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,11 +1,12 @@
|
|
|
1
1
|
// Generated by Ignite ignite.com/cli
|
|
2
|
+
import { SigningStargateClient } from "@cosmjs/stargate";
|
|
2
3
|
import { Registry } from "@cosmjs/proto-signing";
|
|
3
4
|
import { msgTypes } from './registry';
|
|
4
5
|
import { Api } from "./rest";
|
|
5
|
-
import {
|
|
6
|
-
import { TransferAuthorization as typeTransferAuthorization } from "./types";
|
|
6
|
+
import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx";
|
|
7
7
|
import { DenomTrace as typeDenomTrace } from "./types";
|
|
8
8
|
import { Params as typeParams } from "./types";
|
|
9
|
+
export { MsgTransfer };
|
|
9
10
|
export const registry = new Registry(msgTypes);
|
|
10
11
|
function getStructure(template) {
|
|
11
12
|
const structure = { fields: [] };
|
|
@@ -20,7 +21,30 @@ const defaultFee = {
|
|
|
20
21
|
gas: "200000",
|
|
21
22
|
};
|
|
22
23
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
23
|
-
return {
|
|
24
|
+
return {
|
|
25
|
+
async sendMsgTransfer({ value, fee, memo }) {
|
|
26
|
+
if (!signer) {
|
|
27
|
+
throw new Error('TxClient:sendMsgTransfer: Unable to sign Tx. Signer is not present.');
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
const { address } = (await signer.getAccounts())[0];
|
|
31
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
32
|
+
let msg = this.msgTransfer({ value: MsgTransfer.fromPartial(value) });
|
|
33
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
throw new Error('TxClient:sendMsgTransfer: Could not broadcast Tx: ' + e.message);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
msgTransfer({ value }) {
|
|
40
|
+
try {
|
|
41
|
+
return { typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.fromPartial(value) };
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
throw new Error('TxClient:MsgTransfer: Could not create message: ' + e.message);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
};
|
|
24
48
|
};
|
|
25
49
|
export const queryClient = ({ addr: addr } = { addr: "http://localhost:1317" }) => {
|
|
26
50
|
return new Api({ baseURL: addr });
|
|
@@ -31,8 +55,6 @@ class SDKModule {
|
|
|
31
55
|
this.query = queryClient({ addr: client.env.apiURL });
|
|
32
56
|
this.updateTX(client);
|
|
33
57
|
this.structure = {
|
|
34
|
-
Allocation: getStructure(typeAllocation.fromPartial({})),
|
|
35
|
-
TransferAuthorization: getStructure(typeTransferAuthorization.fromPartial({})),
|
|
36
58
|
DenomTrace: getStructure(typeDenomTrace.fromPartial({})),
|
|
37
59
|
Params: getStructure(typeParams.fromPartial({})),
|
|
38
60
|
};
|
|
@@ -7,14 +7,23 @@ import { msgTypes } from './registry';
|
|
|
7
7
|
import { IgniteClient } from "../client"
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
|
+
import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx";
|
|
10
11
|
|
|
11
|
-
import { Allocation as typeAllocation} from "./types"
|
|
12
|
-
import { TransferAuthorization as typeTransferAuthorization} from "./types"
|
|
13
12
|
import { DenomTrace as typeDenomTrace} from "./types"
|
|
14
13
|
import { Params as typeParams} from "./types"
|
|
15
14
|
|
|
16
|
-
export {
|
|
15
|
+
export { MsgTransfer };
|
|
17
16
|
|
|
17
|
+
type sendMsgTransferParams = {
|
|
18
|
+
value: MsgTransfer,
|
|
19
|
+
fee?: StdFee,
|
|
20
|
+
memo?: string
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
type msgTransferParams = {
|
|
25
|
+
value: MsgTransfer,
|
|
26
|
+
};
|
|
18
27
|
|
|
19
28
|
|
|
20
29
|
export const registry = new Registry(msgTypes);
|
|
@@ -46,6 +55,28 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
46
55
|
|
|
47
56
|
return {
|
|
48
57
|
|
|
58
|
+
async sendMsgTransfer({ value, fee, memo }: sendMsgTransferParams): Promise<DeliverTxResponse> {
|
|
59
|
+
if (!signer) {
|
|
60
|
+
throw new Error('TxClient:sendMsgTransfer: Unable to sign Tx. Signer is not present.')
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
const { address } = (await signer.getAccounts())[0];
|
|
64
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
65
|
+
let msg = this.msgTransfer({ value: MsgTransfer.fromPartial(value) })
|
|
66
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
67
|
+
} catch (e: any) {
|
|
68
|
+
throw new Error('TxClient:sendMsgTransfer: Could not broadcast Tx: '+ e.message)
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
msgTransfer({ value }: msgTransferParams): EncodeObject {
|
|
74
|
+
try {
|
|
75
|
+
return { typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: MsgTransfer.fromPartial( value ) }
|
|
76
|
+
} catch (e: any) {
|
|
77
|
+
throw new Error('TxClient:MsgTransfer: Could not create message: ' + e.message)
|
|
78
|
+
}
|
|
79
|
+
},
|
|
49
80
|
|
|
50
81
|
}
|
|
51
82
|
};
|
|
@@ -69,8 +100,6 @@ class SDKModule {
|
|
|
69
100
|
this.query = queryClient({ addr: client.env.apiURL });
|
|
70
101
|
this.updateTX(client);
|
|
71
102
|
this.structure = {
|
|
72
|
-
Allocation: getStructure(typeAllocation.fromPartial({})),
|
|
73
|
-
TransferAuthorization: getStructure(typeTransferAuthorization.fromPartial({})),
|
|
74
103
|
DenomTrace: getStructure(typeDenomTrace.fromPartial({})),
|
|
75
104
|
Params: getStructure(typeParams.fromPartial({})),
|
|
76
105
|
|
|
@@ -76,7 +76,7 @@ export class HttpClient {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* @title ibc/applications/transfer/v1/
|
|
79
|
+
* @title ibc/applications/transfer/v1/genesis.proto
|
|
80
80
|
* @version version not set
|
|
81
81
|
*/
|
|
82
82
|
export class Api extends HttpClient {
|
|
@@ -139,20 +139,6 @@ export class Api extends HttpClient {
|
|
|
139
139
|
format: "json",
|
|
140
140
|
...params,
|
|
141
141
|
});
|
|
142
|
-
/**
|
|
143
|
-
* No description
|
|
144
|
-
*
|
|
145
|
-
* @tags Query
|
|
146
|
-
* @name QueryTotalEscrowForDenom
|
|
147
|
-
* @summary TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom.
|
|
148
|
-
* @request GET:/ibc/apps/transfer/v1/denoms/{denom}/total_escrow
|
|
149
|
-
*/
|
|
150
|
-
this.queryTotalEscrowForDenom = (denom, params = {}) => this.request({
|
|
151
|
-
path: `/ibc/apps/transfer/v1/denoms/${denom}/total_escrow`,
|
|
152
|
-
method: "GET",
|
|
153
|
-
format: "json",
|
|
154
|
-
...params,
|
|
155
|
-
});
|
|
156
142
|
/**
|
|
157
143
|
* No description
|
|
158
144
|
*
|
|
@@ -244,19 +244,6 @@ export interface V1QueryParamsResponse {
|
|
|
244
244
|
params?: Applicationstransferv1Params;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
/**
|
|
248
|
-
* QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method.
|
|
249
|
-
*/
|
|
250
|
-
export interface V1QueryTotalEscrowForDenomResponse {
|
|
251
|
-
/**
|
|
252
|
-
* Coin defines a token with a denomination and an amount.
|
|
253
|
-
*
|
|
254
|
-
* NOTE: The amount field is an Int which implements the custom method
|
|
255
|
-
* signatures required by gogoproto.
|
|
256
|
-
*/
|
|
257
|
-
amount?: V1Beta1Coin;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
247
|
/**
|
|
261
248
|
* Coin defines a token with a denomination and an amount.
|
|
262
249
|
|
|
@@ -461,7 +448,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
461
448
|
}
|
|
462
449
|
|
|
463
450
|
/**
|
|
464
|
-
* @title ibc/applications/transfer/v1/
|
|
451
|
+
* @title ibc/applications/transfer/v1/genesis.proto
|
|
465
452
|
* @version version not set
|
|
466
453
|
*/
|
|
467
454
|
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
@@ -539,22 +526,6 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
539
526
|
...params,
|
|
540
527
|
});
|
|
541
528
|
|
|
542
|
-
/**
|
|
543
|
-
* No description
|
|
544
|
-
*
|
|
545
|
-
* @tags Query
|
|
546
|
-
* @name QueryTotalEscrowForDenom
|
|
547
|
-
* @summary TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom.
|
|
548
|
-
* @request GET:/ibc/apps/transfer/v1/denoms/{denom}/total_escrow
|
|
549
|
-
*/
|
|
550
|
-
queryTotalEscrowForDenom = (denom: string, params: RequestParams = {}) =>
|
|
551
|
-
this.request<V1QueryTotalEscrowForDenomResponse, RpcStatus>({
|
|
552
|
-
path: `/ibc/apps/transfer/v1/denoms/${denom}/total_escrow`,
|
|
553
|
-
method: "GET",
|
|
554
|
-
format: "json",
|
|
555
|
-
...params,
|
|
556
|
-
});
|
|
557
|
-
|
|
558
529
|
/**
|
|
559
530
|
* No description
|
|
560
531
|
*
|
|
@@ -28,7 +28,10 @@ export interface Plan {
|
|
|
28
28
|
time:
|
|
29
29
|
| Date
|
|
30
30
|
| undefined;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* The height at which the upgrade must be performed.
|
|
33
|
+
* Only used if Time is not set.
|
|
34
|
+
*/
|
|
32
35
|
height: number;
|
|
33
36
|
/**
|
|
34
37
|
* Any application specific upgrade info to be included on-chain
|
|
@@ -54,11 +57,8 @@ export interface Plan {
|
|
|
54
57
|
* @deprecated
|
|
55
58
|
*/
|
|
56
59
|
export interface SoftwareUpgradeProposal {
|
|
57
|
-
/** title of the proposal */
|
|
58
60
|
title: string;
|
|
59
|
-
/** description of the proposal */
|
|
60
61
|
description: string;
|
|
61
|
-
/** plan of the proposal */
|
|
62
62
|
plan: Plan | undefined;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -71,9 +71,7 @@ export interface SoftwareUpgradeProposal {
|
|
|
71
71
|
* @deprecated
|
|
72
72
|
*/
|
|
73
73
|
export interface CancelSoftwareUpgradeProposal {
|
|
74
|
-
/** title of the proposal */
|
|
75
74
|
title: string;
|
|
76
|
-
/** description of the proposal */
|
|
77
75
|
description: string;
|
|
78
76
|
}
|
|
79
77
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Coin } from "../../../../cosmos/base/v1beta1/coin";
|
|
4
3
|
import { DenomTrace, Params } from "./transfer";
|
|
5
4
|
export const protobufPackage = "ibc.applications.transfer.v1";
|
|
6
5
|
function createBaseGenesisState() {
|
|
7
|
-
return { portId: "", denomTraces: [], params: undefined
|
|
6
|
+
return { portId: "", denomTraces: [], params: undefined };
|
|
8
7
|
}
|
|
9
8
|
export const GenesisState = {
|
|
10
9
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -17,9 +16,6 @@ export const GenesisState = {
|
|
|
17
16
|
if (message.params !== undefined) {
|
|
18
17
|
Params.encode(message.params, writer.uint32(26).fork()).ldelim();
|
|
19
18
|
}
|
|
20
|
-
for (const v of message.totalEscrowed) {
|
|
21
|
-
Coin.encode(v, writer.uint32(34).fork()).ldelim();
|
|
22
|
-
}
|
|
23
19
|
return writer;
|
|
24
20
|
},
|
|
25
21
|
decode(input, length) {
|
|
@@ -38,9 +34,6 @@ export const GenesisState = {
|
|
|
38
34
|
case 3:
|
|
39
35
|
message.params = Params.decode(reader, reader.uint32());
|
|
40
36
|
break;
|
|
41
|
-
case 4:
|
|
42
|
-
message.totalEscrowed.push(Coin.decode(reader, reader.uint32()));
|
|
43
|
-
break;
|
|
44
37
|
default:
|
|
45
38
|
reader.skipType(tag & 7);
|
|
46
39
|
break;
|
|
@@ -53,7 +46,6 @@ export const GenesisState = {
|
|
|
53
46
|
portId: isSet(object.portId) ? String(object.portId) : "",
|
|
54
47
|
denomTraces: Array.isArray(object?.denomTraces) ? object.denomTraces.map((e) => DenomTrace.fromJSON(e)) : [],
|
|
55
48
|
params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
|
|
56
|
-
totalEscrowed: Array.isArray(object?.totalEscrowed) ? object.totalEscrowed.map((e) => Coin.fromJSON(e)) : [],
|
|
57
49
|
};
|
|
58
50
|
},
|
|
59
51
|
toJSON(message) {
|
|
@@ -66,12 +58,6 @@ export const GenesisState = {
|
|
|
66
58
|
obj.denomTraces = [];
|
|
67
59
|
}
|
|
68
60
|
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
|
69
|
-
if (message.totalEscrowed) {
|
|
70
|
-
obj.totalEscrowed = message.totalEscrowed.map((e) => e ? Coin.toJSON(e) : undefined);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
obj.totalEscrowed = [];
|
|
74
|
-
}
|
|
75
61
|
return obj;
|
|
76
62
|
},
|
|
77
63
|
fromPartial(object) {
|
|
@@ -81,7 +67,6 @@ export const GenesisState = {
|
|
|
81
67
|
message.params = (object.params !== undefined && object.params !== null)
|
|
82
68
|
? Params.fromPartial(object.params)
|
|
83
69
|
: undefined;
|
|
84
|
-
message.totalEscrowed = object.totalEscrowed?.map((e) => Coin.fromPartial(e)) || [];
|
|
85
70
|
return message;
|
|
86
71
|
},
|
|
87
72
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Coin } from "../../../../cosmos/base/v1beta1/coin";
|
|
4
3
|
import { DenomTrace, Params } from "./transfer";
|
|
5
4
|
|
|
6
5
|
export const protobufPackage = "ibc.applications.transfer.v1";
|
|
@@ -9,18 +8,11 @@ export const protobufPackage = "ibc.applications.transfer.v1";
|
|
|
9
8
|
export interface GenesisState {
|
|
10
9
|
portId: string;
|
|
11
10
|
denomTraces: DenomTrace[];
|
|
12
|
-
params:
|
|
13
|
-
| Params
|
|
14
|
-
| undefined;
|
|
15
|
-
/**
|
|
16
|
-
* total_escrowed contains the total amount of tokens escrowed
|
|
17
|
-
* by the transfer module
|
|
18
|
-
*/
|
|
19
|
-
totalEscrowed: Coin[];
|
|
11
|
+
params: Params | undefined;
|
|
20
12
|
}
|
|
21
13
|
|
|
22
14
|
function createBaseGenesisState(): GenesisState {
|
|
23
|
-
return { portId: "", denomTraces: [], params: undefined
|
|
15
|
+
return { portId: "", denomTraces: [], params: undefined };
|
|
24
16
|
}
|
|
25
17
|
|
|
26
18
|
export const GenesisState = {
|
|
@@ -34,9 +26,6 @@ export const GenesisState = {
|
|
|
34
26
|
if (message.params !== undefined) {
|
|
35
27
|
Params.encode(message.params, writer.uint32(26).fork()).ldelim();
|
|
36
28
|
}
|
|
37
|
-
for (const v of message.totalEscrowed) {
|
|
38
|
-
Coin.encode(v!, writer.uint32(34).fork()).ldelim();
|
|
39
|
-
}
|
|
40
29
|
return writer;
|
|
41
30
|
},
|
|
42
31
|
|
|
@@ -56,9 +45,6 @@ export const GenesisState = {
|
|
|
56
45
|
case 3:
|
|
57
46
|
message.params = Params.decode(reader, reader.uint32());
|
|
58
47
|
break;
|
|
59
|
-
case 4:
|
|
60
|
-
message.totalEscrowed.push(Coin.decode(reader, reader.uint32()));
|
|
61
|
-
break;
|
|
62
48
|
default:
|
|
63
49
|
reader.skipType(tag & 7);
|
|
64
50
|
break;
|
|
@@ -72,7 +58,6 @@ export const GenesisState = {
|
|
|
72
58
|
portId: isSet(object.portId) ? String(object.portId) : "",
|
|
73
59
|
denomTraces: Array.isArray(object?.denomTraces) ? object.denomTraces.map((e: any) => DenomTrace.fromJSON(e)) : [],
|
|
74
60
|
params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
|
|
75
|
-
totalEscrowed: Array.isArray(object?.totalEscrowed) ? object.totalEscrowed.map((e: any) => Coin.fromJSON(e)) : [],
|
|
76
61
|
};
|
|
77
62
|
},
|
|
78
63
|
|
|
@@ -85,11 +70,6 @@ export const GenesisState = {
|
|
|
85
70
|
obj.denomTraces = [];
|
|
86
71
|
}
|
|
87
72
|
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
|
88
|
-
if (message.totalEscrowed) {
|
|
89
|
-
obj.totalEscrowed = message.totalEscrowed.map((e) => e ? Coin.toJSON(e) : undefined);
|
|
90
|
-
} else {
|
|
91
|
-
obj.totalEscrowed = [];
|
|
92
|
-
}
|
|
93
73
|
return obj;
|
|
94
74
|
},
|
|
95
75
|
|
|
@@ -100,7 +80,6 @@ export const GenesisState = {
|
|
|
100
80
|
message.params = (object.params !== undefined && object.params !== null)
|
|
101
81
|
? Params.fromPartial(object.params)
|
|
102
82
|
: undefined;
|
|
103
|
-
message.totalEscrowed = object.totalEscrowed?.map((e) => Coin.fromPartial(e)) || [];
|
|
104
83
|
return message;
|
|
105
84
|
},
|
|
106
85
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
3
|
import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination";
|
|
4
|
-
import { Coin } from "../../../../cosmos/base/v1beta1/coin";
|
|
5
4
|
import { DenomTrace, Params } from "./transfer";
|
|
6
5
|
export const protobufPackage = "ibc.applications.transfer.v1";
|
|
7
6
|
function createBaseQueryDenomTraceRequest() {
|
|
@@ -444,90 +443,6 @@ export const QueryEscrowAddressResponse = {
|
|
|
444
443
|
return message;
|
|
445
444
|
},
|
|
446
445
|
};
|
|
447
|
-
function createBaseQueryTotalEscrowForDenomRequest() {
|
|
448
|
-
return { denom: "" };
|
|
449
|
-
}
|
|
450
|
-
export const QueryTotalEscrowForDenomRequest = {
|
|
451
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
452
|
-
if (message.denom !== "") {
|
|
453
|
-
writer.uint32(10).string(message.denom);
|
|
454
|
-
}
|
|
455
|
-
return writer;
|
|
456
|
-
},
|
|
457
|
-
decode(input, length) {
|
|
458
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
459
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
460
|
-
const message = createBaseQueryTotalEscrowForDenomRequest();
|
|
461
|
-
while (reader.pos < end) {
|
|
462
|
-
const tag = reader.uint32();
|
|
463
|
-
switch (tag >>> 3) {
|
|
464
|
-
case 1:
|
|
465
|
-
message.denom = reader.string();
|
|
466
|
-
break;
|
|
467
|
-
default:
|
|
468
|
-
reader.skipType(tag & 7);
|
|
469
|
-
break;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
return message;
|
|
473
|
-
},
|
|
474
|
-
fromJSON(object) {
|
|
475
|
-
return { denom: isSet(object.denom) ? String(object.denom) : "" };
|
|
476
|
-
},
|
|
477
|
-
toJSON(message) {
|
|
478
|
-
const obj = {};
|
|
479
|
-
message.denom !== undefined && (obj.denom = message.denom);
|
|
480
|
-
return obj;
|
|
481
|
-
},
|
|
482
|
-
fromPartial(object) {
|
|
483
|
-
const message = createBaseQueryTotalEscrowForDenomRequest();
|
|
484
|
-
message.denom = object.denom ?? "";
|
|
485
|
-
return message;
|
|
486
|
-
},
|
|
487
|
-
};
|
|
488
|
-
function createBaseQueryTotalEscrowForDenomResponse() {
|
|
489
|
-
return { amount: undefined };
|
|
490
|
-
}
|
|
491
|
-
export const QueryTotalEscrowForDenomResponse = {
|
|
492
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
493
|
-
if (message.amount !== undefined) {
|
|
494
|
-
Coin.encode(message.amount, writer.uint32(10).fork()).ldelim();
|
|
495
|
-
}
|
|
496
|
-
return writer;
|
|
497
|
-
},
|
|
498
|
-
decode(input, length) {
|
|
499
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
500
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
501
|
-
const message = createBaseQueryTotalEscrowForDenomResponse();
|
|
502
|
-
while (reader.pos < end) {
|
|
503
|
-
const tag = reader.uint32();
|
|
504
|
-
switch (tag >>> 3) {
|
|
505
|
-
case 1:
|
|
506
|
-
message.amount = Coin.decode(reader, reader.uint32());
|
|
507
|
-
break;
|
|
508
|
-
default:
|
|
509
|
-
reader.skipType(tag & 7);
|
|
510
|
-
break;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
return message;
|
|
514
|
-
},
|
|
515
|
-
fromJSON(object) {
|
|
516
|
-
return { amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined };
|
|
517
|
-
},
|
|
518
|
-
toJSON(message) {
|
|
519
|
-
const obj = {};
|
|
520
|
-
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
|
521
|
-
return obj;
|
|
522
|
-
},
|
|
523
|
-
fromPartial(object) {
|
|
524
|
-
const message = createBaseQueryTotalEscrowForDenomResponse();
|
|
525
|
-
message.amount = (object.amount !== undefined && object.amount !== null)
|
|
526
|
-
? Coin.fromPartial(object.amount)
|
|
527
|
-
: undefined;
|
|
528
|
-
return message;
|
|
529
|
-
},
|
|
530
|
-
};
|
|
531
446
|
export class QueryClientImpl {
|
|
532
447
|
constructor(rpc) {
|
|
533
448
|
this.rpc = rpc;
|
|
@@ -536,7 +451,6 @@ export class QueryClientImpl {
|
|
|
536
451
|
this.Params = this.Params.bind(this);
|
|
537
452
|
this.DenomHash = this.DenomHash.bind(this);
|
|
538
453
|
this.EscrowAddress = this.EscrowAddress.bind(this);
|
|
539
|
-
this.TotalEscrowForDenom = this.TotalEscrowForDenom.bind(this);
|
|
540
454
|
}
|
|
541
455
|
DenomTrace(request) {
|
|
542
456
|
const data = QueryDenomTraceRequest.encode(request).finish();
|
|
@@ -563,11 +477,6 @@ export class QueryClientImpl {
|
|
|
563
477
|
const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "EscrowAddress", data);
|
|
564
478
|
return promise.then((data) => QueryEscrowAddressResponse.decode(new _m0.Reader(data)));
|
|
565
479
|
}
|
|
566
|
-
TotalEscrowForDenom(request) {
|
|
567
|
-
const data = QueryTotalEscrowForDenomRequest.encode(request).finish();
|
|
568
|
-
const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "TotalEscrowForDenom", data);
|
|
569
|
-
return promise.then((data) => QueryTotalEscrowForDenomResponse.decode(new _m0.Reader(data)));
|
|
570
|
-
}
|
|
571
480
|
}
|
|
572
481
|
function isSet(value) {
|
|
573
482
|
return value !== null && value !== undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
3
|
import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination";
|
|
4
|
-
import { Coin } from "../../../../cosmos/base/v1beta1/coin";
|
|
5
4
|
import { DenomTrace, Params } from "./transfer";
|
|
6
5
|
|
|
7
6
|
export const protobufPackage = "ibc.applications.transfer.v1";
|
|
@@ -86,16 +85,6 @@ export interface QueryEscrowAddressResponse {
|
|
|
86
85
|
escrowAddress: string;
|
|
87
86
|
}
|
|
88
87
|
|
|
89
|
-
/** QueryTotalEscrowForDenomRequest is the request type for TotalEscrowForDenom RPC method. */
|
|
90
|
-
export interface QueryTotalEscrowForDenomRequest {
|
|
91
|
-
denom: string;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/** QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method. */
|
|
95
|
-
export interface QueryTotalEscrowForDenomResponse {
|
|
96
|
-
amount: Coin | undefined;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
88
|
function createBaseQueryDenomTraceRequest(): QueryDenomTraceRequest {
|
|
100
89
|
return { hash: "" };
|
|
101
90
|
}
|
|
@@ -595,106 +584,6 @@ export const QueryEscrowAddressResponse = {
|
|
|
595
584
|
},
|
|
596
585
|
};
|
|
597
586
|
|
|
598
|
-
function createBaseQueryTotalEscrowForDenomRequest(): QueryTotalEscrowForDenomRequest {
|
|
599
|
-
return { denom: "" };
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
export const QueryTotalEscrowForDenomRequest = {
|
|
603
|
-
encode(message: QueryTotalEscrowForDenomRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
604
|
-
if (message.denom !== "") {
|
|
605
|
-
writer.uint32(10).string(message.denom);
|
|
606
|
-
}
|
|
607
|
-
return writer;
|
|
608
|
-
},
|
|
609
|
-
|
|
610
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): QueryTotalEscrowForDenomRequest {
|
|
611
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
612
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
613
|
-
const message = createBaseQueryTotalEscrowForDenomRequest();
|
|
614
|
-
while (reader.pos < end) {
|
|
615
|
-
const tag = reader.uint32();
|
|
616
|
-
switch (tag >>> 3) {
|
|
617
|
-
case 1:
|
|
618
|
-
message.denom = reader.string();
|
|
619
|
-
break;
|
|
620
|
-
default:
|
|
621
|
-
reader.skipType(tag & 7);
|
|
622
|
-
break;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
return message;
|
|
626
|
-
},
|
|
627
|
-
|
|
628
|
-
fromJSON(object: any): QueryTotalEscrowForDenomRequest {
|
|
629
|
-
return { denom: isSet(object.denom) ? String(object.denom) : "" };
|
|
630
|
-
},
|
|
631
|
-
|
|
632
|
-
toJSON(message: QueryTotalEscrowForDenomRequest): unknown {
|
|
633
|
-
const obj: any = {};
|
|
634
|
-
message.denom !== undefined && (obj.denom = message.denom);
|
|
635
|
-
return obj;
|
|
636
|
-
},
|
|
637
|
-
|
|
638
|
-
fromPartial<I extends Exact<DeepPartial<QueryTotalEscrowForDenomRequest>, I>>(
|
|
639
|
-
object: I,
|
|
640
|
-
): QueryTotalEscrowForDenomRequest {
|
|
641
|
-
const message = createBaseQueryTotalEscrowForDenomRequest();
|
|
642
|
-
message.denom = object.denom ?? "";
|
|
643
|
-
return message;
|
|
644
|
-
},
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
function createBaseQueryTotalEscrowForDenomResponse(): QueryTotalEscrowForDenomResponse {
|
|
648
|
-
return { amount: undefined };
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
export const QueryTotalEscrowForDenomResponse = {
|
|
652
|
-
encode(message: QueryTotalEscrowForDenomResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
653
|
-
if (message.amount !== undefined) {
|
|
654
|
-
Coin.encode(message.amount, writer.uint32(10).fork()).ldelim();
|
|
655
|
-
}
|
|
656
|
-
return writer;
|
|
657
|
-
},
|
|
658
|
-
|
|
659
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): QueryTotalEscrowForDenomResponse {
|
|
660
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
661
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
662
|
-
const message = createBaseQueryTotalEscrowForDenomResponse();
|
|
663
|
-
while (reader.pos < end) {
|
|
664
|
-
const tag = reader.uint32();
|
|
665
|
-
switch (tag >>> 3) {
|
|
666
|
-
case 1:
|
|
667
|
-
message.amount = Coin.decode(reader, reader.uint32());
|
|
668
|
-
break;
|
|
669
|
-
default:
|
|
670
|
-
reader.skipType(tag & 7);
|
|
671
|
-
break;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
return message;
|
|
675
|
-
},
|
|
676
|
-
|
|
677
|
-
fromJSON(object: any): QueryTotalEscrowForDenomResponse {
|
|
678
|
-
return { amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined };
|
|
679
|
-
},
|
|
680
|
-
|
|
681
|
-
toJSON(message: QueryTotalEscrowForDenomResponse): unknown {
|
|
682
|
-
const obj: any = {};
|
|
683
|
-
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
|
684
|
-
return obj;
|
|
685
|
-
},
|
|
686
|
-
|
|
687
|
-
fromPartial<I extends Exact<DeepPartial<QueryTotalEscrowForDenomResponse>, I>>(
|
|
688
|
-
object: I,
|
|
689
|
-
): QueryTotalEscrowForDenomResponse {
|
|
690
|
-
const message = createBaseQueryTotalEscrowForDenomResponse();
|
|
691
|
-
message.amount = (object.amount !== undefined && object.amount !== null)
|
|
692
|
-
? Coin.fromPartial(object.amount)
|
|
693
|
-
: undefined;
|
|
694
|
-
return message;
|
|
695
|
-
},
|
|
696
|
-
};
|
|
697
|
-
|
|
698
587
|
/** Query provides defines the gRPC querier service. */
|
|
699
588
|
export interface Query {
|
|
700
589
|
/** DenomTrace queries a denomination trace information. */
|
|
@@ -707,8 +596,6 @@ export interface Query {
|
|
|
707
596
|
DenomHash(request: QueryDenomHashRequest): Promise<QueryDenomHashResponse>;
|
|
708
597
|
/** EscrowAddress returns the escrow address for a particular port and channel id. */
|
|
709
598
|
EscrowAddress(request: QueryEscrowAddressRequest): Promise<QueryEscrowAddressResponse>;
|
|
710
|
-
/** TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom. */
|
|
711
|
-
TotalEscrowForDenom(request: QueryTotalEscrowForDenomRequest): Promise<QueryTotalEscrowForDenomResponse>;
|
|
712
599
|
}
|
|
713
600
|
|
|
714
601
|
export class QueryClientImpl implements Query {
|
|
@@ -720,7 +607,6 @@ export class QueryClientImpl implements Query {
|
|
|
720
607
|
this.Params = this.Params.bind(this);
|
|
721
608
|
this.DenomHash = this.DenomHash.bind(this);
|
|
722
609
|
this.EscrowAddress = this.EscrowAddress.bind(this);
|
|
723
|
-
this.TotalEscrowForDenom = this.TotalEscrowForDenom.bind(this);
|
|
724
610
|
}
|
|
725
611
|
DenomTrace(request: QueryDenomTraceRequest): Promise<QueryDenomTraceResponse> {
|
|
726
612
|
const data = QueryDenomTraceRequest.encode(request).finish();
|
|
@@ -751,12 +637,6 @@ export class QueryClientImpl implements Query {
|
|
|
751
637
|
const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "EscrowAddress", data);
|
|
752
638
|
return promise.then((data) => QueryEscrowAddressResponse.decode(new _m0.Reader(data)));
|
|
753
639
|
}
|
|
754
|
-
|
|
755
|
-
TotalEscrowForDenom(request: QueryTotalEscrowForDenomRequest): Promise<QueryTotalEscrowForDenomResponse> {
|
|
756
|
-
const data = QueryTotalEscrowForDenomRequest.encode(request).finish();
|
|
757
|
-
const promise = this.rpc.request("ibc.applications.transfer.v1.Query", "TotalEscrowForDenom", data);
|
|
758
|
-
return promise.then((data) => QueryTotalEscrowForDenomResponse.decode(new _m0.Reader(data)));
|
|
759
|
-
}
|
|
760
640
|
}
|
|
761
641
|
|
|
762
642
|
interface Rpc {
|
|
@@ -103,11 +103,7 @@ export interface Height {
|
|
|
103
103
|
|
|
104
104
|
/** Params defines the set of IBC light client parameters. */
|
|
105
105
|
export interface Params {
|
|
106
|
-
/**
|
|
107
|
-
* allowed_clients defines the list of allowed client state types which can be created
|
|
108
|
-
* and interacted with. If a client type is removed from the allowed clients list, usage
|
|
109
|
-
* of this client will be disabled until it is added again to the list.
|
|
110
|
-
*/
|
|
106
|
+
/** allowed_clients defines the list of allowed client state types. */
|
|
111
107
|
allowedClients: string[];
|
|
112
108
|
}
|
|
113
109
|
|