@firmachain/firma-js 0.2.64 → 0.3.0-beta1
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 +4 -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 +12 -9
- package/dist/sdk/FirmaGovService.js +162 -97
- 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/GovTxClient.d.ts +6 -0
- package/dist/sdk/firmachain/gov/GovTxClient.js +6 -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.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 +351 -379
- 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 +149 -78
- 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 +18 -9
- package/dist/test/config_test.sample.d.ts +5 -0
- package/dist/test/config_test.sample.js +8 -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
|
@@ -20,14 +20,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
20
20
|
to[j] = from[i];
|
|
21
21
|
return to;
|
|
22
22
|
};
|
|
23
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
24
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
25
|
-
};
|
|
26
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
24
|
exports.makeSignBytes = exports.makeSignDoc = exports.makeAuthInfoBytes = void 0;
|
|
25
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
26
|
+
var utils_1 = require("@cosmjs/utils");
|
|
28
27
|
var signing_1 = require("cosmjs-types/cosmos/tx/signing/v1beta1/signing");
|
|
29
28
|
var tx_1 = require("cosmjs-types/cosmos/tx/v1beta1/tx");
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Create signer infos from the provided signers.
|
|
31
|
+
*
|
|
32
|
+
* This implementation does not support different signing modes for the different signers.
|
|
33
|
+
*/
|
|
31
34
|
function makeSignerInfos(signers, signMode) {
|
|
32
35
|
return signers.map(function (_a) {
|
|
33
36
|
var pubkey = _a.pubkey, sequence = _a.sequence;
|
|
@@ -36,21 +39,30 @@ function makeSignerInfos(signers, signMode) {
|
|
|
36
39
|
modeInfo: {
|
|
37
40
|
single: { mode: signMode },
|
|
38
41
|
},
|
|
39
|
-
sequence:
|
|
42
|
+
sequence: BigInt(sequence),
|
|
40
43
|
});
|
|
41
44
|
});
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Creates and serializes an AuthInfo document.
|
|
48
|
+
*
|
|
49
|
+
* This implementation does not support different signing modes for the different signers.
|
|
50
|
+
*/
|
|
51
|
+
function makeAuthInfoBytes(signers, feeAmount, gasLimit, feeGranter, feePayer, signMode) {
|
|
44
52
|
if (signMode === void 0) { signMode = signing_1.SignMode.SIGN_MODE_DIRECT; }
|
|
45
|
-
|
|
53
|
+
// Required arguments 4 and 5 were added in CosmJS 0.29. Use runtime checks to help our non-TS users.
|
|
54
|
+
utils_1.assert(feeGranter === undefined || typeof feeGranter === "string", "feeGranter must be undefined or string");
|
|
55
|
+
utils_1.assert(feePayer === undefined || typeof feePayer === "string", "feePayer must be undefined or string");
|
|
56
|
+
var authInfo = tx_1.AuthInfo.fromPartial({
|
|
46
57
|
signerInfos: makeSignerInfos(signers, signMode),
|
|
47
58
|
fee: {
|
|
48
59
|
amount: __spreadArray([], __read(feeAmount)),
|
|
49
|
-
gasLimit:
|
|
50
|
-
granter:
|
|
60
|
+
gasLimit: BigInt(gasLimit),
|
|
61
|
+
granter: feeGranter,
|
|
62
|
+
payer: feePayer,
|
|
51
63
|
},
|
|
52
|
-
};
|
|
53
|
-
return tx_1.AuthInfo.encode(
|
|
64
|
+
});
|
|
65
|
+
return tx_1.AuthInfo.encode(authInfo).finish();
|
|
54
66
|
}
|
|
55
67
|
exports.makeAuthInfoBytes = makeAuthInfoBytes;
|
|
56
68
|
function makeSignDoc(bodyBytes, authInfoBytes, chainId, accountNumber) {
|
|
@@ -58,7 +70,7 @@ function makeSignDoc(bodyBytes, authInfoBytes, chainId, accountNumber) {
|
|
|
58
70
|
bodyBytes: bodyBytes,
|
|
59
71
|
authInfoBytes: authInfoBytes,
|
|
60
72
|
chainId: chainId,
|
|
61
|
-
accountNumber:
|
|
73
|
+
accountNumber: BigInt(accountNumber),
|
|
62
74
|
};
|
|
63
75
|
}
|
|
64
76
|
exports.makeSignDoc = makeSignDoc;
|
|
@@ -1,44 +1,121 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AminoMsg, StdFee } from "@cosmjs/amino";
|
|
2
|
+
import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
|
|
3
|
+
import { CometClient, HttpEndpoint } from "@cosmjs/tendermint-rpc";
|
|
4
|
+
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
|
|
3
5
|
import { SignDoc, TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
6
|
+
import { Height } from "cosmjs-types/ibc/core/client/v1/client";
|
|
7
|
+
import { AminoConverters, AminoTypes } from "./aminotypes";
|
|
8
|
+
import { GasPrice } from "./fee";
|
|
9
|
+
import { DeliverTxResponse, StargateClient, StargateClientOptions } from "./stargateclient";
|
|
10
|
+
export declare const defaultRegistryTypes: ReadonlyArray<[string, GeneratedType]>;
|
|
11
|
+
export interface ArbitraryVerifyData {
|
|
12
|
+
type: string;
|
|
13
|
+
signer: string;
|
|
14
|
+
data: string;
|
|
15
|
+
pubkey: string;
|
|
16
|
+
signature: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Signing information for a single signer that is not included in the transaction.
|
|
20
|
+
*
|
|
21
|
+
* @see https://github.com/cosmos/cosmos-sdk/blob/v0.42.2/x/auth/signing/sign_mode_handler.go#L23-L37
|
|
22
|
+
*/
|
|
7
23
|
export interface SignerData {
|
|
8
24
|
readonly accountNumber: number;
|
|
9
25
|
readonly sequence: number;
|
|
10
26
|
readonly chainId: string;
|
|
11
27
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly
|
|
28
|
+
/** Use for testing only */
|
|
29
|
+
export interface PrivateSigningStargateClient {
|
|
30
|
+
readonly registry: Registry;
|
|
31
|
+
}
|
|
32
|
+
export interface SigningStargateClientOptions extends StargateClientOptions {
|
|
33
|
+
readonly registry?: Registry;
|
|
34
|
+
readonly aminoTypes?: AminoTypes;
|
|
35
|
+
readonly broadcastTimeoutMs?: number;
|
|
36
|
+
readonly broadcastPollIntervalMs?: number;
|
|
37
|
+
readonly gasPrice?: GasPrice;
|
|
15
38
|
}
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
readonly
|
|
39
|
+
export declare function createDefaultAminoConverters(): AminoConverters;
|
|
40
|
+
export interface MsgSignData extends AminoMsg {
|
|
41
|
+
readonly type: "sign/MsgSignData";
|
|
42
|
+
readonly value: {
|
|
43
|
+
/** Bech32 account address */
|
|
44
|
+
signer: string;
|
|
45
|
+
/** Base64 encoded data */
|
|
46
|
+
data: string;
|
|
47
|
+
};
|
|
19
48
|
}
|
|
49
|
+
export declare function isMsgSignData(msg: AminoMsg): msg is MsgSignData;
|
|
20
50
|
export declare class SigningStargateClient extends StargateClient {
|
|
21
|
-
|
|
22
|
-
private readonly registry;
|
|
51
|
+
readonly registry: Registry;
|
|
23
52
|
private chainId;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
53
|
+
readonly broadcastTimeoutMs: number | undefined;
|
|
54
|
+
readonly broadcastPollIntervalMs: number | undefined;
|
|
55
|
+
private readonly signer;
|
|
56
|
+
private readonly aminoTypes;
|
|
57
|
+
private readonly gasPrice;
|
|
58
|
+
private readonly defaultGasMultiplier;
|
|
59
|
+
/**
|
|
60
|
+
* Creates an instance by connecting to the given CometBFT RPC endpoint.
|
|
61
|
+
*
|
|
62
|
+
* This uses auto-detection to decide between a CometBFT 0.38, Tendermint 0.37 and 0.34 client.
|
|
63
|
+
* To set the Comet client explicitly, use `createWithSigner`.
|
|
64
|
+
*/
|
|
65
|
+
static connectWithSigner(endpoint: string | HttpEndpoint, signer: OfflineSigner, options?: SigningStargateClientOptions): Promise<SigningStargateClient>;
|
|
66
|
+
/**
|
|
67
|
+
* Creates an instance from a manually created Comet client.
|
|
68
|
+
* Use this to use `Comet38Client` or `Tendermint37Client` instead of `Tendermint34Client`.
|
|
69
|
+
*/
|
|
70
|
+
static createWithSigner(cometClient: CometClient, signer: OfflineSigner, options?: SigningStargateClientOptions): Promise<SigningStargateClient>;
|
|
71
|
+
/**
|
|
72
|
+
* Creates a client in offline mode.
|
|
73
|
+
*
|
|
74
|
+
* This should only be used in niche cases where you know exactly what you're doing,
|
|
75
|
+
* e.g. when building an offline signing application.
|
|
76
|
+
*
|
|
77
|
+
* When you try to use online functionality with such a signer, an
|
|
78
|
+
* exception will be raised.
|
|
79
|
+
*/
|
|
80
|
+
static offline(signer: OfflineSigner, options?: SigningStargateClientOptions): Promise<SigningStargateClient>;
|
|
81
|
+
protected constructor(cometClient: CometClient | undefined, signer: OfflineSigner, options: SigningStargateClientOptions);
|
|
82
|
+
simulate(signerAddress: string, messages: readonly EncodeObject[], memo: string | undefined): Promise<number>;
|
|
83
|
+
sendTokens(senderAddress: string, recipientAddress: string, amount: readonly Coin[], fee: StdFee | "auto" | number, memo?: string): Promise<DeliverTxResponse>;
|
|
84
|
+
delegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: StdFee | "auto" | number, memo?: string): Promise<DeliverTxResponse>;
|
|
85
|
+
undelegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: StdFee | "auto" | number, memo?: string): Promise<DeliverTxResponse>;
|
|
86
|
+
withdrawRewards(delegatorAddress: string, validatorAddress: string, fee: StdFee | "auto" | number, memo?: string): Promise<DeliverTxResponse>;
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated This API does not support setting the memo field of `MsgTransfer` (only the transaction memo).
|
|
89
|
+
* We'll remove this method at some point because trying to wrap the various message types is a losing strategy.
|
|
90
|
+
* Please migrate to `signAndBroadcast` with an `MsgTransferEncodeObject` created in the caller code instead.
|
|
91
|
+
* @see https://github.com/cosmos/cosmjs/issues/1493
|
|
92
|
+
*/
|
|
93
|
+
sendIbcTokens(senderAddress: string, recipientAddress: string, transferAmount: Coin, sourcePort: string, sourceChannel: string, timeoutHeight: Height | undefined,
|
|
94
|
+
/** timeout in seconds */
|
|
95
|
+
timeoutTimestamp: number | undefined, fee: StdFee | "auto" | number, memo?: string): Promise<DeliverTxResponse>;
|
|
96
|
+
signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee | "auto" | number, memo?: string, timeoutHeight?: bigint): Promise<DeliverTxResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* This method is useful if you want to send a transaction in broadcast,
|
|
99
|
+
* without waiting for it to be placed inside a block, because for example
|
|
100
|
+
* I would like to receive the hash to later track the transaction with another tool.
|
|
101
|
+
* @returns Returns the hash of the transaction
|
|
102
|
+
*/
|
|
103
|
+
signAndBroadcastSync(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee | "auto" | number, memo?: string, timeoutHeight?: bigint): Promise<string>;
|
|
29
104
|
static makeSignDocForSend(signerAddress: string, pubkeyStr: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, serverUrl: string, chainId: string, registry: Registry): Promise<SignDoc>;
|
|
30
|
-
sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, explicitSignerData?: SignerData): Promise<TxRaw>;
|
|
31
|
-
getChainId(): Promise<string>;
|
|
32
105
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
106
|
+
* Gets account number and sequence from the API, creates a sign doc,
|
|
107
|
+
* creates a single signature and assembles the signed transaction.
|
|
108
|
+
*
|
|
109
|
+
* The sign mode (SIGN_MODE_DIRECT or SIGN_MODE_LEGACY_AMINO_JSON) is determined by this client's signer.
|
|
110
|
+
*
|
|
111
|
+
* You can pass signer data (account number, sequence and chain ID) explicitly instead of querying them
|
|
112
|
+
* from the chain. This is needed when signing for a multisig account, but it also allows for offline signing
|
|
113
|
+
* (See the SigningStargateClient.offline constructor).
|
|
114
|
+
*/
|
|
115
|
+
sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, explicitSignerData?: SignerData, timeoutHeight?: bigint): Promise<TxRaw>;
|
|
116
|
+
getChainId(): Promise<string>;
|
|
117
|
+
private signAmino;
|
|
42
118
|
private signDirect;
|
|
43
|
-
|
|
119
|
+
static experimentalAdr36Verify(data: ArbitraryVerifyData, checkMsg: string): Promise<boolean>;
|
|
120
|
+
experimentalAdr36Sign(signerAddress: string, data: Uint8Array | Uint8Array[]): Promise<ArbitraryVerifyData>;
|
|
44
121
|
}
|