@firmachain/firma-js 0.2.64 → 0.3.1
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/README.md +1 -1
- package/dist/sdk/FirmaAuthzService.d.ts +8 -8
- package/dist/sdk/FirmaAuthzService.js +12 -6
- package/dist/sdk/FirmaBankService.d.ts +4 -4
- package/dist/sdk/FirmaContractService.d.ts +4 -4
- package/dist/sdk/FirmaCosmWasmCw20.d.ts +14 -14
- package/dist/sdk/FirmaCosmWasmCw721.d.ts +14 -14
- package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +9 -9
- package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +8 -8
- package/dist/sdk/FirmaCosmWasmService.d.ts +8 -8
- package/dist/sdk/FirmaCosmWasmService.js +2 -3
- package/dist/sdk/FirmaDistributionService.d.ts +6 -6
- package/dist/sdk/FirmaFeeGrantService.d.ts +4 -4
- package/dist/sdk/FirmaGovService.d.ts +27 -16
- package/dist/sdk/FirmaGovService.js +305 -195
- package/dist/sdk/FirmaIbcService.d.ts +3 -4
- package/dist/sdk/FirmaIbcService.js +5 -2
- package/dist/sdk/FirmaNftService.d.ts +5 -5
- package/dist/sdk/FirmaStakingService.d.ts +6 -6
- package/dist/sdk/FirmaTokenService.d.ts +5 -5
- package/dist/sdk/FirmaUtil.d.ts +1 -1
- package/dist/sdk/FirmaUtil.js +12 -14
- package/dist/sdk/firmachain/amino/addresses.js +1 -1
- package/dist/sdk/firmachain/amino/aminomsgs.d.ts +10 -0
- package/dist/sdk/firmachain/amino/aminomsgs.js +5 -1
- package/dist/sdk/firmachain/amino/aminotypes.js +27 -10
- package/dist/sdk/firmachain/amino/coins.d.ts +14 -2
- package/dist/sdk/firmachain/amino/coins.js +26 -5
- package/dist/sdk/firmachain/amino/encoding.d.ts +10 -1
- package/dist/sdk/firmachain/amino/encoding.js +21 -3
- package/dist/sdk/firmachain/amino/signdoc.d.ts +21 -3
- package/dist/sdk/firmachain/amino/signdoc.js +37 -11
- package/dist/sdk/firmachain/amino/signer.d.ts +2 -1
- package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +7 -6
- package/dist/sdk/firmachain/authz/AuthzTxTypes.js +7 -6
- package/dist/sdk/firmachain/bank/BankQueryClient.js +1 -1
- package/dist/sdk/firmachain/common/CommonTxClient.js +11 -9
- package/dist/sdk/firmachain/common/ITxClient.d.ts +6 -6
- package/dist/sdk/firmachain/common/ITxClient.js +82 -24
- package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +4 -9
- package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +37 -32
- package/dist/sdk/firmachain/common/LedgerWallet.js +4 -8
- package/dist/sdk/firmachain/common/TxCommon.d.ts +1 -2
- package/dist/sdk/firmachain/common/accounts.d.ts +7 -3
- package/dist/sdk/firmachain/common/accounts.js +28 -33
- package/dist/sdk/firmachain/common/aminotypes.d.ts +19 -0
- package/dist/sdk/firmachain/common/aminotypes.js +74 -0
- package/dist/sdk/firmachain/common/events.d.ts +32 -0
- package/dist/sdk/firmachain/common/events.js +18 -0
- package/dist/sdk/firmachain/common/fee.d.ts +26 -0
- package/dist/sdk/firmachain/common/fee.js +83 -0
- package/dist/sdk/firmachain/common/index.d.ts +1 -0
- package/dist/sdk/firmachain/common/index.js +3 -0
- package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +15 -0
- package/dist/sdk/firmachain/common/modules/auth/queries.js +64 -0
- package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +2 -0
- package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +15 -0
- package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +2 -0
- package/dist/sdk/firmachain/common/modules/authz/messages.js +9 -0
- package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +10 -0
- package/dist/sdk/firmachain/common/modules/authz/queries.js +88 -0
- package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +35 -0
- package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +85 -0
- package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +8 -0
- package/dist/sdk/firmachain/common/modules/bank/messages.js +12 -0
- package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +15 -0
- package/dist/sdk/firmachain/common/modules/bank/queries.js +128 -0
- package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +14 -0
- package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +11 -0
- package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +44 -0
- package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +113 -0
- package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +8 -0
- package/dist/sdk/firmachain/common/modules/distribution/messages.js +15 -0
- package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +16 -0
- package/dist/sdk/firmachain/common/modules/distribution/queries.js +171 -0
- package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +18 -0
- package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +11 -0
- package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +2 -0
- package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +14 -0
- package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +2 -0
- package/dist/sdk/firmachain/common/modules/feegrant/messages.js +8 -0
- package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +9 -0
- package/dist/sdk/firmachain/common/modules/feegrant/queries.js +81 -0
- package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +79 -0
- package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +152 -0
- package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +29 -0
- package/dist/sdk/firmachain/common/modules/gov/messages.js +38 -0
- package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +19 -0
- package/dist/sdk/firmachain/common/modules/gov/queries.js +160 -0
- package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +2 -0
- package/dist/sdk/firmachain/common/modules/group/aminomessages.js +8 -0
- package/dist/sdk/firmachain/common/modules/group/messages.d.ts +2 -0
- package/dist/sdk/firmachain/common/modules/group/messages.js +28 -0
- package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +38 -0
- package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +55 -0
- package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +8 -0
- package/dist/sdk/firmachain/common/modules/ibc/messages.js +32 -0
- package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +58 -0
- package/dist/sdk/firmachain/common/modules/ibc/queries.js +576 -0
- package/dist/sdk/firmachain/common/modules/index.d.ts +32 -0
- package/dist/sdk/firmachain/common/modules/index.js +101 -0
- package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +21 -0
- package/dist/sdk/firmachain/common/modules/mint/queries.js +95 -0
- package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +12 -0
- package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +11 -0
- package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +10 -0
- package/dist/sdk/firmachain/common/modules/slashing/queries.js +88 -0
- package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +112 -0
- package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +234 -0
- package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +33 -0
- package/dist/sdk/firmachain/common/modules/staking/messages.js +37 -0
- package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +23 -0
- package/dist/sdk/firmachain/common/modules/staking/queries.js +242 -0
- package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +11 -0
- package/dist/sdk/firmachain/common/modules/tx/queries.js +103 -0
- package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +16 -0
- package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +56 -0
- package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +2 -0
- package/dist/sdk/firmachain/common/modules/vesting/messages.js +7 -0
- package/dist/sdk/firmachain/common/queryclient/index.d.ts +2 -0
- package/dist/sdk/firmachain/common/queryclient/index.js +10 -0
- package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +75 -0
- package/dist/sdk/firmachain/common/queryclient/queryclient.js +157 -0
- package/dist/sdk/firmachain/common/queryclient/utils.d.ts +33 -0
- package/dist/sdk/firmachain/common/queryclient/utils.js +101 -0
- package/dist/sdk/firmachain/common/search.d.ts +10 -0
- package/dist/sdk/firmachain/common/search.js +7 -0
- package/dist/sdk/firmachain/common/signing.d.ts +8 -3
- package/dist/sdk/firmachain/common/signing.js +24 -12
- package/dist/sdk/firmachain/common/signingstargateclient.d.ts +107 -30
- package/dist/sdk/firmachain/common/signingstargateclient.js +445 -128
- package/dist/sdk/firmachain/common/stargateclient.d.ts +184 -20
- package/dist/sdk/firmachain/common/stargateclient.js +351 -35
- package/dist/sdk/firmachain/contract/ContractTxClient.d.ts +2 -2
- package/dist/sdk/firmachain/contract/ContractTxClient.js +4 -4
- package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +1 -1
- package/dist/sdk/firmachain/contract/ContractTxTypes.js +3 -3
- package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +1 -1
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +5 -5
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +10 -8
- package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -2
- package/dist/sdk/firmachain/google/protobuf/any.js +2 -1
- package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -2
- package/dist/sdk/firmachain/google/protobuf/duration.js +2 -1
- package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +3 -2
- package/dist/sdk/firmachain/google/protobuf/timestamp.js +2 -1
- package/dist/sdk/firmachain/gov/GovQueryClient.d.ts +13 -1
- package/dist/sdk/firmachain/gov/GovQueryClient.js +9 -2
- package/dist/sdk/firmachain/gov/GovTxClient.d.ts +12 -0
- package/dist/sdk/firmachain/gov/GovTxClient.js +11 -1
- package/dist/sdk/firmachain/nft/NftTxClient.d.ts +3 -3
- package/dist/sdk/firmachain/nft/NftTxClient.js +6 -6
- package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +1 -1
- package/dist/sdk/firmachain/nft/NftTxTypes.js +4 -4
- package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +1 -0
- package/dist/sdk/firmachain/staking/StakingQueryClient.js +0 -1
- package/dist/sdk/firmachain/token/TokenTxClient.d.ts +4 -4
- package/dist/sdk/firmachain/token/TokenTxClient.js +8 -8
- package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +1 -1
- package/dist/sdk/firmachain/token/TokenTxTypes.js +5 -5
- package/dist/test/00.wallet.test.js +15 -9
- package/dist/test/01.contract_tx.test.js +53 -45
- package/dist/test/02.contract_query.test.js +54 -31
- package/dist/test/03.contract_scenario.test.js +170 -326
- package/dist/test/04.bank_tx.test.js +58 -59
- package/dist/test/05.bank_query.test.js +51 -56
- package/dist/test/06.feegrant_tx.test.js +74 -89
- package/dist/test/07.feegrant_query.test.js +69 -27
- package/dist/test/08.gas_estimate.test.js +422 -392
- package/dist/test/09.ipfs.test.js +3 -3
- package/dist/test/10.nft_tx.test.js +108 -76
- package/dist/test/11.nft_query.test.js +41 -46
- package/dist/test/12.staking_tx.test.js +81 -98
- package/dist/test/13.staking_query.test.js +66 -12
- package/dist/test/14.distribution_tx.test.js +69 -78
- package/dist/test/15.distribution_query.test.js +81 -57
- package/dist/test/16.gov_tx.test.js +247 -107
- package/dist/test/17.gov_query.test.js +48 -9
- package/dist/test/18.util.test.js +6 -1
- package/dist/test/19.chain.test.js +50 -4
- package/dist/test/20.slashing_query.test.js +31 -1
- package/dist/test/21.token_tx.test.js +48 -56
- package/dist/test/22.token_query.test.js +24 -20
- package/dist/test/23.authz_tx.test.js +119 -240
- package/dist/test/24.authz_query.test.js +116 -56
- package/dist/test/25.cosmwasm_tx.test.js +95 -57
- package/dist/test/26.cosmwasm_query.test.js +66 -26
- package/dist/test/27.arbitary_sign.test.js +59 -67
- package/dist/test/28.ibc_tx.test.js +29 -17
- package/dist/test/29.mint_query.test.js +2 -0
- package/dist/test/30.cw20_tx.test.js +161 -226
- package/dist/test/31.cw20_query.test.js +183 -37
- package/dist/test/32.cw721_tx.test.js +147 -149
- package/dist/test/33.cw721_query.test.js +188 -36
- package/dist/test/34.cw_bridge_tx.test.js +266 -155
- package/dist/test/35.cw_bridge_tx_low.test.js +221 -81
- package/dist/test/36.cw_bridge_query.test.js +157 -21
- package/dist/test/37.cw_marketplace_tx.test.js +22 -22
- package/dist/test/38.cw_marketplace_query.test.js +9 -9
- package/dist/test/config_test.d.ts +10 -4
- package/dist/test/config_test.js +16 -9
- package/dist/test/config_test.sample.d.ts +11 -0
- package/dist/test/config_test.sample.js +14 -0
- package/package.json +9 -7
- package/dist/sdk/firmachain/common/signingaminostargateclient.d.ts +0 -50
- package/dist/sdk/firmachain/common/signingaminostargateclient.js +0 -267
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.groupTypes = void 0;
|
|
4
|
+
var tx_1 = require("cosmjs-types/cosmos/group/v1/tx");
|
|
5
|
+
exports.groupTypes = [
|
|
6
|
+
["/cosmos.group.v1.MsgCreateGroup", tx_1.MsgCreateGroup],
|
|
7
|
+
["/cosmos.group.v1.MsgCreateGroupPolicy", tx_1.MsgCreateGroupPolicy],
|
|
8
|
+
["/cosmos.group.v1.MsgCreateGroupWithPolicy", tx_1.MsgCreateGroupWithPolicy],
|
|
9
|
+
["/cosmos.group.v1.MsgExec", tx_1.MsgExec],
|
|
10
|
+
["/cosmos.group.v1.MsgLeaveGroup", tx_1.MsgLeaveGroup],
|
|
11
|
+
["/cosmos.group.v1.MsgSubmitProposal", tx_1.MsgSubmitProposal],
|
|
12
|
+
["/cosmos.group.v1.MsgUpdateGroupAdmin", tx_1.MsgUpdateGroupAdmin],
|
|
13
|
+
["/cosmos.group.v1.MsgUpdateGroupMembers", tx_1.MsgUpdateGroupMembers],
|
|
14
|
+
["/cosmos.group.v1.MsgUpdateGroupMetadata", tx_1.MsgUpdateGroupMetadata],
|
|
15
|
+
["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", tx_1.MsgUpdateGroupPolicyAdmin],
|
|
16
|
+
["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", tx_1.MsgUpdateGroupPolicyDecisionPolicy],
|
|
17
|
+
["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", tx_1.MsgUpdateGroupPolicyMetadata],
|
|
18
|
+
["/cosmos.group.v1.MsgVote", tx_1.MsgVote],
|
|
19
|
+
["/cosmos.group.v1.MsgWithdrawProposal", tx_1.MsgWithdrawProposal],
|
|
20
|
+
];
|
|
21
|
+
// There are no EncodeObject implementations for the new v1 message types because
|
|
22
|
+
// those things don't scale (https://github.com/cosmos/cosmjs/issues/1440). We need to
|
|
23
|
+
// address this more fundamentally. Users can use
|
|
24
|
+
// const msg = {
|
|
25
|
+
// typeUrl: "/cosmos.group.v1.MsgCreateGroup",
|
|
26
|
+
// value: MsgCreateGroup.fromPartial({ ... })
|
|
27
|
+
// }
|
|
28
|
+
// in their app.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AminoMsg, Coin } from "@cosmjs/amino";
|
|
2
|
+
import { AminoConverters } from "../../aminotypes";
|
|
3
|
+
interface AminoHeight {
|
|
4
|
+
/** 0 values must be omitted (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/core/02-client/types/client.pb.go#L252). */
|
|
5
|
+
readonly revision_number?: string;
|
|
6
|
+
/** 0 values must be omitted (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/core/02-client/types/client.pb.go#L254). */
|
|
7
|
+
readonly revision_height?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Transfers fungible tokens (i.e Coins) between ICS20 enabled chains */
|
|
10
|
+
export interface AminoMsgTransfer extends AminoMsg {
|
|
11
|
+
readonly type: "cosmos-sdk/MsgTransfer";
|
|
12
|
+
readonly value: {
|
|
13
|
+
readonly source_port: string;
|
|
14
|
+
readonly source_channel: string;
|
|
15
|
+
readonly token?: Coin;
|
|
16
|
+
/** Bech32 account address */
|
|
17
|
+
readonly sender: string;
|
|
18
|
+
/** Bech32 account address */
|
|
19
|
+
readonly receiver: string;
|
|
20
|
+
/**
|
|
21
|
+
* The timeout as a (revision_number, revision_height) pair.
|
|
22
|
+
*
|
|
23
|
+
* This fied is is non-optional (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/applications/transfer/types/tx.pb.go#L49).
|
|
24
|
+
* In order to not set the timeout height, set it to {}.
|
|
25
|
+
*/
|
|
26
|
+
readonly timeout_height: AminoHeight;
|
|
27
|
+
/**
|
|
28
|
+
* Timeout timestamp in nanoseconds since Unix epoch. The timeout is disabled when set to 0.
|
|
29
|
+
*
|
|
30
|
+
* 0 values must be omitted (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/applications/transfer/types/tx.pb.go#L52).
|
|
31
|
+
*/
|
|
32
|
+
readonly timeout_timestamp?: string;
|
|
33
|
+
readonly memo?: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export declare function isAminoMsgTransfer(msg: AminoMsg): msg is AminoMsgTransfer;
|
|
37
|
+
export declare function createIbcAminoConverters(): AminoConverters;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createIbcAminoConverters = exports.isAminoMsgTransfer = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
5
|
+
var amino_1 = require("@cosmjs/amino");
|
|
6
|
+
var tx_1 = require("cosmjs-types/ibc/applications/transfer/v1/tx");
|
|
7
|
+
function isAminoMsgTransfer(msg) {
|
|
8
|
+
return msg.type === "cosmos-sdk/MsgTransfer";
|
|
9
|
+
}
|
|
10
|
+
exports.isAminoMsgTransfer = isAminoMsgTransfer;
|
|
11
|
+
function createIbcAminoConverters() {
|
|
12
|
+
return {
|
|
13
|
+
"/ibc.applications.transfer.v1.MsgTransfer": {
|
|
14
|
+
aminoType: "cosmos-sdk/MsgTransfer",
|
|
15
|
+
toAmino: function (_a) {
|
|
16
|
+
var _b, _c, _d;
|
|
17
|
+
var sourcePort = _a.sourcePort, sourceChannel = _a.sourceChannel, token = _a.token, sender = _a.sender, receiver = _a.receiver, timeoutHeight = _a.timeoutHeight, timeoutTimestamp = _a.timeoutTimestamp, memo = _a.memo;
|
|
18
|
+
return ({
|
|
19
|
+
source_port: sourcePort,
|
|
20
|
+
source_channel: sourceChannel,
|
|
21
|
+
token: token,
|
|
22
|
+
sender: sender,
|
|
23
|
+
receiver: receiver,
|
|
24
|
+
timeout_height: timeoutHeight
|
|
25
|
+
? {
|
|
26
|
+
revision_height: (_b = amino_1.omitDefault(timeoutHeight.revisionHeight)) === null || _b === void 0 ? void 0 : _b.toString(),
|
|
27
|
+
revision_number: (_c = amino_1.omitDefault(timeoutHeight.revisionNumber)) === null || _c === void 0 ? void 0 : _c.toString(),
|
|
28
|
+
}
|
|
29
|
+
: {},
|
|
30
|
+
timeout_timestamp: (_d = amino_1.omitDefault(timeoutTimestamp)) === null || _d === void 0 ? void 0 : _d.toString(),
|
|
31
|
+
memo: amino_1.omitDefault(memo),
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
fromAmino: function (_a) {
|
|
35
|
+
var source_port = _a.source_port, source_channel = _a.source_channel, token = _a.token, sender = _a.sender, receiver = _a.receiver, timeout_height = _a.timeout_height, timeout_timestamp = _a.timeout_timestamp, memo = _a.memo;
|
|
36
|
+
return tx_1.MsgTransfer.fromPartial({
|
|
37
|
+
sourcePort: source_port,
|
|
38
|
+
sourceChannel: source_channel,
|
|
39
|
+
token: token,
|
|
40
|
+
sender: sender,
|
|
41
|
+
receiver: receiver,
|
|
42
|
+
timeoutHeight: timeout_height
|
|
43
|
+
? {
|
|
44
|
+
revisionHeight: BigInt(timeout_height.revision_height || "0"),
|
|
45
|
+
revisionNumber: BigInt(timeout_height.revision_number || "0"),
|
|
46
|
+
}
|
|
47
|
+
: undefined,
|
|
48
|
+
timeoutTimestamp: BigInt(timeout_timestamp || "0"),
|
|
49
|
+
memo: memo !== null && memo !== void 0 ? memo : "",
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
exports.createIbcAminoConverters = createIbcAminoConverters;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EncodeObject, GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
+
import { MsgTransfer } from "cosmjs-types/ibc/applications/transfer/v1/tx";
|
|
3
|
+
export declare const ibcTypes: ReadonlyArray<[string, GeneratedType]>;
|
|
4
|
+
export interface MsgTransferEncodeObject extends EncodeObject {
|
|
5
|
+
readonly typeUrl: "/ibc.applications.transfer.v1.MsgTransfer";
|
|
6
|
+
readonly value: Partial<MsgTransfer>;
|
|
7
|
+
}
|
|
8
|
+
export declare function isMsgTransferEncodeObject(object: EncodeObject): object is MsgTransferEncodeObject;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isMsgTransferEncodeObject = exports.ibcTypes = void 0;
|
|
4
|
+
var tx_1 = require("cosmjs-types/ibc/applications/transfer/v1/tx");
|
|
5
|
+
var tx_2 = require("cosmjs-types/ibc/core/channel/v1/tx");
|
|
6
|
+
var tx_3 = require("cosmjs-types/ibc/core/client/v1/tx");
|
|
7
|
+
var tx_4 = require("cosmjs-types/ibc/core/connection/v1/tx");
|
|
8
|
+
exports.ibcTypes = [
|
|
9
|
+
["/ibc.applications.transfer.v1.MsgTransfer", tx_1.MsgTransfer],
|
|
10
|
+
["/ibc.core.channel.v1.MsgAcknowledgement", tx_2.MsgAcknowledgement],
|
|
11
|
+
["/ibc.core.channel.v1.MsgChannelCloseConfirm", tx_2.MsgChannelCloseConfirm],
|
|
12
|
+
["/ibc.core.channel.v1.MsgChannelCloseInit", tx_2.MsgChannelCloseInit],
|
|
13
|
+
["/ibc.core.channel.v1.MsgChannelOpenAck", tx_2.MsgChannelOpenAck],
|
|
14
|
+
["/ibc.core.channel.v1.MsgChannelOpenConfirm", tx_2.MsgChannelOpenConfirm],
|
|
15
|
+
["/ibc.core.channel.v1.MsgChannelOpenInit", tx_2.MsgChannelOpenInit],
|
|
16
|
+
["/ibc.core.channel.v1.MsgChannelOpenTry", tx_2.MsgChannelOpenTry],
|
|
17
|
+
["/ibc.core.channel.v1.MsgRecvPacket", tx_2.MsgRecvPacket],
|
|
18
|
+
["/ibc.core.channel.v1.MsgTimeout", tx_2.MsgTimeout],
|
|
19
|
+
["/ibc.core.channel.v1.MsgTimeoutOnClose", tx_2.MsgTimeoutOnClose],
|
|
20
|
+
["/ibc.core.client.v1.MsgCreateClient", tx_3.MsgCreateClient],
|
|
21
|
+
["/ibc.core.client.v1.MsgSubmitMisbehaviour", tx_3.MsgSubmitMisbehaviour],
|
|
22
|
+
["/ibc.core.client.v1.MsgUpdateClient", tx_3.MsgUpdateClient],
|
|
23
|
+
["/ibc.core.client.v1.MsgUpgradeClient", tx_3.MsgUpgradeClient],
|
|
24
|
+
["/ibc.core.connection.v1.MsgConnectionOpenAck", tx_4.MsgConnectionOpenAck],
|
|
25
|
+
["/ibc.core.connection.v1.MsgConnectionOpenConfirm", tx_4.MsgConnectionOpenConfirm],
|
|
26
|
+
["/ibc.core.connection.v1.MsgConnectionOpenInit", tx_4.MsgConnectionOpenInit],
|
|
27
|
+
["/ibc.core.connection.v1.MsgConnectionOpenTry", tx_4.MsgConnectionOpenTry],
|
|
28
|
+
];
|
|
29
|
+
function isMsgTransferEncodeObject(object) {
|
|
30
|
+
return object.typeUrl === "/ibc.applications.transfer.v1.MsgTransfer";
|
|
31
|
+
}
|
|
32
|
+
exports.isMsgTransferEncodeObject = isMsgTransferEncodeObject;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { QueryDenomTraceResponse, QueryDenomTracesResponse, QueryParamsResponse as QueryTransferParamsResponse } from "cosmjs-types/ibc/applications/transfer/v1/query";
|
|
2
|
+
import { QueryChannelClientStateResponse, QueryChannelConsensusStateResponse, QueryChannelResponse, QueryChannelsResponse, QueryConnectionChannelsResponse, QueryNextSequenceReceiveResponse, QueryPacketAcknowledgementResponse, QueryPacketAcknowledgementsResponse, QueryPacketCommitmentResponse, QueryPacketCommitmentsResponse, QueryPacketReceiptResponse, QueryUnreceivedAcksResponse, QueryUnreceivedPacketsResponse } from "cosmjs-types/ibc/core/channel/v1/query";
|
|
3
|
+
import { Height } from "cosmjs-types/ibc/core/client/v1/client";
|
|
4
|
+
import { QueryClientParamsResponse, QueryClientStateResponse, QueryClientStatesResponse, QueryConsensusStateResponse, QueryConsensusStatesResponse } from "cosmjs-types/ibc/core/client/v1/query";
|
|
5
|
+
import { QueryClientConnectionsResponse, QueryConnectionClientStateResponse, QueryConnectionConsensusStateResponse, QueryConnectionResponse, QueryConnectionsResponse } from "cosmjs-types/ibc/core/connection/v1/query";
|
|
6
|
+
import { ClientState as TendermintClientState, ConsensusState as TendermintConsensusState } from "cosmjs-types/ibc/lightclients/tendermint/v1/tendermint";
|
|
7
|
+
import { QueryClient } from "../../queryclient";
|
|
8
|
+
export interface IbcExtension {
|
|
9
|
+
readonly ibc: {
|
|
10
|
+
readonly channel: {
|
|
11
|
+
readonly channel: (portId: string, channelId: string) => Promise<QueryChannelResponse>;
|
|
12
|
+
readonly channels: (paginationKey?: Uint8Array) => Promise<QueryChannelsResponse>;
|
|
13
|
+
readonly allChannels: () => Promise<QueryChannelsResponse>;
|
|
14
|
+
readonly connectionChannels: (connection: string, paginationKey?: Uint8Array) => Promise<QueryConnectionChannelsResponse>;
|
|
15
|
+
readonly allConnectionChannels: (connection: string) => Promise<QueryConnectionChannelsResponse>;
|
|
16
|
+
readonly clientState: (portId: string, channelId: string) => Promise<QueryChannelClientStateResponse>;
|
|
17
|
+
readonly consensusState: (portId: string, channelId: string, revisionNumber: number, revisionHeight: number) => Promise<QueryChannelConsensusStateResponse>;
|
|
18
|
+
readonly packetCommitment: (portId: string, channelId: string, sequence: number) => Promise<QueryPacketCommitmentResponse>;
|
|
19
|
+
readonly packetCommitments: (portId: string, channelId: string, paginationKey?: Uint8Array) => Promise<QueryPacketCommitmentsResponse>;
|
|
20
|
+
readonly allPacketCommitments: (portId: string, channelId: string) => Promise<QueryPacketCommitmentsResponse>;
|
|
21
|
+
readonly packetReceipt: (portId: string, channelId: string, sequence: number) => Promise<QueryPacketReceiptResponse>;
|
|
22
|
+
readonly packetAcknowledgement: (portId: string, channelId: string, sequence: number) => Promise<QueryPacketAcknowledgementResponse>;
|
|
23
|
+
readonly packetAcknowledgements: (portId: string, channelId: string, paginationKey?: Uint8Array) => Promise<QueryPacketAcknowledgementsResponse>;
|
|
24
|
+
readonly allPacketAcknowledgements: (portId: string, channelId: string) => Promise<QueryPacketAcknowledgementsResponse>;
|
|
25
|
+
readonly unreceivedPackets: (portId: string, channelId: string, packetCommitmentSequences: readonly number[]) => Promise<QueryUnreceivedPacketsResponse>;
|
|
26
|
+
readonly unreceivedAcks: (portId: string, channelId: string, packetAckSequences: readonly number[]) => Promise<QueryUnreceivedAcksResponse>;
|
|
27
|
+
readonly nextSequenceReceive: (portId: string, channelId: string) => Promise<QueryNextSequenceReceiveResponse>;
|
|
28
|
+
};
|
|
29
|
+
readonly client: {
|
|
30
|
+
readonly state: (clientId: string) => Promise<QueryClientStateResponse>;
|
|
31
|
+
readonly states: (paginationKey?: Uint8Array) => Promise<QueryClientStatesResponse>;
|
|
32
|
+
readonly allStates: () => Promise<QueryClientStatesResponse>;
|
|
33
|
+
readonly consensusState: (clientId: string, height?: number) => Promise<QueryConsensusStateResponse>;
|
|
34
|
+
readonly consensusStates: (clientId: string, paginationKey?: Uint8Array) => Promise<QueryConsensusStatesResponse>;
|
|
35
|
+
readonly allConsensusStates: (clientId: string) => Promise<QueryConsensusStatesResponse>;
|
|
36
|
+
readonly params: () => Promise<QueryClientParamsResponse>;
|
|
37
|
+
readonly stateTm: (clientId: string) => Promise<TendermintClientState>;
|
|
38
|
+
readonly statesTm: (paginationKey?: Uint8Array) => Promise<TendermintClientState[]>;
|
|
39
|
+
readonly allStatesTm: () => Promise<TendermintClientState[]>;
|
|
40
|
+
readonly consensusStateTm: (clientId: string, height?: Height) => Promise<TendermintConsensusState>;
|
|
41
|
+
};
|
|
42
|
+
readonly connection: {
|
|
43
|
+
readonly connection: (connectionId: string) => Promise<QueryConnectionResponse>;
|
|
44
|
+
readonly connections: (paginationKey?: Uint8Array) => Promise<QueryConnectionsResponse>;
|
|
45
|
+
readonly allConnections: () => Promise<QueryConnectionsResponse>;
|
|
46
|
+
readonly clientConnections: (clientId: string) => Promise<QueryClientConnectionsResponse>;
|
|
47
|
+
readonly clientState: (connectionId: string) => Promise<QueryConnectionClientStateResponse>;
|
|
48
|
+
readonly consensusState: (connectionId: string, revisionNumber: number, revisionHeight: number) => Promise<QueryConnectionConsensusStateResponse>;
|
|
49
|
+
};
|
|
50
|
+
readonly transfer: {
|
|
51
|
+
readonly denomTrace: (hash: string) => Promise<QueryDenomTraceResponse>;
|
|
52
|
+
readonly denomTraces: (paginationKey?: Uint8Array) => Promise<QueryDenomTracesResponse>;
|
|
53
|
+
readonly allDenomTraces: () => Promise<QueryDenomTracesResponse>;
|
|
54
|
+
readonly params: () => Promise<QueryTransferParamsResponse>;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export declare function setupIbcExtension(base: QueryClient): IbcExtension;
|