decentralcardgame-cardchain-client-ts 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DecentralCardGame.cardchain.cardchain/module.js +318 -383
- package/DecentralCardGame.cardchain.cardchain/module.ts +463 -558
- package/DecentralCardGame.cardchain.cardchain/registry.js +72 -78
- package/DecentralCardGame.cardchain.cardchain/registry.ts +72 -78
- package/DecentralCardGame.cardchain.cardchain/rest.js +77 -60
- package/DecentralCardGame.cardchain.cardchain/rest.ts +123 -76
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +657 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +741 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/copyright_proposal.js +102 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/copyright_proposal.ts +134 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.js +356 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.ts +415 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.js +254 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.ts +281 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/image.js +88 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/image.ts +115 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match.js +308 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match.ts +355 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match_reporter_proposal.js +67 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match_reporter_proposal.ts +92 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/num.js +73 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/num.ts +102 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/params.js +325 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/params.ts +380 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +2200 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +2633 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/running_average.js +85 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/running_average.ts +111 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/sell_offer.js +148 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/sell_offer.ts +183 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/server.js +93 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/server.ts +124 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.js +365 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.ts +416 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set_proposal.js +93 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set_proposal.ts +124 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +4185 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +5139 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +580 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +652 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting.js +346 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting.ts +417 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +25 -23
- package/DecentralCardGame.cardchain.cardchain/types.ts +26 -22
- package/DecentralCardGame.cardchain.featureflag/index.js +5 -0
- package/DecentralCardGame.cardchain.featureflag/index.ts +6 -0
- package/DecentralCardGame.cardchain.featureflag/module.js +62 -0
- package/DecentralCardGame.cardchain.featureflag/module.ts +102 -0
- package/DecentralCardGame.cardchain.featureflag/registry.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/registry.ts +7 -0
- package/DecentralCardGame.cardchain.featureflag/rest.js +128 -0
- package/DecentralCardGame.cardchain.featureflag/rest.ts +222 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/flag.js +67 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/flag.ts +92 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/genesis.js +135 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/genesis.ts +172 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/params.js +36 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/params.ts +58 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/proposal.js +76 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/proposal.ts +102 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/query.js +279 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/query.ts +371 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/tx.js +7 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/tx.ts +17 -0
- package/DecentralCardGame.cardchain.featureflag/types/cosmos/base/query/v1beta1/pagination.js +190 -0
- package/DecentralCardGame.cardchain.featureflag/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/DecentralCardGame.cardchain.featureflag/types/gogoproto/gogo.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/gogoproto/gogo.ts +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/annotations.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/annotations.ts +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/http.js +260 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/http.ts +589 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/protobuf/descriptor.js +2830 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/protobuf/descriptor.ts +3753 -0
- package/DecentralCardGame.cardchain.featureflag/types.js +4 -0
- package/DecentralCardGame.cardchain.featureflag/types.ts +11 -0
- package/client.js +7 -7
- package/client.ts +9 -10
- package/cosmos.auth.v1beta1/module.js +0 -2
- package/cosmos.auth.v1beta1/module.ts +0 -2
- package/cosmos.auth.v1beta1/rest.js +3 -18
- package/cosmos.auth.v1beta1/rest.ts +3 -113
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.js +0 -84
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.ts +0 -104
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts +1 -1
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.js +3 -104
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.ts +4 -157
- package/cosmos.auth.v1beta1/types.js +1 -2
- package/cosmos.auth.v1beta1/types.ts +0 -2
- package/cosmos.authz.v1beta1/module.js +19 -19
- package/cosmos.authz.v1beta1/module.ts +29 -29
- package/cosmos.authz.v1beta1/registry.js +2 -2
- package/cosmos.authz.v1beta1/registry.ts +2 -2
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/tx.ts +1 -1
- package/cosmos.bank.v1beta1/module.js +16 -16
- package/cosmos.bank.v1beta1/module.ts +24 -24
- package/cosmos.bank.v1beta1/registry.js +2 -2
- package/cosmos.bank.v1beta1/registry.ts +2 -2
- package/cosmos.bank.v1beta1/rest.js +6 -37
- package/cosmos.bank.v1beta1/rest.ts +6 -99
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.js +2 -18
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.ts +2 -24
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/bank.ts +0 -9
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.js +2 -18
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.ts +4 -25
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.js +1 -230
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.ts +5 -356
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.js +1 -206
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.ts +1 -305
- package/cosmos.base.tendermint.v1beta1/rest.js +3 -3
- package/cosmos.base.tendermint.v1beta1/rest.ts +27 -18
- package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/query.ts +46 -16
- package/cosmos.crisis.v1beta1/module.js +1 -24
- package/cosmos.crisis.v1beta1/module.ts +1 -34
- package/cosmos.crisis.v1beta1/registry.js +0 -2
- package/cosmos.crisis.v1beta1/registry.ts +0 -2
- package/cosmos.crisis.v1beta1/rest.ts +0 -19
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.js +0 -95
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.ts +1 -140
- package/cosmos.distribution.v1beta1/module.js +21 -67
- package/cosmos.distribution.v1beta1/module.ts +34 -100
- package/cosmos.distribution.v1beta1/registry.js +4 -8
- package/cosmos.distribution.v1beta1/registry.ts +4 -8
- package/cosmos.distribution.v1beta1/rest.js +0 -14
- package/cosmos.distribution.v1beta1/rest.ts +7 -66
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/distribution.ts +0 -19
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/genesis.ts +4 -4
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.js +0 -120
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.ts +1 -158
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.js +0 -199
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.ts +3 -300
- package/cosmos.evidence.v1beta1/rest.js +3 -4
- package/cosmos.evidence.v1beta1/rest.ts +3 -4
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/evidence.ts +1 -7
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.js +2 -13
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.ts +3 -25
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/tx.ts +0 -2
- package/cosmos.gov.v1/module.js +21 -46
- package/cosmos.gov.v1/module.ts +33 -68
- package/cosmos.gov.v1/registry.js +4 -6
- package/cosmos.gov.v1/registry.ts +4 -6
- package/cosmos.gov.v1/rest.ts +41 -155
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.js +1 -13
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.ts +5 -40
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.js +0 -179
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.ts +6 -277
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.js +2 -13
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.ts +7 -45
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.js +2 -113
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.ts +3 -186
- package/cosmos.gov.v1/types.js +1 -2
- package/cosmos.gov.v1/types.ts +0 -2
- package/cosmos.gov.v1beta1/module.js +24 -24
- package/cosmos.gov.v1beta1/module.ts +36 -36
- package/cosmos.gov.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1beta1/registry.ts +4 -4
- package/cosmos.gov.v1beta1/rest.ts +96 -65
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/genesis.ts +3 -3
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/gov.ts +10 -45
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/query.ts +2 -4
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/tx.ts +1 -16
- package/cosmos.group.v1/module.js +92 -92
- package/cosmos.group.v1/module.ts +138 -138
- package/cosmos.group.v1/registry.js +16 -16
- package/cosmos.group.v1/registry.ts +16 -16
- package/cosmos.group.v1/rest.js +3 -3
- package/cosmos.group.v1/rest.ts +9 -29
- package/cosmos.group.v1/types/cosmos/group/v1/query.ts +5 -5
- package/cosmos.group.v1/types/cosmos/group/v1/tx.js +34 -52
- package/cosmos.group.v1/types/cosmos/group/v1/tx.ts +49 -79
- package/cosmos.group.v1/types/cosmos/group/v1/types.js +0 -20
- package/cosmos.group.v1/types/cosmos/group/v1/types.ts +6 -46
- package/cosmos.mint.v1beta1/rest.ts +1 -9
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/genesis.ts +1 -1
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/mint.ts +1 -1
- package/cosmos.nft.v1beta1/rest.ts +22 -18
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/event.ts +0 -10
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/genesis.ts +0 -1
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/query.ts +0 -20
- package/cosmos.slashing.v1beta1/rest.ts +0 -8
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/genesis.ts +1 -1
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.js +0 -94
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.ts +0 -139
- package/cosmos.staking.v1beta1/module.js +39 -41
- package/cosmos.staking.v1beta1/module.ts +59 -61
- package/cosmos.staking.v1beta1/registry.js +6 -6
- package/cosmos.staking.v1beta1/registry.ts +6 -6
- package/cosmos.staking.v1beta1/rest.js +7 -7
- package/cosmos.staking.v1beta1/rest.ts +8 -49
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/genesis.ts +1 -1
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/query.ts +5 -36
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.js +2 -180
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.ts +3 -206
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.js +1 -94
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.ts +1 -138
- package/cosmos.staking.v1beta1/types.js +1 -2
- package/cosmos.staking.v1beta1/types.ts +0 -2
- package/cosmos.tx.v1beta1/rest.js +2 -66
- package/cosmos.tx.v1beta1/rest.ts +16 -177
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.js +2 -360
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.ts +2 -524
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.js +266 -592
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +332 -703
- package/cosmos.tx.v1beta1/types/tendermint/types/params.js +17 -8
- package/cosmos.tx.v1beta1/types/tendermint/types/params.ts +25 -9
- package/cosmos.upgrade.v1beta1/rest.ts +1 -0
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/tx.ts +3 -3
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.js +0 -84
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.ts +0 -104
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +0 -1
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +2 -13
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +4 -16
- package/ibc.applications.transfer.v1/module.js +27 -5
- package/ibc.applications.transfer.v1/module.ts +34 -5
- package/ibc.applications.transfer.v1/registry.js +4 -1
- package/ibc.applications.transfer.v1/registry.ts +2 -0
- package/ibc.applications.transfer.v1/rest.js +1 -15
- package/ibc.applications.transfer.v1/rest.ts +1 -30
- package/ibc.applications.transfer.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.js +1 -16
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.ts +2 -23
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.js +0 -91
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.ts +0 -120
- package/ibc.applications.transfer.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.applications.transfer.v1/types.js +1 -3
- package/ibc.applications.transfer.v1/types.ts +0 -4
- package/ibc.core.channel.v1/rest.ts +0 -1
- package/ibc.core.channel.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.js +2 -13
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.ts +2 -14
- package/ibc.core.channel.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.client.v1/rest.ts +1 -5
- package/ibc.core.client.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.client.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.js +8 -9
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.ts +14 -28
- package/ibc.core.connection.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.connection.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.js +1 -1
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.ts +1 -1
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.js +0 -26
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.ts +0 -34
- package/ibc.core.connection.v1/types/proofs.js +1126 -0
- package/ibc.core.connection.v1/types/proofs.ts +1408 -0
- package/index.js +3 -3
- package/index.ts +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Params } from "./slashing";
|
|
4
3
|
|
|
5
4
|
export const protobufPackage = "cosmos.slashing.v1beta1";
|
|
6
5
|
|
|
@@ -13,31 +12,6 @@ export interface MsgUnjail {
|
|
|
13
12
|
export interface MsgUnjailResponse {
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
/**
|
|
17
|
-
* MsgUpdateParams is the Msg/UpdateParams request type.
|
|
18
|
-
*
|
|
19
|
-
* Since: cosmos-sdk 0.47
|
|
20
|
-
*/
|
|
21
|
-
export interface MsgUpdateParams {
|
|
22
|
-
/** authority is the address that controls the module (defaults to x/gov unless overwritten). */
|
|
23
|
-
authority: string;
|
|
24
|
-
/**
|
|
25
|
-
* params defines the x/slashing parameters to update.
|
|
26
|
-
*
|
|
27
|
-
* NOTE: All parameters must be supplied.
|
|
28
|
-
*/
|
|
29
|
-
params: Params | undefined;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* MsgUpdateParamsResponse defines the response structure for executing a
|
|
34
|
-
* MsgUpdateParams message.
|
|
35
|
-
*
|
|
36
|
-
* Since: cosmos-sdk 0.47
|
|
37
|
-
*/
|
|
38
|
-
export interface MsgUpdateParamsResponse {
|
|
39
|
-
}
|
|
40
|
-
|
|
41
15
|
function createBaseMsgUnjail(): MsgUnjail {
|
|
42
16
|
return { validatorAddr: "" };
|
|
43
17
|
}
|
|
@@ -124,105 +98,6 @@ export const MsgUnjailResponse = {
|
|
|
124
98
|
},
|
|
125
99
|
};
|
|
126
100
|
|
|
127
|
-
function createBaseMsgUpdateParams(): MsgUpdateParams {
|
|
128
|
-
return { authority: "", params: undefined };
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export const MsgUpdateParams = {
|
|
132
|
-
encode(message: MsgUpdateParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
133
|
-
if (message.authority !== "") {
|
|
134
|
-
writer.uint32(10).string(message.authority);
|
|
135
|
-
}
|
|
136
|
-
if (message.params !== undefined) {
|
|
137
|
-
Params.encode(message.params, writer.uint32(18).fork()).ldelim();
|
|
138
|
-
}
|
|
139
|
-
return writer;
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParams {
|
|
143
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
144
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
145
|
-
const message = createBaseMsgUpdateParams();
|
|
146
|
-
while (reader.pos < end) {
|
|
147
|
-
const tag = reader.uint32();
|
|
148
|
-
switch (tag >>> 3) {
|
|
149
|
-
case 1:
|
|
150
|
-
message.authority = reader.string();
|
|
151
|
-
break;
|
|
152
|
-
case 2:
|
|
153
|
-
message.params = Params.decode(reader, reader.uint32());
|
|
154
|
-
break;
|
|
155
|
-
default:
|
|
156
|
-
reader.skipType(tag & 7);
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
return message;
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
fromJSON(object: any): MsgUpdateParams {
|
|
164
|
-
return {
|
|
165
|
-
authority: isSet(object.authority) ? String(object.authority) : "",
|
|
166
|
-
params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
|
|
167
|
-
};
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
toJSON(message: MsgUpdateParams): unknown {
|
|
171
|
-
const obj: any = {};
|
|
172
|
-
message.authority !== undefined && (obj.authority = message.authority);
|
|
173
|
-
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
|
174
|
-
return obj;
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
fromPartial<I extends Exact<DeepPartial<MsgUpdateParams>, I>>(object: I): MsgUpdateParams {
|
|
178
|
-
const message = createBaseMsgUpdateParams();
|
|
179
|
-
message.authority = object.authority ?? "";
|
|
180
|
-
message.params = (object.params !== undefined && object.params !== null)
|
|
181
|
-
? Params.fromPartial(object.params)
|
|
182
|
-
: undefined;
|
|
183
|
-
return message;
|
|
184
|
-
},
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse {
|
|
188
|
-
return {};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export const MsgUpdateParamsResponse = {
|
|
192
|
-
encode(_: MsgUpdateParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
193
|
-
return writer;
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParamsResponse {
|
|
197
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
198
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
199
|
-
const message = createBaseMsgUpdateParamsResponse();
|
|
200
|
-
while (reader.pos < end) {
|
|
201
|
-
const tag = reader.uint32();
|
|
202
|
-
switch (tag >>> 3) {
|
|
203
|
-
default:
|
|
204
|
-
reader.skipType(tag & 7);
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
return message;
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
fromJSON(_: any): MsgUpdateParamsResponse {
|
|
212
|
-
return {};
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
toJSON(_: MsgUpdateParamsResponse): unknown {
|
|
216
|
-
const obj: any = {};
|
|
217
|
-
return obj;
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
fromPartial<I extends Exact<DeepPartial<MsgUpdateParamsResponse>, I>>(_: I): MsgUpdateParamsResponse {
|
|
221
|
-
const message = createBaseMsgUpdateParamsResponse();
|
|
222
|
-
return message;
|
|
223
|
-
},
|
|
224
|
-
};
|
|
225
|
-
|
|
226
101
|
/** Msg defines the slashing Msg service. */
|
|
227
102
|
export interface Msg {
|
|
228
103
|
/**
|
|
@@ -231,13 +106,6 @@ export interface Msg {
|
|
|
231
106
|
* and rewards again.
|
|
232
107
|
*/
|
|
233
108
|
Unjail(request: MsgUnjail): Promise<MsgUnjailResponse>;
|
|
234
|
-
/**
|
|
235
|
-
* UpdateParams defines a governance operation for updating the x/slashing module
|
|
236
|
-
* parameters. The authority defaults to the x/gov module account.
|
|
237
|
-
*
|
|
238
|
-
* Since: cosmos-sdk 0.47
|
|
239
|
-
*/
|
|
240
|
-
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
|
|
241
109
|
}
|
|
242
110
|
|
|
243
111
|
export class MsgClientImpl implements Msg {
|
|
@@ -245,19 +113,12 @@ export class MsgClientImpl implements Msg {
|
|
|
245
113
|
constructor(rpc: Rpc) {
|
|
246
114
|
this.rpc = rpc;
|
|
247
115
|
this.Unjail = this.Unjail.bind(this);
|
|
248
|
-
this.UpdateParams = this.UpdateParams.bind(this);
|
|
249
116
|
}
|
|
250
117
|
Unjail(request: MsgUnjail): Promise<MsgUnjailResponse> {
|
|
251
118
|
const data = MsgUnjail.encode(request).finish();
|
|
252
119
|
const promise = this.rpc.request("cosmos.slashing.v1beta1.Msg", "Unjail", data);
|
|
253
120
|
return promise.then((data) => MsgUnjailResponse.decode(new _m0.Reader(data)));
|
|
254
121
|
}
|
|
255
|
-
|
|
256
|
-
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse> {
|
|
257
|
-
const data = MsgUpdateParams.encode(request).finish();
|
|
258
|
-
const promise = this.rpc.request("cosmos.slashing.v1beta1.Msg", "UpdateParams", data);
|
|
259
|
-
return promise.then((data) => MsgUpdateParamsResponse.decode(new _m0.Reader(data)));
|
|
260
|
-
}
|
|
261
122
|
}
|
|
262
123
|
|
|
263
124
|
interface Rpc {
|
|
@@ -3,12 +3,12 @@ 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 { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
6
7
|
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
7
|
-
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
8
8
|
import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
9
|
-
import {
|
|
10
|
-
import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
9
|
+
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
11
10
|
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
11
|
+
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
12
12
|
import { StakeAuthorization as typeStakeAuthorization } from "./types";
|
|
13
13
|
import { StakeAuthorization_Validators as typeStakeAuthorization_Validators } from "./types";
|
|
14
14
|
import { LastValidatorPower as typeLastValidatorPower } from "./types";
|
|
@@ -32,8 +32,7 @@ import { DelegationResponse as typeDelegationResponse } from "./types";
|
|
|
32
32
|
import { RedelegationEntryResponse as typeRedelegationEntryResponse } from "./types";
|
|
33
33
|
import { RedelegationResponse as typeRedelegationResponse } from "./types";
|
|
34
34
|
import { Pool as typePool } from "./types";
|
|
35
|
-
|
|
36
|
-
export { MsgEditValidator, MsgBeginRedelegate, MsgDelegate, MsgCancelUnbondingDelegation, MsgCreateValidator, MsgUndelegate };
|
|
35
|
+
export { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation };
|
|
37
36
|
export const registry = new Registry(msgTypes);
|
|
38
37
|
function getStructure(template) {
|
|
39
38
|
const structure = { fields: [] };
|
|
@@ -49,32 +48,32 @@ const defaultFee = {
|
|
|
49
48
|
};
|
|
50
49
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
51
50
|
return {
|
|
52
|
-
async
|
|
51
|
+
async sendMsgCreateValidator({ value, fee, memo }) {
|
|
53
52
|
if (!signer) {
|
|
54
|
-
throw new Error('TxClient:
|
|
53
|
+
throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.');
|
|
55
54
|
}
|
|
56
55
|
try {
|
|
57
56
|
const { address } = (await signer.getAccounts())[0];
|
|
58
57
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
59
|
-
let msg = this.
|
|
58
|
+
let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) });
|
|
60
59
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
61
60
|
}
|
|
62
61
|
catch (e) {
|
|
63
|
-
throw new Error('TxClient:
|
|
62
|
+
throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: ' + e.message);
|
|
64
63
|
}
|
|
65
64
|
},
|
|
66
|
-
async
|
|
65
|
+
async sendMsgEditValidator({ value, fee, memo }) {
|
|
67
66
|
if (!signer) {
|
|
68
|
-
throw new Error('TxClient:
|
|
67
|
+
throw new Error('TxClient:sendMsgEditValidator: Unable to sign Tx. Signer is not present.');
|
|
69
68
|
}
|
|
70
69
|
try {
|
|
71
70
|
const { address } = (await signer.getAccounts())[0];
|
|
72
71
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
73
|
-
let msg = this.
|
|
72
|
+
let msg = this.msgEditValidator({ value: MsgEditValidator.fromPartial(value) });
|
|
74
73
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
75
74
|
}
|
|
76
75
|
catch (e) {
|
|
77
|
-
throw new Error('TxClient:
|
|
76
|
+
throw new Error('TxClient:sendMsgEditValidator: Could not broadcast Tx: ' + e.message);
|
|
78
77
|
}
|
|
79
78
|
},
|
|
80
79
|
async sendMsgDelegate({ value, fee, memo }) {
|
|
@@ -91,62 +90,62 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
91
90
|
throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: ' + e.message);
|
|
92
91
|
}
|
|
93
92
|
},
|
|
94
|
-
async
|
|
93
|
+
async sendMsgBeginRedelegate({ value, fee, memo }) {
|
|
95
94
|
if (!signer) {
|
|
96
|
-
throw new Error('TxClient:
|
|
95
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.');
|
|
97
96
|
}
|
|
98
97
|
try {
|
|
99
98
|
const { address } = (await signer.getAccounts())[0];
|
|
100
99
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
101
|
-
let msg = this.
|
|
100
|
+
let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) });
|
|
102
101
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
103
102
|
}
|
|
104
103
|
catch (e) {
|
|
105
|
-
throw new Error('TxClient:
|
|
104
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: ' + e.message);
|
|
106
105
|
}
|
|
107
106
|
},
|
|
108
|
-
async
|
|
107
|
+
async sendMsgUndelegate({ value, fee, memo }) {
|
|
109
108
|
if (!signer) {
|
|
110
|
-
throw new Error('TxClient:
|
|
109
|
+
throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.');
|
|
111
110
|
}
|
|
112
111
|
try {
|
|
113
112
|
const { address } = (await signer.getAccounts())[0];
|
|
114
113
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
115
|
-
let msg = this.
|
|
114
|
+
let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) });
|
|
116
115
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
117
116
|
}
|
|
118
117
|
catch (e) {
|
|
119
|
-
throw new Error('TxClient:
|
|
118
|
+
throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: ' + e.message);
|
|
120
119
|
}
|
|
121
120
|
},
|
|
122
|
-
async
|
|
121
|
+
async sendMsgCancelUnbondingDelegation({ value, fee, memo }) {
|
|
123
122
|
if (!signer) {
|
|
124
|
-
throw new Error('TxClient:
|
|
123
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.');
|
|
125
124
|
}
|
|
126
125
|
try {
|
|
127
126
|
const { address } = (await signer.getAccounts())[0];
|
|
128
127
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
129
|
-
let msg = this.
|
|
128
|
+
let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) });
|
|
130
129
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
131
130
|
}
|
|
132
131
|
catch (e) {
|
|
133
|
-
throw new Error('TxClient:
|
|
132
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: ' + e.message);
|
|
134
133
|
}
|
|
135
134
|
},
|
|
136
|
-
|
|
135
|
+
msgCreateValidator({ value }) {
|
|
137
136
|
try {
|
|
138
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
137
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial(value) };
|
|
139
138
|
}
|
|
140
139
|
catch (e) {
|
|
141
|
-
throw new Error('TxClient:
|
|
140
|
+
throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message);
|
|
142
141
|
}
|
|
143
142
|
},
|
|
144
|
-
|
|
143
|
+
msgEditValidator({ value }) {
|
|
145
144
|
try {
|
|
146
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
145
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial(value) };
|
|
147
146
|
}
|
|
148
147
|
catch (e) {
|
|
149
|
-
throw new Error('TxClient:
|
|
148
|
+
throw new Error('TxClient:MsgEditValidator: Could not create message: ' + e.message);
|
|
150
149
|
}
|
|
151
150
|
},
|
|
152
151
|
msgDelegate({ value }) {
|
|
@@ -157,28 +156,28 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
157
156
|
throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message);
|
|
158
157
|
}
|
|
159
158
|
},
|
|
160
|
-
|
|
159
|
+
msgBeginRedelegate({ value }) {
|
|
161
160
|
try {
|
|
162
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
161
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial(value) };
|
|
163
162
|
}
|
|
164
163
|
catch (e) {
|
|
165
|
-
throw new Error('TxClient:
|
|
164
|
+
throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message);
|
|
166
165
|
}
|
|
167
166
|
},
|
|
168
|
-
|
|
167
|
+
msgUndelegate({ value }) {
|
|
169
168
|
try {
|
|
170
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
169
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial(value) };
|
|
171
170
|
}
|
|
172
171
|
catch (e) {
|
|
173
|
-
throw new Error('TxClient:
|
|
172
|
+
throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message);
|
|
174
173
|
}
|
|
175
174
|
},
|
|
176
|
-
|
|
175
|
+
msgCancelUnbondingDelegation({ value }) {
|
|
177
176
|
try {
|
|
178
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
177
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial(value) };
|
|
179
178
|
}
|
|
180
179
|
catch (e) {
|
|
181
|
-
throw new Error('TxClient:
|
|
180
|
+
throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message);
|
|
182
181
|
}
|
|
183
182
|
},
|
|
184
183
|
};
|
|
@@ -215,7 +214,6 @@ class SDKModule {
|
|
|
215
214
|
RedelegationEntryResponse: getStructure(typeRedelegationEntryResponse.fromPartial({})),
|
|
216
215
|
RedelegationResponse: getStructure(typeRedelegationResponse.fromPartial({})),
|
|
217
216
|
Pool: getStructure(typePool.fromPartial({})),
|
|
218
|
-
ValidatorUpdates: getStructure(typeValidatorUpdates.fromPartial({})),
|
|
219
217
|
};
|
|
220
218
|
client.on('signer-changed', (signer) => {
|
|
221
219
|
this.updateTX(client);
|
|
@@ -7,12 +7,12 @@ import { msgTypes } from './registry';
|
|
|
7
7
|
import { IgniteClient } from "../client"
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
|
+
import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
10
11
|
import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
11
|
-
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
12
12
|
import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
13
|
-
import {
|
|
14
|
-
import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
|
|
13
|
+
import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
15
14
|
import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
|
|
15
|
+
import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
|
|
16
16
|
|
|
17
17
|
import { StakeAuthorization as typeStakeAuthorization} from "./types"
|
|
18
18
|
import { StakeAuthorization_Validators as typeStakeAuthorization_Validators} from "./types"
|
|
@@ -37,18 +37,17 @@ import { DelegationResponse as typeDelegationResponse} from "./types"
|
|
|
37
37
|
import { RedelegationEntryResponse as typeRedelegationEntryResponse} from "./types"
|
|
38
38
|
import { RedelegationResponse as typeRedelegationResponse} from "./types"
|
|
39
39
|
import { Pool as typePool} from "./types"
|
|
40
|
-
import { ValidatorUpdates as typeValidatorUpdates} from "./types"
|
|
41
40
|
|
|
42
|
-
export {
|
|
41
|
+
export { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation };
|
|
43
42
|
|
|
44
|
-
type
|
|
45
|
-
value:
|
|
43
|
+
type sendMsgCreateValidatorParams = {
|
|
44
|
+
value: MsgCreateValidator,
|
|
46
45
|
fee?: StdFee,
|
|
47
46
|
memo?: string
|
|
48
47
|
};
|
|
49
48
|
|
|
50
|
-
type
|
|
51
|
-
value:
|
|
49
|
+
type sendMsgEditValidatorParams = {
|
|
50
|
+
value: MsgEditValidator,
|
|
52
51
|
fee?: StdFee,
|
|
53
52
|
memo?: string
|
|
54
53
|
};
|
|
@@ -59,49 +58,49 @@ type sendMsgDelegateParams = {
|
|
|
59
58
|
memo?: string
|
|
60
59
|
};
|
|
61
60
|
|
|
62
|
-
type
|
|
63
|
-
value:
|
|
61
|
+
type sendMsgBeginRedelegateParams = {
|
|
62
|
+
value: MsgBeginRedelegate,
|
|
64
63
|
fee?: StdFee,
|
|
65
64
|
memo?: string
|
|
66
65
|
};
|
|
67
66
|
|
|
68
|
-
type
|
|
69
|
-
value:
|
|
67
|
+
type sendMsgUndelegateParams = {
|
|
68
|
+
value: MsgUndelegate,
|
|
70
69
|
fee?: StdFee,
|
|
71
70
|
memo?: string
|
|
72
71
|
};
|
|
73
72
|
|
|
74
|
-
type
|
|
75
|
-
value:
|
|
73
|
+
type sendMsgCancelUnbondingDelegationParams = {
|
|
74
|
+
value: MsgCancelUnbondingDelegation,
|
|
76
75
|
fee?: StdFee,
|
|
77
76
|
memo?: string
|
|
78
77
|
};
|
|
79
78
|
|
|
80
79
|
|
|
81
|
-
type
|
|
82
|
-
value:
|
|
80
|
+
type msgCreateValidatorParams = {
|
|
81
|
+
value: MsgCreateValidator,
|
|
83
82
|
};
|
|
84
83
|
|
|
85
|
-
type
|
|
86
|
-
value:
|
|
84
|
+
type msgEditValidatorParams = {
|
|
85
|
+
value: MsgEditValidator,
|
|
87
86
|
};
|
|
88
87
|
|
|
89
88
|
type msgDelegateParams = {
|
|
90
89
|
value: MsgDelegate,
|
|
91
90
|
};
|
|
92
91
|
|
|
93
|
-
type
|
|
94
|
-
value:
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
type msgCreateValidatorParams = {
|
|
98
|
-
value: MsgCreateValidator,
|
|
92
|
+
type msgBeginRedelegateParams = {
|
|
93
|
+
value: MsgBeginRedelegate,
|
|
99
94
|
};
|
|
100
95
|
|
|
101
96
|
type msgUndelegateParams = {
|
|
102
97
|
value: MsgUndelegate,
|
|
103
98
|
};
|
|
104
99
|
|
|
100
|
+
type msgCancelUnbondingDelegationParams = {
|
|
101
|
+
value: MsgCancelUnbondingDelegation,
|
|
102
|
+
};
|
|
103
|
+
|
|
105
104
|
|
|
106
105
|
export const registry = new Registry(msgTypes);
|
|
107
106
|
|
|
@@ -132,31 +131,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
132
131
|
|
|
133
132
|
return {
|
|
134
133
|
|
|
135
|
-
async
|
|
134
|
+
async sendMsgCreateValidator({ value, fee, memo }: sendMsgCreateValidatorParams): Promise<DeliverTxResponse> {
|
|
136
135
|
if (!signer) {
|
|
137
|
-
throw new Error('TxClient:
|
|
136
|
+
throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.')
|
|
138
137
|
}
|
|
139
138
|
try {
|
|
140
139
|
const { address } = (await signer.getAccounts())[0];
|
|
141
140
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
142
|
-
let msg = this.
|
|
141
|
+
let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) })
|
|
143
142
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
144
143
|
} catch (e: any) {
|
|
145
|
-
throw new Error('TxClient:
|
|
144
|
+
throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: '+ e.message)
|
|
146
145
|
}
|
|
147
146
|
},
|
|
148
147
|
|
|
149
|
-
async
|
|
148
|
+
async sendMsgEditValidator({ value, fee, memo }: sendMsgEditValidatorParams): Promise<DeliverTxResponse> {
|
|
150
149
|
if (!signer) {
|
|
151
|
-
throw new Error('TxClient:
|
|
150
|
+
throw new Error('TxClient:sendMsgEditValidator: Unable to sign Tx. Signer is not present.')
|
|
152
151
|
}
|
|
153
152
|
try {
|
|
154
153
|
const { address } = (await signer.getAccounts())[0];
|
|
155
154
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
156
|
-
let msg = this.
|
|
155
|
+
let msg = this.msgEditValidator({ value: MsgEditValidator.fromPartial(value) })
|
|
157
156
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
158
157
|
} catch (e: any) {
|
|
159
|
-
throw new Error('TxClient:
|
|
158
|
+
throw new Error('TxClient:sendMsgEditValidator: Could not broadcast Tx: '+ e.message)
|
|
160
159
|
}
|
|
161
160
|
},
|
|
162
161
|
|
|
@@ -174,62 +173,62 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
174
173
|
}
|
|
175
174
|
},
|
|
176
175
|
|
|
177
|
-
async
|
|
176
|
+
async sendMsgBeginRedelegate({ value, fee, memo }: sendMsgBeginRedelegateParams): Promise<DeliverTxResponse> {
|
|
178
177
|
if (!signer) {
|
|
179
|
-
throw new Error('TxClient:
|
|
178
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.')
|
|
180
179
|
}
|
|
181
180
|
try {
|
|
182
181
|
const { address } = (await signer.getAccounts())[0];
|
|
183
182
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
184
|
-
let msg = this.
|
|
183
|
+
let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) })
|
|
185
184
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
186
185
|
} catch (e: any) {
|
|
187
|
-
throw new Error('TxClient:
|
|
186
|
+
throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: '+ e.message)
|
|
188
187
|
}
|
|
189
188
|
},
|
|
190
189
|
|
|
191
|
-
async
|
|
190
|
+
async sendMsgUndelegate({ value, fee, memo }: sendMsgUndelegateParams): Promise<DeliverTxResponse> {
|
|
192
191
|
if (!signer) {
|
|
193
|
-
throw new Error('TxClient:
|
|
192
|
+
throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.')
|
|
194
193
|
}
|
|
195
194
|
try {
|
|
196
195
|
const { address } = (await signer.getAccounts())[0];
|
|
197
196
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
198
|
-
let msg = this.
|
|
197
|
+
let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) })
|
|
199
198
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
200
199
|
} catch (e: any) {
|
|
201
|
-
throw new Error('TxClient:
|
|
200
|
+
throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: '+ e.message)
|
|
202
201
|
}
|
|
203
202
|
},
|
|
204
203
|
|
|
205
|
-
async
|
|
204
|
+
async sendMsgCancelUnbondingDelegation({ value, fee, memo }: sendMsgCancelUnbondingDelegationParams): Promise<DeliverTxResponse> {
|
|
206
205
|
if (!signer) {
|
|
207
|
-
throw new Error('TxClient:
|
|
206
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.')
|
|
208
207
|
}
|
|
209
208
|
try {
|
|
210
209
|
const { address } = (await signer.getAccounts())[0];
|
|
211
210
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
212
|
-
let msg = this.
|
|
211
|
+
let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) })
|
|
213
212
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
214
213
|
} catch (e: any) {
|
|
215
|
-
throw new Error('TxClient:
|
|
214
|
+
throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: '+ e.message)
|
|
216
215
|
}
|
|
217
216
|
},
|
|
218
217
|
|
|
219
218
|
|
|
220
|
-
|
|
219
|
+
msgCreateValidator({ value }: msgCreateValidatorParams): EncodeObject {
|
|
221
220
|
try {
|
|
222
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
221
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial( value ) }
|
|
223
222
|
} catch (e: any) {
|
|
224
|
-
throw new Error('TxClient:
|
|
223
|
+
throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message)
|
|
225
224
|
}
|
|
226
225
|
},
|
|
227
226
|
|
|
228
|
-
|
|
227
|
+
msgEditValidator({ value }: msgEditValidatorParams): EncodeObject {
|
|
229
228
|
try {
|
|
230
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
229
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial( value ) }
|
|
231
230
|
} catch (e: any) {
|
|
232
|
-
throw new Error('TxClient:
|
|
231
|
+
throw new Error('TxClient:MsgEditValidator: Could not create message: ' + e.message)
|
|
233
232
|
}
|
|
234
233
|
},
|
|
235
234
|
|
|
@@ -241,27 +240,27 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
241
240
|
}
|
|
242
241
|
},
|
|
243
242
|
|
|
244
|
-
|
|
243
|
+
msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject {
|
|
245
244
|
try {
|
|
246
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
245
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( value ) }
|
|
247
246
|
} catch (e: any) {
|
|
248
|
-
throw new Error('TxClient:
|
|
247
|
+
throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message)
|
|
249
248
|
}
|
|
250
249
|
},
|
|
251
250
|
|
|
252
|
-
|
|
251
|
+
msgUndelegate({ value }: msgUndelegateParams): EncodeObject {
|
|
253
252
|
try {
|
|
254
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
253
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( value ) }
|
|
255
254
|
} catch (e: any) {
|
|
256
|
-
throw new Error('TxClient:
|
|
255
|
+
throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message)
|
|
257
256
|
}
|
|
258
257
|
},
|
|
259
258
|
|
|
260
|
-
|
|
259
|
+
msgCancelUnbondingDelegation({ value }: msgCancelUnbondingDelegationParams): EncodeObject {
|
|
261
260
|
try {
|
|
262
|
-
return { typeUrl: "/cosmos.staking.v1beta1.
|
|
261
|
+
return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) }
|
|
263
262
|
} catch (e: any) {
|
|
264
|
-
throw new Error('TxClient:
|
|
263
|
+
throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message)
|
|
265
264
|
}
|
|
266
265
|
},
|
|
267
266
|
|
|
@@ -310,7 +309,6 @@ class SDKModule {
|
|
|
310
309
|
RedelegationEntryResponse: getStructure(typeRedelegationEntryResponse.fromPartial({})),
|
|
311
310
|
RedelegationResponse: getStructure(typeRedelegationResponse.fromPartial({})),
|
|
312
311
|
Pool: getStructure(typePool.fromPartial({})),
|
|
313
|
-
ValidatorUpdates: getStructure(typeValidatorUpdates.fromPartial({})),
|
|
314
312
|
|
|
315
313
|
};
|
|
316
314
|
client.on('signer-changed',(signer) => {
|