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
|
@@ -150,9 +150,7 @@ export function proposalStatusToJSON(object: ProposalStatus): string {
|
|
|
150
150
|
* Since: cosmos-sdk 0.43
|
|
151
151
|
*/
|
|
152
152
|
export interface WeightedVoteOption {
|
|
153
|
-
/** option defines the valid vote options, it must not contain duplicate vote options. */
|
|
154
153
|
option: VoteOption;
|
|
155
|
-
/** weight is the vote weight associated with the vote option. */
|
|
156
154
|
weight: string;
|
|
157
155
|
}
|
|
158
156
|
|
|
@@ -161,9 +159,7 @@ export interface WeightedVoteOption {
|
|
|
161
159
|
* manually updated in case of approval.
|
|
162
160
|
*/
|
|
163
161
|
export interface TextProposal {
|
|
164
|
-
/** title of the proposal. */
|
|
165
162
|
title: string;
|
|
166
|
-
/** description associated with the proposal. */
|
|
167
163
|
description: string;
|
|
168
164
|
}
|
|
169
165
|
|
|
@@ -172,59 +168,34 @@ export interface TextProposal {
|
|
|
172
168
|
* proposal.
|
|
173
169
|
*/
|
|
174
170
|
export interface Deposit {
|
|
175
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
176
171
|
proposalId: number;
|
|
177
|
-
/** depositor defines the deposit addresses from the proposals. */
|
|
178
172
|
depositor: string;
|
|
179
|
-
/** amount to be deposited by depositor. */
|
|
180
173
|
amount: Coin[];
|
|
181
174
|
}
|
|
182
175
|
|
|
183
176
|
/** Proposal defines the core field members of a governance proposal. */
|
|
184
177
|
export interface Proposal {
|
|
185
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
186
178
|
proposalId: number;
|
|
187
|
-
|
|
188
|
-
content:
|
|
189
|
-
| Any
|
|
190
|
-
| undefined;
|
|
191
|
-
/** status defines the proposal status. */
|
|
179
|
+
content: Any | undefined;
|
|
192
180
|
status: ProposalStatus;
|
|
193
181
|
/**
|
|
194
182
|
* final_tally_result is the final tally result of the proposal. When
|
|
195
183
|
* querying a proposal via gRPC, this field is not populated until the
|
|
196
184
|
* proposal's voting period has ended.
|
|
197
185
|
*/
|
|
198
|
-
finalTallyResult:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
/** submit_time is the time of proposal submission. */
|
|
202
|
-
submitTime:
|
|
203
|
-
| Date
|
|
204
|
-
| undefined;
|
|
205
|
-
/** deposit_end_time is the end time for deposition. */
|
|
206
|
-
depositEndTime:
|
|
207
|
-
| Date
|
|
208
|
-
| undefined;
|
|
209
|
-
/** total_deposit is the total deposit on the proposal. */
|
|
186
|
+
finalTallyResult: TallyResult | undefined;
|
|
187
|
+
submitTime: Date | undefined;
|
|
188
|
+
depositEndTime: Date | undefined;
|
|
210
189
|
totalDeposit: Coin[];
|
|
211
|
-
|
|
212
|
-
votingStartTime:
|
|
213
|
-
| Date
|
|
214
|
-
| undefined;
|
|
215
|
-
/** voting_end_time is the end time of voting on a proposal. */
|
|
190
|
+
votingStartTime: Date | undefined;
|
|
216
191
|
votingEndTime: Date | undefined;
|
|
217
192
|
}
|
|
218
193
|
|
|
219
194
|
/** TallyResult defines a standard tally for a governance proposal. */
|
|
220
195
|
export interface TallyResult {
|
|
221
|
-
/** yes is the number of yes votes on a proposal. */
|
|
222
196
|
yes: string;
|
|
223
|
-
/** abstain is the number of abstain votes on a proposal. */
|
|
224
197
|
abstain: string;
|
|
225
|
-
/** no is the number of no votes on a proposal. */
|
|
226
198
|
no: string;
|
|
227
|
-
/** no_with_veto is the number of no with veto votes on a proposal. */
|
|
228
199
|
noWithVeto: string;
|
|
229
200
|
}
|
|
230
201
|
|
|
@@ -233,9 +204,7 @@ export interface TallyResult {
|
|
|
233
204
|
* A Vote consists of a proposal ID, the voter, and the vote option.
|
|
234
205
|
*/
|
|
235
206
|
export interface Vote {
|
|
236
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
237
207
|
proposalId: number;
|
|
238
|
-
/** voter is the voter address of the proposal. */
|
|
239
208
|
voter: string;
|
|
240
209
|
/**
|
|
241
210
|
* Deprecated: Prefer to use `options` instead. This field is set in queries
|
|
@@ -245,11 +214,7 @@ export interface Vote {
|
|
|
245
214
|
* @deprecated
|
|
246
215
|
*/
|
|
247
216
|
option: VoteOption;
|
|
248
|
-
/**
|
|
249
|
-
* options is the weighted vote options.
|
|
250
|
-
*
|
|
251
|
-
* Since: cosmos-sdk 0.43
|
|
252
|
-
*/
|
|
217
|
+
/** Since: cosmos-sdk 0.43 */
|
|
253
218
|
options: WeightedVoteOption[];
|
|
254
219
|
}
|
|
255
220
|
|
|
@@ -259,14 +224,14 @@ export interface DepositParams {
|
|
|
259
224
|
minDeposit: Coin[];
|
|
260
225
|
/**
|
|
261
226
|
* Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
262
|
-
*
|
|
227
|
+
* months.
|
|
263
228
|
*/
|
|
264
229
|
maxDepositPeriod: Duration | undefined;
|
|
265
230
|
}
|
|
266
231
|
|
|
267
232
|
/** VotingParams defines the params for voting on governance proposals. */
|
|
268
233
|
export interface VotingParams {
|
|
269
|
-
/**
|
|
234
|
+
/** Length of the voting period. */
|
|
270
235
|
votingPeriod: Duration | undefined;
|
|
271
236
|
}
|
|
272
237
|
|
|
@@ -274,14 +239,14 @@ export interface VotingParams {
|
|
|
274
239
|
export interface TallyParams {
|
|
275
240
|
/**
|
|
276
241
|
* Minimum percentage of total stake needed to vote for a result to be
|
|
277
|
-
*
|
|
242
|
+
* considered valid.
|
|
278
243
|
*/
|
|
279
244
|
quorum: Uint8Array;
|
|
280
245
|
/** Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. */
|
|
281
246
|
threshold: Uint8Array;
|
|
282
247
|
/**
|
|
283
248
|
* Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
284
|
-
*
|
|
249
|
+
* vetoed. Default value: 1/3.
|
|
285
250
|
*/
|
|
286
251
|
vetoThreshold: Uint8Array;
|
|
287
252
|
}
|
|
@@ -45,7 +45,6 @@ export interface QueryProposalsRequest {
|
|
|
45
45
|
* method.
|
|
46
46
|
*/
|
|
47
47
|
export interface QueryProposalsResponse {
|
|
48
|
-
/** proposals defines all the requested governance proposals. */
|
|
49
48
|
proposals: Proposal[];
|
|
50
49
|
/** pagination defines the pagination in the response. */
|
|
51
50
|
pagination: PageResponse | undefined;
|
|
@@ -61,7 +60,7 @@ export interface QueryVoteRequest {
|
|
|
61
60
|
|
|
62
61
|
/** QueryVoteResponse is the response type for the Query/Vote RPC method. */
|
|
63
62
|
export interface QueryVoteResponse {
|
|
64
|
-
/** vote
|
|
63
|
+
/** vote defined the queried vote. */
|
|
65
64
|
vote: Vote | undefined;
|
|
66
65
|
}
|
|
67
66
|
|
|
@@ -75,7 +74,7 @@ export interface QueryVotesRequest {
|
|
|
75
74
|
|
|
76
75
|
/** QueryVotesResponse is the response type for the Query/Votes RPC method. */
|
|
77
76
|
export interface QueryVotesResponse {
|
|
78
|
-
/** votes
|
|
77
|
+
/** votes defined the queried votes. */
|
|
79
78
|
votes: Vote[];
|
|
80
79
|
/** pagination defines the pagination in the response. */
|
|
81
80
|
pagination: PageResponse | undefined;
|
|
@@ -128,7 +127,6 @@ export interface QueryDepositsRequest {
|
|
|
128
127
|
|
|
129
128
|
/** QueryDepositsResponse is the response type for the Query/Deposits RPC method. */
|
|
130
129
|
export interface QueryDepositsResponse {
|
|
131
|
-
/** deposits defines the requested deposits. */
|
|
132
130
|
deposits: Deposit[];
|
|
133
131
|
/** pagination defines the pagination in the response. */
|
|
134
132
|
pagination: PageResponse | undefined;
|
|
@@ -12,29 +12,20 @@ export const protobufPackage = "cosmos.gov.v1beta1";
|
|
|
12
12
|
* proposal Content.
|
|
13
13
|
*/
|
|
14
14
|
export interface MsgSubmitProposal {
|
|
15
|
-
|
|
16
|
-
content:
|
|
17
|
-
| Any
|
|
18
|
-
| undefined;
|
|
19
|
-
/** initial_deposit is the deposit value that must be paid at proposal submission. */
|
|
15
|
+
content: Any | undefined;
|
|
20
16
|
initialDeposit: Coin[];
|
|
21
|
-
/** proposer is the account address of the proposer. */
|
|
22
17
|
proposer: string;
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
/** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */
|
|
26
21
|
export interface MsgSubmitProposalResponse {
|
|
27
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
28
22
|
proposalId: number;
|
|
29
23
|
}
|
|
30
24
|
|
|
31
25
|
/** MsgVote defines a message to cast a vote. */
|
|
32
26
|
export interface MsgVote {
|
|
33
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
34
27
|
proposalId: number;
|
|
35
|
-
/** voter is the voter address for the proposal. */
|
|
36
28
|
voter: string;
|
|
37
|
-
/** option defines the vote option. */
|
|
38
29
|
option: VoteOption;
|
|
39
30
|
}
|
|
40
31
|
|
|
@@ -48,11 +39,8 @@ export interface MsgVoteResponse {
|
|
|
48
39
|
* Since: cosmos-sdk 0.43
|
|
49
40
|
*/
|
|
50
41
|
export interface MsgVoteWeighted {
|
|
51
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
52
42
|
proposalId: number;
|
|
53
|
-
/** voter is the voter address for the proposal. */
|
|
54
43
|
voter: string;
|
|
55
|
-
/** options defines the weighted vote options. */
|
|
56
44
|
options: WeightedVoteOption[];
|
|
57
45
|
}
|
|
58
46
|
|
|
@@ -66,11 +54,8 @@ export interface MsgVoteWeightedResponse {
|
|
|
66
54
|
|
|
67
55
|
/** MsgDeposit defines a message to submit a deposit to an existing proposal. */
|
|
68
56
|
export interface MsgDeposit {
|
|
69
|
-
/** proposal_id defines the unique id of the proposal. */
|
|
70
57
|
proposalId: number;
|
|
71
|
-
/** depositor defines the deposit addresses from the proposals. */
|
|
72
58
|
depositor: string;
|
|
73
|
-
/** amount to be deposited by depositor. */
|
|
74
59
|
amount: Coin[];
|
|
75
60
|
}
|
|
76
61
|
|
|
@@ -4,19 +4,19 @@ import { Registry } from "@cosmjs/proto-signing";
|
|
|
4
4
|
import { msgTypes } from './registry';
|
|
5
5
|
import { Api } from "./rest";
|
|
6
6
|
import { MsgCreateGroupWithPolicy } from "./types/cosmos/group/v1/tx";
|
|
7
|
+
import { MsgCreateGroup } from "./types/cosmos/group/v1/tx";
|
|
8
|
+
import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx";
|
|
7
9
|
import { MsgUpdateGroupPolicyMetadata } from "./types/cosmos/group/v1/tx";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { MsgCreateGroupPolicy } from "./types/cosmos/group/v1/tx";
|
|
10
|
+
import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx";
|
|
11
|
+
import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx";
|
|
11
12
|
import { MsgVote } from "./types/cosmos/group/v1/tx";
|
|
12
13
|
import { MsgSubmitProposal } from "./types/cosmos/group/v1/tx";
|
|
13
|
-
import {
|
|
14
|
-
import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx";
|
|
15
|
-
import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx";
|
|
16
|
-
import { MsgCreateGroup } from "./types/cosmos/group/v1/tx";
|
|
14
|
+
import { MsgCreateGroupPolicy } from "./types/cosmos/group/v1/tx";
|
|
17
15
|
import { MsgUpdateGroupMembers } from "./types/cosmos/group/v1/tx";
|
|
16
|
+
import { MsgUpdateGroupMetadata } from "./types/cosmos/group/v1/tx";
|
|
17
|
+
import { MsgLeaveGroup } from "./types/cosmos/group/v1/tx";
|
|
18
18
|
import { MsgUpdateGroupPolicyAdmin } from "./types/cosmos/group/v1/tx";
|
|
19
|
-
import {
|
|
19
|
+
import { MsgExec } from "./types/cosmos/group/v1/tx";
|
|
20
20
|
import { EventCreateGroup as typeEventCreateGroup } from "./types";
|
|
21
21
|
import { EventUpdateGroup as typeEventUpdateGroup } from "./types";
|
|
22
22
|
import { EventCreateGroupPolicy as typeEventCreateGroupPolicy } from "./types";
|
|
@@ -38,7 +38,7 @@ import { GroupPolicyInfo as typeGroupPolicyInfo } from "./types";
|
|
|
38
38
|
import { Proposal as typeProposal } from "./types";
|
|
39
39
|
import { TallyResult as typeTallyResult } from "./types";
|
|
40
40
|
import { Vote as typeVote } from "./types";
|
|
41
|
-
export { MsgCreateGroupWithPolicy,
|
|
41
|
+
export { MsgCreateGroupWithPolicy, MsgCreateGroup, MsgUpdateGroupAdmin, MsgUpdateGroupPolicyMetadata, MsgUpdateGroupPolicyDecisionPolicy, MsgWithdrawProposal, MsgVote, MsgSubmitProposal, MsgCreateGroupPolicy, MsgUpdateGroupMembers, MsgUpdateGroupMetadata, MsgLeaveGroup, MsgUpdateGroupPolicyAdmin, MsgExec };
|
|
42
42
|
export const registry = new Registry(msgTypes);
|
|
43
43
|
function getStructure(template) {
|
|
44
44
|
const structure = { fields: [] };
|
|
@@ -68,158 +68,158 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
68
68
|
throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Could not broadcast Tx: ' + e.message);
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
async
|
|
71
|
+
async sendMsgCreateGroup({ value, fee, memo }) {
|
|
72
72
|
if (!signer) {
|
|
73
|
-
throw new Error('TxClient:
|
|
73
|
+
throw new Error('TxClient:sendMsgCreateGroup: Unable to sign Tx. Signer is not present.');
|
|
74
74
|
}
|
|
75
75
|
try {
|
|
76
76
|
const { address } = (await signer.getAccounts())[0];
|
|
77
77
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
78
|
-
let msg = this.
|
|
78
|
+
let msg = this.msgCreateGroup({ value: MsgCreateGroup.fromPartial(value) });
|
|
79
79
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
80
80
|
}
|
|
81
81
|
catch (e) {
|
|
82
|
-
throw new Error('TxClient:
|
|
82
|
+
throw new Error('TxClient:sendMsgCreateGroup: Could not broadcast Tx: ' + e.message);
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
async
|
|
85
|
+
async sendMsgUpdateGroupAdmin({ value, fee, memo }) {
|
|
86
86
|
if (!signer) {
|
|
87
|
-
throw new Error('TxClient:
|
|
87
|
+
throw new Error('TxClient:sendMsgUpdateGroupAdmin: Unable to sign Tx. Signer is not present.');
|
|
88
88
|
}
|
|
89
89
|
try {
|
|
90
90
|
const { address } = (await signer.getAccounts())[0];
|
|
91
91
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
92
|
-
let msg = this.
|
|
92
|
+
let msg = this.msgUpdateGroupAdmin({ value: MsgUpdateGroupAdmin.fromPartial(value) });
|
|
93
93
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
94
94
|
}
|
|
95
95
|
catch (e) {
|
|
96
|
-
throw new Error('TxClient:
|
|
96
|
+
throw new Error('TxClient:sendMsgUpdateGroupAdmin: Could not broadcast Tx: ' + e.message);
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
async
|
|
99
|
+
async sendMsgUpdateGroupPolicyMetadata({ value, fee, memo }) {
|
|
100
100
|
if (!signer) {
|
|
101
|
-
throw new Error('TxClient:
|
|
101
|
+
throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Unable to sign Tx. Signer is not present.');
|
|
102
102
|
}
|
|
103
103
|
try {
|
|
104
104
|
const { address } = (await signer.getAccounts())[0];
|
|
105
105
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
106
|
-
let msg = this.
|
|
106
|
+
let msg = this.msgUpdateGroupPolicyMetadata({ value: MsgUpdateGroupPolicyMetadata.fromPartial(value) });
|
|
107
107
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
108
108
|
}
|
|
109
109
|
catch (e) {
|
|
110
|
-
throw new Error('TxClient:
|
|
110
|
+
throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Could not broadcast Tx: ' + e.message);
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
async
|
|
113
|
+
async sendMsgUpdateGroupPolicyDecisionPolicy({ value, fee, memo }) {
|
|
114
114
|
if (!signer) {
|
|
115
|
-
throw new Error('TxClient:
|
|
115
|
+
throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Unable to sign Tx. Signer is not present.');
|
|
116
116
|
}
|
|
117
117
|
try {
|
|
118
118
|
const { address } = (await signer.getAccounts())[0];
|
|
119
119
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
120
|
-
let msg = this.
|
|
120
|
+
let msg = this.msgUpdateGroupPolicyDecisionPolicy({ value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) });
|
|
121
121
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
122
122
|
}
|
|
123
123
|
catch (e) {
|
|
124
|
-
throw new Error('TxClient:
|
|
124
|
+
throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Could not broadcast Tx: ' + e.message);
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
async
|
|
127
|
+
async sendMsgWithdrawProposal({ value, fee, memo }) {
|
|
128
128
|
if (!signer) {
|
|
129
|
-
throw new Error('TxClient:
|
|
129
|
+
throw new Error('TxClient:sendMsgWithdrawProposal: Unable to sign Tx. Signer is not present.');
|
|
130
130
|
}
|
|
131
131
|
try {
|
|
132
132
|
const { address } = (await signer.getAccounts())[0];
|
|
133
133
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
134
|
-
let msg = this.
|
|
134
|
+
let msg = this.msgWithdrawProposal({ value: MsgWithdrawProposal.fromPartial(value) });
|
|
135
135
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
136
136
|
}
|
|
137
137
|
catch (e) {
|
|
138
|
-
throw new Error('TxClient:
|
|
138
|
+
throw new Error('TxClient:sendMsgWithdrawProposal: Could not broadcast Tx: ' + e.message);
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
|
-
async
|
|
141
|
+
async sendMsgVote({ value, fee, memo }) {
|
|
142
142
|
if (!signer) {
|
|
143
|
-
throw new Error('TxClient:
|
|
143
|
+
throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.');
|
|
144
144
|
}
|
|
145
145
|
try {
|
|
146
146
|
const { address } = (await signer.getAccounts())[0];
|
|
147
147
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
148
|
-
let msg = this.
|
|
148
|
+
let msg = this.msgVote({ value: MsgVote.fromPartial(value) });
|
|
149
149
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
150
150
|
}
|
|
151
151
|
catch (e) {
|
|
152
|
-
throw new Error('TxClient:
|
|
152
|
+
throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: ' + e.message);
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
|
-
async
|
|
155
|
+
async sendMsgSubmitProposal({ value, fee, memo }) {
|
|
156
156
|
if (!signer) {
|
|
157
|
-
throw new Error('TxClient:
|
|
157
|
+
throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.');
|
|
158
158
|
}
|
|
159
159
|
try {
|
|
160
160
|
const { address } = (await signer.getAccounts())[0];
|
|
161
161
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
162
|
-
let msg = this.
|
|
162
|
+
let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) });
|
|
163
163
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
164
164
|
}
|
|
165
165
|
catch (e) {
|
|
166
|
-
throw new Error('TxClient:
|
|
166
|
+
throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: ' + e.message);
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
|
-
async
|
|
169
|
+
async sendMsgCreateGroupPolicy({ value, fee, memo }) {
|
|
170
170
|
if (!signer) {
|
|
171
|
-
throw new Error('TxClient:
|
|
171
|
+
throw new Error('TxClient:sendMsgCreateGroupPolicy: Unable to sign Tx. Signer is not present.');
|
|
172
172
|
}
|
|
173
173
|
try {
|
|
174
174
|
const { address } = (await signer.getAccounts())[0];
|
|
175
175
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
176
|
-
let msg = this.
|
|
176
|
+
let msg = this.msgCreateGroupPolicy({ value: MsgCreateGroupPolicy.fromPartial(value) });
|
|
177
177
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
178
178
|
}
|
|
179
179
|
catch (e) {
|
|
180
|
-
throw new Error('TxClient:
|
|
180
|
+
throw new Error('TxClient:sendMsgCreateGroupPolicy: Could not broadcast Tx: ' + e.message);
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
|
-
async
|
|
183
|
+
async sendMsgUpdateGroupMembers({ value, fee, memo }) {
|
|
184
184
|
if (!signer) {
|
|
185
|
-
throw new Error('TxClient:
|
|
185
|
+
throw new Error('TxClient:sendMsgUpdateGroupMembers: Unable to sign Tx. Signer is not present.');
|
|
186
186
|
}
|
|
187
187
|
try {
|
|
188
188
|
const { address } = (await signer.getAccounts())[0];
|
|
189
189
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
190
|
-
let msg = this.
|
|
190
|
+
let msg = this.msgUpdateGroupMembers({ value: MsgUpdateGroupMembers.fromPartial(value) });
|
|
191
191
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
192
192
|
}
|
|
193
193
|
catch (e) {
|
|
194
|
-
throw new Error('TxClient:
|
|
194
|
+
throw new Error('TxClient:sendMsgUpdateGroupMembers: Could not broadcast Tx: ' + e.message);
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
|
-
async
|
|
197
|
+
async sendMsgUpdateGroupMetadata({ value, fee, memo }) {
|
|
198
198
|
if (!signer) {
|
|
199
|
-
throw new Error('TxClient:
|
|
199
|
+
throw new Error('TxClient:sendMsgUpdateGroupMetadata: Unable to sign Tx. Signer is not present.');
|
|
200
200
|
}
|
|
201
201
|
try {
|
|
202
202
|
const { address } = (await signer.getAccounts())[0];
|
|
203
203
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
204
|
-
let msg = this.
|
|
204
|
+
let msg = this.msgUpdateGroupMetadata({ value: MsgUpdateGroupMetadata.fromPartial(value) });
|
|
205
205
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
206
206
|
}
|
|
207
207
|
catch (e) {
|
|
208
|
-
throw new Error('TxClient:
|
|
208
|
+
throw new Error('TxClient:sendMsgUpdateGroupMetadata: Could not broadcast Tx: ' + e.message);
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
|
-
async
|
|
211
|
+
async sendMsgLeaveGroup({ value, fee, memo }) {
|
|
212
212
|
if (!signer) {
|
|
213
|
-
throw new Error('TxClient:
|
|
213
|
+
throw new Error('TxClient:sendMsgLeaveGroup: Unable to sign Tx. Signer is not present.');
|
|
214
214
|
}
|
|
215
215
|
try {
|
|
216
216
|
const { address } = (await signer.getAccounts())[0];
|
|
217
217
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
218
|
-
let msg = this.
|
|
218
|
+
let msg = this.msgLeaveGroup({ value: MsgLeaveGroup.fromPartial(value) });
|
|
219
219
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
220
220
|
}
|
|
221
221
|
catch (e) {
|
|
222
|
-
throw new Error('TxClient:
|
|
222
|
+
throw new Error('TxClient:sendMsgLeaveGroup: Could not broadcast Tx: ' + e.message);
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
225
|
async sendMsgUpdateGroupPolicyAdmin({ value, fee, memo }) {
|
|
@@ -236,18 +236,18 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
236
236
|
throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Could not broadcast Tx: ' + e.message);
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
-
async
|
|
239
|
+
async sendMsgExec({ value, fee, memo }) {
|
|
240
240
|
if (!signer) {
|
|
241
|
-
throw new Error('TxClient:
|
|
241
|
+
throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.');
|
|
242
242
|
}
|
|
243
243
|
try {
|
|
244
244
|
const { address } = (await signer.getAccounts())[0];
|
|
245
245
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
246
|
-
let msg = this.
|
|
246
|
+
let msg = this.msgExec({ value: MsgExec.fromPartial(value) });
|
|
247
247
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
248
248
|
}
|
|
249
249
|
catch (e) {
|
|
250
|
-
throw new Error('TxClient:
|
|
250
|
+
throw new Error('TxClient:sendMsgExec: Could not broadcast Tx: ' + e.message);
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
msgCreateGroupWithPolicy({ value }) {
|
|
@@ -258,36 +258,44 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
258
258
|
throw new Error('TxClient:MsgCreateGroupWithPolicy: Could not create message: ' + e.message);
|
|
259
259
|
}
|
|
260
260
|
},
|
|
261
|
-
|
|
261
|
+
msgCreateGroup({ value }) {
|
|
262
262
|
try {
|
|
263
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
263
|
+
return { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.fromPartial(value) };
|
|
264
264
|
}
|
|
265
265
|
catch (e) {
|
|
266
|
-
throw new Error('TxClient:
|
|
266
|
+
throw new Error('TxClient:MsgCreateGroup: Could not create message: ' + e.message);
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
|
-
|
|
269
|
+
msgUpdateGroupAdmin({ value }) {
|
|
270
270
|
try {
|
|
271
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
271
|
+
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupAdmin", value: MsgUpdateGroupAdmin.fromPartial(value) };
|
|
272
272
|
}
|
|
273
273
|
catch (e) {
|
|
274
|
-
throw new Error('TxClient:
|
|
274
|
+
throw new Error('TxClient:MsgUpdateGroupAdmin: Could not create message: ' + e.message);
|
|
275
275
|
}
|
|
276
276
|
},
|
|
277
|
-
|
|
277
|
+
msgUpdateGroupPolicyMetadata({ value }) {
|
|
278
278
|
try {
|
|
279
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
279
|
+
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.fromPartial(value) };
|
|
280
280
|
}
|
|
281
281
|
catch (e) {
|
|
282
|
-
throw new Error('TxClient:
|
|
282
|
+
throw new Error('TxClient:MsgUpdateGroupPolicyMetadata: Could not create message: ' + e.message);
|
|
283
283
|
}
|
|
284
284
|
},
|
|
285
|
-
|
|
285
|
+
msgUpdateGroupPolicyDecisionPolicy({ value }) {
|
|
286
286
|
try {
|
|
287
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
287
|
+
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) };
|
|
288
288
|
}
|
|
289
289
|
catch (e) {
|
|
290
|
-
throw new Error('TxClient:
|
|
290
|
+
throw new Error('TxClient:MsgUpdateGroupPolicyDecisionPolicy: Could not create message: ' + e.message);
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
msgWithdrawProposal({ value }) {
|
|
294
|
+
try {
|
|
295
|
+
return { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.fromPartial(value) };
|
|
296
|
+
}
|
|
297
|
+
catch (e) {
|
|
298
|
+
throw new Error('TxClient:MsgWithdrawProposal: Could not create message: ' + e.message);
|
|
291
299
|
}
|
|
292
300
|
},
|
|
293
301
|
msgVote({ value }) {
|
|
@@ -306,44 +314,36 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
306
314
|
throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message);
|
|
307
315
|
}
|
|
308
316
|
},
|
|
309
|
-
|
|
310
|
-
try {
|
|
311
|
-
return { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.fromPartial(value) };
|
|
312
|
-
}
|
|
313
|
-
catch (e) {
|
|
314
|
-
throw new Error('TxClient:MsgExec: Could not create message: ' + e.message);
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
msgUpdateGroupAdmin({ value }) {
|
|
317
|
+
msgCreateGroupPolicy({ value }) {
|
|
318
318
|
try {
|
|
319
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
319
|
+
return { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.fromPartial(value) };
|
|
320
320
|
}
|
|
321
321
|
catch (e) {
|
|
322
|
-
throw new Error('TxClient:
|
|
322
|
+
throw new Error('TxClient:MsgCreateGroupPolicy: Could not create message: ' + e.message);
|
|
323
323
|
}
|
|
324
324
|
},
|
|
325
|
-
|
|
325
|
+
msgUpdateGroupMembers({ value }) {
|
|
326
326
|
try {
|
|
327
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
327
|
+
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.fromPartial(value) };
|
|
328
328
|
}
|
|
329
329
|
catch (e) {
|
|
330
|
-
throw new Error('TxClient:
|
|
330
|
+
throw new Error('TxClient:MsgUpdateGroupMembers: Could not create message: ' + e.message);
|
|
331
331
|
}
|
|
332
332
|
},
|
|
333
|
-
|
|
333
|
+
msgUpdateGroupMetadata({ value }) {
|
|
334
334
|
try {
|
|
335
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
335
|
+
return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.fromPartial(value) };
|
|
336
336
|
}
|
|
337
337
|
catch (e) {
|
|
338
|
-
throw new Error('TxClient:
|
|
338
|
+
throw new Error('TxClient:MsgUpdateGroupMetadata: Could not create message: ' + e.message);
|
|
339
339
|
}
|
|
340
340
|
},
|
|
341
|
-
|
|
341
|
+
msgLeaveGroup({ value }) {
|
|
342
342
|
try {
|
|
343
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
343
|
+
return { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.fromPartial(value) };
|
|
344
344
|
}
|
|
345
345
|
catch (e) {
|
|
346
|
-
throw new Error('TxClient:
|
|
346
|
+
throw new Error('TxClient:MsgLeaveGroup: Could not create message: ' + e.message);
|
|
347
347
|
}
|
|
348
348
|
},
|
|
349
349
|
msgUpdateGroupPolicyAdmin({ value }) {
|
|
@@ -354,12 +354,12 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
354
354
|
throw new Error('TxClient:MsgUpdateGroupPolicyAdmin: Could not create message: ' + e.message);
|
|
355
355
|
}
|
|
356
356
|
},
|
|
357
|
-
|
|
357
|
+
msgExec({ value }) {
|
|
358
358
|
try {
|
|
359
|
-
return { typeUrl: "/cosmos.group.v1.
|
|
359
|
+
return { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.fromPartial(value) };
|
|
360
360
|
}
|
|
361
361
|
catch (e) {
|
|
362
|
-
throw new Error('TxClient:
|
|
362
|
+
throw new Error('TxClient:MsgExec: Could not create message: ' + e.message);
|
|
363
363
|
}
|
|
364
364
|
},
|
|
365
365
|
};
|