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
|
@@ -3,8 +3,8 @@ 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 { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
7
6
|
import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
7
|
+
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
8
8
|
import { SendAuthorization as typeSendAuthorization } from "./types";
|
|
9
9
|
import { Params as typeParams } from "./types";
|
|
10
10
|
import { SendEnabled as typeSendEnabled } from "./types";
|
|
@@ -15,7 +15,7 @@ import { DenomUnit as typeDenomUnit } from "./types";
|
|
|
15
15
|
import { Metadata as typeMetadata } from "./types";
|
|
16
16
|
import { Balance as typeBalance } from "./types";
|
|
17
17
|
import { DenomOwner as typeDenomOwner } from "./types";
|
|
18
|
-
export {
|
|
18
|
+
export { MsgMultiSend, MsgSend };
|
|
19
19
|
export const registry = new Registry(msgTypes);
|
|
20
20
|
function getStructure(template) {
|
|
21
21
|
const structure = { fields: [] };
|
|
@@ -31,48 +31,48 @@ const defaultFee = {
|
|
|
31
31
|
};
|
|
32
32
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
33
33
|
return {
|
|
34
|
-
async
|
|
34
|
+
async sendMsgMultiSend({ value, fee, memo }) {
|
|
35
35
|
if (!signer) {
|
|
36
|
-
throw new Error('TxClient:
|
|
36
|
+
throw new Error('TxClient:sendMsgMultiSend: Unable to sign Tx. Signer is not present.');
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
39
|
const { address } = (await signer.getAccounts())[0];
|
|
40
40
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
41
|
-
let msg = this.
|
|
41
|
+
let msg = this.msgMultiSend({ value: MsgMultiSend.fromPartial(value) });
|
|
42
42
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
43
43
|
}
|
|
44
44
|
catch (e) {
|
|
45
|
-
throw new Error('TxClient:
|
|
45
|
+
throw new Error('TxClient:sendMsgMultiSend: Could not broadcast Tx: ' + e.message);
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
async
|
|
48
|
+
async sendMsgSend({ value, fee, memo }) {
|
|
49
49
|
if (!signer) {
|
|
50
|
-
throw new Error('TxClient:
|
|
50
|
+
throw new Error('TxClient:sendMsgSend: Unable to sign Tx. Signer is not present.');
|
|
51
51
|
}
|
|
52
52
|
try {
|
|
53
53
|
const { address } = (await signer.getAccounts())[0];
|
|
54
54
|
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
55
|
-
let msg = this.
|
|
55
|
+
let msg = this.msgSend({ value: MsgSend.fromPartial(value) });
|
|
56
56
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
57
57
|
}
|
|
58
58
|
catch (e) {
|
|
59
|
-
throw new Error('TxClient:
|
|
59
|
+
throw new Error('TxClient:sendMsgSend: Could not broadcast Tx: ' + e.message);
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
|
|
62
|
+
msgMultiSend({ value }) {
|
|
63
63
|
try {
|
|
64
|
-
return { typeUrl: "/cosmos.bank.v1beta1.
|
|
64
|
+
return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial(value) };
|
|
65
65
|
}
|
|
66
66
|
catch (e) {
|
|
67
|
-
throw new Error('TxClient:
|
|
67
|
+
throw new Error('TxClient:MsgMultiSend: Could not create message: ' + e.message);
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
|
|
70
|
+
msgSend({ value }) {
|
|
71
71
|
try {
|
|
72
|
-
return { typeUrl: "/cosmos.bank.v1beta1.
|
|
72
|
+
return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial(value) };
|
|
73
73
|
}
|
|
74
74
|
catch (e) {
|
|
75
|
-
throw new Error('TxClient:
|
|
75
|
+
throw new Error('TxClient:MsgSend: Could not create message: ' + e.message);
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
};
|
|
@@ -7,8 +7,8 @@ import { msgTypes } from './registry';
|
|
|
7
7
|
import { IgniteClient } from "../client"
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
|
-
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
11
10
|
import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
11
|
+
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
12
12
|
|
|
13
13
|
import { SendAuthorization as typeSendAuthorization} from "./types"
|
|
14
14
|
import { Params as typeParams} from "./types"
|
|
@@ -21,13 +21,7 @@ import { Metadata as typeMetadata} from "./types"
|
|
|
21
21
|
import { Balance as typeBalance} from "./types"
|
|
22
22
|
import { DenomOwner as typeDenomOwner} from "./types"
|
|
23
23
|
|
|
24
|
-
export {
|
|
25
|
-
|
|
26
|
-
type sendMsgSendParams = {
|
|
27
|
-
value: MsgSend,
|
|
28
|
-
fee?: StdFee,
|
|
29
|
-
memo?: string
|
|
30
|
-
};
|
|
24
|
+
export { MsgMultiSend, MsgSend };
|
|
31
25
|
|
|
32
26
|
type sendMsgMultiSendParams = {
|
|
33
27
|
value: MsgMultiSend,
|
|
@@ -35,15 +29,21 @@ type sendMsgMultiSendParams = {
|
|
|
35
29
|
memo?: string
|
|
36
30
|
};
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
type msgSendParams = {
|
|
32
|
+
type sendMsgSendParams = {
|
|
40
33
|
value: MsgSend,
|
|
34
|
+
fee?: StdFee,
|
|
35
|
+
memo?: string
|
|
41
36
|
};
|
|
42
37
|
|
|
38
|
+
|
|
43
39
|
type msgMultiSendParams = {
|
|
44
40
|
value: MsgMultiSend,
|
|
45
41
|
};
|
|
46
42
|
|
|
43
|
+
type msgSendParams = {
|
|
44
|
+
value: MsgSend,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
47
|
|
|
48
48
|
export const registry = new Registry(msgTypes);
|
|
49
49
|
|
|
@@ -74,48 +74,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
74
74
|
|
|
75
75
|
return {
|
|
76
76
|
|
|
77
|
-
async
|
|
77
|
+
async sendMsgMultiSend({ value, fee, memo }: sendMsgMultiSendParams): Promise<DeliverTxResponse> {
|
|
78
78
|
if (!signer) {
|
|
79
|
-
throw new Error('TxClient:
|
|
79
|
+
throw new Error('TxClient:sendMsgMultiSend: Unable to sign Tx. Signer is not present.')
|
|
80
80
|
}
|
|
81
81
|
try {
|
|
82
82
|
const { address } = (await signer.getAccounts())[0];
|
|
83
83
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
84
|
-
let msg = this.
|
|
84
|
+
let msg = this.msgMultiSend({ value: MsgMultiSend.fromPartial(value) })
|
|
85
85
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
86
86
|
} catch (e: any) {
|
|
87
|
-
throw new Error('TxClient:
|
|
87
|
+
throw new Error('TxClient:sendMsgMultiSend: Could not broadcast Tx: '+ e.message)
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
|
|
91
|
-
async
|
|
91
|
+
async sendMsgSend({ value, fee, memo }: sendMsgSendParams): Promise<DeliverTxResponse> {
|
|
92
92
|
if (!signer) {
|
|
93
|
-
throw new Error('TxClient:
|
|
93
|
+
throw new Error('TxClient:sendMsgSend: Unable to sign Tx. Signer is not present.')
|
|
94
94
|
}
|
|
95
95
|
try {
|
|
96
96
|
const { address } = (await signer.getAccounts())[0];
|
|
97
97
|
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
98
|
-
let msg = this.
|
|
98
|
+
let msg = this.msgSend({ value: MsgSend.fromPartial(value) })
|
|
99
99
|
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
100
100
|
} catch (e: any) {
|
|
101
|
-
throw new Error('TxClient:
|
|
101
|
+
throw new Error('TxClient:sendMsgSend: Could not broadcast Tx: '+ e.message)
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
msgMultiSend({ value }: msgMultiSendParams): EncodeObject {
|
|
107
107
|
try {
|
|
108
|
-
return { typeUrl: "/cosmos.bank.v1beta1.
|
|
108
|
+
return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial( value ) }
|
|
109
109
|
} catch (e: any) {
|
|
110
|
-
throw new Error('TxClient:
|
|
110
|
+
throw new Error('TxClient:MsgMultiSend: Could not create message: ' + e.message)
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
msgSend({ value }: msgSendParams): EncodeObject {
|
|
115
115
|
try {
|
|
116
|
-
return { typeUrl: "/cosmos.bank.v1beta1.
|
|
116
|
+
return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial( value ) }
|
|
117
117
|
} catch (e: any) {
|
|
118
|
-
throw new Error('TxClient:
|
|
118
|
+
throw new Error('TxClient:MsgSend: Could not create message: ' + e.message)
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
2
1
|
import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
2
|
+
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
3
3
|
const msgTypes = [
|
|
4
|
-
["/cosmos.bank.v1beta1.MsgSend", MsgSend],
|
|
5
4
|
["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend],
|
|
5
|
+
["/cosmos.bank.v1beta1.MsgSend", MsgSend],
|
|
6
6
|
];
|
|
7
7
|
export { msgTypes };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
-
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
3
2
|
import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
3
|
+
import { MsgSend } from "./types/cosmos/bank/v1beta1/tx";
|
|
4
4
|
|
|
5
5
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
6
|
-
["/cosmos.bank.v1beta1.MsgSend", MsgSend],
|
|
7
6
|
["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend],
|
|
7
|
+
["/cosmos.bank.v1beta1.MsgSend", MsgSend],
|
|
8
8
|
|
|
9
9
|
];
|
|
10
10
|
|
|
@@ -83,7 +83,7 @@ export class Api extends HttpClient {
|
|
|
83
83
|
constructor() {
|
|
84
84
|
super(...arguments);
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* No description
|
|
87
87
|
*
|
|
88
88
|
* @tags Query
|
|
89
89
|
* @name QueryAllBalances
|
|
@@ -113,7 +113,7 @@ export class Api extends HttpClient {
|
|
|
113
113
|
...params,
|
|
114
114
|
});
|
|
115
115
|
/**
|
|
116
|
-
* @description
|
|
116
|
+
* @description Since: cosmos-sdk 0.46
|
|
117
117
|
*
|
|
118
118
|
* @tags Query
|
|
119
119
|
* @name QueryDenomOwners
|
|
@@ -173,26 +173,11 @@ export class Api extends HttpClient {
|
|
|
173
173
|
...params,
|
|
174
174
|
});
|
|
175
175
|
/**
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
* @tags Query
|
|
179
|
-
* @name QuerySendEnabled
|
|
180
|
-
* @summary SendEnabled queries for SendEnabled entries.
|
|
181
|
-
* @request GET:/cosmos/bank/v1beta1/send_enabled
|
|
182
|
-
*/
|
|
183
|
-
this.querySendEnabled = (query, params = {}) => this.request({
|
|
184
|
-
path: `/cosmos/bank/v1beta1/send_enabled`,
|
|
185
|
-
method: "GET",
|
|
186
|
-
query: query,
|
|
187
|
-
format: "json",
|
|
188
|
-
...params,
|
|
189
|
-
});
|
|
190
|
-
/**
|
|
191
|
-
* @description When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. Since: cosmos-sdk 0.46
|
|
176
|
+
* @description Since: cosmos-sdk 0.46
|
|
192
177
|
*
|
|
193
178
|
* @tags Query
|
|
194
179
|
* @name QuerySpendableBalances
|
|
195
|
-
* @summary SpendableBalances queries the
|
|
180
|
+
* @summary SpendableBalances queries the spenable balance of all coins for a single
|
|
196
181
|
account.
|
|
197
182
|
* @request GET:/cosmos/bank/v1beta1/spendable_balances/{address}
|
|
198
183
|
*/
|
|
@@ -204,23 +189,7 @@ export class Api extends HttpClient {
|
|
|
204
189
|
...params,
|
|
205
190
|
});
|
|
206
191
|
/**
|
|
207
|
-
|
|
208
|
-
*
|
|
209
|
-
* @tags Query
|
|
210
|
-
* @name QuerySpendableBalanceByDenom
|
|
211
|
-
* @summary SpendableBalanceByDenom queries the spendable balance of a single denom for
|
|
212
|
-
a single account.
|
|
213
|
-
* @request GET:/cosmos/bank/v1beta1/spendable_balances/{address}/by_denom
|
|
214
|
-
*/
|
|
215
|
-
this.querySpendableBalanceByDenom = (address, query, params = {}) => this.request({
|
|
216
|
-
path: `/cosmos/bank/v1beta1/spendable_balances/${address}/by_denom`,
|
|
217
|
-
method: "GET",
|
|
218
|
-
query: query,
|
|
219
|
-
format: "json",
|
|
220
|
-
...params,
|
|
221
|
-
});
|
|
222
|
-
/**
|
|
223
|
-
* @description When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set.
|
|
192
|
+
* No description
|
|
224
193
|
*
|
|
225
194
|
* @tags Query
|
|
226
195
|
* @name QueryTotalSupply
|
|
@@ -235,7 +204,7 @@ export class Api extends HttpClient {
|
|
|
235
204
|
...params,
|
|
236
205
|
});
|
|
237
206
|
/**
|
|
238
|
-
*
|
|
207
|
+
* No description
|
|
239
208
|
*
|
|
240
209
|
* @tags Query
|
|
241
210
|
* @name QuerySupplyOf
|
|
@@ -135,21 +135,6 @@ export type V1Beta1MsgMultiSendResponse = object;
|
|
|
135
135
|
*/
|
|
136
136
|
export type V1Beta1MsgSendResponse = object;
|
|
137
137
|
|
|
138
|
-
/**
|
|
139
|
-
* MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type.
|
|
140
|
-
|
|
141
|
-
Since: cosmos-sdk 0.47
|
|
142
|
-
*/
|
|
143
|
-
export type V1Beta1MsgSetSendEnabledResponse = object;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* MsgUpdateParamsResponse defines the response structure for executing a
|
|
147
|
-
MsgUpdateParams message.
|
|
148
|
-
|
|
149
|
-
Since: cosmos-sdk 0.47
|
|
150
|
-
*/
|
|
151
|
-
export type V1Beta1MsgUpdateParamsResponse = object;
|
|
152
|
-
|
|
153
138
|
/**
|
|
154
139
|
* Output models transaction outputs.
|
|
155
140
|
*/
|
|
@@ -234,13 +219,6 @@ export interface V1Beta1PageResponse {
|
|
|
234
219
|
* Params defines the parameters for the bank module.
|
|
235
220
|
*/
|
|
236
221
|
export interface V1Beta1Params {
|
|
237
|
-
/**
|
|
238
|
-
* Deprecated: Use of SendEnabled in params is deprecated.
|
|
239
|
-
* For genesis, use the newly added send_enabled field in the genesis object.
|
|
240
|
-
* Storage, lookup, and manipulation of this information is now in the keeper.
|
|
241
|
-
*
|
|
242
|
-
* As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.
|
|
243
|
-
*/
|
|
244
222
|
send_enabled?: V1Beta1SendEnabled[];
|
|
245
223
|
default_send_enabled?: boolean;
|
|
246
224
|
}
|
|
@@ -306,32 +284,6 @@ export interface V1Beta1QueryParamsResponse {
|
|
|
306
284
|
params?: V1Beta1Params;
|
|
307
285
|
}
|
|
308
286
|
|
|
309
|
-
/**
|
|
310
|
-
* QuerySendEnabledResponse defines the RPC response of a SendEnable query.
|
|
311
|
-
|
|
312
|
-
Since: cosmos-sdk 0.47
|
|
313
|
-
*/
|
|
314
|
-
export interface V1Beta1QuerySendEnabledResponse {
|
|
315
|
-
send_enabled?: V1Beta1SendEnabled[];
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* pagination defines the pagination in the response. This field is only
|
|
319
|
-
* populated if the denoms field in the request is empty.
|
|
320
|
-
*/
|
|
321
|
-
pagination?: V1Beta1PageResponse;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* QuerySpendableBalanceByDenomResponse defines the gRPC response structure for
|
|
326
|
-
querying an account's spendable balance for a specific denom.
|
|
327
|
-
|
|
328
|
-
Since: cosmos-sdk 0.47
|
|
329
|
-
*/
|
|
330
|
-
export interface V1Beta1QuerySpendableBalanceByDenomResponse {
|
|
331
|
-
/** balance is the balance of the coin. */
|
|
332
|
-
balance?: V1Beta1Coin;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
287
|
/**
|
|
336
288
|
* QuerySpendableBalancesResponse defines the gRPC response structure for querying
|
|
337
289
|
an account's spendable balances.
|
|
@@ -501,7 +453,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
501
453
|
*/
|
|
502
454
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
503
455
|
/**
|
|
504
|
-
*
|
|
456
|
+
* No description
|
|
505
457
|
*
|
|
506
458
|
* @tags Query
|
|
507
459
|
* @name QueryAllBalances
|
|
@@ -545,7 +497,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
545
497
|
});
|
|
546
498
|
|
|
547
499
|
/**
|
|
548
|
-
* @description
|
|
500
|
+
* @description Since: cosmos-sdk 0.46
|
|
549
501
|
*
|
|
550
502
|
* @tags Query
|
|
551
503
|
* @name QueryDenomOwners
|
|
@@ -632,38 +584,11 @@ denominations.
|
|
|
632
584
|
});
|
|
633
585
|
|
|
634
586
|
/**
|
|
635
|
-
|
|
636
|
-
*
|
|
637
|
-
* @tags Query
|
|
638
|
-
* @name QuerySendEnabled
|
|
639
|
-
* @summary SendEnabled queries for SendEnabled entries.
|
|
640
|
-
* @request GET:/cosmos/bank/v1beta1/send_enabled
|
|
641
|
-
*/
|
|
642
|
-
querySendEnabled = (
|
|
643
|
-
query?: {
|
|
644
|
-
denoms?: string[];
|
|
645
|
-
"pagination.key"?: string;
|
|
646
|
-
"pagination.offset"?: string;
|
|
647
|
-
"pagination.limit"?: string;
|
|
648
|
-
"pagination.count_total"?: boolean;
|
|
649
|
-
"pagination.reverse"?: boolean;
|
|
650
|
-
},
|
|
651
|
-
params: RequestParams = {},
|
|
652
|
-
) =>
|
|
653
|
-
this.request<V1Beta1QuerySendEnabledResponse, RpcStatus>({
|
|
654
|
-
path: `/cosmos/bank/v1beta1/send_enabled`,
|
|
655
|
-
method: "GET",
|
|
656
|
-
query: query,
|
|
657
|
-
format: "json",
|
|
658
|
-
...params,
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* @description When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. Since: cosmos-sdk 0.46
|
|
587
|
+
* @description Since: cosmos-sdk 0.46
|
|
663
588
|
*
|
|
664
589
|
* @tags Query
|
|
665
590
|
* @name QuerySpendableBalances
|
|
666
|
-
* @summary SpendableBalances queries the
|
|
591
|
+
* @summary SpendableBalances queries the spenable balance of all coins for a single
|
|
667
592
|
account.
|
|
668
593
|
* @request GET:/cosmos/bank/v1beta1/spendable_balances/{address}
|
|
669
594
|
*/
|
|
@@ -687,25 +612,7 @@ account.
|
|
|
687
612
|
});
|
|
688
613
|
|
|
689
614
|
/**
|
|
690
|
-
|
|
691
|
-
*
|
|
692
|
-
* @tags Query
|
|
693
|
-
* @name QuerySpendableBalanceByDenom
|
|
694
|
-
* @summary SpendableBalanceByDenom queries the spendable balance of a single denom for
|
|
695
|
-
a single account.
|
|
696
|
-
* @request GET:/cosmos/bank/v1beta1/spendable_balances/{address}/by_denom
|
|
697
|
-
*/
|
|
698
|
-
querySpendableBalanceByDenom = (address: string, query?: { denom?: string }, params: RequestParams = {}) =>
|
|
699
|
-
this.request<V1Beta1QuerySpendableBalanceByDenomResponse, RpcStatus>({
|
|
700
|
-
path: `/cosmos/bank/v1beta1/spendable_balances/${address}/by_denom`,
|
|
701
|
-
method: "GET",
|
|
702
|
-
query: query,
|
|
703
|
-
format: "json",
|
|
704
|
-
...params,
|
|
705
|
-
});
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* @description When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set.
|
|
615
|
+
* No description
|
|
709
616
|
*
|
|
710
617
|
* @tags Query
|
|
711
618
|
* @name QueryTotalSupply
|
|
@@ -731,7 +638,7 @@ a single account.
|
|
|
731
638
|
});
|
|
732
639
|
|
|
733
640
|
/**
|
|
734
|
-
*
|
|
641
|
+
* No description
|
|
735
642
|
*
|
|
736
643
|
* @tags Query
|
|
737
644
|
* @name QuerySupplyOf
|
|
@@ -3,16 +3,13 @@ import _m0 from "protobufjs/minimal";
|
|
|
3
3
|
import { Coin } from "../../base/v1beta1/coin";
|
|
4
4
|
export const protobufPackage = "cosmos.bank.v1beta1";
|
|
5
5
|
function createBaseSendAuthorization() {
|
|
6
|
-
return { spendLimit: []
|
|
6
|
+
return { spendLimit: [] };
|
|
7
7
|
}
|
|
8
8
|
export const SendAuthorization = {
|
|
9
9
|
encode(message, writer = _m0.Writer.create()) {
|
|
10
10
|
for (const v of message.spendLimit) {
|
|
11
11
|
Coin.encode(v, writer.uint32(10).fork()).ldelim();
|
|
12
12
|
}
|
|
13
|
-
for (const v of message.allowList) {
|
|
14
|
-
writer.uint32(18).string(v);
|
|
15
|
-
}
|
|
16
13
|
return writer;
|
|
17
14
|
},
|
|
18
15
|
decode(input, length) {
|
|
@@ -25,9 +22,6 @@ export const SendAuthorization = {
|
|
|
25
22
|
case 1:
|
|
26
23
|
message.spendLimit.push(Coin.decode(reader, reader.uint32()));
|
|
27
24
|
break;
|
|
28
|
-
case 2:
|
|
29
|
-
message.allowList.push(reader.string());
|
|
30
|
-
break;
|
|
31
25
|
default:
|
|
32
26
|
reader.skipType(tag & 7);
|
|
33
27
|
break;
|
|
@@ -36,10 +30,7 @@ export const SendAuthorization = {
|
|
|
36
30
|
return message;
|
|
37
31
|
},
|
|
38
32
|
fromJSON(object) {
|
|
39
|
-
return {
|
|
40
|
-
spendLimit: Array.isArray(object?.spendLimit) ? object.spendLimit.map((e) => Coin.fromJSON(e)) : [],
|
|
41
|
-
allowList: Array.isArray(object?.allowList) ? object.allowList.map((e) => String(e)) : [],
|
|
42
|
-
};
|
|
33
|
+
return { spendLimit: Array.isArray(object?.spendLimit) ? object.spendLimit.map((e) => Coin.fromJSON(e)) : [] };
|
|
43
34
|
},
|
|
44
35
|
toJSON(message) {
|
|
45
36
|
const obj = {};
|
|
@@ -49,18 +40,11 @@ export const SendAuthorization = {
|
|
|
49
40
|
else {
|
|
50
41
|
obj.spendLimit = [];
|
|
51
42
|
}
|
|
52
|
-
if (message.allowList) {
|
|
53
|
-
obj.allowList = message.allowList.map((e) => e);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
obj.allowList = [];
|
|
57
|
-
}
|
|
58
43
|
return obj;
|
|
59
44
|
},
|
|
60
45
|
fromPartial(object) {
|
|
61
46
|
const message = createBaseSendAuthorization();
|
|
62
47
|
message.spendLimit = object.spendLimit?.map((e) => Coin.fromPartial(e)) || [];
|
|
63
|
-
message.allowList = object.allowList?.map((e) => e) || [];
|
|
64
48
|
return message;
|
|
65
49
|
},
|
|
66
50
|
};
|
|
@@ -12,17 +12,10 @@ export const protobufPackage = "cosmos.bank.v1beta1";
|
|
|
12
12
|
*/
|
|
13
13
|
export interface SendAuthorization {
|
|
14
14
|
spendLimit: Coin[];
|
|
15
|
-
/**
|
|
16
|
-
* allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the
|
|
17
|
-
* granter. If omitted, any recipient is allowed.
|
|
18
|
-
*
|
|
19
|
-
* Since: cosmos-sdk 0.47
|
|
20
|
-
*/
|
|
21
|
-
allowList: string[];
|
|
22
15
|
}
|
|
23
16
|
|
|
24
17
|
function createBaseSendAuthorization(): SendAuthorization {
|
|
25
|
-
return { spendLimit: []
|
|
18
|
+
return { spendLimit: [] };
|
|
26
19
|
}
|
|
27
20
|
|
|
28
21
|
export const SendAuthorization = {
|
|
@@ -30,9 +23,6 @@ export const SendAuthorization = {
|
|
|
30
23
|
for (const v of message.spendLimit) {
|
|
31
24
|
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
32
25
|
}
|
|
33
|
-
for (const v of message.allowList) {
|
|
34
|
-
writer.uint32(18).string(v!);
|
|
35
|
-
}
|
|
36
26
|
return writer;
|
|
37
27
|
},
|
|
38
28
|
|
|
@@ -46,9 +36,6 @@ export const SendAuthorization = {
|
|
|
46
36
|
case 1:
|
|
47
37
|
message.spendLimit.push(Coin.decode(reader, reader.uint32()));
|
|
48
38
|
break;
|
|
49
|
-
case 2:
|
|
50
|
-
message.allowList.push(reader.string());
|
|
51
|
-
break;
|
|
52
39
|
default:
|
|
53
40
|
reader.skipType(tag & 7);
|
|
54
41
|
break;
|
|
@@ -58,10 +45,7 @@ export const SendAuthorization = {
|
|
|
58
45
|
},
|
|
59
46
|
|
|
60
47
|
fromJSON(object: any): SendAuthorization {
|
|
61
|
-
return {
|
|
62
|
-
spendLimit: Array.isArray(object?.spendLimit) ? object.spendLimit.map((e: any) => Coin.fromJSON(e)) : [],
|
|
63
|
-
allowList: Array.isArray(object?.allowList) ? object.allowList.map((e: any) => String(e)) : [],
|
|
64
|
-
};
|
|
48
|
+
return { spendLimit: Array.isArray(object?.spendLimit) ? object.spendLimit.map((e: any) => Coin.fromJSON(e)) : [] };
|
|
65
49
|
},
|
|
66
50
|
|
|
67
51
|
toJSON(message: SendAuthorization): unknown {
|
|
@@ -71,18 +55,12 @@ export const SendAuthorization = {
|
|
|
71
55
|
} else {
|
|
72
56
|
obj.spendLimit = [];
|
|
73
57
|
}
|
|
74
|
-
if (message.allowList) {
|
|
75
|
-
obj.allowList = message.allowList.map((e) => e);
|
|
76
|
-
} else {
|
|
77
|
-
obj.allowList = [];
|
|
78
|
-
}
|
|
79
58
|
return obj;
|
|
80
59
|
},
|
|
81
60
|
|
|
82
61
|
fromPartial<I extends Exact<DeepPartial<SendAuthorization>, I>>(object: I): SendAuthorization {
|
|
83
62
|
const message = createBaseSendAuthorization();
|
|
84
63
|
message.spendLimit = object.spendLimit?.map((e) => Coin.fromPartial(e)) || [];
|
|
85
|
-
message.allowList = object.allowList?.map((e) => e) || [];
|
|
86
64
|
return message;
|
|
87
65
|
},
|
|
88
66
|
};
|
|
@@ -6,15 +6,6 @@ export const protobufPackage = "cosmos.bank.v1beta1";
|
|
|
6
6
|
|
|
7
7
|
/** Params defines the parameters for the bank module. */
|
|
8
8
|
export interface Params {
|
|
9
|
-
/**
|
|
10
|
-
* Deprecated: Use of SendEnabled in params is deprecated.
|
|
11
|
-
* For genesis, use the newly added send_enabled field in the genesis object.
|
|
12
|
-
* Storage, lookup, and manipulation of this information is now in the keeper.
|
|
13
|
-
*
|
|
14
|
-
* As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.
|
|
15
|
-
*
|
|
16
|
-
* @deprecated
|
|
17
|
-
*/
|
|
18
9
|
sendEnabled: SendEnabled[];
|
|
19
10
|
defaultSendEnabled: boolean;
|
|
20
11
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
3
|
import { Coin } from "../../base/v1beta1/coin";
|
|
4
|
-
import { Metadata, Params
|
|
4
|
+
import { Metadata, Params } from "./bank";
|
|
5
5
|
export const protobufPackage = "cosmos.bank.v1beta1";
|
|
6
6
|
function createBaseGenesisState() {
|
|
7
|
-
return { params: undefined, balances: [], supply: [], denomMetadata: []
|
|
7
|
+
return { params: undefined, balances: [], supply: [], denomMetadata: [] };
|
|
8
8
|
}
|
|
9
9
|
export const GenesisState = {
|
|
10
10
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -20,9 +20,6 @@ export const GenesisState = {
|
|
|
20
20
|
for (const v of message.denomMetadata) {
|
|
21
21
|
Metadata.encode(v, writer.uint32(34).fork()).ldelim();
|
|
22
22
|
}
|
|
23
|
-
for (const v of message.sendEnabled) {
|
|
24
|
-
SendEnabled.encode(v, writer.uint32(42).fork()).ldelim();
|
|
25
|
-
}
|
|
26
23
|
return writer;
|
|
27
24
|
},
|
|
28
25
|
decode(input, length) {
|
|
@@ -44,9 +41,6 @@ export const GenesisState = {
|
|
|
44
41
|
case 4:
|
|
45
42
|
message.denomMetadata.push(Metadata.decode(reader, reader.uint32()));
|
|
46
43
|
break;
|
|
47
|
-
case 5:
|
|
48
|
-
message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32()));
|
|
49
|
-
break;
|
|
50
44
|
default:
|
|
51
45
|
reader.skipType(tag & 7);
|
|
52
46
|
break;
|
|
@@ -62,9 +56,6 @@ export const GenesisState = {
|
|
|
62
56
|
denomMetadata: Array.isArray(object?.denomMetadata)
|
|
63
57
|
? object.denomMetadata.map((e) => Metadata.fromJSON(e))
|
|
64
58
|
: [],
|
|
65
|
-
sendEnabled: Array.isArray(object?.sendEnabled)
|
|
66
|
-
? object.sendEnabled.map((e) => SendEnabled.fromJSON(e))
|
|
67
|
-
: [],
|
|
68
59
|
};
|
|
69
60
|
},
|
|
70
61
|
toJSON(message) {
|
|
@@ -88,12 +79,6 @@ export const GenesisState = {
|
|
|
88
79
|
else {
|
|
89
80
|
obj.denomMetadata = [];
|
|
90
81
|
}
|
|
91
|
-
if (message.sendEnabled) {
|
|
92
|
-
obj.sendEnabled = message.sendEnabled.map((e) => e ? SendEnabled.toJSON(e) : undefined);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
obj.sendEnabled = [];
|
|
96
|
-
}
|
|
97
82
|
return obj;
|
|
98
83
|
},
|
|
99
84
|
fromPartial(object) {
|
|
@@ -104,7 +89,6 @@ export const GenesisState = {
|
|
|
104
89
|
message.balances = object.balances?.map((e) => Balance.fromPartial(e)) || [];
|
|
105
90
|
message.supply = object.supply?.map((e) => Coin.fromPartial(e)) || [];
|
|
106
91
|
message.denomMetadata = object.denomMetadata?.map((e) => Metadata.fromPartial(e)) || [];
|
|
107
|
-
message.sendEnabled = object.sendEnabled?.map((e) => SendEnabled.fromPartial(e)) || [];
|
|
108
92
|
return message;
|
|
109
93
|
},
|
|
110
94
|
};
|