@skip-go/client 0.10.2 → 0.11.0-alpha.0
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 -38
- package/dist/index.d.mts +1938 -0
- package/dist/index.mjs +35 -0
- package/package.json +18 -16
- package/vitest.config.mjs +17 -0
- package/vitest.e2e.config.mjs +11 -0
- package/vitest.unit.config.mjs +11 -0
- package/dist/chunk-6FNC3XMI.js +0 -45
- package/dist/chunk-F6SLLVEL.js +0 -2012
- package/dist/chunk-JRIEAGIQ.js +0 -10
- package/dist/chunk-TUX4SN3U.js +0 -3996
- package/dist/index.d.ts +0 -329
- package/dist/index.js +0 -5208
- package/dist/parser.d.ts +0 -1
- package/dist/parser.js +0 -11
- package/dist/shared-IGtrUCgc.d.ts +0 -1035
- package/dist/transactions.d.ts +0 -11
- package/dist/transactions.js +0 -23
- package/dist/types.d.ts +0 -577
- package/dist/types.js +0 -687
- package/parser.d.ts +0 -1
- package/parser.js +0 -1
- package/transactions.d.ts +0 -1
- package/transactions.js +0 -1
- package/types.d.ts +0 -1
- package/types.js +0 -1
package/dist/index.d.ts
DELETED
|
@@ -1,329 +0,0 @@
|
|
|
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, balanceRequestChainEntryFromJSON, balanceRequestChainEntryToJSON, balanceRequestFromJSON, balanceRequestToJSON, balanceResponseChainEntryFromJSON, balanceResponseChainEntryToJSON, balanceResponseDenomEntryFromJSON, balanceResponseDenomEntryToJSON, balanceResponseFromJSON, balanceResponseToJSON, 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, smartRelayFeeQuoteFromJSON, smartRelayFeeQuoteToJSON, 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 { a as ChainAffiliates, R as RouteResponse, M as MultiChainMsg, C as CosmosMsg, A as AssetsRequest, b as Asset, c as AssetsFromSourceRequest, d as AssetsBetweenChainsRequest, e as AssetBetweenChains, B as Bridge, f as BalanceRequest, g as BalanceResponse, T as Tx, E as EvmTx, S as SvmTx, h as MsgsRequest, i as MsgsResponse, j as RouteRequest, k as MsgsDirectRequest, l as MsgsDirectResponse, m as AssetRecommendationRequest, n as RecommendationEntry, D as DenomWithChainID, o as AssetOrError, p as SwapVenue } from './shared-IGtrUCgc.js';
|
|
11
|
-
export { aa as Affiliate, a9 as AffiliateJSON, ao as ApiError, ba as AssetBetweenChainsJSON, r as AssetJSON, ap as AssetOrErrorJSON, ay as AssetRecommendation, az as AssetRecommendationJSON, aA as AssetRecommendationRequestJSON, bb as AssetsBetweenChainsRequestJSON, bd as AssetsBetweenChainsResponse, bc as AssetsBetweenChainsResponseJSON, ax as AssetsFromSourceRequestJSON, aw as AssetsRequestJSON, af as AutopilotAction, ag as AutopilotMsg, v as AxelarTransfer, u as AxelarTransferJSON, bf as BalanceRequestChainEntry, be as BalanceRequestChainEntryJSON, bg as BalanceRequestJSON, bk as BalanceResponseChainEntry, bj as BalanceResponseChainEntryJSON, bi as BalanceResponseDenomEntry, bh as BalanceResponseDenomEntryJSON, bl as BalanceResponseJSON, x as BankSend, w as BankSendJSON, bo as BridgeJSON, b9 as BridgeType, bn as BridgesResponse, bm as BridgesResponseJSON, J as CCTPTransfer, H as CCTPTransferJSON, ab as ChainAffiliatesJSON, ae as CosmWasmContractMsg, ad as CosmWasmContractMsgJSON, z as CosmosMsgJSON, G as CosmosTx, F as CosmosTxJSON, an as DenomWithChainIDJSON, ak as ERC20Approval, aj as ERC20ApprovalJSON, aU as EstimatedFee, aV as EstimatedFeeJSON, a8 as EvmSwap, a7 as EvmSwapJSON, am as EvmTxJSON, aQ as ExperimentalFeature, aT as FeeType, L as HyperlaneTransfer, K as HyperlaneTransferJSON, q as IBCAddress, I as IBCAddressJSON, b6 as Msg, b5 as MsgJSON, b2 as MsgsDirectRequestBase, a_ as MsgsDirectRequestBaseJSON, b3 as MsgsDirectRequestGivenIn, a$ as MsgsDirectRequestGivenInJSON, b4 as MsgsDirectRequestGivenOut, b0 as MsgsDirectRequestGivenOutJSON, b1 as MsgsDirectRequestJSON, aK as MsgsDirectResponseJSON, aZ as MsgsRequestJSON, b8 as MsgsResponseJSON, aS as MsgsWarning, aP as MsgsWarningType, y as MultiChainMsgJSON, N as OPInitTransfer, O as OPInitTransferJSON, aX as Operation, aW as OperationJSON, ar as OriginAssetsRequest, aq as OriginAssetsRequestJSON, at as OriginAssetsResponse, as as OriginAssetsResponseJSON, ai as PostHandler, ah as PostHandlerJSON, ac as Reason, aC as RecommendAssetsRequest, aB as RecommendAssetsRequestJSON, aE as RecommendAssetsResponse, aD as RecommendAssetsResponseJSON, aF as RecommendationEntryJSON, aL as RouteRequestBase, aG as RouteRequestBaseJSON, aM as RouteRequestGivenIn, aH as RouteRequestGivenInJSON, aN as RouteRequestGivenOut, aI as RouteRequestGivenOutJSON, aJ as RouteRequestJSON, aY as RouteResponseJSON, aR as RouteWarning, aO as RouteWarningType, Q as SmartRelayFeeQuote, P as SmartRelayFeeQuoteJSON, a4 as SmartSwapExactCoinIn, a3 as SmartSwapExactCoinInJSON, av as SmartSwapOptions, au as SmartSwapOptionsJSON, al as SvmTxJSON, a6 as Swap, a0 as SwapExactCoinIn, $ as SwapExactCoinInJSON, _ as SwapExactCoinOut, Z as SwapExactCoinOutJSON, a5 as SwapJSON, Y as SwapOperation, X as SwapOperationJSON, a2 as SwapRoute, a1 as SwapRouteJSON, U as SwapVenueJSON, W as SwapVenueRequest, V as SwapVenueRequestJSON, t as Transfer, s as TransferJSON, b7 as TxJSON } from './shared-IGtrUCgc.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 SkipClientOptions {
|
|
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
|
-
chainIDsToAffiliates?: Record<string, ChainAffiliates>;
|
|
48
|
-
}
|
|
49
|
-
type ExecuteRouteOptions = {
|
|
50
|
-
route: RouteResponse;
|
|
51
|
-
/**
|
|
52
|
-
* addresses should be in the same order with the `chainIDs` in the `route`
|
|
53
|
-
*/
|
|
54
|
-
userAddresses: UserAddress[];
|
|
55
|
-
getEVMSigner?: (chainID: string) => Promise<WalletClient>;
|
|
56
|
-
getCosmosSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
57
|
-
getSVMSigner?: () => Promise<Adapter>;
|
|
58
|
-
onTransactionSigned?: (txInfo: {
|
|
59
|
-
txHash: string;
|
|
60
|
-
chainID: string;
|
|
61
|
-
}) => Promise<void>;
|
|
62
|
-
onTransactionBroadcast?: (txInfo: {
|
|
63
|
-
txHash: string;
|
|
64
|
-
chainID: string;
|
|
65
|
-
}) => Promise<void>;
|
|
66
|
-
onTransactionTracked?: (txInfo: {
|
|
67
|
-
txHash: string;
|
|
68
|
-
chainID: string;
|
|
69
|
-
explorerLink: string;
|
|
70
|
-
}) => Promise<void>;
|
|
71
|
-
onTransactionCompleted?: (chainID: string, txHash: string, status: TxStatusResponse) => Promise<void>;
|
|
72
|
-
onValidateGasBalance?: (value: {
|
|
73
|
-
chainID?: string;
|
|
74
|
-
txIndex?: number;
|
|
75
|
-
status: "success" | "error" | "pending" | "completed";
|
|
76
|
-
}) => Promise<void>;
|
|
77
|
-
validateGasBalance?: boolean;
|
|
78
|
-
slippageTolerancePercent?: string;
|
|
79
|
-
/**
|
|
80
|
-
* If `getGasPrice` is undefined, or returns undefined, the router will attempt to set the recommended gas price
|
|
81
|
-
**/
|
|
82
|
-
getGasPrice?: (chainID: string) => Promise<GasPrice | undefined>;
|
|
83
|
-
/**
|
|
84
|
-
* If `getFallbackGasAmount` is set, when router fails to simulate the gas amount, it will use the fallback gas amount
|
|
85
|
-
*/
|
|
86
|
-
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
87
|
-
gasAmountMultiplier?: number;
|
|
88
|
-
};
|
|
89
|
-
type ExecuteCosmosMessageOptions = {
|
|
90
|
-
signerAddress: string;
|
|
91
|
-
signer: OfflineSigner;
|
|
92
|
-
message: MultiChainMsg;
|
|
93
|
-
fee: StdFee;
|
|
94
|
-
};
|
|
95
|
-
type ExecuteCosmosMessage = {
|
|
96
|
-
signerAddress: string;
|
|
97
|
-
getCosmosSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
98
|
-
/**
|
|
99
|
-
* If `getGasPrice` is undefined, or returns undefined, the router will attempt to set the recommended gas price
|
|
100
|
-
**/
|
|
101
|
-
getGasPrice?: GetGasPrice;
|
|
102
|
-
/**
|
|
103
|
-
* If `getFallbackGasAmount` is set, when router fails to simulate the gas amount, it will use the fallback gas amount
|
|
104
|
-
*/
|
|
105
|
-
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
106
|
-
chainID: string;
|
|
107
|
-
messages: CosmosMsg[];
|
|
108
|
-
gasAmountMultiplier?: number;
|
|
109
|
-
gasTokenUsed?: Coin;
|
|
110
|
-
onTransactionSigned?: ExecuteRouteOptions['onTransactionSigned'];
|
|
111
|
-
};
|
|
112
|
-
type SignCosmosMessageDirectOptions = {
|
|
113
|
-
signerAddress: string;
|
|
114
|
-
signer: OfflineDirectSigner;
|
|
115
|
-
chainID: string;
|
|
116
|
-
cosmosMsgs: CosmosMsg[];
|
|
117
|
-
fee: StdFee;
|
|
118
|
-
signerData: SignerData;
|
|
119
|
-
};
|
|
120
|
-
type SignCosmosMessageAminoOptions = {
|
|
121
|
-
signerAddress: string;
|
|
122
|
-
signer: OfflineAminoSigner;
|
|
123
|
-
chainID: string;
|
|
124
|
-
cosmosMsgs: CosmosMsg[];
|
|
125
|
-
fee: StdFee;
|
|
126
|
-
signerData: SignerData;
|
|
127
|
-
};
|
|
128
|
-
type GetFallbackGasAmount = (chainID: string, chainType: 'cosmos' | 'evm' | 'svm') => Promise<number | undefined>;
|
|
129
|
-
type GetGasPrice = (chainID: string, chainType: 'cosmos' | 'evm' | 'svm') => Promise<GasPrice | undefined>;
|
|
130
|
-
|
|
131
|
-
declare const SKIP_API_URL = "https://api.skip.build";
|
|
132
|
-
declare class SkipClient {
|
|
133
|
-
protected requestClient: RequestClient;
|
|
134
|
-
protected aminoTypes: AminoTypes;
|
|
135
|
-
protected registry: Registry;
|
|
136
|
-
protected endpointOptions: {
|
|
137
|
-
endpoints?: Record<string, EndpointOptions>;
|
|
138
|
-
getRpcEndpointForChain?: (chainID: string) => Promise<string>;
|
|
139
|
-
getRestEndpointForChain?: (chainID: string) => Promise<string>;
|
|
140
|
-
};
|
|
141
|
-
protected getCosmosSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
142
|
-
protected getEVMSigner?: (chainID: string) => Promise<WalletClient>;
|
|
143
|
-
protected getSVMSigner?: () => Promise<Adapter>;
|
|
144
|
-
protected chainIDsToAffiliates?: Record<string, ChainAffiliates>;
|
|
145
|
-
protected cumulativeAffiliateFeeBPS?: string;
|
|
146
|
-
constructor(options?: SkipClientOptions);
|
|
147
|
-
assets(options?: AssetsRequest): Promise<Record<string, Asset[]>>;
|
|
148
|
-
assetsFromSource(options: AssetsFromSourceRequest): Promise<Record<string, Asset[]>>;
|
|
149
|
-
assetsBetweenChains(options: AssetsBetweenChainsRequest): Promise<AssetBetweenChains[]>;
|
|
150
|
-
bridges(): Promise<Bridge[]>;
|
|
151
|
-
chains({ includeEVM, includeSVM, onlyTestnets, chainIDs, }?: {
|
|
152
|
-
includeEVM?: boolean;
|
|
153
|
-
includeSVM?: boolean;
|
|
154
|
-
onlyTestnets?: boolean;
|
|
155
|
-
chainIDs?: string[];
|
|
156
|
-
}): Promise<Chain[]>;
|
|
157
|
-
balances(request: BalanceRequest): Promise<BalanceResponse>;
|
|
158
|
-
executeRoute(options: ExecuteRouteOptions): Promise<void>;
|
|
159
|
-
executeTxs(options: ExecuteRouteOptions & {
|
|
160
|
-
txs: Tx[];
|
|
161
|
-
}): Promise<void>;
|
|
162
|
-
executeEvmMsg(message: {
|
|
163
|
-
evmTx: EvmTx;
|
|
164
|
-
}, options: ExecuteRouteOptions): Promise<viem.TransactionReceipt>;
|
|
165
|
-
executeCosmosMessage(options: ExecuteCosmosMessage): Promise<_cosmjs_cosmwasm_stargate.DeliverTxResponse>;
|
|
166
|
-
estimateGasForMessage({ stargateClient, chainID, signerAddress, gasAmountMultiplier, getGasPrice, messages, encodedMsgs, getFallbackGasAmount, }: {
|
|
167
|
-
stargateClient: SigningStargateClient;
|
|
168
|
-
chainID: string;
|
|
169
|
-
signerAddress: string;
|
|
170
|
-
gasAmountMultiplier: number | undefined;
|
|
171
|
-
getGasPrice?: GetGasPrice;
|
|
172
|
-
messages?: CosmosMsg[];
|
|
173
|
-
encodedMsgs?: EncodeObject[];
|
|
174
|
-
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
175
|
-
}): Promise<StdFee>;
|
|
176
|
-
executeEVMTransaction({ message, signer, onTransactionSigned, }: {
|
|
177
|
-
message: EvmTx;
|
|
178
|
-
signer: WalletClient;
|
|
179
|
-
onTransactionSigned?: ExecuteRouteOptions['onTransactionSigned'];
|
|
180
|
-
}): Promise<viem.TransactionReceipt>;
|
|
181
|
-
executeSVMTransaction({ signer, message, onTransactionSigned, }: {
|
|
182
|
-
signer: Adapter;
|
|
183
|
-
message: SvmTx;
|
|
184
|
-
onTransactionSigned?: ExecuteRouteOptions['onTransactionSigned'];
|
|
185
|
-
}): Promise<string>;
|
|
186
|
-
signCosmosMessageDirect(options: SignCosmosMessageDirectOptions): Promise<TxRaw>;
|
|
187
|
-
private signCosmosMessageDirectEvmos;
|
|
188
|
-
private signCosmosMessageDirectInjective;
|
|
189
|
-
signCosmosMessageAmino(options: SignCosmosMessageAminoOptions): Promise<TxRaw>;
|
|
190
|
-
messages(options: MsgsRequest): Promise<MsgsResponse>;
|
|
191
|
-
route(options: RouteRequest): Promise<RouteResponse>;
|
|
192
|
-
msgsDirect(options: MsgsDirectRequest): Promise<MsgsDirectResponse>;
|
|
193
|
-
recommendAssets(request: AssetRecommendationRequest | AssetRecommendationRequest[]): Promise<RecommendationEntry[]>;
|
|
194
|
-
ibcOriginAssets(assets: DenomWithChainID[]): Promise<AssetOrError[]>;
|
|
195
|
-
submitTransaction({ chainID, tx, }: {
|
|
196
|
-
chainID: string;
|
|
197
|
-
tx: string;
|
|
198
|
-
}): Promise<SubmitTxResponse>;
|
|
199
|
-
trackTransaction({ chainID, txHash, options, }: {
|
|
200
|
-
chainID: string;
|
|
201
|
-
txHash: string;
|
|
202
|
-
options?: {
|
|
203
|
-
/**
|
|
204
|
-
* Retry options
|
|
205
|
-
* @default { maxRetries: 5, retryInterval: 1000, backoffMultiplier: 2 }
|
|
206
|
-
*/
|
|
207
|
-
retry?: {
|
|
208
|
-
/**
|
|
209
|
-
* Maximum number of retries
|
|
210
|
-
* @default 5
|
|
211
|
-
*/
|
|
212
|
-
maxRetries?: number;
|
|
213
|
-
/**
|
|
214
|
-
* Retry interval in milliseconds
|
|
215
|
-
* @default 1000
|
|
216
|
-
*/
|
|
217
|
-
retryInterval?: number;
|
|
218
|
-
/**
|
|
219
|
-
* Backoff multiplier for retries
|
|
220
|
-
*
|
|
221
|
-
* example: `retryInterval` is set to 1000, backoffMultiplier is set to 2
|
|
222
|
-
*
|
|
223
|
-
* 1st retry: 1000ms
|
|
224
|
-
*
|
|
225
|
-
* 2nd retry: 2000ms
|
|
226
|
-
*
|
|
227
|
-
* 3rd retry: 4000ms
|
|
228
|
-
*
|
|
229
|
-
* 4th retry: 8000ms
|
|
230
|
-
*
|
|
231
|
-
* 5th retry: 16000ms
|
|
232
|
-
*
|
|
233
|
-
* @default 2
|
|
234
|
-
*/
|
|
235
|
-
backoffMultiplier?: number;
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
}): Promise<TrackTxResponse>;
|
|
239
|
-
transactionStatus({ chainID, txHash, options, }: {
|
|
240
|
-
chainID: string;
|
|
241
|
-
txHash: string;
|
|
242
|
-
options?: {
|
|
243
|
-
/**
|
|
244
|
-
* Retry options
|
|
245
|
-
* @default { maxRetries: 5, retryInterval: 1000, backoffMultiplier: 2 }
|
|
246
|
-
*/
|
|
247
|
-
retry?: {
|
|
248
|
-
/**
|
|
249
|
-
* Maximum number of retries
|
|
250
|
-
* @default 5
|
|
251
|
-
*/
|
|
252
|
-
maxRetries?: number;
|
|
253
|
-
/**
|
|
254
|
-
* Retry interval in milliseconds
|
|
255
|
-
* @default 1000
|
|
256
|
-
*/
|
|
257
|
-
retryInterval?: number;
|
|
258
|
-
/**
|
|
259
|
-
* Backoff multiplier for retries
|
|
260
|
-
*
|
|
261
|
-
* example: `retryInterval` is set to 1000, backoffMultiplier is set to 2
|
|
262
|
-
*
|
|
263
|
-
* 1st retry: 1000ms
|
|
264
|
-
*
|
|
265
|
-
* 2nd retry: 2000ms
|
|
266
|
-
*
|
|
267
|
-
* 3rd retry: 4000ms
|
|
268
|
-
*
|
|
269
|
-
* 4th retry: 8000ms
|
|
270
|
-
*
|
|
271
|
-
* 5th retry: 16000ms
|
|
272
|
-
*
|
|
273
|
-
* @default 2
|
|
274
|
-
*/
|
|
275
|
-
backoffMultiplier?: number;
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
}): Promise<TxStatusResponse>;
|
|
279
|
-
waitForTransaction({ chainID, txHash, onTransactionTracked, }: {
|
|
280
|
-
chainID: string;
|
|
281
|
-
txHash: string;
|
|
282
|
-
onTransactionTracked?: (txInfo: {
|
|
283
|
-
txHash: string;
|
|
284
|
-
chainID: string;
|
|
285
|
-
explorerLink: string;
|
|
286
|
-
}) => Promise<void>;
|
|
287
|
-
}): Promise<TxStatusResponse>;
|
|
288
|
-
venues(onlyTestnets?: boolean): Promise<SwapVenue[]>;
|
|
289
|
-
getCosmsosGasAmountForMessage(client: SigningStargateClient, signerAddress: string, chainID: string, cosmosMessages: CosmosMsg[]): Promise<string>;
|
|
290
|
-
getAccountNumberAndSequence(address: string, chainID: string): Promise<{
|
|
291
|
-
accountNumber: number;
|
|
292
|
-
sequence: number;
|
|
293
|
-
}>;
|
|
294
|
-
private getAccountNumberAndSequenceFromDymension;
|
|
295
|
-
private getAccountNumberAndSequenceFromEvmos;
|
|
296
|
-
private getAccountNumberAndSequenceInjective;
|
|
297
|
-
getRpcEndpointForChain(chainID: string): Promise<string>;
|
|
298
|
-
getRestEndpointForChain(chainID: string): Promise<string>;
|
|
299
|
-
getCosmosFeeForMessage(chainID: string, msgs: CosmosMsg[], gasAmountMultiplier?: number, signer?: OfflineSigner, gasPrice?: GasPrice): Promise<StdFee>;
|
|
300
|
-
getRecommendedGasPrice(chainID: string): Promise<GasPrice | undefined>;
|
|
301
|
-
getFeeInfoForChain(chainID: string): Promise<FeeAsset | undefined>;
|
|
302
|
-
private getDefaultGasTokenForChain;
|
|
303
|
-
private getStakingTokensForChain;
|
|
304
|
-
validateGasBalances({ txs, userAddresses, getOfflineSigner, getGasPrice, gasAmountMultiplier, getFallbackGasAmount, onValidateGasBalance }: {
|
|
305
|
-
txs: Tx[];
|
|
306
|
-
userAddresses: UserAddress[];
|
|
307
|
-
getOfflineSigner?: (chainID: string) => Promise<OfflineSigner>;
|
|
308
|
-
getGasPrice?: GetGasPrice;
|
|
309
|
-
gasAmountMultiplier?: number;
|
|
310
|
-
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
311
|
-
onValidateGasBalance?: ExecuteRouteOptions['onValidateGasBalance'];
|
|
312
|
-
}): Promise<Record<number, Coin>>;
|
|
313
|
-
validateCosmosGasBalance({ chainID, client, signerAddress, messages, getGasPrice, gasAmountMultiplier, getFallbackGasAmount, }: {
|
|
314
|
-
client: SigningStargateClient;
|
|
315
|
-
signerAddress: string;
|
|
316
|
-
chainID: string;
|
|
317
|
-
messages: CosmosMsg[];
|
|
318
|
-
getGasPrice?: GetGasPrice;
|
|
319
|
-
gasAmountMultiplier?: number;
|
|
320
|
-
getFallbackGasAmount?: GetFallbackGasAmount;
|
|
321
|
-
}): Promise<Coin>;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* @deprecated SkipRouter is deprecated please use SkipClient instead
|
|
325
|
-
*/
|
|
326
|
-
declare class SkipRouter extends SkipClient {
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export { Asset, AssetBetweenChains, AssetOrError, AssetRecommendationRequest, AssetsBetweenChainsRequest, AssetsFromSourceRequest, AssetsRequest, BalanceRequest, BalanceResponse, Bridge, Chain, ChainAffiliates, 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, SkipClient, type SkipClientOptions, SkipRouter, SubmitTxResponse, SvmTx, SwapVenue, TrackTxResponse, Tx, TxStatusResponse, type UserAddress };
|