@skip-go/client 0.4.3
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 +55 -0
- package/dist/chunk-6AMBIQDN.js +1868 -0
- package/dist/chunk-6FNC3XMI.js +45 -0
- package/dist/chunk-JRIEAGIQ.js +10 -0
- package/dist/chunk-PV2ELBDQ.js +3248 -0
- package/dist/index.d.ts +307 -0
- package/dist/index.js +2874 -0
- package/dist/parser.d.ts +1 -0
- package/dist/parser.js +11 -0
- package/dist/shared-UW-rSz3r.d.ts +943 -0
- package/dist/transactions.d.ts +11 -0
- package/dist/transactions.js +23 -0
- package/dist/types.d.ts +565 -0
- package/dist/types.js +639 -0
- package/package.json +38 -0
- package/parser.d.ts +1 -0
- package/parser.js +1 -0
- package/transactions.d.ts +1 -0
- package/transactions.js +1 -0
- package/types.d.ts +1 -0
- package/types.js +1 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import * as _cosmjs_cosmwasm_stargate from '@cosmjs/cosmwasm-stargate';
|
|
2
|
+
import * as viem from 'viem';
|
|
3
|
+
import { WalletClient } from 'viem';
|
|
4
|
+
import { Coin, OfflineAminoSigner } from '@cosmjs/amino';
|
|
5
|
+
import { OfflineSigner, GeneratedType, OfflineDirectSigner, Registry, EncodeObject } from '@cosmjs/proto-signing';
|
|
6
|
+
import { AminoConverters, GasPrice, StdFee, SignerData, AminoTypes, SigningStargateClient } from '@cosmjs/stargate';
|
|
7
|
+
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx';
|
|
8
|
+
import { TxStatusResponse, Chain, SubmitTxResponse, TrackTxResponse, FeeAsset } from './types.js';
|
|
9
|
+
export { AcknowledgementError, AxelarTransferInfo, AxelarTransferInfoJSON, AxelarTransferState, AxelarTransferTransactions, AxelarTransferTransactionsJSON, AxelarTransferType, CCTPTransferInfo, CCTPTransferInfoJSON, CCTPTransferState, CCTPTransferTransactions, CCTPTransferTransactionsJSON, ChainJSON, ChainTransaction, ChainTransactionJSON, ContractCallWithTokenError, ContractCallWithTokenErrorType, ContractCallWithTokenTransactions, ContractCallWithTokenTransactionsJSON, FeeAssetJSON, GasPriceInfo, HyperlaneTransferInfo, HyperlaneTransferInfoJSON, HyperlaneTransferState, HyperlaneTransferTransactions, HyperlaneTransferTransactionsJSON, IbcCapabilities, IbcCapabilitiesJSON, ModuleSupport, ModuleVersionInfo, NextBlockingTransfer, NextBlockingTransferJSON, OPInitTransferInfo, OPInitTransferInfoJSON, OPInitTransferState, OPInitTransferTransactions, OPInitTransferTransactionsJSON, Packet, PacketError, PacketErrorJSON, PacketErrorType, PacketJSON, SendTokenError, SendTokenErrorType, SendTokenTransactions, SendTokenTransactionsJSON, StatusError, StatusErrorJSON, StatusErrorType, StatusRequest, StatusRequestJSON, StatusState, SubmitTxRequest, SubmitTxRequestJSON, SubmitTxResponseJSON, TrackTxRequest, TrackTxRequestJSON, TrackTxResponseJSON, TransactionExecutionError, TransferAssetRelease, TransferAssetReleaseJSON, TransferEvent, TransferEventJSON, TransferInfo, TransferInfoJSON, TransferState, TransferStatus, TransferStatusJSON, TxStatusResponseJSON, Venue, affiliateFromJSON, affiliateToJSON, assetBetweenChainsFromJSON, assetBetweenChainsToJSON, assetFromJSON, assetOrErrorFromJSON, assetOrErrorToJSON, assetRecommendationFromJSON, assetRecommendationRequestFromJSON, assetRecommendationRequestToJSON, assetRecommendationToJSON, assetToJSON, assetsBetweenChainsRequestFromJSON, assetsBetweenChainsRequestToJSON, assetsBetweenChainsResponseFromJSON, assetsFromSourceRequestFromJSON, assetsFromSourceRequestToJSON, assetsRequestFromJSON, assetsRequestToJSON, axelarTransferFromJSON, axelarTransferInfoFromJSON, axelarTransferInfoToJSON, axelarTransferToJSON, axelarTransferTransactionsFromJSON, axelarTransferTransactionsToJSON, bankSendFromJSON, bankSendToJSON, bridgeFromJSON, bridgeToJSON, bridgesResponseFromJSON, bridgesResponseToJSON, cctpTransferFromJSON, cctpTransferInfoFromJSON, cctpTransferInfoToJSON, cctpTransferToJSON, cctpTransferTransactionsFromJSON, cctpTransferTransactionsToJSON, chainAffiliatesFromJSON, chainAffiliatesToJSON, chainFromJSON, chainIDsToAffiliatesMapFromJSON, chainIDsToAffiliatesMapToJSON, chainToJSON, chainTransactionFromJSON, chainTransactionToJSON, contractCallWithTokenTransactionsFromJSON, contractCallWithTokenTransactionsToJSON, cosmWasmContractMsgFromJSON, cosmWasmContractMsgToJSON, cosmosMsgFromJSON, cosmosMsgToJSON, cosmosTxFromJSON, cosmosTxToJSON, denomWithChainIDFromJSON, denomWithChainIDToJSON, erc20ApprovalFromJSON, erc20ApprovalToJSON, estimatedFeeFromJSON, estimatedFeeToJSON, evmSwapFromJSON, evmSwapToJSON, evmTxFromJSON, evmTxToJSON, feeAssetFromJSON, feeAssetToJSON, hyperlaneTransferFromJSON, hyperlaneTransferInfoFromJSON, hyperlaneTransferInfoToJSON, hyperlaneTransferToJSON, hyperlaneTransferTransactionsFromJSON, hyperlaneTransferTransactionsToJSON, ibcAddressFromJSON, ibcAddressToJSON, ibcCapabilitiesFromJSON, ibcCapabilitiesToJSON, messageResponseFromJSON, msgFromJSON, msgToJSON, msgsDirectRequestFromJSON, msgsDirectRequestToJSON, msgsRequestFromJSON, msgsRequestToJSON, multiChainMsgFromJSON, multiChainMsgToJSON, nextBlockingTransferFromJSON, nextBlockingTransferToJSON, opInitTransferFromJSON, opInitTransferInfoFromJSON, opInitTransferInfoToJSON, opInitTransferToJSON, opInitTransferTransactionsFromJSON, opInitTransferTransactionsToJSON, operationFromJSON, operationToJSON, originAssetsRequestFromJSON, originAssetsRequestToJSON, originAssetsResponseFromJSON, originAssetsResponseToJSON, packetFromJSON, packetToJSON, postHandlerFromJSON, postHandlerToJSON, recommendAssetsRequestFromJSON, recommendAssetsRequestToJSON, recommendAssetsResponseFromJSON, recommendAssetsResponseToJSON, recommendationEntryFromJSON, recommendationEntryToJSON, routeRequestFromJSON, routeRequestToJSON, routeResponseFromJSON, routeResponseToJSON, sendTokenTransactionsFromJSON, sendTokenTransactionsToJSON, smartSwapExactCoinInFromJSON, smartSwapExactCoinInToJSON, smartSwapOptionsFromJSON, smartSwapOptionsToJSON, submitTxRequestFromJSON, submitTxRequestToJSON, submitTxResponseFromJSON, submitTxResponseToJSON, svmTxFromJSON, svmTxToJSON, swapExactCoinInFromJSON, swapExactCoinInToJSON, swapExactCoinOutFromJSON, swapExactCoinOutToJSON, swapFromJSON, swapOperationFromJSON, swapOperationToJSON, swapRouteFromJSON, swapRouteToJSON, swapToJSON, swapVenueFromJSON, swapVenueRequestFromJSON, swapVenueRequestToJSON, swapVenueToJSON, trackTxRequestFromJSON, trackTxRequestToJSON, trackTxResponseFromJSON, trackTxResponseToJSON, transferAssetReleaseFromJSON, transferAssetReleaseToJSON, transferEventFromJSON, transferEventToJSON, transferFromJSON, transferInfoFromJSON, transferInfoToJSON, transferStatusFromJSON, transferStatusToJSON, transferToJSON, txFromJSON, txStatusRequestFromJSON, txStatusRequestToJSON, txStatusResponseFromJSON, txStatusResponseToJSON, txToJSON } from './types.js';
|
|
10
|
+
import { R as RouteResponse, M as MultiChainMsg, C as CosmosMsg, A as AssetsRequest, a as Asset, b as AssetsFromSourceRequest, c as AssetsBetweenChainsRequest, d as AssetBetweenChains, B as Bridge, T as Tx, E as EvmTx, S as SvmTx, e as MsgsRequest, f as MsgsResponse, g as RouteRequest, h as MsgsDirectRequest, i as MsgsDirectResponse, j as AssetRecommendationRequest, k as RecommendationEntry, D as DenomWithChainID, l as AssetOrError, m as SwapVenue } from './shared-UW-rSz3r.js';
|
|
11
|
+
export { a5 as Affiliate, a4 as AffiliateJSON, ak as ApiError, b0 as AssetBetweenChainsJSON, o as AssetJSON, al as AssetOrErrorJSON, au as AssetRecommendation, av as AssetRecommendationJSON, aw as AssetRecommendationRequestJSON, b1 as AssetsBetweenChainsRequestJSON, b3 as AssetsBetweenChainsResponse, b2 as AssetsBetweenChainsResponseJSON, at as AssetsFromSourceRequestJSON, as as AssetsRequestJSON, ab as AutopilotAction, ac as AutopilotMsg, s as AxelarTransfer, r as AxelarTransferJSON, u as BankSend, t as BankSendJSON, b6 as BridgeJSON, a$ as BridgeType, b5 as BridgesResponse, b4 as BridgesResponseJSON, F as CCTPTransfer, z as CCTPTransferJSON, a7 as ChainAffiliates, a6 as ChainAffiliatesJSON, aa as CosmWasmContractMsg, a9 as CosmWasmContractMsgJSON, w as CosmosMsgJSON, y as CosmosTx, x as CosmosTxJSON, aj as DenomWithChainIDJSON, ag as ERC20Approval, af as ERC20ApprovalJSON, aQ as EstimatedFee, aR as EstimatedFeeJSON, a3 as EvmSwap, a2 as EvmSwapJSON, ai as EvmTxJSON, aM as ExperimentalFeature, aP as FeeType, G as HyperlaneTransfer, H as HyperlaneTransferJSON, n as IBCAddress, I as IBCAddressJSON, aY as Msg, aX as MsgJSON, aW as MsgsDirectRequestJSON, aG as MsgsDirectResponseJSON, aV as MsgsRequestJSON, a_ as MsgsResponseJSON, aO as MsgsWarning, aL as MsgsWarningType, v as MultiChainMsgJSON, J as OPInitTransfer, O as OPInitTransferJSON, aT as Operation, aS as OperationJSON, an as OriginAssetsRequest, am as OriginAssetsRequestJSON, ap as OriginAssetsResponse, ao as OriginAssetsResponseJSON, ae as PostHandler, ad as PostHandlerJSON, a8 as Reason, ay as RecommendAssetsRequest, ax as RecommendAssetsRequestJSON, aA as RecommendAssetsResponse, az as RecommendAssetsResponseJSON, aB as RecommendationEntryJSON, aH as RouteRequestBase, aC as RouteRequestBaseJSON, aI as RouteRequestGivenIn, aD as RouteRequestGivenInJSON, aJ as RouteRequestGivenOut, aE as RouteRequestGivenOutJSON, aF as RouteRequestJSON, aU as RouteResponseJSON, aN as RouteWarning, aK as RouteWarningType, $ as SmartSwapExactCoinIn, _ as SmartSwapExactCoinInJSON, ar as SmartSwapOptions, aq as SmartSwapOptionsJSON, ah as SvmTxJSON, a1 as Swap, X as SwapExactCoinIn, W as SwapExactCoinInJSON, V as SwapExactCoinOut, U as SwapExactCoinOutJSON, a0 as SwapJSON, Q as SwapOperation, P as SwapOperationJSON, Z as SwapRoute, Y as SwapRouteJSON, K as SwapVenueJSON, N as SwapVenueRequest, L as SwapVenueRequestJSON, q as Transfer, p as TransferJSON, aZ as TxJSON } from './shared-UW-rSz3r.js';
|
|
12
|
+
import { Adapter } from '@solana/wallet-adapter-base';
|
|
13
|
+
export { DEFAULT_GAS_MULTIPLIER, getCosmosGasAmountForMessage, getEncodeObjectFromCosmosMessage, getEncodeObjectFromCosmosMessageInjective } from './transactions.js';
|
|
14
|
+
import '@injectivelabs/sdk-ts/dist/cjs/core/modules/msgs';
|
|
15
|
+
|
|
16
|
+
declare class RequestClient {
|
|
17
|
+
private httpClient;
|
|
18
|
+
constructor({ baseURL, apiKey }: {
|
|
19
|
+
baseURL: string;
|
|
20
|
+
apiKey?: string;
|
|
21
|
+
});
|
|
22
|
+
get<ResponseType = unknown, RequestParams = unknown>(path: string, params?: RequestParams): Promise<ResponseType>;
|
|
23
|
+
post<ResponseType = unknown, Body = unknown>(path: string, data?: Body): Promise<ResponseType>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface UserAddress {
|
|
27
|
+
chainID: string;
|
|
28
|
+
address: string;
|
|
29
|
+
}
|
|
30
|
+
type EndpointOptions = {
|
|
31
|
+
rpc?: string;
|
|
32
|
+
rest?: string;
|
|
33
|
+
};
|
|
34
|
+
interface SkipRouterOptions {
|
|
35
|
+
apiURL?: string;
|
|
36
|
+
apiKey?: string;
|
|
37
|
+
getEVMSigner?: (chainID: string) => Promise<WalletClient>;
|
|
38
|
+
getCosmosSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
39
|
+
getSVMSigner?: () => Promise<Adapter>;
|
|
40
|
+
endpointOptions?: {
|
|
41
|
+
endpoints?: Record<string, EndpointOptions>;
|
|
42
|
+
getRpcEndpointForChain?: (chainID: string) => Promise<string>;
|
|
43
|
+
getRestEndpointForChain?: (chainID: string) => Promise<string>;
|
|
44
|
+
};
|
|
45
|
+
aminoTypes?: AminoConverters;
|
|
46
|
+
registryTypes?: Iterable<[string, GeneratedType]>;
|
|
47
|
+
}
|
|
48
|
+
type ExecuteRouteOptions = {
|
|
49
|
+
route: RouteResponse;
|
|
50
|
+
/**
|
|
51
|
+
* addresses should be in the same order with the `chainIDs` in the `route`
|
|
52
|
+
*/
|
|
53
|
+
userAddresses: UserAddress[];
|
|
54
|
+
getEVMSigner?: (chainID: string) => Promise<WalletClient>;
|
|
55
|
+
getCosmosSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
56
|
+
getSVMSigner?: () => Promise<Adapter>;
|
|
57
|
+
onTransactionBroadcast?: (txInfo: {
|
|
58
|
+
txHash: string;
|
|
59
|
+
chainID: string;
|
|
60
|
+
}) => Promise<void>;
|
|
61
|
+
onTransactionTracked?: (txInfo: {
|
|
62
|
+
txHash: string;
|
|
63
|
+
chainID: string;
|
|
64
|
+
explorerLink: string;
|
|
65
|
+
}) => Promise<void>;
|
|
66
|
+
onTransactionCompleted?: (chainID: string, txHash: string, status: TxStatusResponse) => Promise<void>;
|
|
67
|
+
validateGasBalance?: boolean;
|
|
68
|
+
slippageTolerancePercent?: string;
|
|
69
|
+
/**
|
|
70
|
+
* If `getGasPrice` is undefined, or returns undefined, the router will attempt to set the recommended gas price
|
|
71
|
+
**/
|
|
72
|
+
getGasPrice?: (chainID: string) => Promise<GasPrice | undefined>;
|
|
73
|
+
/**
|
|
74
|
+
* If `getFallbackGasAmount` is set, when router fails to simulate the gas amount, it will use the fallback gas amount
|
|
75
|
+
*/
|
|
76
|
+
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
77
|
+
gasAmountMultiplier?: number;
|
|
78
|
+
};
|
|
79
|
+
type ExecuteCosmosMessageOptions = {
|
|
80
|
+
signerAddress: string;
|
|
81
|
+
signer: OfflineSigner;
|
|
82
|
+
message: MultiChainMsg;
|
|
83
|
+
fee: StdFee;
|
|
84
|
+
};
|
|
85
|
+
type ExecuteCosmosMessage = {
|
|
86
|
+
signerAddress: string;
|
|
87
|
+
getCosmosSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
88
|
+
/**
|
|
89
|
+
* If `getGasPrice` is undefined, or returns undefined, the router will attempt to set the recommended gas price
|
|
90
|
+
**/
|
|
91
|
+
getGasPrice?: GetGasPrice;
|
|
92
|
+
/**
|
|
93
|
+
* If `getFallbackGasAmount` is set, when router fails to simulate the gas amount, it will use the fallback gas amount
|
|
94
|
+
*/
|
|
95
|
+
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
96
|
+
chainID: string;
|
|
97
|
+
messages: CosmosMsg[];
|
|
98
|
+
gasAmountMultiplier?: number;
|
|
99
|
+
gasTokenUsed?: Coin;
|
|
100
|
+
};
|
|
101
|
+
type SignCosmosMessageDirectOptions = {
|
|
102
|
+
signerAddress: string;
|
|
103
|
+
signer: OfflineDirectSigner;
|
|
104
|
+
chainID: string;
|
|
105
|
+
cosmosMsgs: CosmosMsg[];
|
|
106
|
+
fee: StdFee;
|
|
107
|
+
signerData: SignerData;
|
|
108
|
+
};
|
|
109
|
+
type SignCosmosMessageAminoOptions = {
|
|
110
|
+
signerAddress: string;
|
|
111
|
+
signer: OfflineAminoSigner;
|
|
112
|
+
chainID: string;
|
|
113
|
+
cosmosMsgs: CosmosMsg[];
|
|
114
|
+
fee: StdFee;
|
|
115
|
+
signerData: SignerData;
|
|
116
|
+
};
|
|
117
|
+
type GetFallbackGasAmount = (chainID: string, chainType: 'cosmos' | 'evm' | 'svm') => Promise<number | undefined>;
|
|
118
|
+
type GetGasPrice = (chainID: string, chainType: 'cosmos' | 'evm' | 'svm') => Promise<GasPrice | undefined>;
|
|
119
|
+
|
|
120
|
+
declare const SKIP_API_URL = "https://api.skip.build";
|
|
121
|
+
declare class SkipRouter {
|
|
122
|
+
protected requestClient: RequestClient;
|
|
123
|
+
protected aminoTypes: AminoTypes;
|
|
124
|
+
protected registry: Registry;
|
|
125
|
+
protected endpointOptions: {
|
|
126
|
+
endpoints?: Record<string, EndpointOptions>;
|
|
127
|
+
getRpcEndpointForChain?: (chainID: string) => Promise<string>;
|
|
128
|
+
getRestEndpointForChain?: (chainID: string) => Promise<string>;
|
|
129
|
+
};
|
|
130
|
+
protected getCosmosSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
131
|
+
protected getEVMSigner?: (chainID: string) => Promise<WalletClient>;
|
|
132
|
+
protected getSVMSigner?: () => Promise<Adapter>;
|
|
133
|
+
constructor(options?: SkipRouterOptions);
|
|
134
|
+
assets(options?: AssetsRequest): Promise<Record<string, Asset[]>>;
|
|
135
|
+
assetsFromSource(options: AssetsFromSourceRequest): Promise<Record<string, Asset[]>>;
|
|
136
|
+
assetsBetweenChains(options: AssetsBetweenChainsRequest): Promise<AssetBetweenChains[]>;
|
|
137
|
+
bridges(): Promise<Bridge[]>;
|
|
138
|
+
chains({ includeEVM, includeSVM, onlyTestnets, chainIDs, }?: {
|
|
139
|
+
includeEVM?: boolean;
|
|
140
|
+
includeSVM?: boolean;
|
|
141
|
+
onlyTestnets?: boolean;
|
|
142
|
+
chainIDs?: string[];
|
|
143
|
+
}): Promise<Chain[]>;
|
|
144
|
+
executeRoute(options: ExecuteRouteOptions): Promise<void>;
|
|
145
|
+
executeTxs(options: ExecuteRouteOptions & {
|
|
146
|
+
txs: Tx[];
|
|
147
|
+
}): Promise<void>;
|
|
148
|
+
executeEvmMsg(message: {
|
|
149
|
+
evmTx: EvmTx;
|
|
150
|
+
}, options: ExecuteRouteOptions): Promise<viem.TransactionReceipt>;
|
|
151
|
+
executeCosmosMessage(options: ExecuteCosmosMessage): Promise<_cosmjs_cosmwasm_stargate.DeliverTxResponse>;
|
|
152
|
+
estimateGasForMessage({ stargateClient, chainID, signerAddress, gasAmountMultiplier, getGasPrice, messages, encodedMsgs, getFallbackGasAmount, }: {
|
|
153
|
+
stargateClient: SigningStargateClient;
|
|
154
|
+
chainID: string;
|
|
155
|
+
signerAddress: string;
|
|
156
|
+
gasAmountMultiplier: number | undefined;
|
|
157
|
+
getGasPrice?: GetGasPrice;
|
|
158
|
+
messages?: CosmosMsg[];
|
|
159
|
+
encodedMsgs?: EncodeObject[];
|
|
160
|
+
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
161
|
+
}): Promise<StdFee>;
|
|
162
|
+
executeEVMTransaction({ message, signer, }: {
|
|
163
|
+
message: EvmTx;
|
|
164
|
+
signer: WalletClient;
|
|
165
|
+
}): Promise<viem.TransactionReceipt>;
|
|
166
|
+
executeSVMTransaction({ signer, message, }: {
|
|
167
|
+
signer: Adapter;
|
|
168
|
+
message: SvmTx;
|
|
169
|
+
}): Promise<string>;
|
|
170
|
+
signCosmosMessageDirect(options: SignCosmosMessageDirectOptions): Promise<TxRaw>;
|
|
171
|
+
private signCosmosMessageDirectEvmos;
|
|
172
|
+
private signCosmosMessageDirectInjective;
|
|
173
|
+
signCosmosMessageAmino(options: SignCosmosMessageAminoOptions): Promise<TxRaw>;
|
|
174
|
+
messages(options: MsgsRequest): Promise<MsgsResponse>;
|
|
175
|
+
route(options: RouteRequest): Promise<RouteResponse>;
|
|
176
|
+
msgsDirect(options: MsgsDirectRequest): Promise<MsgsDirectResponse>;
|
|
177
|
+
recommendAssets(request: AssetRecommendationRequest | AssetRecommendationRequest[]): Promise<RecommendationEntry[]>;
|
|
178
|
+
ibcOriginAssets(assets: DenomWithChainID[]): Promise<AssetOrError[]>;
|
|
179
|
+
submitTransaction({ chainID, tx, }: {
|
|
180
|
+
chainID: string;
|
|
181
|
+
tx: string;
|
|
182
|
+
}): Promise<SubmitTxResponse>;
|
|
183
|
+
trackTransaction({ chainID, txHash, options, }: {
|
|
184
|
+
chainID: string;
|
|
185
|
+
txHash: string;
|
|
186
|
+
options?: {
|
|
187
|
+
/**
|
|
188
|
+
* Retry options
|
|
189
|
+
* @default { maxRetries: 5, retryInterval: 1000, backoffMultiplier: 2 }
|
|
190
|
+
*/
|
|
191
|
+
retry?: {
|
|
192
|
+
/**
|
|
193
|
+
* Maximum number of retries
|
|
194
|
+
* @default 5
|
|
195
|
+
*/
|
|
196
|
+
maxRetries?: number;
|
|
197
|
+
/**
|
|
198
|
+
* Retry interval in milliseconds
|
|
199
|
+
* @default 1000
|
|
200
|
+
*/
|
|
201
|
+
retryInterval?: number;
|
|
202
|
+
/**
|
|
203
|
+
* Backoff multiplier for retries
|
|
204
|
+
*
|
|
205
|
+
* example: `retryInterval` is set to 1000, backoffMultiplier is set to 2
|
|
206
|
+
*
|
|
207
|
+
* 1st retry: 1000ms
|
|
208
|
+
*
|
|
209
|
+
* 2nd retry: 2000ms
|
|
210
|
+
*
|
|
211
|
+
* 3rd retry: 4000ms
|
|
212
|
+
*
|
|
213
|
+
* 4th retry: 8000ms
|
|
214
|
+
*
|
|
215
|
+
* 5th retry: 16000ms
|
|
216
|
+
*
|
|
217
|
+
* @default 2
|
|
218
|
+
*/
|
|
219
|
+
backoffMultiplier?: number;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
}): Promise<TrackTxResponse>;
|
|
223
|
+
transactionStatus({ chainID, txHash, options, }: {
|
|
224
|
+
chainID: string;
|
|
225
|
+
txHash: string;
|
|
226
|
+
options?: {
|
|
227
|
+
/**
|
|
228
|
+
* Retry options
|
|
229
|
+
* @default { maxRetries: 5, retryInterval: 1000, backoffMultiplier: 2 }
|
|
230
|
+
*/
|
|
231
|
+
retry?: {
|
|
232
|
+
/**
|
|
233
|
+
* Maximum number of retries
|
|
234
|
+
* @default 5
|
|
235
|
+
*/
|
|
236
|
+
maxRetries?: number;
|
|
237
|
+
/**
|
|
238
|
+
* Retry interval in milliseconds
|
|
239
|
+
* @default 1000
|
|
240
|
+
*/
|
|
241
|
+
retryInterval?: number;
|
|
242
|
+
/**
|
|
243
|
+
* Backoff multiplier for retries
|
|
244
|
+
*
|
|
245
|
+
* example: `retryInterval` is set to 1000, backoffMultiplier is set to 2
|
|
246
|
+
*
|
|
247
|
+
* 1st retry: 1000ms
|
|
248
|
+
*
|
|
249
|
+
* 2nd retry: 2000ms
|
|
250
|
+
*
|
|
251
|
+
* 3rd retry: 4000ms
|
|
252
|
+
*
|
|
253
|
+
* 4th retry: 8000ms
|
|
254
|
+
*
|
|
255
|
+
* 5th retry: 16000ms
|
|
256
|
+
*
|
|
257
|
+
* @default 2
|
|
258
|
+
*/
|
|
259
|
+
backoffMultiplier?: number;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
}): Promise<TxStatusResponse>;
|
|
263
|
+
waitForTransaction({ chainID, txHash, onTransactionTracked, }: {
|
|
264
|
+
chainID: string;
|
|
265
|
+
txHash: string;
|
|
266
|
+
onTransactionTracked?: (txInfo: {
|
|
267
|
+
txHash: string;
|
|
268
|
+
chainID: string;
|
|
269
|
+
explorerLink: string;
|
|
270
|
+
}) => Promise<void>;
|
|
271
|
+
}): Promise<TxStatusResponse>;
|
|
272
|
+
venues(onlyTestnets?: boolean): Promise<SwapVenue[]>;
|
|
273
|
+
getCosmsosGasAmountForMessage(client: SigningStargateClient, signerAddress: string, chainID: string, cosmosMessages: CosmosMsg[]): Promise<string>;
|
|
274
|
+
getAccountNumberAndSequence(address: string, chainID: string): Promise<{
|
|
275
|
+
accountNumber: number;
|
|
276
|
+
sequence: number;
|
|
277
|
+
}>;
|
|
278
|
+
private getAccountNumberAndSequenceFromDymension;
|
|
279
|
+
private getAccountNumberAndSequenceFromEvmos;
|
|
280
|
+
private getAccountNumberAndSequenceInjective;
|
|
281
|
+
getRpcEndpointForChain(chainID: string): Promise<string>;
|
|
282
|
+
getRestEndpointForChain(chainID: string): Promise<string>;
|
|
283
|
+
getCosmosFeeForMessage(chainID: string, msgs: CosmosMsg[], gasAmountMultiplier?: number, signer?: OfflineSigner, gasPrice?: GasPrice): Promise<StdFee>;
|
|
284
|
+
getRecommendedGasPrice(chainID: string): Promise<GasPrice | undefined>;
|
|
285
|
+
getFeeInfoForChain(chainID: string): Promise<FeeAsset | undefined>;
|
|
286
|
+
private getDefaultGasTokenForChain;
|
|
287
|
+
private getStakingTokensForChain;
|
|
288
|
+
validateGasBalances({ txs, userAddresses, getOfflineSigner, getGasPrice, gasAmountMultiplier, getFallbackGasAmount, }: {
|
|
289
|
+
txs: Tx[];
|
|
290
|
+
userAddresses: UserAddress[];
|
|
291
|
+
getOfflineSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
292
|
+
getGasPrice?: GetGasPrice;
|
|
293
|
+
gasAmountMultiplier?: number;
|
|
294
|
+
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
295
|
+
}): Promise<Coin | undefined>;
|
|
296
|
+
validateCosmosGasBalance({ chainID, client, signerAddress, messages, getGasPrice, gasAmountMultiplier, getFallbackGasAmount, }: {
|
|
297
|
+
client: SigningStargateClient;
|
|
298
|
+
signerAddress: string;
|
|
299
|
+
chainID: string;
|
|
300
|
+
messages: CosmosMsg[];
|
|
301
|
+
getGasPrice?: GetGasPrice;
|
|
302
|
+
gasAmountMultiplier?: number;
|
|
303
|
+
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
304
|
+
}): Promise<Coin>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export { Asset, AssetBetweenChains, AssetOrError, AssetRecommendationRequest, AssetsBetweenChainsRequest, AssetsFromSourceRequest, AssetsRequest, Bridge, Chain, CosmosMsg, DenomWithChainID, type EndpointOptions, EvmTx, type ExecuteCosmosMessage, type ExecuteCosmosMessageOptions, type ExecuteRouteOptions, FeeAsset, type GetFallbackGasAmount, type GetGasPrice, MsgsDirectRequest, MsgsDirectResponse, MsgsRequest, MsgsResponse, MultiChainMsg, RecommendationEntry, RouteRequest, RouteResponse, SKIP_API_URL, type SignCosmosMessageAminoOptions, type SignCosmosMessageDirectOptions, SkipRouter, type SkipRouterOptions, SubmitTxResponse, SvmTx, SwapVenue, TrackTxResponse, Tx, TxStatusResponse, type UserAddress };
|