@skip-go/client 1.5.1 → 1.5.3-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/dist/cjs/api/getAssets.cjs +5 -5
- package/dist/cjs/api/getAssetsBetweenChains.cjs +4 -4
- package/dist/cjs/api/getBridges.cjs +4 -4
- package/dist/cjs/api/getChains.cjs +4 -4
- package/dist/cjs/api/getVenues.cjs +4 -4
- package/dist/cjs/api/postAssetsFromSource.cjs +5 -5
- package/dist/cjs/api/postBalances.cjs +4 -4
- package/dist/cjs/api/postIbcOriginAssets.cjs +4 -4
- package/dist/cjs/api/postMessages.cjs +4 -4
- package/dist/cjs/api/postMessagesDirect.cjs +4 -4
- package/dist/cjs/api/postRecommendAssets.cjs +4 -4
- package/dist/cjs/api/postRoute.cjs +4 -4
- package/dist/cjs/api/postSubmitTransaction.cjs +4 -4
- package/dist/cjs/api/postTrackTransaction.cjs +4 -4
- package/dist/cjs/api/postTransactionStatus.cjs +4 -4
- package/dist/cjs/{chunk-5HDKZVOL.cjs → chunk-262HFM6V.cjs} +2 -2
- package/dist/cjs/{chunk-OZUCMWNE.cjs → chunk-3NHW3XWK.cjs} +2 -2
- package/dist/cjs/{chunk-LHY62HPI.cjs → chunk-4MV4GLIA.cjs} +2 -2
- package/dist/cjs/{chunk-FNB244QI.cjs → chunk-4NGHNHAS.cjs} +6 -6
- package/dist/cjs/{chunk-JBKNEFXB.cjs → chunk-7SZZBUBD.cjs} +3 -3
- package/dist/cjs/{chunk-EZGHN6ZL.cjs → chunk-ARCCHERF.cjs} +55 -55
- package/dist/cjs/{chunk-ZBPDDVQ2.cjs → chunk-AW6IQ7JH.cjs} +2 -2
- package/dist/cjs/{chunk-KHJQE3DI.cjs → chunk-BCX2D6TE.cjs} +91 -18
- package/dist/cjs/{chunk-NDSHB4I6.cjs → chunk-BQDOKZFX.cjs} +15 -15
- package/dist/cjs/{chunk-V3FWWJG2.cjs → chunk-CZKIE576.cjs} +10 -10
- package/dist/cjs/chunk-EVEVOW2U.cjs +2179 -0
- package/dist/cjs/{chunk-A26H4FVN.cjs → chunk-FF5UWES6.cjs} +4 -4
- package/dist/cjs/chunk-GGSF5JZH.cjs +101 -0
- package/dist/cjs/chunk-GWRZ6MPC.cjs +2179 -0
- package/dist/cjs/{chunk-N5V3YW5K.cjs → chunk-H2T4LMS2.cjs} +10 -10
- package/dist/cjs/{chunk-ERGJBZUC.cjs → chunk-HFEMNOJS.cjs} +12 -18
- package/dist/cjs/chunk-I6VYDEUV.cjs +454 -0
- package/dist/cjs/{chunk-RVXCF6AL.cjs → chunk-J7HZ6VJE.cjs} +10 -10
- package/dist/cjs/{chunk-QPM7H2YL.cjs → chunk-JWWJIJUE.cjs} +2 -2
- package/dist/cjs/{chunk-RCGCQD6T.cjs → chunk-KWH6S7PB.cjs} +8 -6
- package/dist/cjs/{chunk-QZ2BGX6O.cjs → chunk-MOWOIPUG.cjs} +4 -4
- package/dist/cjs/{chunk-LUVMRHAJ.cjs → chunk-PLO5CVGN.cjs} +2 -2
- package/dist/cjs/{chunk-N4UW74AG.cjs → chunk-QAHHTQ7V.cjs} +4 -4
- package/dist/cjs/{chunk-X5AJHZ2J.cjs → chunk-RBM66GW6.cjs} +2 -2
- package/dist/cjs/{chunk-AXYRULAI.cjs → chunk-S3BKLN4L.cjs} +2 -2
- package/dist/cjs/{chunk-5AYPH3ZR.cjs → chunk-T5EGKQAT.cjs} +2 -2
- package/dist/cjs/{chunk-5CB6SPCX.cjs → chunk-UY5LWG5D.cjs} +2 -2
- package/dist/cjs/chunk-W6ID22B6.cjs +24 -0
- package/dist/{esm/chunk-VQ5SIQWU.js → cjs/chunk-WKYP2NMS.cjs} +11 -7
- package/dist/cjs/{chunk-23YF4LFI.cjs → chunk-XCFPRLX3.cjs} +10 -7
- package/dist/cjs/{chunk-EJMC4JXF.cjs → chunk-ZBJZTBIW.cjs} +2 -2
- package/dist/cjs/index.cjs +188 -250
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +26 -16
- package/dist/cjs/public-functions/executeRoute.cjs +26 -16
- package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +1 -1
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +5 -6
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +7 -8
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +39 -0
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +5 -5
- package/dist/cjs/public-functions/setApiOptions.cjs +4 -4
- package/dist/cjs/public-functions/setClientOptions.cjs +5 -5
- package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +9 -9
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +7 -7
- package/dist/cjs/public-functions/waitForTransaction.cjs +6 -6
- package/dist/esm/api/getAssets.d.ts +2 -2
- package/dist/esm/api/getAssets.js +3 -3
- package/dist/esm/api/getAssetsBetweenChains.d.ts +22 -22
- package/dist/esm/api/getAssetsBetweenChains.js +3 -3
- package/dist/esm/api/getBridges.d.ts +2 -2
- package/dist/esm/api/getBridges.js +3 -3
- package/dist/esm/api/getChains.d.ts +2 -2
- package/dist/esm/api/getChains.js +3 -3
- package/dist/esm/api/getVenues.d.ts +1 -1
- package/dist/esm/api/getVenues.js +3 -3
- package/dist/esm/api/postAssetsFromSource.d.ts +2 -2
- package/dist/esm/api/postAssetsFromSource.js +4 -4
- package/dist/esm/api/postBalances.d.ts +3 -3
- package/dist/esm/api/postBalances.js +3 -3
- package/dist/esm/api/postIbcOriginAssets.d.ts +11 -11
- package/dist/esm/api/postIbcOriginAssets.js +3 -3
- package/dist/esm/api/postMessages.d.ts +13 -13
- package/dist/esm/api/postMessages.js +3 -3
- package/dist/esm/api/postMessagesDirect.d.ts +164 -162
- package/dist/esm/api/postMessagesDirect.js +3 -3
- package/dist/esm/api/postRecommendAssets.d.ts +12 -12
- package/dist/esm/api/postRecommendAssets.js +3 -3
- package/dist/esm/api/postRoute.d.ts +162 -160
- package/dist/esm/api/postRoute.js +3 -3
- package/dist/esm/api/postSubmitTransaction.d.ts +3 -3
- package/dist/esm/api/postSubmitTransaction.js +3 -3
- package/dist/esm/api/postTrackTransaction.d.ts +3 -3
- package/dist/esm/api/postTrackTransaction.js +3 -3
- package/dist/esm/api/postTransactionStatus.d.ts +37 -37
- package/dist/esm/api/postTransactionStatus.js +3 -3
- package/dist/esm/{apiState-DwZhwVul.d.ts → apiState-1VvikVK-.d.ts} +1 -0
- package/dist/esm/{callbacks-DCqqd0D9.d.ts → callbacks-C-KUJnDv.d.ts} +34 -4
- package/dist/esm/{chunk-APRMN34M.js → chunk-3WFXBPS2.js} +1 -1
- package/dist/esm/{chunk-3XOGEVJL.js → chunk-44IX6KPJ.js} +1 -1
- package/dist/esm/{chunk-VZGOU6MB.js → chunk-47HN6VKU.js} +3 -3
- package/dist/esm/{chunk-XYYXRVFN.js → chunk-5IXH2QPF.js} +86 -16
- package/dist/esm/{chunk-WBZVMPPV.js → chunk-6M7N6EAO.js} +7 -4
- package/dist/esm/{chunk-7X4ERB3R.js → chunk-AUNRER4I.js} +1 -1
- package/dist/esm/{chunk-562J5DCB.js → chunk-DL374PFE.js} +4 -4
- package/dist/esm/chunk-FDRLM2JD.js +431 -0
- package/dist/esm/{chunk-52PEBJRQ.js → chunk-FNTPI2AV.js} +1 -1
- package/dist/esm/{chunk-3J5IMMMB.js → chunk-H3MY23AH.js} +1 -1
- package/dist/esm/{chunk-JQ4F4WBG.js → chunk-HDW6XFWX.js} +1 -1
- package/dist/esm/{chunk-LHNGF5J2.js → chunk-HELQO7PA.js} +2 -2
- package/dist/esm/{chunk-W5EGS2G4.js → chunk-IGK7LJCM.js} +8 -8
- package/dist/esm/{chunk-AND7HVIU.js → chunk-IHSSWY3M.js} +1 -1
- package/dist/esm/{chunk-2DD5F6PK.js → chunk-JNVGNIOE.js} +2 -2
- package/dist/{cjs/chunk-4R6OCWRR.cjs → esm/chunk-JYYCFKB4.js} +8 -9
- package/dist/esm/chunk-KNXMSLOB.js +1 -1
- package/dist/esm/{chunk-Y2YCODZK.js → chunk-KXQ2ASHQ.js} +1 -1
- package/dist/esm/{chunk-ZOUYAZU6.js → chunk-MYGJGC62.js} +1 -1
- package/dist/esm/{chunk-ZI3SYUQH.js → chunk-RFJYCJK4.js} +1 -1
- package/dist/esm/{chunk-FVQFGEL2.js → chunk-RHLE3EW7.js} +6 -6
- package/dist/esm/chunk-RJ35JBT4.js +2154 -0
- package/dist/esm/{chunk-BZDVQMHK.js → chunk-SOVU5NCL.js} +2 -2
- package/dist/esm/{chunk-QIS6ILPS.js → chunk-TNIGHYH2.js} +3 -3
- package/dist/esm/{chunk-FH2YHZVV.js → chunk-UBVBVJPY.js} +5 -3
- package/dist/esm/chunk-UIDIKXMB.js +1 -1
- package/dist/esm/{chunk-A6KSECAH.js → chunk-VGCTTJO7.js} +12 -18
- package/dist/esm/{chunk-OTS5KO43.js → chunk-VWOMKMH2.js} +1 -1
- package/dist/esm/chunk-X2IBEHMZ.js +2154 -0
- package/dist/esm/chunk-XHLXJGVB.js +22 -0
- package/dist/esm/{chunk-S4RO2LHD.js → chunk-YGQ4NKTM.js} +1 -1
- package/dist/esm/{chunk-UI3SIFZN.js → chunk-YLVUKXLR.js} +1 -1
- package/dist/esm/chunk-YWG4XR5A.js +98 -0
- package/dist/esm/{client-types-BSZasIDd.d.ts → client-types-CGMuZ3zo.d.ts} +2 -2
- package/dist/esm/{generateApi-CwM4Ca30.d.ts → generateApi-D_-Gso-x.d.ts} +1 -1
- package/dist/esm/index.d.ts +167 -144
- package/dist/esm/index.js +25 -174
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +31 -11
- package/dist/esm/public-functions/executeMultipleRoutes.js +25 -15
- package/dist/esm/public-functions/executeRoute.d.ts +5 -5
- package/dist/esm/public-functions/executeRoute.js +25 -15
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +1 -1
- package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +4 -4
- package/dist/esm/public-functions/getEvmGasAmountForMessage.js +1 -1
- package/dist/esm/public-functions/getFeeInfoForChain.d.ts +2 -2
- package/dist/esm/public-functions/getFeeInfoForChain.js +4 -5
- package/dist/esm/public-functions/getRecommendedGasPrice.d.ts +1 -1
- package/dist/esm/public-functions/getRecommendedGasPrice.js +6 -7
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +20 -0
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +30 -0
- package/dist/esm/public-functions/getSigningStargateClient.js +4 -4
- package/dist/esm/public-functions/setApiOptions.d.ts +3 -3
- package/dist/esm/public-functions/setApiOptions.js +3 -3
- package/dist/esm/public-functions/setClientOptions.d.ts +5 -5
- package/dist/esm/public-functions/setClientOptions.js +4 -4
- package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +5 -5
- package/dist/esm/public-functions/subscribeToRouteStatus.js +5 -5
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +5 -5
- package/dist/esm/public-functions/validateCosmosGasBalance.js +6 -6
- package/dist/esm/public-functions/waitForTransaction.d.ts +39 -39
- package/dist/esm/public-functions/waitForTransaction.js +5 -5
- package/dist/esm/setClientOptions-C8g92xTm.d.ts +76 -0
- package/dist/esm/{swaggerTypes-Bh6hu5Q-.d.ts → swaggerTypes-B_jKfpvz.d.ts} +154 -132
- package/package.json +1 -1
- package/dist/esm/setClientOptions-0DYCj_A5.d.ts +0 -19
- package/dist/cjs/{chunk-IDDRJJO5.cjs → chunk-DLT6Q6RB.cjs} +1 -1
- package/dist/esm/{chunk-OQDBWVET.js → chunk-QL423UEF.js} +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ApiResponse } from '../generateApi-
|
|
3
|
-
import { S as SkipApiOptions } from '../apiState-
|
|
1
|
+
import { 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, av as StatusErrorType } from '../swaggerTypes-B_jKfpvz.js';
|
|
2
|
+
import { a as ApiResponse } from '../generateApi-D_-Gso-x.js';
|
|
3
|
+
import { S as SkipApiOptions } from '../apiState-1VvikVK-.js';
|
|
4
4
|
|
|
5
5
|
declare const transactionStatus: (params?: ({
|
|
6
6
|
txHash: string;
|
|
@@ -9,24 +9,7 @@ declare const transactionStatus: (params?: ({
|
|
|
9
9
|
abortDuplicateRequests?: boolean | undefined;
|
|
10
10
|
}) | undefined) => Promise<{
|
|
11
11
|
transfers?: {
|
|
12
|
-
error?: {
|
|
13
|
-
details?: {
|
|
14
|
-
code?: number | undefined;
|
|
15
|
-
message?: string | undefined;
|
|
16
|
-
} | undefined;
|
|
17
|
-
message?: string | undefined;
|
|
18
|
-
type?: StatusErrorType | undefined;
|
|
19
|
-
} | undefined;
|
|
20
|
-
nextBlockingTransfer?: {
|
|
21
|
-
transferSequenceIndex?: number | undefined;
|
|
22
|
-
} | undefined;
|
|
23
12
|
state?: TransactionState | undefined;
|
|
24
|
-
transferAssetRelease?: {
|
|
25
|
-
chainId?: string | undefined;
|
|
26
|
-
denom?: string | undefined;
|
|
27
|
-
amount?: string | undefined;
|
|
28
|
-
released?: boolean | undefined;
|
|
29
|
-
} | undefined;
|
|
30
13
|
transferSequence?: {
|
|
31
14
|
ibcTransfer?: {
|
|
32
15
|
toChainId: string;
|
|
@@ -318,8 +301,42 @@ declare const transactionStatus: (params?: ({
|
|
|
318
301
|
};
|
|
319
302
|
} | undefined;
|
|
320
303
|
}[] | undefined;
|
|
304
|
+
nextBlockingTransfer?: {
|
|
305
|
+
transferSequenceIndex?: number | undefined;
|
|
306
|
+
} | undefined;
|
|
307
|
+
transferAssetRelease?: {
|
|
308
|
+
chainId?: string | undefined;
|
|
309
|
+
denom?: string | undefined;
|
|
310
|
+
amount?: string | undefined;
|
|
311
|
+
released?: boolean | undefined;
|
|
312
|
+
} | undefined;
|
|
313
|
+
error?: {
|
|
314
|
+
details?: {
|
|
315
|
+
code?: number | undefined;
|
|
316
|
+
message?: string | undefined;
|
|
317
|
+
} | undefined;
|
|
318
|
+
message?: string | undefined;
|
|
319
|
+
type?: StatusErrorType | undefined;
|
|
320
|
+
} | undefined;
|
|
321
321
|
}[] | undefined;
|
|
322
322
|
state: TransactionState;
|
|
323
|
+
nextBlockingTransfer?: {
|
|
324
|
+
transferSequenceIndex?: number | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
transferAssetRelease?: {
|
|
327
|
+
chainId?: string | undefined;
|
|
328
|
+
denom?: string | undefined;
|
|
329
|
+
amount?: string | undefined;
|
|
330
|
+
released?: boolean | undefined;
|
|
331
|
+
} | undefined;
|
|
332
|
+
error?: {
|
|
333
|
+
details?: {
|
|
334
|
+
code?: number | undefined;
|
|
335
|
+
message?: string | undefined;
|
|
336
|
+
} | undefined;
|
|
337
|
+
message?: string | undefined;
|
|
338
|
+
type?: StatusErrorType | undefined;
|
|
339
|
+
} | undefined;
|
|
323
340
|
transferSequence: {
|
|
324
341
|
ibcTransfer?: {
|
|
325
342
|
toChainId: string;
|
|
@@ -611,23 +628,6 @@ declare const transactionStatus: (params?: ({
|
|
|
611
628
|
};
|
|
612
629
|
} | undefined;
|
|
613
630
|
}[];
|
|
614
|
-
nextBlockingTransfer?: {
|
|
615
|
-
transferSequenceIndex?: number | undefined;
|
|
616
|
-
} | undefined;
|
|
617
|
-
transferAssetRelease?: {
|
|
618
|
-
chainId?: string | undefined;
|
|
619
|
-
denom?: string | undefined;
|
|
620
|
-
amount?: string | undefined;
|
|
621
|
-
released?: boolean | undefined;
|
|
622
|
-
} | undefined;
|
|
623
|
-
error?: {
|
|
624
|
-
details?: {
|
|
625
|
-
code?: number | undefined;
|
|
626
|
-
message?: string | undefined;
|
|
627
|
-
} | undefined;
|
|
628
|
-
message?: string | undefined;
|
|
629
|
-
type?: StatusErrorType | undefined;
|
|
630
|
-
} | null | undefined;
|
|
631
631
|
status?: string | undefined;
|
|
632
632
|
}>;
|
|
633
633
|
type TxStatusResponse = ApiResponse<"status">;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { transactionStatus } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { transactionStatus } from '../chunk-3WFXBPS2.js';
|
|
2
|
+
import '../chunk-VGCTTJO7.js';
|
|
3
|
+
import '../chunk-QL423UEF.js';
|
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
import { TxStatusResponse } from './api/postTransactionStatus.js';
|
|
2
|
-
import { aS as TransferState, k as AxelarTransferState, p as CCTPTransferState, a8 as HyperlaneTransferState, aO as OPInitTransferState, w as GoFastTransferState, s as StargateTransferState, aP as LayerZeroTransferState,
|
|
3
|
-
import { A as ApiRequest } from './generateApi-
|
|
4
|
-
import { S as SignerGetters, b as GasOptions, B as BaseSettings, U as UserAddress, T as TxResult } from './client-types-
|
|
2
|
+
import { aS as TransferState, k as AxelarTransferState, p as CCTPTransferState, a8 as HyperlaneTransferState, aO as OPInitTransferState, w as GoFastTransferState, s as StargateTransferState, aP as LayerZeroTransferState, aJ as TransactionState, bq as RouteResponse, W as CosmosMsg, an as PostHandler, aq as Route, aT as TransferAssetRelease, aU as TransferStatus, T as Erc20Approval } from './swaggerTypes-B_jKfpvz.js';
|
|
3
|
+
import { A as ApiRequest } from './generateApi-D_-Gso-x.js';
|
|
4
|
+
import { S as SignerGetters, b as GasOptions, B as BaseSettings, U as UserAddress, T as TxResult } from './client-types-CGMuZ3zo.js';
|
|
5
5
|
|
|
6
|
+
type OverallStatus = "pending" | "success" | "failed";
|
|
7
|
+
declare function getTransferEventsFromTxStatusResponse(txStatusResponse?: TxStatusResponse[]): {
|
|
8
|
+
status: TransferEventStatus;
|
|
9
|
+
fromChainId: string;
|
|
10
|
+
toChainId: string;
|
|
11
|
+
state: AxelarTransferState | CCTPTransferState | StargateTransferState | GoFastTransferState | HyperlaneTransferState | TransferState | OPInitTransferState | LayerZeroTransferState;
|
|
12
|
+
fromExplorerLink?: string | undefined;
|
|
13
|
+
toExplorerLink?: string | undefined;
|
|
14
|
+
fromTxHash?: string | undefined;
|
|
15
|
+
toTxHash?: string | undefined;
|
|
16
|
+
explorerLink?: string | undefined;
|
|
17
|
+
transferType?: TransferType | undefined;
|
|
18
|
+
durationInMs?: number | undefined;
|
|
19
|
+
}[];
|
|
20
|
+
declare function getSimpleOverallStatus(state: TransactionState): OverallStatus;
|
|
21
|
+
declare enum TransferType {
|
|
22
|
+
ibcTransfer = "ibcTransfer",
|
|
23
|
+
axelarTransfer = "axelarTransfer",
|
|
24
|
+
cctpTransfer = "cctpTransfer",
|
|
25
|
+
hyperlaneTransfer = "hyperlaneTransfer",
|
|
26
|
+
opInitTransfer = "opInitTransfer",
|
|
27
|
+
goFastTransfer = "goFastTransfer",
|
|
28
|
+
stargateTransfer = "stargateTransfer",
|
|
29
|
+
eurekaTransfer = "eurekaTransfer",
|
|
30
|
+
layerZeroTransfer = "layerZeroTransfer"
|
|
31
|
+
}
|
|
6
32
|
type TransferEventStatus = "unconfirmed" | "signing" | "pending" | "completed" | "failed" | "approving" | "incomplete";
|
|
7
33
|
type ClientTransferEvent = {
|
|
8
34
|
fromChainId: string;
|
|
@@ -11,7 +37,11 @@ type ClientTransferEvent = {
|
|
|
11
37
|
status?: TransferEventStatus;
|
|
12
38
|
fromExplorerLink?: string;
|
|
13
39
|
toExplorerLink?: string;
|
|
40
|
+
fromTxHash?: string;
|
|
41
|
+
toTxHash?: string;
|
|
14
42
|
explorerLink?: string;
|
|
43
|
+
transferType?: TransferType;
|
|
44
|
+
durationInMs?: number;
|
|
15
45
|
};
|
|
16
46
|
|
|
17
47
|
/** Execute Route Options */
|
|
@@ -125,4 +155,4 @@ type TransactionCallbacks = {
|
|
|
125
155
|
}) => Promise<void>;
|
|
126
156
|
};
|
|
127
157
|
|
|
128
|
-
export { type ExecuteRouteOptions as E, type RouteDetails as R, type TransactionDetails as T, type RouteStatus as a, type TransactionStatus as b, type TransferEventStatus as c,
|
|
158
|
+
export { type ClientTransferEvent as C, type ExecuteRouteOptions as E, type RouteDetails as R, type TransactionDetails as T, type RouteStatus as a, type TransactionStatus as b, type TransferEventStatus as c, TransferType as d, executeRoute as e, getSimpleOverallStatus as f, getTransferEventsFromTxStatusResponse as g, type TransactionCallbacks as h, getTransactionStatus as i, type subscribeToRouteStatusProps as j, type executeAndSubscribeToRouteStatusProps as k, executeAndSubscribeToRouteStatus as l, subscribeToRouteStatus as s, updateRouteDetails as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCosmosGasAmountForMessage } from './chunk-KNXMSLOB.js';
|
|
2
|
-
import { BigNumber } from './chunk-
|
|
3
|
-
import { getSigningStargateClient } from './chunk-
|
|
4
|
-
import { ClientState, balances } from './chunk-
|
|
2
|
+
import { BigNumber } from './chunk-JYYCFKB4.js';
|
|
3
|
+
import { getSigningStargateClient } from './chunk-SOVU5NCL.js';
|
|
4
|
+
import { ClientState, balances } from './chunk-MYGJGC62.js';
|
|
5
5
|
import { GasPrice, calculateFee } from '@cosmjs/stargate';
|
|
6
6
|
import { Decimal } from '@cosmjs/math';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { trackTransaction } from './chunk-
|
|
2
|
-
import { transactionStatus } from './chunk-
|
|
3
|
-
import { wait } from './chunk-
|
|
1
|
+
import { trackTransaction } from './chunk-AUNRER4I.js';
|
|
2
|
+
import { transactionStatus } from './chunk-3WFXBPS2.js';
|
|
3
|
+
import { wait } from './chunk-VGCTTJO7.js';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
|
|
6
6
|
// src/utils/clientType.ts
|
|
@@ -35,30 +35,71 @@ function getClientTransferEvent(transferEvent) {
|
|
|
35
35
|
} else if (layerZeroTransfer) {
|
|
36
36
|
transferType = "layerZeroTransfer" /* layerZeroTransfer */;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const getTxHashAndExplorerLink = (type) => {
|
|
39
39
|
switch (transferType) {
|
|
40
40
|
case "ibcTransfer" /* ibcTransfer */:
|
|
41
41
|
if (type === "send") {
|
|
42
|
-
return
|
|
42
|
+
return {
|
|
43
|
+
explorerLink: ibcTransfer.packetTxs.sendTx?.explorerLink,
|
|
44
|
+
txHash: ibcTransfer.packetTxs.sendTx?.txHash
|
|
45
|
+
};
|
|
43
46
|
}
|
|
44
|
-
return
|
|
47
|
+
return {
|
|
48
|
+
explorerLink: ibcTransfer.packetTxs.receiveTx?.explorerLink,
|
|
49
|
+
txHash: ibcTransfer.packetTxs.receiveTx?.txHash
|
|
50
|
+
};
|
|
45
51
|
case "eurekaTransfer" /* eurekaTransfer */:
|
|
46
52
|
if (type === "send") {
|
|
47
|
-
return
|
|
53
|
+
return {
|
|
54
|
+
explorerLink: eurekaTransfer.packetTxs.sendTx?.explorerLink,
|
|
55
|
+
txHash: eurekaTransfer.packetTxs.sendTx?.txHash
|
|
56
|
+
};
|
|
48
57
|
}
|
|
49
|
-
return
|
|
58
|
+
return {
|
|
59
|
+
explorerLink: eurekaTransfer.packetTxs.receiveTx?.explorerLink,
|
|
60
|
+
txHash: eurekaTransfer.packetTxs.receiveTx?.txHash
|
|
61
|
+
};
|
|
50
62
|
case "goFastTransfer" /* goFastTransfer */:
|
|
51
63
|
if (type === "send") {
|
|
52
|
-
return
|
|
64
|
+
return {
|
|
65
|
+
explorerLink: goFastTransfer.txs.orderSubmittedTx?.explorerLink,
|
|
66
|
+
txHash: goFastTransfer.txs.orderSubmittedTx?.txHash
|
|
67
|
+
};
|
|
53
68
|
}
|
|
54
|
-
return
|
|
69
|
+
return {
|
|
70
|
+
explorerLink: goFastTransfer.txs.orderFilledTx?.explorerLink,
|
|
71
|
+
txHash: goFastTransfer.txs.orderFilledTx?.txHash
|
|
72
|
+
};
|
|
55
73
|
case "axelarTransfer" /* axelarTransfer */:
|
|
56
|
-
return
|
|
74
|
+
return {
|
|
75
|
+
explorerLink: axelarTransfer?.axelarScanLink,
|
|
76
|
+
txHash: axelarTransfer?.txs?.sendTx?.txHash
|
|
77
|
+
};
|
|
57
78
|
default:
|
|
58
79
|
if (type === "send") {
|
|
59
|
-
return
|
|
80
|
+
return {
|
|
81
|
+
explorerLink: combinedTransferEvent[transferType]?.txs?.sendTx?.explorerLink,
|
|
82
|
+
txHash: combinedTransferEvent[transferType]?.txs?.sendTx?.txHash
|
|
83
|
+
};
|
|
60
84
|
}
|
|
61
|
-
return
|
|
85
|
+
return {
|
|
86
|
+
explorerLink: combinedTransferEvent[transferType]?.txs?.receiveTx?.explorerLink,
|
|
87
|
+
txHash: combinedTransferEvent[transferType]?.txs?.receiveTx?.txHash
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const getDuration = () => {
|
|
92
|
+
switch (transferType) {
|
|
93
|
+
case "ibcTransfer" /* ibcTransfer */:
|
|
94
|
+
return new Date(ibcTransfer.packetTxs.receiveTx?.onChainAt ?? 0).getTime() - new Date(ibcTransfer.packetTxs.sendTx?.onChainAt ?? 0).getTime();
|
|
95
|
+
case "eurekaTransfer" /* eurekaTransfer */:
|
|
96
|
+
return new Date(eurekaTransfer.packetTxs.receiveTx?.onChainAt ?? 0).getTime() - new Date(eurekaTransfer.packetTxs.sendTx?.onChainAt ?? 0).getTime();
|
|
97
|
+
case "goFastTransfer" /* goFastTransfer */:
|
|
98
|
+
return new Date(goFastTransfer.txs.orderFilledTx?.onChainAt ?? 0).getTime() - new Date(goFastTransfer.txs.orderSubmittedTx?.onChainAt ?? 0).getTime();
|
|
99
|
+
case "axelarTransfer" /* axelarTransfer */:
|
|
100
|
+
return new Date(axelarTransfer?.txs?.confirmTx?.onChainAt ?? 0).getTime() - new Date(axelarTransfer?.txs?.sendTx?.onChainAt ?? 0).getTime();
|
|
101
|
+
default:
|
|
102
|
+
return new Date(combinedTransferEvent[transferType]?.txs?.receiveTx?.onChainAt ?? 0).getTime() - new Date(combinedTransferEvent[transferType]?.txs?.sendTx?.onChainAt ?? 0).getTime();
|
|
62
103
|
}
|
|
63
104
|
};
|
|
64
105
|
const _result = {
|
|
@@ -73,8 +114,12 @@ function getClientTransferEvent(transferEvent) {
|
|
|
73
114
|
...stargateTransfer,
|
|
74
115
|
...eurekaTransfer,
|
|
75
116
|
...layerZeroTransfer,
|
|
76
|
-
|
|
77
|
-
|
|
117
|
+
transferType,
|
|
118
|
+
fromExplorerLink: getTxHashAndExplorerLink("send")?.explorerLink,
|
|
119
|
+
toExplorerLink: getTxHashAndExplorerLink("receive")?.explorerLink,
|
|
120
|
+
fromTxHash: getTxHashAndExplorerLink("send")?.txHash,
|
|
121
|
+
toTxHash: getTxHashAndExplorerLink("receive")?.txHash,
|
|
122
|
+
durationInMs: getDuration()
|
|
78
123
|
};
|
|
79
124
|
const status = getSimpleStatus(_result.state);
|
|
80
125
|
const result = {
|
|
@@ -91,6 +136,19 @@ function getTransferEventsFromTxStatusResponse(txStatusResponse) {
|
|
|
91
136
|
});
|
|
92
137
|
});
|
|
93
138
|
}
|
|
139
|
+
function getSimpleOverallStatus(state) {
|
|
140
|
+
switch (state) {
|
|
141
|
+
case "STATE_SUBMITTED":
|
|
142
|
+
case "STATE_PENDING":
|
|
143
|
+
return "pending";
|
|
144
|
+
case "STATE_COMPLETED_SUCCESS":
|
|
145
|
+
return "success";
|
|
146
|
+
case "STATE_COMPLETED_ERROR":
|
|
147
|
+
case "STATE_PENDING_ERROR":
|
|
148
|
+
default:
|
|
149
|
+
return "failed";
|
|
150
|
+
}
|
|
151
|
+
}
|
|
94
152
|
function getSimpleStatus(state) {
|
|
95
153
|
switch (state) {
|
|
96
154
|
case "TRANSFER_PENDING":
|
|
@@ -119,6 +177,18 @@ function getSimpleStatus(state) {
|
|
|
119
177
|
return "failed";
|
|
120
178
|
}
|
|
121
179
|
}
|
|
180
|
+
var TransferType = /* @__PURE__ */ ((TransferType2) => {
|
|
181
|
+
TransferType2["ibcTransfer"] = "ibcTransfer";
|
|
182
|
+
TransferType2["axelarTransfer"] = "axelarTransfer";
|
|
183
|
+
TransferType2["cctpTransfer"] = "cctpTransfer";
|
|
184
|
+
TransferType2["hyperlaneTransfer"] = "hyperlaneTransfer";
|
|
185
|
+
TransferType2["opInitTransfer"] = "opInitTransfer";
|
|
186
|
+
TransferType2["goFastTransfer"] = "goFastTransfer";
|
|
187
|
+
TransferType2["stargateTransfer"] = "stargateTransfer";
|
|
188
|
+
TransferType2["eurekaTransfer"] = "eurekaTransfer";
|
|
189
|
+
TransferType2["layerZeroTransfer"] = "layerZeroTransfer";
|
|
190
|
+
return TransferType2;
|
|
191
|
+
})(TransferType || {});
|
|
122
192
|
function getTransactionStatus(state) {
|
|
123
193
|
switch (state) {
|
|
124
194
|
case "STATE_SUBMITTED":
|
|
@@ -460,4 +530,4 @@ var updateRelatedRoutes = ({
|
|
|
460
530
|
return updatedRelatedRoutes;
|
|
461
531
|
};
|
|
462
532
|
|
|
463
|
-
export { executeAndSubscribeToRouteStatus, getTransactionStatus, subscribeToRouteStatus, updateRouteDetails };
|
|
533
|
+
export { TransferType, executeAndSubscribeToRouteStatus, getSimpleOverallStatus, getTransactionStatus, getTransferEventsFromTxStatusResponse, subscribeToRouteStatus, updateRouteDetails };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MsgUpdateSignatureThreshold, MsgSetMaxBurnAmountPerMessage, MsgUpdateMaxMessageBodySize, MsgUpdatePauser, MsgUpdateTokenController, MsgUpdateAttesterManager, MsgUpdateOwner, MsgUnpauseSendingAndReceivingMessages, MsgUnpauseBurningAndMinting, MsgUnlinkTokenPair, MsgSendMessageWithCaller, MsgSendMessage, MsgReplaceMessage, MsgReplaceDepositForBurn, MsgRemoveRemoteTokenMessenger, MsgReceiveMessage, MsgPauseSendingAndReceivingMessages, MsgPauseBurningAndMinting, MsgLinkTokenPair, MsgEnableAttester, MsgDisableAttester, MsgDepositForBurnWithCaller, MsgDepositForBurn, MsgAddRemoteTokenMessenger, MsgAcceptOwner, MsgExecute, MsgInitiateTokenDeposit, Coin, Timestamp, Period } from './chunk-UIDIKXMB.js';
|
|
2
2
|
import { isSet, Long, toTimestamp, fromTimestamp, fromJsonTimestamp, padDecimal } from './chunk-QO2CYYF5.js';
|
|
3
|
-
import { ClientState } from './chunk-
|
|
4
|
-
import {
|
|
3
|
+
import { ClientState } from './chunk-MYGJGC62.js';
|
|
4
|
+
import { createRequestClient, ApiState } from './chunk-VGCTTJO7.js';
|
|
5
5
|
import { AminoTypes, createDefaultAminoConverters, defaultRegistryTypes } from '@cosmjs/stargate';
|
|
6
6
|
import { createWasmAminoConverters } from '@cosmjs/cosmwasm-stargate';
|
|
7
7
|
import { Registry } from '@cosmjs/proto-signing';
|
|
@@ -2253,7 +2253,10 @@ var setClientOptions = (options = {}) => {
|
|
|
2253
2253
|
...evmosProtoRegistry,
|
|
2254
2254
|
...options.registryTypes ?? []
|
|
2255
2255
|
]);
|
|
2256
|
-
ApiState.
|
|
2256
|
+
if (!options.allowOptionsUpdateAfterApiCall && ApiState.apiCalled && !ApiState.initialized) {
|
|
2257
|
+
throw new Error("setClientOptions must be called before an api request is made");
|
|
2258
|
+
}
|
|
2259
|
+
ApiState.initialized = true;
|
|
2257
2260
|
};
|
|
2258
2261
|
|
|
2259
2262
|
export { setClientOptions };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createValidAddressList, executeTransactions } from './chunk-
|
|
2
|
-
import { updateRouteDetails, executeAndSubscribeToRouteStatus } from './chunk-
|
|
3
|
-
import { messages } from './chunk-
|
|
4
|
-
import { ApiState } from './chunk-
|
|
1
|
+
import { createValidAddressList, executeTransactions } from './chunk-IGK7LJCM.js';
|
|
2
|
+
import { updateRouteDetails, executeAndSubscribeToRouteStatus } from './chunk-5IXH2QPF.js';
|
|
3
|
+
import { messages } from './chunk-IHSSWY3M.js';
|
|
4
|
+
import { ApiState } from './chunk-VGCTTJO7.js';
|
|
5
5
|
|
|
6
6
|
// src/public-functions/executeRoute.ts
|
|
7
7
|
var executeRoute = async (options) => {
|