@skip-go/client 1.3.2 → 1.3.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/dist/cjs/api/getAssets.cjs +4 -4
- package/dist/cjs/api/getAssetsBetweenChains.cjs +3 -3
- package/dist/cjs/api/getBridges.cjs +3 -3
- package/dist/cjs/api/getChains.cjs +3 -3
- package/dist/cjs/api/getVenues.cjs +3 -3
- package/dist/cjs/api/postAssetsFromSource.cjs +4 -4
- package/dist/cjs/api/postBalances.cjs +3 -3
- package/dist/cjs/api/postIbcOriginAssets.cjs +3 -3
- package/dist/cjs/api/postMessages.cjs +3 -3
- package/dist/cjs/api/postMessagesDirect.cjs +3 -3
- package/dist/cjs/api/postRecommendAssets.cjs +3 -3
- package/dist/cjs/api/postRoute.cjs +3 -3
- package/dist/cjs/api/postSubmitTransaction.cjs +3 -3
- package/dist/cjs/api/postTrackTransaction.cjs +3 -3
- package/dist/cjs/api/postTransactionStatus.cjs +3 -3
- package/dist/cjs/{chunk-EINQFLWN.cjs → chunk-2CCLIBCC.cjs} +2 -2
- package/dist/cjs/{chunk-SLZCWA4K.cjs → chunk-2EKCOIWV.cjs} +7 -7
- package/dist/cjs/{chunk-SIY2K7TT.cjs → chunk-2VQ2TNFM.cjs} +2 -2
- package/dist/cjs/{chunk-EQBTNGJJ.cjs → chunk-7I2KQNIU.cjs} +2 -2
- package/dist/cjs/{chunk-DUJSZRFD.cjs → chunk-A7GR26AQ.cjs} +58 -55
- package/dist/cjs/{chunk-WE7KICKO.cjs → chunk-B4OGYBRC.cjs} +2 -2
- package/dist/cjs/{chunk-OA5PE7TW.cjs → chunk-DBDB2XWX.cjs} +3 -3
- package/dist/cjs/{chunk-PFCGKAXF.cjs → chunk-DCFIIF7G.cjs} +2 -2
- package/dist/cjs/{chunk-W2DPDT3Y.cjs → chunk-EXK2GDR5.cjs} +2 -2
- package/dist/cjs/{chunk-G3G6PBIF.cjs → chunk-FO25SR66.cjs} +6 -6
- package/dist/cjs/{chunk-5FR25GF5.cjs → chunk-HKQ5VION.cjs} +1 -1
- package/dist/cjs/{chunk-TCQMGBFL.cjs → chunk-J5RC6ZU5.cjs} +19 -11
- package/dist/cjs/{chunk-MGYSCMET.cjs → chunk-KJ5NZG2D.cjs} +10 -10
- package/dist/cjs/{chunk-KMDNP6DN.cjs → chunk-L4MLX6KI.cjs} +2 -2
- package/dist/cjs/{chunk-AHRSARNR.cjs → chunk-LP3L6XJB.cjs} +2 -2
- package/dist/cjs/{chunk-NQR3EPN2.cjs → chunk-MCZ3F457.cjs} +2 -2
- package/dist/cjs/{chunk-PG7RVHOU.cjs → chunk-MW3TE7DC.cjs} +2 -2
- package/dist/cjs/{chunk-TFL5E5A6.cjs → chunk-P7CDAHIX.cjs} +2 -2
- package/dist/cjs/{chunk-D2W4UBJB.cjs → chunk-QSISUSYP.cjs} +4 -4
- package/dist/cjs/{chunk-CWUD7UGL.cjs → chunk-XGBCEYWI.cjs} +2 -2
- package/dist/cjs/{chunk-HDKNPB2J.cjs → chunk-XNBHMZQZ.cjs} +6 -6
- package/dist/cjs/{chunk-TWPLCFOH.cjs → chunk-YYBGBKRE.cjs} +4 -4
- package/dist/cjs/index.cjs +52 -57
- package/dist/cjs/public-functions/executeRoute.cjs +13 -14
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +4 -4
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +5 -5
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +4 -4
- package/dist/cjs/public-functions/setApiOptions.cjs +3 -3
- package/dist/cjs/public-functions/setClientOptions.cjs +4 -4
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +6 -6
- package/dist/cjs/public-functions/waitForTransaction.cjs +5 -5
- package/dist/esm/api/getAssets.d.ts +1 -1
- package/dist/esm/api/getAssets.js +2 -2
- package/dist/esm/api/getAssetsBetweenChains.d.ts +1 -1
- package/dist/esm/api/getAssetsBetweenChains.js +2 -2
- package/dist/esm/api/getBridges.d.ts +1 -1
- package/dist/esm/api/getBridges.js +2 -2
- package/dist/esm/api/getChains.d.ts +1 -1
- package/dist/esm/api/getChains.js +2 -2
- package/dist/esm/api/getVenues.js +2 -2
- package/dist/esm/api/postAssetsFromSource.d.ts +1 -1
- package/dist/esm/api/postAssetsFromSource.js +3 -3
- package/dist/esm/api/postBalances.d.ts +2 -2
- package/dist/esm/api/postBalances.js +2 -2
- package/dist/esm/api/postIbcOriginAssets.js +2 -2
- package/dist/esm/api/postMessages.d.ts +2 -2
- package/dist/esm/api/postMessages.js +2 -2
- package/dist/esm/api/postMessagesDirect.d.ts +1 -1
- package/dist/esm/api/postMessagesDirect.js +2 -2
- package/dist/esm/api/postRecommendAssets.d.ts +1 -1
- package/dist/esm/api/postRecommendAssets.js +2 -2
- package/dist/esm/api/postRoute.d.ts +2 -2
- package/dist/esm/api/postRoute.js +2 -2
- package/dist/esm/api/postSubmitTransaction.d.ts +5 -1
- package/dist/esm/api/postSubmitTransaction.js +2 -2
- package/dist/esm/api/postTrackTransaction.d.ts +2 -2
- package/dist/esm/api/postTrackTransaction.js +2 -2
- package/dist/esm/api/postTransactionStatus.d.ts +2 -2
- package/dist/esm/api/postTransactionStatus.js +2 -2
- package/dist/esm/{callbacks-DGLv2hr0.d.ts → callbacks-CuL50GnB.d.ts} +1 -1
- package/dist/esm/{chunk-6ULKULTX.js → chunk-2L7PKZDY.js} +1 -1
- package/dist/esm/{chunk-7ZG7HNNC.js → chunk-2R3M45RX.js} +2 -2
- package/dist/esm/{chunk-HAGMHUOI.js → chunk-35H4PDPF.js} +23 -20
- package/dist/esm/{chunk-F65QOYUA.js → chunk-6F2T2KB3.js} +1 -1
- package/dist/esm/{chunk-MAOMQHG5.js → chunk-7ITTEUMR.js} +1 -1
- package/dist/esm/{chunk-4DI7G6TH.js → chunk-7YN3UVVF.js} +1 -1
- package/dist/esm/{chunk-CGZ5DA2T.js → chunk-CFDTJGQK.js} +1 -1
- package/dist/esm/{chunk-ERPZHRBM.js → chunk-CU6W3622.js} +17 -9
- package/dist/esm/{chunk-NZVZH6OA.js → chunk-GSCIF7YA.js} +1 -1
- package/dist/esm/{chunk-VUOOTNLG.js → chunk-HT6O3BQ7.js} +1 -1
- package/dist/esm/{chunk-ZTDLGX7X.js → chunk-IPHFFTGO.js} +1 -1
- package/dist/esm/{chunk-YLMQS52U.js → chunk-IWXRHEX4.js} +2 -2
- package/dist/esm/{chunk-UZKIIX6A.js → chunk-JIADJKRD.js} +1 -1
- package/dist/esm/{chunk-YYXOIRHZ.js → chunk-JSY7M43P.js} +1 -1
- package/dist/esm/{chunk-HS2D6FKN.js → chunk-JYUNVL4F.js} +1 -1
- package/dist/esm/{chunk-SS5LQKBL.js → chunk-LZI7A4JI.js} +1 -1
- package/dist/esm/{chunk-I4AMZAHH.js → chunk-MXCJ2M3K.js} +1 -1
- package/dist/esm/{chunk-PIQZD2VE.js → chunk-OHV2LZEG.js} +1 -1
- package/dist/esm/{chunk-C6NHVJ3R.js → chunk-OL7CWCPB.js} +2 -2
- package/dist/esm/{chunk-2R5COFPS.js → chunk-SJP6W2SK.js} +1 -1
- package/dist/esm/{chunk-QPJEHGY7.js → chunk-XXTECZG3.js} +1 -1
- package/dist/esm/{chunk-GOD6ESBZ.js → chunk-Y5H25R7Z.js} +1 -1
- package/dist/esm/{client-types-CSzTHcG9.d.ts → client-types-B7Fin0mq.d.ts} +2 -1
- package/dist/esm/{generateApi-Bfli9ipj.d.ts → generateApi-C_xgtxrO.d.ts} +1 -1
- package/dist/esm/index.d.ts +6 -7
- package/dist/esm/index.js +23 -24
- package/dist/esm/public-functions/executeRoute.d.ts +4 -4
- package/dist/esm/public-functions/executeRoute.js +12 -13
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +1 -1
- package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +2 -2
- package/dist/esm/public-functions/getFeeInfoForChain.d.ts +1 -1
- package/dist/esm/public-functions/getFeeInfoForChain.js +3 -3
- package/dist/esm/public-functions/getRecommendedGasPrice.js +4 -4
- package/dist/esm/public-functions/getSigningStargateClient.js +3 -3
- package/dist/esm/public-functions/setApiOptions.d.ts +1 -1
- package/dist/esm/public-functions/setApiOptions.js +2 -2
- package/dist/esm/public-functions/setClientOptions.d.ts +3 -3
- package/dist/esm/public-functions/setClientOptions.js +3 -3
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +4 -4
- package/dist/esm/public-functions/validateCosmosGasBalance.js +5 -5
- package/dist/esm/public-functions/waitForTransaction.d.ts +10 -6
- package/dist/esm/public-functions/waitForTransaction.js +4 -4
- package/dist/esm/{setClientOptions-RMgGQ1KD.d.ts → setClientOptions-BTRwCbmt.d.ts} +1 -1
- package/dist/esm/{swaggerTypes-BIYUp1AO.d.ts → swaggerTypes-DDwqIjap.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/cjs/api/postSubmit.cjs +0 -12
- package/dist/cjs/chunk-RFBDXALX.cjs +0 -12
- package/dist/esm/api/postSubmit.d.ts +0 -17
- package/dist/esm/api/postSubmit.js +0 -3
- package/dist/esm/chunk-6UMMVC2P.js +0 -10
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { recommendAssets } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { recommendAssets } from '../chunk-IPHFFTGO.js';
|
|
2
|
+
import '../chunk-LZI7A4JI.js';
|
|
3
3
|
import '../chunk-OQDBWVET.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { J as BridgeType, ap as RoutePriceWarningType, b3 as FeeType, b4 as FeeBehavior } from '../swaggerTypes-
|
|
1
|
+
import { J as BridgeType, ap as RoutePriceWarningType, b3 as FeeType, b4 as FeeBehavior } from '../swaggerTypes-DDwqIjap.js';
|
|
2
2
|
import { S as SkipApiOptions } from '../apiState-DwZhwVul.js';
|
|
3
|
-
import { A as ApiRequest } from '../generateApi-
|
|
3
|
+
import { A as ApiRequest } from '../generateApi-C_xgtxrO.js';
|
|
4
4
|
|
|
5
5
|
declare const route: (request: RouteRequest) => Promise<{
|
|
6
6
|
amountIn: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { route } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { route } from '../chunk-JIADJKRD.js';
|
|
2
|
+
import '../chunk-LZI7A4JI.js';
|
|
3
3
|
import '../chunk-OQDBWVET.js';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { S as SkipApiOptions } from '../apiState-DwZhwVul.js';
|
|
2
|
+
import { A as ApiRequest, a as ApiResponse } from '../generateApi-C_xgtxrO.js';
|
|
3
|
+
import '../swaggerTypes-DDwqIjap.js';
|
|
2
4
|
|
|
3
5
|
declare const submitTransaction: (options?: ({
|
|
4
6
|
tx?: string | undefined;
|
|
@@ -9,5 +11,7 @@ declare const submitTransaction: (options?: ({
|
|
|
9
11
|
txHash?: string | undefined;
|
|
10
12
|
explorerLink?: string | undefined;
|
|
11
13
|
} | undefined>;
|
|
14
|
+
type SubmitTransactionRequest = ApiRequest<"submit">;
|
|
15
|
+
type SubmitTransactionResponse = ApiResponse<"submit">;
|
|
12
16
|
|
|
13
|
-
export { submitTransaction };
|
|
17
|
+
export { type SubmitTransactionRequest, type SubmitTransactionResponse, submitTransaction };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { submitTransaction } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { submitTransaction } from '../chunk-OHV2LZEG.js';
|
|
2
|
+
import '../chunk-LZI7A4JI.js';
|
|
3
3
|
import '../chunk-OQDBWVET.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiRequest, P as PollingProps } from '../generateApi-
|
|
2
|
-
import '../swaggerTypes-
|
|
1
|
+
import { A as ApiRequest, P as PollingProps } from '../generateApi-C_xgtxrO.js';
|
|
2
|
+
import '../swaggerTypes-DDwqIjap.js';
|
|
3
3
|
|
|
4
4
|
type TrackTxRequest = ApiRequest<"status"> & TrackTxPollingProps;
|
|
5
5
|
type TrackTxPollingProps = Omit<PollingProps<"status">, "isSuccess" | "onError" | "onSuccess">;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { trackTransaction } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { trackTransaction } from '../chunk-7ITTEUMR.js';
|
|
2
|
+
import '../chunk-LZI7A4JI.js';
|
|
3
3
|
import '../chunk-OQDBWVET.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { av as StatusErrorType, aJ as TransactionState, al as PacketErrorType, aS as TransferState, k as AxelarTransferState, O as ContractCallWithTokenErrorType, as as SendTokenErrorType, l as AxelarTransferType, p as CCTPTransferState, a8 as HyperlaneTransferState, aO as OPInitTransferState, s as StargateTransferState, w as GoFastTransferState, aP as LayerZeroTransferState } from '../swaggerTypes-
|
|
1
|
+
import { av as StatusErrorType, aJ as TransactionState, al as PacketErrorType, aS as TransferState, k as AxelarTransferState, O as ContractCallWithTokenErrorType, as as SendTokenErrorType, l as AxelarTransferType, p as CCTPTransferState, a8 as HyperlaneTransferState, aO as OPInitTransferState, s as StargateTransferState, w as GoFastTransferState, aP as LayerZeroTransferState } from '../swaggerTypes-DDwqIjap.js';
|
|
2
2
|
import { S as SkipApiOptions } from '../apiState-DwZhwVul.js';
|
|
3
|
-
import { a as ApiResponse } from '../generateApi-
|
|
3
|
+
import { a as ApiResponse } from '../generateApi-C_xgtxrO.js';
|
|
4
4
|
|
|
5
5
|
declare const transactionStatus: (params?: ({
|
|
6
6
|
txHash: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { transactionStatus } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { transactionStatus } from '../chunk-MXCJ2M3K.js';
|
|
2
|
+
import '../chunk-LZI7A4JI.js';
|
|
3
3
|
import '../chunk-OQDBWVET.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCosmosGasAmountForMessage } from './chunk-TV2XPAIF.js';
|
|
2
2
|
import { BigNumber } from './chunk-VQ5SIQWU.js';
|
|
3
|
-
import { getSigningStargateClient } from './chunk-
|
|
4
|
-
import { ClientState, balances } from './chunk-
|
|
3
|
+
import { getSigningStargateClient } from './chunk-6F2T2KB3.js';
|
|
4
|
+
import { ClientState, balances } from './chunk-2L7PKZDY.js';
|
|
5
5
|
import { GasPrice, calculateFee } from '@cosmjs/stargate';
|
|
6
6
|
import { Decimal } from '@cosmjs/math';
|
|
7
7
|
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { validateCosmosGasBalance } from './chunk-
|
|
2
|
-
import { waitForTransaction } from './chunk-
|
|
1
|
+
import { validateCosmosGasBalance } from './chunk-2R3M45RX.js';
|
|
2
|
+
import { waitForTransaction } from './chunk-CU6W3622.js';
|
|
3
3
|
import { getEncodeObjectFromCosmosMessage, getEncodeObjectFromCosmosMessageInjective } from './chunk-TV2XPAIF.js';
|
|
4
4
|
import { getEVMGasAmountForMessage } from './chunk-GV2QOWB4.js';
|
|
5
5
|
import { BigNumber } from './chunk-VQ5SIQWU.js';
|
|
6
6
|
import { GAS_STATION_CHAIN_IDS } from './chunk-SWYON2RG.js';
|
|
7
|
-
import { getSigningStargateClient, getRpcEndpointForChain, accountParser } from './chunk-
|
|
7
|
+
import { getSigningStargateClient, getRpcEndpointForChain, accountParser } from './chunk-6F2T2KB3.js';
|
|
8
8
|
import { chains, findFirstWorkingEndpoint, getIsEthermint, getIsInitia } from './chunk-43P4WRGN.js';
|
|
9
|
-
import { messages } from './chunk-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { ApiState, wait, createRequestClient, toCamel } from './chunk-SS5LQKBL.js';
|
|
9
|
+
import { messages } from './chunk-GSCIF7YA.js';
|
|
10
|
+
import { submitTransaction } from './chunk-OHV2LZEG.js';
|
|
11
|
+
import { venues } from './chunk-JSY7M43P.js';
|
|
12
|
+
import { ClientState, balances } from './chunk-2L7PKZDY.js';
|
|
13
|
+
import { ApiState, wait, createRequestClient, toCamel } from './chunk-LZI7A4JI.js';
|
|
15
14
|
import { PublicKey, Transaction, Connection, LAMPORTS_PER_SOL } from '@solana/web3.js';
|
|
16
15
|
import { bech32m, bech32 } from 'bech32';
|
|
17
16
|
import { StargateClient } from '@cosmjs/stargate';
|
|
@@ -341,6 +340,8 @@ var signCosmosMessageAmino = async (options) => {
|
|
|
341
340
|
signatures: [fromBase64(signature.signature)]
|
|
342
341
|
});
|
|
343
342
|
};
|
|
343
|
+
|
|
344
|
+
// src/private-functions/cosmos/signCosmosTransaction.ts
|
|
344
345
|
var signCosmosTransaction = async ({
|
|
345
346
|
tx,
|
|
346
347
|
options,
|
|
@@ -438,13 +439,14 @@ var executeCosmosTransaction = async ({
|
|
|
438
439
|
index
|
|
439
440
|
});
|
|
440
441
|
const chainId = tx.cosmosTx?.chainId;
|
|
441
|
-
const txResponse = await
|
|
442
|
+
const txResponse = await submitTransaction({
|
|
442
443
|
chainId,
|
|
443
444
|
tx: rawTxBase64
|
|
444
445
|
});
|
|
445
446
|
return {
|
|
446
447
|
chainId: tx?.cosmosTx?.chainId ?? "",
|
|
447
|
-
txHash: txResponse?.txHash ?? ""
|
|
448
|
+
txHash: txResponse?.txHash ?? "",
|
|
449
|
+
explorerLink: txResponse?.explorerLink ?? ""
|
|
448
450
|
};
|
|
449
451
|
};
|
|
450
452
|
function createAbi(abi) {
|
|
@@ -781,24 +783,23 @@ var signSvmTransaction = async ({
|
|
|
781
783
|
};
|
|
782
784
|
|
|
783
785
|
// src/private-functions/svm/executeSvmTransaction.ts
|
|
784
|
-
var executeSvmTransaction = async (tx, options) => {
|
|
786
|
+
var executeSvmTransaction = async (tx, options, index) => {
|
|
785
787
|
const svmTx = tx?.svmTx;
|
|
786
788
|
if (!svmTx?.chainId) {
|
|
787
789
|
throw new Error("executeSvmTransaction error: chainId not found in svmTx");
|
|
788
790
|
}
|
|
789
|
-
const signedTx = await signSvmTransaction({ tx, options });
|
|
791
|
+
const signedTx = await signSvmTransaction({ tx, options, index });
|
|
790
792
|
if (!signedTx) {
|
|
791
793
|
throw new Error("executeSvmTransaction error: signedTx is undefined");
|
|
792
794
|
}
|
|
793
795
|
const endpoint = await getRpcEndpointForChain(svmTx.chainId);
|
|
794
796
|
const connection = new Connection(endpoint);
|
|
795
797
|
let signature;
|
|
796
|
-
await submitTransaction({
|
|
798
|
+
const submitTxResponse = await submitTransaction({
|
|
797
799
|
chainId: svmTx.chainId,
|
|
798
800
|
tx: signedTx.toString("base64")
|
|
799
|
-
}).then((res) => {
|
|
800
|
-
signature = res?.txHash;
|
|
801
801
|
});
|
|
802
|
+
signature = submitTxResponse?.txHash;
|
|
802
803
|
const rpcSig = await connection.sendRawTransaction(signedTx, {
|
|
803
804
|
preflightCommitment: "confirmed",
|
|
804
805
|
maxRetries: 5
|
|
@@ -817,7 +818,8 @@ var executeSvmTransaction = async (tx, options) => {
|
|
|
817
818
|
if (status?.value?.confirmationStatus === "confirmed") {
|
|
818
819
|
return {
|
|
819
820
|
chainId: svmTx.chainId,
|
|
820
|
-
txHash: signature
|
|
821
|
+
txHash: signature,
|
|
822
|
+
explorerLink: submitTxResponse?.explorerLink ?? ""
|
|
821
823
|
};
|
|
822
824
|
}
|
|
823
825
|
if (getStatusCount > 12) {
|
|
@@ -1286,13 +1288,14 @@ var executeTransactions = async (options) => {
|
|
|
1286
1288
|
let txResult;
|
|
1287
1289
|
const txSigned = signedTxs.find((item) => item.index === i);
|
|
1288
1290
|
if (txSigned) {
|
|
1289
|
-
const txResponse = await
|
|
1291
|
+
const txResponse = await submitTransaction({
|
|
1290
1292
|
chainId: txSigned.chainId,
|
|
1291
1293
|
tx: txSigned.tx
|
|
1292
1294
|
});
|
|
1293
1295
|
txResult = {
|
|
1294
1296
|
chainId: txSigned.chainId,
|
|
1295
|
-
txHash: txResponse?.txHash ?? ""
|
|
1297
|
+
txHash: txResponse?.txHash ?? "",
|
|
1298
|
+
explorerLink: txResponse?.explorerLink ?? ""
|
|
1296
1299
|
};
|
|
1297
1300
|
} else {
|
|
1298
1301
|
if ("cosmosTx" in tx) {
|
|
@@ -1311,7 +1314,7 @@ var executeTransactions = async (options) => {
|
|
|
1311
1314
|
};
|
|
1312
1315
|
} else if ("svmTx" in tx) {
|
|
1313
1316
|
await validateEnabledChainIds(tx.svmTx?.chainId ?? "");
|
|
1314
|
-
txResult = await executeSvmTransaction(tx, options);
|
|
1317
|
+
txResult = await executeSvmTransaction(tx, options, i);
|
|
1315
1318
|
} else {
|
|
1316
1319
|
throw new Error("executeRoute error: invalid message type");
|
|
1317
1320
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { chains, findFirstWorkingEndpoint } from './chunk-43P4WRGN.js';
|
|
2
|
-
import { ClientState } from './chunk-
|
|
2
|
+
import { ClientState } from './chunk-2L7PKZDY.js';
|
|
3
3
|
import { accountFromAny, SigningStargateClient } from '@cosmjs/stargate';
|
|
4
4
|
import { assertDefinedAndNotNull } from '@cosmjs/utils';
|
|
5
5
|
import { BinaryWriter, BinaryReader } from 'cosmjs-types/binary.js';
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { wait } from './chunk-
|
|
1
|
+
import { trackTransaction } from './chunk-7ITTEUMR.js';
|
|
2
|
+
import { transactionStatus } from './chunk-MXCJ2M3K.js';
|
|
3
|
+
import { wait } from './chunk-LZI7A4JI.js';
|
|
4
4
|
|
|
5
5
|
// src/public-functions/waitForTransaction.ts
|
|
6
6
|
var waitForTransaction = async ({
|
|
7
7
|
chainId,
|
|
8
8
|
txHash,
|
|
9
|
+
explorerLink,
|
|
9
10
|
onTransactionTracked,
|
|
10
11
|
...trackTxPollingOptions
|
|
11
12
|
}) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
try {
|
|
14
|
+
if (!explorerLink) {
|
|
15
|
+
const response = await trackTransaction({
|
|
16
|
+
chainId,
|
|
17
|
+
txHash,
|
|
18
|
+
...trackTxPollingOptions
|
|
19
|
+
});
|
|
20
|
+
explorerLink = response.explorerLink;
|
|
21
|
+
}
|
|
22
|
+
await onTransactionTracked?.({ txHash, chainId, explorerLink });
|
|
23
|
+
} catch (error) {
|
|
24
|
+
console.warn(`track failed for txHash:${txHash}, chainId: ${chainId}`);
|
|
25
|
+
}
|
|
18
26
|
while (true) {
|
|
19
27
|
const txStatusResponse = await transactionStatus({
|
|
20
28
|
chainId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { transformAssetsMap } from './chunk-
|
|
2
|
-
import { api } from './chunk-
|
|
1
|
+
import { transformAssetsMap } from './chunk-2L7PKZDY.js';
|
|
2
|
+
import { api } from './chunk-LZI7A4JI.js';
|
|
3
3
|
|
|
4
4
|
// src/api/postAssetsFromSource.ts
|
|
5
5
|
var assetsFromSource = api({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MsgAcceptOwner, MsgAddRemoteTokenMessenger, MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgDisableAttester, MsgEnableAttester, MsgLinkTokenPair, MsgPauseBurningAndMinting, MsgPauseSendingAndReceivingMessages, MsgReceiveMessage, MsgRemoveRemoteTokenMessenger, MsgReplaceDepositForBurn, MsgReplaceMessage, MsgSendMessage, MsgSendMessageWithCaller, MsgUnlinkTokenPair, MsgUnpauseBurningAndMinting, MsgUnpauseSendingAndReceivingMessages, MsgUpdateOwner, MsgUpdateAttesterManager, MsgUpdateTokenController, MsgUpdatePauser, MsgUpdateMaxMessageBodySize, MsgSetMaxBurnAmountPerMessage, MsgUpdateSignatureThreshold, MsgExecute, MsgInitiateTokenDeposit, Coin, isSet, Long, Timestamp, toTimestamp, Period, fromTimestamp, fromJsonTimestamp, padDecimal } from './chunk-TD63P2AG.js';
|
|
2
|
-
import { ClientState } from './chunk-
|
|
3
|
-
import { ApiState, createRequestClient } from './chunk-
|
|
2
|
+
import { ClientState } from './chunk-2L7PKZDY.js';
|
|
3
|
+
import { ApiState, createRequestClient } from './chunk-LZI7A4JI.js';
|
|
4
4
|
import { AminoTypes, createDefaultAminoConverters, defaultRegistryTypes } from '@cosmjs/stargate';
|
|
5
5
|
import { createWasmAminoConverters } from '@cosmjs/cosmwasm-stargate';
|
|
6
6
|
import { Registry } from '@cosmjs/proto-signing';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_GAS_DENOM_OVERRIDES } from './chunk-SWYON2RG.js';
|
|
2
2
|
import { chains } from './chunk-43P4WRGN.js';
|
|
3
|
-
import { ClientState } from './chunk-
|
|
3
|
+
import { ClientState } from './chunk-2L7PKZDY.js';
|
|
4
4
|
|
|
5
5
|
// src/private-functions/getDefaultGasTokenForChain.ts
|
|
6
6
|
var getDefaultGasTokenForChain = async (chainId) => {
|
|
@@ -3,7 +3,7 @@ import { OfflineDirectSigner } from '@cosmjs/proto-signing';
|
|
|
3
3
|
import { StdFee, GasPrice, SignerData } from '@cosmjs/stargate';
|
|
4
4
|
import { WalletClient } from 'viem';
|
|
5
5
|
import { Adapter } from '@solana/wallet-adapter-base';
|
|
6
|
-
import { a3 as FeeAsset, L as ChainType, W as CosmosMsg } from './swaggerTypes-
|
|
6
|
+
import { a3 as FeeAsset, L as ChainType, W as CosmosMsg } from './swaggerTypes-DDwqIjap.js';
|
|
7
7
|
|
|
8
8
|
/** Common Types */
|
|
9
9
|
type UserAddress = {
|
|
@@ -55,6 +55,7 @@ type SignCosmosMessageAminoOptions = SignCosmosMessageOptionsBase & {
|
|
|
55
55
|
type TxResult = {
|
|
56
56
|
txHash: string;
|
|
57
57
|
chainId: string;
|
|
58
|
+
explorerLink?: string;
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
export type { EndpointOptions as E, GetFallbackGasAmount as G, SignerGetters as S, TxResult as T, UserAddress as U, ValidateGasResult as V, GetGasPrice as a, GasOptions as b, SignCosmosMessageOptionsBase as c, SignCosmosMessageDirectOptions as d, SignCosmosMessageAminoOptions as e };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bx as Api } from './swaggerTypes-DDwqIjap.js';
|
|
2
2
|
|
|
3
3
|
type CamelKey<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<CamelKey<U>>}` : S;
|
|
4
4
|
type Camel<T> = T extends (infer U)[] ? Camel<U>[] : T extends object ? {
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AcknowledgementErrorDetails, a as Affiliate,
|
|
2
|
-
export { T as TransactionCallbacks } from './callbacks-
|
|
3
|
-
export { E as EndpointOptions, b as GasOptions, G as GetFallbackGasAmount, a as GetGasPrice, e as SignCosmosMessageAminoOptions, d as SignCosmosMessageDirectOptions, c as SignCosmosMessageOptionsBase, S as SignerGetters, T as TxResult, U as UserAddress, V as ValidateGasResult } from './client-types-
|
|
1
|
+
export { A as AcknowledgementErrorDetails, a as Affiliate, bx as Api, bt as ApiConfig, b as ApiError, c as Asset, d as AssetBetweenChains, e as AssetRecommendation, bi as AssetRecommendationsResponse, be as AssetsFromSourceResponse, bc as AssetsRequest, bd as AssetsResponse, f as AutopilotAction, g as AutopilotMsg, h as AutopilotMsgWrapper, i as AxelarTransfer, j as AxelarTransferInfo, k as AxelarTransferState, l as AxelarTransferType, m as AxelarTransferWrapper, B as BalanceRequestChainEntry, E as BalanceResponseChainEntry, D as BalanceResponseDenomEntry, b8 as BalancesResponse, F as BankSend, H as BankSendWrapper, I as Bridge, J as BridgeType, b9 as BridgesResponse, C as CCTPTransfer, n as CCTPTransferInfo, p as CCTPTransferState, o as CCTPTransferTxs, q as CCTPTransferWrapper, K as Chain, M as ChainAffiliates, am as ChainTransaction, L as ChainType, b6 as ChainsRequest, b7 as ChainsResponse, bv as ContentType, N as ContractCallWithTokenError, O as ContractCallWithTokenErrorType, P as ContractCallWithTokenTxs, Q as CosmWasmContractMsg, R as CosmWasmContractMsgWrapper, b1 as CosmosModuleSupport, W as CosmosMsg, X as CosmosTx, Y as CosmosTxWrapper, T as Erc20Approval, V as Error, U as ErrorDetail, aW as EurekaTransfer, aX as EurekaTransferInfo, aY as EurekaTransferWrapper, Z as EvmSwap, _ as EvmSwapWrapper, $ as EvmTx, a0 as EvmTxWrapper, b5 as Fee, a3 as FeeAsset, b4 as FeeBehavior, b3 as FeeType, br as FullRequestParams, bo as FungibleAssetsBetweenChainsCreateResponse, a5 as GRPCStatusCode, a4 as GoFastFee, G as GoFastTransfer, y as GoFastTransferInfo, w as GoFastTransferState, x as GoFastTransferTxs, z as GoFastTransferWrapper, bw as HttpClient, bu as HttpResponse, a6 as HyperlaneTransfer, a7 as HyperlaneTransferInfo, a8 as HyperlaneTransferState, a9 as HyperlaneTransferTransactions, aa as HyperlaneTransferWrapper, ab as IBCTransferInfo, b2 as IbcCapabilities, bn as IbcOriginAssetsResponse, aZ as LayerZeroTransfer, a_ as LayerZeroTransferInfo, aP as LayerZeroTransferState, ai as LayerZeroTransferTransactions, a$ as LayerZeroTransferWrapper, ac as Msg, bh as MsgsDirectResponse, bg as MsgsResponse, ae as MultiChainMsg, af as MultiChainMsgWrapper, aK as OPInitTransfer, aM as OPInitTransferInfo, aO as OPInitTransferState, aN as OPInitTransferTxs, aL as OPInitTransferWrapper, ag as Operation, ah as OptionalAsset, aj as Packet, ak as PacketError, al as PacketErrorType, an as PostHandler, bp as QueryParamsType, ao as Reason, b0 as RecommendationRequest, bs as RequestParams, bq as ResponseFormat, aq as Route, ap as RoutePriceWarningType, bf as RouteResponse, ar as SendTokenError, as as SendTokenErrorType, at as SendTokenTxs, S as SmartRelayFeeQuote, aD as SmartSwapExactCoinIn, aF as SmartSwapInWrapper, aE as SmartSwapOptions, r as StargateTransfer, u as StargateTransferInfo, s as StargateTransferState, t as StargateTransferTxs, v as StargateTransferWrapper, au as StatusError, av as StatusErrorType, bl as StatusRequest, bm as StatusResponse, bj as SubmitResponse, a1 as SvmTx, a2 as SvmTxWrapper, aw as Swap, ax as SwapExactCoinIn, ay as SwapExactCoinOut, az as SwapInWrapper, aA as SwapOperation, aB as SwapOutWrapper, aC as SwapRoute, aG as SwapVenue, aH as SwapWrapper, bk as TrackResponse, aI as TransactionExecutionErrorDetails, aJ as TransactionState, aQ as Transfer, aT as TransferAssetRelease, aR as TransferEvent, aS as TransferState, aU as TransferStatus, aV as TransferWrapper, ad as Tx, ba as VenuesRequest, bb as VenuesResponse } from './swaggerTypes-DDwqIjap.js';
|
|
2
|
+
export { T as TransactionCallbacks } from './callbacks-CuL50GnB.js';
|
|
3
|
+
export { E as EndpointOptions, b as GasOptions, G as GetFallbackGasAmount, a as GetGasPrice, e as SignCosmosMessageAminoOptions, d as SignCosmosMessageDirectOptions, c as SignCosmosMessageOptionsBase, S as SignerGetters, T as TxResult, U as UserAddress, V as ValidateGasResult } from './client-types-B7Fin0mq.js';
|
|
4
4
|
export { assets } from './api/getAssets.js';
|
|
5
5
|
export { assetsBetweenChains } from './api/getAssetsBetweenChains.js';
|
|
6
6
|
export { bridges } from './api/getBridges.js';
|
|
@@ -13,12 +13,12 @@ export { recommendAssets } from './api/postRecommendAssets.js';
|
|
|
13
13
|
export { assetsFromSource } from './api/postAssetsFromSource.js';
|
|
14
14
|
export { BalanceRequest, BalanceResponse, balances } from './api/postBalances.js';
|
|
15
15
|
export { RouteRequest, route } from './api/postRoute.js';
|
|
16
|
-
export { submitTransaction } from './api/postSubmitTransaction.js';
|
|
16
|
+
export { SubmitTransactionRequest, SubmitTransactionResponse, submitTransaction } from './api/postSubmitTransaction.js';
|
|
17
17
|
export { trackTransaction } from './api/postTrackTransaction.js';
|
|
18
18
|
export { TxStatusResponse, transactionStatus } from './api/postTransactionStatus.js';
|
|
19
19
|
export { ExecuteRouteOptions, executeRoute } from './public-functions/executeRoute.js';
|
|
20
20
|
export { getSigningStargateClient, getSigningStargateClientProps } from './public-functions/getSigningStargateClient.js';
|
|
21
|
-
export { S as SkipClientOptions, s as setClientOptions } from './setClientOptions-
|
|
21
|
+
export { S as SkipClientOptions, s as setClientOptions } from './setClientOptions-BTRwCbmt.js';
|
|
22
22
|
export { getRecommendedGasPrice } from './public-functions/getRecommendedGasPrice.js';
|
|
23
23
|
export { getFeeInfoForChain } from './public-functions/getFeeInfoForChain.js';
|
|
24
24
|
export { SetApiOptionsProps, setApiOptions } from './public-functions/setApiOptions.js';
|
|
@@ -26,14 +26,13 @@ export { waitForTransaction } from './public-functions/waitForTransaction.js';
|
|
|
26
26
|
export { getCosmosGasAmountForMessage } from './public-functions/getCosmosGasAmountForMessage.js';
|
|
27
27
|
export { getEVMGasAmountForMessage } from './public-functions/getEvmGasAmountForMessage.js';
|
|
28
28
|
export { validateCosmosGasBalance } from './public-functions/validateCosmosGasBalance.js';
|
|
29
|
-
export { SubmitRequest, SubmitResponse, submit } from './api/postSubmit.js';
|
|
30
29
|
import '@cosmjs/amino';
|
|
31
30
|
import '@cosmjs/proto-signing';
|
|
32
31
|
import '@cosmjs/stargate';
|
|
33
32
|
import 'viem';
|
|
34
33
|
import '@solana/wallet-adapter-base';
|
|
35
34
|
import './apiState-DwZhwVul.js';
|
|
36
|
-
import './generateApi-
|
|
35
|
+
import './generateApi-C_xgtxrO.js';
|
|
37
36
|
|
|
38
37
|
interface AcknowledgementErrorDetailsJson {
|
|
39
38
|
/** Error code */
|
package/dist/esm/index.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export { waitForTransaction } from './chunk-ERPZHRBM.js';
|
|
5
|
-
export { transactionStatus } from './chunk-I4AMZAHH.js';
|
|
1
|
+
export { executeRoute } from './chunk-35H4PDPF.js';
|
|
2
|
+
export { validateCosmosGasBalance } from './chunk-2R3M45RX.js';
|
|
3
|
+
export { waitForTransaction } from './chunk-CU6W3622.js';
|
|
6
4
|
export { getCosmosGasAmountForMessage } from './chunk-TV2XPAIF.js';
|
|
7
|
-
import './chunk-TD63P2AG.js';
|
|
8
5
|
export { getEVMGasAmountForMessage } from './chunk-GV2QOWB4.js';
|
|
9
|
-
export { getRecommendedGasPrice } from './chunk-
|
|
6
|
+
export { getRecommendedGasPrice } from './chunk-CFDTJGQK.js';
|
|
10
7
|
import './chunk-VQ5SIQWU.js';
|
|
11
|
-
export { getFeeInfoForChain } from './chunk-
|
|
8
|
+
export { getFeeInfoForChain } from './chunk-Y5H25R7Z.js';
|
|
12
9
|
export { GAS_STATION_CHAIN_IDS } from './chunk-SWYON2RG.js';
|
|
13
|
-
export { getSigningStargateClient } from './chunk-
|
|
10
|
+
export { getSigningStargateClient } from './chunk-6F2T2KB3.js';
|
|
14
11
|
import './chunk-43P4WRGN.js';
|
|
15
|
-
export { setApiOptions } from './chunk-
|
|
16
|
-
export {
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
|
|
12
|
+
export { setApiOptions } from './chunk-JYUNVL4F.js';
|
|
13
|
+
export { setClientOptions } from './chunk-OL7CWCPB.js';
|
|
14
|
+
import './chunk-TD63P2AG.js';
|
|
15
|
+
export { ibcOriginAssets } from './chunk-XXTECZG3.js';
|
|
16
|
+
export { messages } from './chunk-GSCIF7YA.js';
|
|
17
|
+
export { messagesDirect } from './chunk-SJP6W2SK.js';
|
|
18
|
+
export { recommendAssets } from './chunk-IPHFFTGO.js';
|
|
19
|
+
export { route } from './chunk-JIADJKRD.js';
|
|
20
|
+
export { submitTransaction } from './chunk-OHV2LZEG.js';
|
|
21
|
+
export { trackTransaction } from './chunk-7ITTEUMR.js';
|
|
22
|
+
export { transactionStatus } from './chunk-MXCJ2M3K.js';
|
|
23
|
+
export { assetsBetweenChains } from './chunk-HT6O3BQ7.js';
|
|
24
|
+
export { bridges } from './chunk-7YN3UVVF.js';
|
|
25
|
+
export { venues } from './chunk-JSY7M43P.js';
|
|
26
|
+
export { assetsFromSource } from './chunk-IWXRHEX4.js';
|
|
27
|
+
export { assets, balances, chains } from './chunk-2L7PKZDY.js';
|
|
28
|
+
import './chunk-LZI7A4JI.js';
|
|
30
29
|
export { Api, AutopilotAction, AxelarTransferState, AxelarTransferType, BridgeType, CCTPTransferState, ChainType, ContentType, ContractCallWithTokenErrorType, FeeBehavior, FeeType, GoFastTransferState, HttpClient, HyperlaneTransferState, LayerZeroTransferState, OPInitTransferState, PacketErrorType, Reason, RoutePriceWarningType, SendTokenErrorType, StargateTransferState, StatusErrorType, TransactionState, TransferState } from './chunk-OQDBWVET.js';
|
|
31
30
|
|
|
32
31
|
// src/types/swaggerTypesJson.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TransactionCallbacks } from '../callbacks-
|
|
2
|
-
import { bf as RouteResponse, W as CosmosMsg, an as PostHandler } from '../swaggerTypes-
|
|
3
|
-
import { A as ApiRequest } from '../generateApi-
|
|
4
|
-
import { S as SignerGetters, b as GasOptions, U as UserAddress } from '../client-types-
|
|
1
|
+
import { T as TransactionCallbacks } from '../callbacks-CuL50GnB.js';
|
|
2
|
+
import { bf as RouteResponse, W as CosmosMsg, an as PostHandler } from '../swaggerTypes-DDwqIjap.js';
|
|
3
|
+
import { A as ApiRequest } from '../generateApi-C_xgtxrO.js';
|
|
4
|
+
import { S as SignerGetters, b as GasOptions, U as UserAddress } from '../client-types-B7Fin0mq.js';
|
|
5
5
|
import { TrackTxPollingProps } from '../api/postTrackTransaction.js';
|
|
6
6
|
import '@cosmjs/amino';
|
|
7
7
|
import '@cosmjs/proto-signing';
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
export { executeRoute } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-I4AMZAHH.js';
|
|
1
|
+
export { executeRoute } from '../chunk-35H4PDPF.js';
|
|
2
|
+
import '../chunk-2R3M45RX.js';
|
|
3
|
+
import '../chunk-CU6W3622.js';
|
|
5
4
|
import '../chunk-TV2XPAIF.js';
|
|
6
|
-
import '../chunk-TD63P2AG.js';
|
|
7
5
|
import '../chunk-GV2QOWB4.js';
|
|
8
6
|
import '../chunk-VQ5SIQWU.js';
|
|
9
7
|
import '../chunk-SWYON2RG.js';
|
|
10
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-6F2T2KB3.js';
|
|
11
9
|
import '../chunk-43P4WRGN.js';
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
15
|
-
import '../chunk-
|
|
16
|
-
import '../chunk-
|
|
17
|
-
import '../chunk-
|
|
18
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-TD63P2AG.js';
|
|
11
|
+
import '../chunk-GSCIF7YA.js';
|
|
12
|
+
import '../chunk-OHV2LZEG.js';
|
|
13
|
+
import '../chunk-7ITTEUMR.js';
|
|
14
|
+
import '../chunk-MXCJ2M3K.js';
|
|
15
|
+
import '../chunk-JSY7M43P.js';
|
|
16
|
+
import '../chunk-2L7PKZDY.js';
|
|
17
|
+
import '../chunk-LZI7A4JI.js';
|
|
19
18
|
import '../chunk-OQDBWVET.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EncodeObject } from '@cosmjs/proto-signing';
|
|
2
2
|
import { SigningStargateClient } from '@cosmjs/stargate';
|
|
3
|
-
import { W as CosmosMsg } from '../swaggerTypes-
|
|
3
|
+
import { W as CosmosMsg } from '../swaggerTypes-DDwqIjap.js';
|
|
4
4
|
|
|
5
5
|
declare const DEFAULT_GAS_MULTIPLIER = 1.5;
|
|
6
6
|
declare function getCosmosGasAmountForMessage(client: SigningStargateClient, signerAddress: string, chainId: string, messages?: CosmosMsg[], encodedMsgs?: EncodeObject[], multiplier?: number): Promise<string>;
|