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
|
@@ -8,10 +8,9 @@ import { IgniteClient } from "../client"
|
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
10
|
import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx";
|
|
11
|
-
import { MsgUpdateParams } from "./types/cosmos/crisis/v1beta1/tx";
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
export { MsgVerifyInvariant
|
|
13
|
+
export { MsgVerifyInvariant };
|
|
15
14
|
|
|
16
15
|
type sendMsgVerifyInvariantParams = {
|
|
17
16
|
value: MsgVerifyInvariant,
|
|
@@ -19,21 +18,11 @@ type sendMsgVerifyInvariantParams = {
|
|
|
19
18
|
memo?: string
|
|
20
19
|
};
|
|
21
20
|
|
|
22
|
-
type sendMsgUpdateParamsParams = {
|
|
23
|
-
value: MsgUpdateParams,
|
|
24
|
-
fee?: StdFee,
|
|
25
|
-
memo?: string
|
|
26
|
-
};
|
|
27
|
-
|
|
28
21
|
|
|
29
22
|
type msgVerifyInvariantParams = {
|
|
30
23
|
value: MsgVerifyInvariant,
|
|
31
24
|
};
|
|
32
25
|
|
|
33
|
-
type msgUpdateParamsParams = {
|
|
34
|
-
value: MsgUpdateParams,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
26
|
|
|
38
27
|
export const registry = new Registry(msgTypes);
|
|
39
28
|
|
|
@@ -78,20 +67,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
78
67
|
}
|
|
79
68
|
},
|
|
80
69
|
|
|
81
|
-
async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise<DeliverTxResponse> {
|
|
82
|
-
if (!signer) {
|
|
83
|
-
throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.')
|
|
84
|
-
}
|
|
85
|
-
try {
|
|
86
|
-
const { address } = (await signer.getAccounts())[0];
|
|
87
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
88
|
-
let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) })
|
|
89
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
90
|
-
} catch (e: any) {
|
|
91
|
-
throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message)
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
|
|
95
70
|
|
|
96
71
|
msgVerifyInvariant({ value }: msgVerifyInvariantParams): EncodeObject {
|
|
97
72
|
try {
|
|
@@ -101,14 +76,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
101
76
|
}
|
|
102
77
|
},
|
|
103
78
|
|
|
104
|
-
msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject {
|
|
105
|
-
try {
|
|
106
|
-
return { typeUrl: "/cosmos.crisis.v1beta1.MsgUpdateParams", value: MsgUpdateParams.fromPartial( value ) }
|
|
107
|
-
} catch (e: any) {
|
|
108
|
-
throw new Error('TxClient:MsgUpdateParams: Could not create message: ' + e.message)
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
|
|
112
79
|
}
|
|
113
80
|
};
|
|
114
81
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx";
|
|
2
|
-
import { MsgUpdateParams } from "./types/cosmos/crisis/v1beta1/tx";
|
|
3
2
|
const msgTypes = [
|
|
4
3
|
["/cosmos.crisis.v1beta1.MsgVerifyInvariant", MsgVerifyInvariant],
|
|
5
|
-
["/cosmos.crisis.v1beta1.MsgUpdateParams", MsgUpdateParams],
|
|
6
4
|
];
|
|
7
5
|
export { msgTypes };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
2
|
import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx";
|
|
3
|
-
import { MsgUpdateParams } from "./types/cosmos/crisis/v1beta1/tx";
|
|
4
3
|
|
|
5
4
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
6
5
|
["/cosmos.crisis.v1beta1.MsgVerifyInvariant", MsgVerifyInvariant],
|
|
7
|
-
["/cosmos.crisis.v1beta1.MsgUpdateParams", MsgUpdateParams],
|
|
8
6
|
|
|
9
7
|
];
|
|
10
8
|
|
|
@@ -20,25 +20,6 @@ export interface RpcStatus {
|
|
|
20
20
|
details?: ProtobufAny[];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* Coin defines a token with a denomination and an amount.
|
|
25
|
-
|
|
26
|
-
NOTE: The amount field is an Int which implements the custom method
|
|
27
|
-
signatures required by gogoproto.
|
|
28
|
-
*/
|
|
29
|
-
export interface V1Beta1Coin {
|
|
30
|
-
denom?: string;
|
|
31
|
-
amount?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* MsgUpdateParamsResponse defines the response structure for executing a
|
|
36
|
-
MsgUpdateParams message.
|
|
37
|
-
|
|
38
|
-
Since: cosmos-sdk 0.47
|
|
39
|
-
*/
|
|
40
|
-
export type V1Beta1MsgUpdateParamsResponse = object;
|
|
41
|
-
|
|
42
23
|
/**
|
|
43
24
|
* MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type.
|
|
44
25
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Coin } from "../../base/v1beta1/coin";
|
|
4
3
|
export const protobufPackage = "cosmos.crisis.v1beta1";
|
|
5
4
|
function createBaseMsgVerifyInvariant() {
|
|
6
5
|
return { sender: "", invariantModuleName: "", invariantRoute: "" };
|
|
@@ -96,110 +95,16 @@ export const MsgVerifyInvariantResponse = {
|
|
|
96
95
|
return message;
|
|
97
96
|
},
|
|
98
97
|
};
|
|
99
|
-
function createBaseMsgUpdateParams() {
|
|
100
|
-
return { authority: "", constantFee: undefined };
|
|
101
|
-
}
|
|
102
|
-
export const MsgUpdateParams = {
|
|
103
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
104
|
-
if (message.authority !== "") {
|
|
105
|
-
writer.uint32(10).string(message.authority);
|
|
106
|
-
}
|
|
107
|
-
if (message.constantFee !== undefined) {
|
|
108
|
-
Coin.encode(message.constantFee, writer.uint32(18).fork()).ldelim();
|
|
109
|
-
}
|
|
110
|
-
return writer;
|
|
111
|
-
},
|
|
112
|
-
decode(input, length) {
|
|
113
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
114
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
115
|
-
const message = createBaseMsgUpdateParams();
|
|
116
|
-
while (reader.pos < end) {
|
|
117
|
-
const tag = reader.uint32();
|
|
118
|
-
switch (tag >>> 3) {
|
|
119
|
-
case 1:
|
|
120
|
-
message.authority = reader.string();
|
|
121
|
-
break;
|
|
122
|
-
case 2:
|
|
123
|
-
message.constantFee = Coin.decode(reader, reader.uint32());
|
|
124
|
-
break;
|
|
125
|
-
default:
|
|
126
|
-
reader.skipType(tag & 7);
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return message;
|
|
131
|
-
},
|
|
132
|
-
fromJSON(object) {
|
|
133
|
-
return {
|
|
134
|
-
authority: isSet(object.authority) ? String(object.authority) : "",
|
|
135
|
-
constantFee: isSet(object.constantFee) ? Coin.fromJSON(object.constantFee) : undefined,
|
|
136
|
-
};
|
|
137
|
-
},
|
|
138
|
-
toJSON(message) {
|
|
139
|
-
const obj = {};
|
|
140
|
-
message.authority !== undefined && (obj.authority = message.authority);
|
|
141
|
-
message.constantFee !== undefined
|
|
142
|
-
&& (obj.constantFee = message.constantFee ? Coin.toJSON(message.constantFee) : undefined);
|
|
143
|
-
return obj;
|
|
144
|
-
},
|
|
145
|
-
fromPartial(object) {
|
|
146
|
-
const message = createBaseMsgUpdateParams();
|
|
147
|
-
message.authority = object.authority ?? "";
|
|
148
|
-
message.constantFee = (object.constantFee !== undefined && object.constantFee !== null)
|
|
149
|
-
? Coin.fromPartial(object.constantFee)
|
|
150
|
-
: undefined;
|
|
151
|
-
return message;
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
function createBaseMsgUpdateParamsResponse() {
|
|
155
|
-
return {};
|
|
156
|
-
}
|
|
157
|
-
export const MsgUpdateParamsResponse = {
|
|
158
|
-
encode(_, writer = _m0.Writer.create()) {
|
|
159
|
-
return writer;
|
|
160
|
-
},
|
|
161
|
-
decode(input, length) {
|
|
162
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
163
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
164
|
-
const message = createBaseMsgUpdateParamsResponse();
|
|
165
|
-
while (reader.pos < end) {
|
|
166
|
-
const tag = reader.uint32();
|
|
167
|
-
switch (tag >>> 3) {
|
|
168
|
-
default:
|
|
169
|
-
reader.skipType(tag & 7);
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return message;
|
|
174
|
-
},
|
|
175
|
-
fromJSON(_) {
|
|
176
|
-
return {};
|
|
177
|
-
},
|
|
178
|
-
toJSON(_) {
|
|
179
|
-
const obj = {};
|
|
180
|
-
return obj;
|
|
181
|
-
},
|
|
182
|
-
fromPartial(_) {
|
|
183
|
-
const message = createBaseMsgUpdateParamsResponse();
|
|
184
|
-
return message;
|
|
185
|
-
},
|
|
186
|
-
};
|
|
187
98
|
export class MsgClientImpl {
|
|
188
99
|
constructor(rpc) {
|
|
189
100
|
this.rpc = rpc;
|
|
190
101
|
this.VerifyInvariant = this.VerifyInvariant.bind(this);
|
|
191
|
-
this.UpdateParams = this.UpdateParams.bind(this);
|
|
192
102
|
}
|
|
193
103
|
VerifyInvariant(request) {
|
|
194
104
|
const data = MsgVerifyInvariant.encode(request).finish();
|
|
195
105
|
const promise = this.rpc.request("cosmos.crisis.v1beta1.Msg", "VerifyInvariant", data);
|
|
196
106
|
return promise.then((data) => MsgVerifyInvariantResponse.decode(new _m0.Reader(data)));
|
|
197
107
|
}
|
|
198
|
-
UpdateParams(request) {
|
|
199
|
-
const data = MsgUpdateParams.encode(request).finish();
|
|
200
|
-
const promise = this.rpc.request("cosmos.crisis.v1beta1.Msg", "UpdateParams", data);
|
|
201
|
-
return promise.then((data) => MsgUpdateParamsResponse.decode(new _m0.Reader(data)));
|
|
202
|
-
}
|
|
203
108
|
}
|
|
204
109
|
function isSet(value) {
|
|
205
110
|
return value !== null && value !== undefined;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Coin } from "../../base/v1beta1/coin";
|
|
4
3
|
|
|
5
4
|
export const protobufPackage = "cosmos.crisis.v1beta1";
|
|
6
5
|
|
|
7
6
|
/** MsgVerifyInvariant represents a message to verify a particular invariance. */
|
|
8
7
|
export interface MsgVerifyInvariant {
|
|
9
|
-
/** sender is the account address of private key to send coins to fee collector account. */
|
|
10
8
|
sender: string;
|
|
11
|
-
/** name of the invariant module. */
|
|
12
9
|
invariantModuleName: string;
|
|
13
|
-
/** invariant_route is the msg's invariant route. */
|
|
14
10
|
invariantRoute: string;
|
|
15
11
|
}
|
|
16
12
|
|
|
@@ -18,27 +14,6 @@ export interface MsgVerifyInvariant {
|
|
|
18
14
|
export interface MsgVerifyInvariantResponse {
|
|
19
15
|
}
|
|
20
16
|
|
|
21
|
-
/**
|
|
22
|
-
* MsgUpdateParams is the Msg/UpdateParams request type.
|
|
23
|
-
*
|
|
24
|
-
* Since: cosmos-sdk 0.47
|
|
25
|
-
*/
|
|
26
|
-
export interface MsgUpdateParams {
|
|
27
|
-
/** authority is the address that controls the module (defaults to x/gov unless overwritten). */
|
|
28
|
-
authority: string;
|
|
29
|
-
/** constant_fee defines the x/crisis parameter. */
|
|
30
|
-
constantFee: Coin | undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* MsgUpdateParamsResponse defines the response structure for executing a
|
|
35
|
-
* MsgUpdateParams message.
|
|
36
|
-
*
|
|
37
|
-
* Since: cosmos-sdk 0.47
|
|
38
|
-
*/
|
|
39
|
-
export interface MsgUpdateParamsResponse {
|
|
40
|
-
}
|
|
41
|
-
|
|
42
17
|
function createBaseMsgVerifyInvariant(): MsgVerifyInvariant {
|
|
43
18
|
return { sender: "", invariantModuleName: "", invariantRoute: "" };
|
|
44
19
|
}
|
|
@@ -145,117 +120,10 @@ export const MsgVerifyInvariantResponse = {
|
|
|
145
120
|
},
|
|
146
121
|
};
|
|
147
122
|
|
|
148
|
-
function createBaseMsgUpdateParams(): MsgUpdateParams {
|
|
149
|
-
return { authority: "", constantFee: undefined };
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export const MsgUpdateParams = {
|
|
153
|
-
encode(message: MsgUpdateParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
154
|
-
if (message.authority !== "") {
|
|
155
|
-
writer.uint32(10).string(message.authority);
|
|
156
|
-
}
|
|
157
|
-
if (message.constantFee !== undefined) {
|
|
158
|
-
Coin.encode(message.constantFee, writer.uint32(18).fork()).ldelim();
|
|
159
|
-
}
|
|
160
|
-
return writer;
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParams {
|
|
164
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
165
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
166
|
-
const message = createBaseMsgUpdateParams();
|
|
167
|
-
while (reader.pos < end) {
|
|
168
|
-
const tag = reader.uint32();
|
|
169
|
-
switch (tag >>> 3) {
|
|
170
|
-
case 1:
|
|
171
|
-
message.authority = reader.string();
|
|
172
|
-
break;
|
|
173
|
-
case 2:
|
|
174
|
-
message.constantFee = Coin.decode(reader, reader.uint32());
|
|
175
|
-
break;
|
|
176
|
-
default:
|
|
177
|
-
reader.skipType(tag & 7);
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return message;
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
fromJSON(object: any): MsgUpdateParams {
|
|
185
|
-
return {
|
|
186
|
-
authority: isSet(object.authority) ? String(object.authority) : "",
|
|
187
|
-
constantFee: isSet(object.constantFee) ? Coin.fromJSON(object.constantFee) : undefined,
|
|
188
|
-
};
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
toJSON(message: MsgUpdateParams): unknown {
|
|
192
|
-
const obj: any = {};
|
|
193
|
-
message.authority !== undefined && (obj.authority = message.authority);
|
|
194
|
-
message.constantFee !== undefined
|
|
195
|
-
&& (obj.constantFee = message.constantFee ? Coin.toJSON(message.constantFee) : undefined);
|
|
196
|
-
return obj;
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
fromPartial<I extends Exact<DeepPartial<MsgUpdateParams>, I>>(object: I): MsgUpdateParams {
|
|
200
|
-
const message = createBaseMsgUpdateParams();
|
|
201
|
-
message.authority = object.authority ?? "";
|
|
202
|
-
message.constantFee = (object.constantFee !== undefined && object.constantFee !== null)
|
|
203
|
-
? Coin.fromPartial(object.constantFee)
|
|
204
|
-
: undefined;
|
|
205
|
-
return message;
|
|
206
|
-
},
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse {
|
|
210
|
-
return {};
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export const MsgUpdateParamsResponse = {
|
|
214
|
-
encode(_: MsgUpdateParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
215
|
-
return writer;
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParamsResponse {
|
|
219
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
220
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
221
|
-
const message = createBaseMsgUpdateParamsResponse();
|
|
222
|
-
while (reader.pos < end) {
|
|
223
|
-
const tag = reader.uint32();
|
|
224
|
-
switch (tag >>> 3) {
|
|
225
|
-
default:
|
|
226
|
-
reader.skipType(tag & 7);
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return message;
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
fromJSON(_: any): MsgUpdateParamsResponse {
|
|
234
|
-
return {};
|
|
235
|
-
},
|
|
236
|
-
|
|
237
|
-
toJSON(_: MsgUpdateParamsResponse): unknown {
|
|
238
|
-
const obj: any = {};
|
|
239
|
-
return obj;
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
fromPartial<I extends Exact<DeepPartial<MsgUpdateParamsResponse>, I>>(_: I): MsgUpdateParamsResponse {
|
|
243
|
-
const message = createBaseMsgUpdateParamsResponse();
|
|
244
|
-
return message;
|
|
245
|
-
},
|
|
246
|
-
};
|
|
247
|
-
|
|
248
123
|
/** Msg defines the bank Msg service. */
|
|
249
124
|
export interface Msg {
|
|
250
|
-
/** VerifyInvariant defines a method to verify a particular
|
|
125
|
+
/** VerifyInvariant defines a method to verify a particular invariance. */
|
|
251
126
|
VerifyInvariant(request: MsgVerifyInvariant): Promise<MsgVerifyInvariantResponse>;
|
|
252
|
-
/**
|
|
253
|
-
* UpdateParams defines a governance operation for updating the x/crisis module
|
|
254
|
-
* parameters. The authority is defined in the keeper.
|
|
255
|
-
*
|
|
256
|
-
* Since: cosmos-sdk 0.47
|
|
257
|
-
*/
|
|
258
|
-
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
|
|
259
127
|
}
|
|
260
128
|
|
|
261
129
|
export class MsgClientImpl implements Msg {
|
|
@@ -263,19 +131,12 @@ export class MsgClientImpl implements Msg {
|
|
|
263
131
|
constructor(rpc: Rpc) {
|
|
264
132
|
this.rpc = rpc;
|
|
265
133
|
this.VerifyInvariant = this.VerifyInvariant.bind(this);
|
|
266
|
-
this.UpdateParams = this.UpdateParams.bind(this);
|
|
267
134
|
}
|
|
268
135
|
VerifyInvariant(request: MsgVerifyInvariant): Promise<MsgVerifyInvariantResponse> {
|
|
269
136
|
const data = MsgVerifyInvariant.encode(request).finish();
|
|
270
137
|
const promise = this.rpc.request("cosmos.crisis.v1beta1.Msg", "VerifyInvariant", data);
|
|
271
138
|
return promise.then((data) => MsgVerifyInvariantResponse.decode(new _m0.Reader(data)));
|
|
272
139
|
}
|
|
273
|
-
|
|
274
|
-
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse> {
|
|
275
|
-
const data = MsgUpdateParams.encode(request).finish();
|
|
276
|
-
const promise = this.rpc.request("cosmos.crisis.v1beta1.Msg", "UpdateParams", data);
|
|
277
|
-
return promise.then((data) => MsgUpdateParamsResponse.decode(new _m0.Reader(data)));
|
|
278
|
-
}
|
|
279
140
|
}
|
|
280
141
|
|
|
281
142
|
interface Rpc {
|
|
@@ -3,12 +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 { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
|
|
6
7
|
import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx";
|
|
7
|
-
import { MsgUpdateParams } from "./types/cosmos/distribution/v1beta1/tx";
|
|
8
|
-
import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx";
|
|
9
8
|
import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
|
|
10
|
-
import {
|
|
11
|
-
import { MsgCommunityPoolSpend } from "./types/cosmos/distribution/v1beta1/tx";
|
|
9
|
+
import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx";
|
|
12
10
|
import { Params as typeParams } from "./types";
|
|
13
11
|
import { ValidatorHistoricalRewards as typeValidatorHistoricalRewards } from "./types";
|
|
14
12
|
import { ValidatorCurrentRewards as typeValidatorCurrentRewards } from "./types";
|
|
@@ -28,7 +26,7 @@ import { ValidatorHistoricalRewardsRecord as typeValidatorHistoricalRewardsRecor
|
|
|
28
26
|
import { ValidatorCurrentRewardsRecord as typeValidatorCurrentRewardsRecord } from "./types";
|
|
29
27
|
import { DelegatorStartingInfoRecord as typeDelegatorStartingInfoRecord } from "./types";
|
|
30
28
|
import { ValidatorSlashEventRecord as typeValidatorSlashEventRecord } from "./types";
|
|
31
|
-
export {
|
|
29
|
+
export { MsgWithdrawValidatorCommission, MsgWithdrawDelegatorReward, MsgSetWithdrawAddress, MsgFundCommunityPool };
|
|
32
30
|
export const registry = new Registry(msgTypes);
|
|
33
31
|
function getStructure(template) {
|
|
34
32
|
const structure = { fields: [] };
|
|
@@ -44,46 +42,32 @@ const defaultFee = {
|
|
|
44
42
|
};
|
|
45
43
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
46
44
|
return {
|
|
47
|
-
async
|
|
48
|
-
if (!signer) {
|
|
49
|
-
throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.');
|
|
50
|
-
}
|
|
51
|
-
try {
|
|
52
|
-
const { address } = (await signer.getAccounts())[0];
|
|
53
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
54
|
-
let msg = this.msgWithdrawDelegatorReward({ value: MsgWithdrawDelegatorReward.fromPartial(value) });
|
|
55
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
56
|
-
}
|
|
57
|
-
catch (e) {
|
|
58
|
-
throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Could not broadcast Tx: ' + e.message);
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
async sendMsgUpdateParams({ value, fee, memo }) {
|
|
45
|
+
async sendMsgWithdrawValidatorCommission({ value, fee, memo }) {
|
|
62
46
|
if (!signer) {
|
|
63
|
-
throw new Error('TxClient:
|
|
47
|
+
throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.');
|
|
64
48
|
}
|
|
65
49
|
try {
|
|
66
50
|
const { address } = (await signer.getAccounts())[0];
|
|
67
51
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
68
|
-
let msg = this.
|
|
52
|
+
let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) });
|
|
69
53
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
70
54
|
}
|
|
71
55
|
catch (e) {
|
|
72
|
-
throw new Error('TxClient:
|
|
56
|
+
throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: ' + e.message);
|
|
73
57
|
}
|
|
74
58
|
},
|
|
75
|
-
async
|
|
59
|
+
async sendMsgWithdrawDelegatorReward({ value, fee, memo }) {
|
|
76
60
|
if (!signer) {
|
|
77
|
-
throw new Error('TxClient:
|
|
61
|
+
throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.');
|
|
78
62
|
}
|
|
79
63
|
try {
|
|
80
64
|
const { address } = (await signer.getAccounts())[0];
|
|
81
65
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
82
|
-
let msg = this.
|
|
66
|
+
let msg = this.msgWithdrawDelegatorReward({ value: MsgWithdrawDelegatorReward.fromPartial(value) });
|
|
83
67
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
84
68
|
}
|
|
85
69
|
catch (e) {
|
|
86
|
-
throw new Error('TxClient:
|
|
70
|
+
throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Could not broadcast Tx: ' + e.message);
|
|
87
71
|
}
|
|
88
72
|
},
|
|
89
73
|
async sendMsgSetWithdrawAddress({ value, fee, memo }) {
|
|
@@ -100,32 +84,26 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
100
84
|
throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: ' + e.message);
|
|
101
85
|
}
|
|
102
86
|
},
|
|
103
|
-
async
|
|
87
|
+
async sendMsgFundCommunityPool({ value, fee, memo }) {
|
|
104
88
|
if (!signer) {
|
|
105
|
-
throw new Error('TxClient:
|
|
89
|
+
throw new Error('TxClient:sendMsgFundCommunityPool: Unable to sign Tx. Signer is not present.');
|
|
106
90
|
}
|
|
107
91
|
try {
|
|
108
92
|
const { address } = (await signer.getAccounts())[0];
|
|
109
93
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
110
|
-
let msg = this.
|
|
94
|
+
let msg = this.msgFundCommunityPool({ value: MsgFundCommunityPool.fromPartial(value) });
|
|
111
95
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
112
96
|
}
|
|
113
97
|
catch (e) {
|
|
114
|
-
throw new Error('TxClient:
|
|
98
|
+
throw new Error('TxClient:sendMsgFundCommunityPool: Could not broadcast Tx: ' + e.message);
|
|
115
99
|
}
|
|
116
100
|
},
|
|
117
|
-
|
|
118
|
-
if (!signer) {
|
|
119
|
-
throw new Error('TxClient:sendMsgCommunityPoolSpend: Unable to sign Tx. Signer is not present.');
|
|
120
|
-
}
|
|
101
|
+
msgWithdrawValidatorCommission({ value }) {
|
|
121
102
|
try {
|
|
122
|
-
|
|
123
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
124
|
-
let msg = this.msgCommunityPoolSpend({ value: MsgCommunityPoolSpend.fromPartial(value) });
|
|
125
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
103
|
+
return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial(value) };
|
|
126
104
|
}
|
|
127
105
|
catch (e) {
|
|
128
|
-
throw new Error('TxClient:
|
|
106
|
+
throw new Error('TxClient:MsgWithdrawValidatorCommission: Could not create message: ' + e.message);
|
|
129
107
|
}
|
|
130
108
|
},
|
|
131
109
|
msgWithdrawDelegatorReward({ value }) {
|
|
@@ -136,22 +114,6 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
136
114
|
throw new Error('TxClient:MsgWithdrawDelegatorReward: Could not create message: ' + e.message);
|
|
137
115
|
}
|
|
138
116
|
},
|
|
139
|
-
msgUpdateParams({ value }) {
|
|
140
|
-
try {
|
|
141
|
-
return { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", value: MsgUpdateParams.fromPartial(value) };
|
|
142
|
-
}
|
|
143
|
-
catch (e) {
|
|
144
|
-
throw new Error('TxClient:MsgUpdateParams: Could not create message: ' + e.message);
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
msgFundCommunityPool({ value }) {
|
|
148
|
-
try {
|
|
149
|
-
return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial(value) };
|
|
150
|
-
}
|
|
151
|
-
catch (e) {
|
|
152
|
-
throw new Error('TxClient:MsgFundCommunityPool: Could not create message: ' + e.message);
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
117
|
msgSetWithdrawAddress({ value }) {
|
|
156
118
|
try {
|
|
157
119
|
return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial(value) };
|
|
@@ -160,20 +122,12 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
160
122
|
throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message);
|
|
161
123
|
}
|
|
162
124
|
},
|
|
163
|
-
|
|
164
|
-
try {
|
|
165
|
-
return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial(value) };
|
|
166
|
-
}
|
|
167
|
-
catch (e) {
|
|
168
|
-
throw new Error('TxClient:MsgWithdrawValidatorCommission: Could not create message: ' + e.message);
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
msgCommunityPoolSpend({ value }) {
|
|
125
|
+
msgFundCommunityPool({ value }) {
|
|
172
126
|
try {
|
|
173
|
-
return { typeUrl: "/cosmos.distribution.v1beta1.
|
|
127
|
+
return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial(value) };
|
|
174
128
|
}
|
|
175
129
|
catch (e) {
|
|
176
|
-
throw new Error('TxClient:
|
|
130
|
+
throw new Error('TxClient:MsgFundCommunityPool: Could not create message: ' + e.message);
|
|
177
131
|
}
|
|
178
132
|
},
|
|
179
133
|
};
|