@skip-go/client 1.5.2 → 1.5.3-alpha.1
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-EI4ZWAEU.cjs → chunk-262HFM6V.cjs} +2 -2
- package/dist/cjs/{chunk-XPQRSO4J.cjs → chunk-3NHW3XWK.cjs} +2 -2
- package/dist/cjs/{chunk-XEBVLUYW.cjs → chunk-4MV4GLIA.cjs} +2 -2
- package/dist/cjs/{chunk-MHVCR4QO.cjs → chunk-4NGHNHAS.cjs} +6 -6
- package/dist/cjs/{chunk-3IWLZ562.cjs → chunk-7SZZBUBD.cjs} +3 -3
- package/dist/cjs/{chunk-LARLMUFZ.cjs → chunk-APJDSXWR.cjs} +10 -10
- package/dist/cjs/{chunk-R3TSJPKH.cjs → chunk-AW6IQ7JH.cjs} +2 -2
- package/dist/cjs/{chunk-7D433NQ5.cjs → chunk-BCX2D6TE.cjs} +91 -18
- package/dist/cjs/{chunk-JUKPQLLQ.cjs → chunk-FF5UWES6.cjs} +4 -4
- package/dist/cjs/{chunk-MMGVGXA5.cjs → chunk-HFEMNOJS.cjs} +7 -1
- package/dist/cjs/{chunk-HEYFLFKD.cjs → chunk-I2FDWZZJ.cjs} +810 -109
- package/dist/cjs/{chunk-MFJ6S6TL.cjs → chunk-JWWJIJUE.cjs} +2 -2
- package/dist/cjs/{chunk-5RP766TT.cjs → chunk-KWH6S7PB.cjs} +6 -6
- package/dist/cjs/{chunk-GO4BJ6G2.cjs → chunk-NWD4MAMT.cjs} +14 -8
- package/dist/cjs/{chunk-66VIHDGM.cjs → chunk-PDTIT3JO.cjs} +13 -13
- package/dist/cjs/{chunk-2MAYN27U.cjs → chunk-PLO5CVGN.cjs} +2 -2
- package/dist/cjs/{chunk-5HZLL5KD.cjs → chunk-QAHHTQ7V.cjs} +4 -4
- package/dist/cjs/{chunk-AJYZ5GAD.cjs → chunk-RBM66GW6.cjs} +2 -2
- package/dist/cjs/{chunk-ULD54VE4.cjs → chunk-RC73RNNQ.cjs} +4 -4
- package/dist/cjs/{chunk-N2RG3CRN.cjs → chunk-S3BKLN4L.cjs} +2 -2
- package/dist/cjs/{chunk-KPV3PGBG.cjs → chunk-T5EGKQAT.cjs} +2 -2
- package/dist/cjs/chunk-UMBMSRZZ.cjs +185 -0
- package/dist/cjs/{chunk-4R6OCWRR.cjs → chunk-WKYP2NMS.cjs} +8 -6
- package/dist/cjs/{chunk-VMWCRZVT.cjs → chunk-XCFPRLX3.cjs} +8 -8
- package/dist/cjs/{chunk-XDKONUY6.cjs → chunk-ZBJZTBIW.cjs} +2 -2
- package/dist/cjs/index.cjs +189 -251
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +27 -17
- package/dist/cjs/public-functions/executeRoute.cjs +27 -17
- package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +1 -1
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +6 -7
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +8 -9
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +39 -0
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +6 -6
- 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 +8 -8
- package/dist/cjs/public-functions/waitForTransaction.cjs +6 -6
- package/dist/esm/api/getAssets.d.ts +1 -1
- package/dist/esm/api/getAssets.js +3 -3
- package/dist/esm/api/getAssetsBetweenChains.d.ts +21 -21
- package/dist/esm/api/getAssetsBetweenChains.js +3 -3
- package/dist/esm/api/getBridges.d.ts +1 -1
- package/dist/esm/api/getBridges.js +3 -3
- package/dist/esm/api/getChains.d.ts +1 -1
- package/dist/esm/api/getChains.js +3 -3
- package/dist/esm/api/getVenues.js +3 -3
- package/dist/esm/api/postAssetsFromSource.d.ts +1 -1
- package/dist/esm/api/postAssetsFromSource.js +4 -4
- package/dist/esm/api/postBalances.d.ts +2 -2
- package/dist/esm/api/postBalances.js +3 -3
- package/dist/esm/api/postIbcOriginAssets.d.ts +10 -10
- package/dist/esm/api/postIbcOriginAssets.js +3 -3
- package/dist/esm/api/postMessages.d.ts +12 -12
- package/dist/esm/api/postMessages.js +3 -3
- package/dist/esm/api/postMessagesDirect.d.ts +163 -161
- package/dist/esm/api/postMessagesDirect.js +3 -3
- package/dist/esm/api/postRecommendAssets.d.ts +11 -11
- package/dist/esm/api/postRecommendAssets.js +3 -3
- package/dist/esm/api/postRoute.d.ts +161 -159
- package/dist/esm/api/postRoute.js +3 -3
- package/dist/esm/api/postSubmitTransaction.d.ts +2 -2
- package/dist/esm/api/postSubmitTransaction.js +3 -3
- package/dist/esm/api/postTrackTransaction.d.ts +2 -2
- package/dist/esm/api/postTrackTransaction.js +3 -3
- package/dist/esm/api/postTransactionStatus.d.ts +36 -36
- package/dist/esm/api/postTransactionStatus.js +3 -3
- package/dist/esm/{callbacks-DCqqd0D9.d.ts → callbacks-C-KUJnDv.d.ts} +34 -4
- package/dist/esm/{chunk-GU3UHER5.js → chunk-2PWROHHX.js} +3 -3
- package/dist/esm/{chunk-MFHZBJGQ.js → chunk-3WFXBPS2.js} +1 -1
- package/dist/esm/{chunk-B36HVX2L.js → chunk-44IX6KPJ.js} +1 -1
- package/dist/esm/{chunk-WSAZDCXR.js → chunk-5IXH2QPF.js} +86 -16
- package/dist/esm/{chunk-Z2HSHJLW.js → chunk-6M7N6EAO.js} +3 -3
- package/dist/esm/{chunk-6HKZYODA.js → chunk-AUNRER4I.js} +1 -1
- package/dist/esm/{chunk-H2HTF2UF.js → chunk-FNTPI2AV.js} +1 -1
- package/dist/esm/{chunk-W5AA7QOQ.js → chunk-HDW6XFWX.js} +1 -1
- package/dist/esm/{chunk-RXZJUE4K.js → chunk-HELQO7PA.js} +2 -2
- package/dist/esm/{chunk-45B6E7AT.js → chunk-IHSSWY3M.js} +1 -1
- package/dist/esm/{chunk-JQOJIEZA.js → chunk-IKWC55JU.js} +739 -60
- package/dist/esm/{chunk-VQ5SIQWU.js → chunk-JYYCFKB4.js} +8 -7
- package/dist/esm/chunk-KNXMSLOB.js +1 -1
- package/dist/esm/{chunk-HPA2XUA3.js → chunk-KXQ2ASHQ.js} +1 -1
- package/dist/esm/{chunk-263RYJUL.js → chunk-MYGJGC62.js} +1 -1
- package/dist/esm/chunk-O4J7DHZA.js +180 -0
- package/dist/esm/{chunk-BNMWBXN3.js → chunk-QRKO56DH.js} +9 -4
- package/dist/esm/{chunk-VG3G5QHN.js → chunk-RFJYCJK4.js} +1 -1
- package/dist/esm/{chunk-A4MFVNZO.js → chunk-SFWTQBQT.js} +3 -3
- package/dist/esm/{chunk-7WXPBTSR.js → chunk-TNIGHYH2.js} +3 -3
- package/dist/esm/{chunk-EJZGYHGH.js → chunk-UBVBVJPY.js} +1 -1
- package/dist/esm/chunk-UIDIKXMB.js +1 -1
- package/dist/esm/{chunk-DQXGZGNJ.js → chunk-V7VKYD4J.js} +2 -2
- package/dist/esm/{chunk-X3PQKUOS.js → chunk-VGCTTJO7.js} +7 -1
- package/dist/esm/{chunk-TLVHKYQ3.js → chunk-VWOMKMH2.js} +1 -1
- package/dist/esm/{chunk-AGHQ7SIE.js → chunk-YGQ4NKTM.js} +1 -1
- package/dist/esm/{chunk-A35RPDUV.js → chunk-YLVUKXLR.js} +1 -1
- 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 +166 -143
- package/dist/esm/index.js +26 -175
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +30 -10
- package/dist/esm/public-functions/executeMultipleRoutes.js +26 -16
- package/dist/esm/public-functions/executeRoute.d.ts +4 -4
- package/dist/esm/public-functions/executeRoute.js +26 -16
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +1 -1
- package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +3 -3
- package/dist/esm/public-functions/getEvmGasAmountForMessage.js +1 -1
- package/dist/esm/public-functions/getFeeInfoForChain.d.ts +1 -1
- package/dist/esm/public-functions/getFeeInfoForChain.js +5 -6
- package/dist/esm/public-functions/getRecommendedGasPrice.js +7 -8
- 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 +5 -5
- package/dist/esm/public-functions/setApiOptions.d.ts +1 -1
- package/dist/esm/public-functions/setApiOptions.js +3 -3
- package/dist/esm/public-functions/setClientOptions.d.ts +4 -4
- package/dist/esm/public-functions/setClientOptions.js +4 -4
- package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +4 -4
- package/dist/esm/public-functions/subscribeToRouteStatus.js +5 -5
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +4 -4
- package/dist/esm/public-functions/validateCosmosGasBalance.js +7 -7
- package/dist/esm/public-functions/waitForTransaction.d.ts +38 -38
- 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/cjs/chunk-D57TNRV3.cjs +0 -214
- package/dist/cjs/chunk-KSJ5QYMR.cjs +0 -185
- package/dist/cjs/chunk-KZOSEIWH.cjs +0 -10
- package/dist/cjs/chunk-Q33F7U2Y.cjs +0 -55
- package/dist/esm/chunk-4YTLUDRU.js +0 -212
- package/dist/esm/chunk-CP55HI6R.js +0 -53
- package/dist/esm/chunk-RHGDUD76.js +0 -180
- package/dist/esm/chunk-SWYON2RG.js +0 -7
- package/dist/esm/setClientOptions-CrXIODm0.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,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,6 +1,6 @@
|
|
|
1
|
-
import { BaseAccount as BaseAccount$1,
|
|
2
|
-
import { chains, findFirstWorkingEndpoint } from './chunk-
|
|
3
|
-
import { ClientState } from './chunk-
|
|
1
|
+
import { BaseAccount as BaseAccount$1, base64FromBytes, bytesFromBase64, isSet } from './chunk-QO2CYYF5.js';
|
|
2
|
+
import { chains, findFirstWorkingEndpoint } from './chunk-O4J7DHZA.js';
|
|
3
|
+
import { ClientState } from './chunk-MYGJGC62.js';
|
|
4
4
|
import { accountFromAny, SigningStargateClient } from '@cosmjs/stargate';
|
|
5
5
|
import { assertDefinedAndNotNull } from '@cosmjs/utils';
|
|
6
6
|
import { BinaryWriter, BinaryReader } from 'cosmjs-types/binary.js';
|
|
@@ -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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { transformAssetsMap } from './chunk-
|
|
2
|
-
import { api } from './chunk-
|
|
1
|
+
import { transformAssetsMap } from './chunk-MYGJGC62.js';
|
|
2
|
+
import { api } from './chunk-VGCTTJO7.js';
|
|
3
3
|
|
|
4
4
|
// src/api/postAssetsFromSource.ts
|
|
5
5
|
var assetsFromSource = api({
|