@skip-go/client 1.5.3-alpha.1 → 1.5.4
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-HFEMNOJS.cjs → chunk-2QPPD3BB.cjs} +3 -0
- package/dist/cjs/{chunk-7SZZBUBD.cjs → chunk-2SA3OAIJ.cjs} +3 -3
- package/dist/cjs/{chunk-APJDSXWR.cjs → chunk-3RPOC3AX.cjs} +12 -12
- package/dist/cjs/chunk-4BWE7SOV.cjs +68 -0
- package/dist/cjs/{chunk-FF5UWES6.cjs → chunk-4GHUZDDP.cjs} +4 -4
- package/dist/cjs/{chunk-KM2D7PJL.cjs → chunk-4TBONPD6.cjs} +33 -33
- package/dist/cjs/chunk-5JS6DMVZ.cjs +214 -0
- package/dist/cjs/{chunk-NWD4MAMT.cjs → chunk-5KWNKICM.cjs} +4 -10
- package/dist/cjs/{chunk-I2FDWZZJ.cjs → chunk-67WZP4PA.cjs} +106 -807
- package/dist/cjs/{chunk-WKYP2NMS.cjs → chunk-6W2OIU3O.cjs} +15 -15
- package/dist/cjs/{chunk-PDTIT3JO.cjs → chunk-7CFJPJJ2.cjs} +22 -22
- package/dist/cjs/chunk-7HDLYDAS.cjs +55 -0
- package/dist/cjs/{chunk-AW6IQ7JH.cjs → chunk-A5S6SIYN.cjs} +2 -2
- package/dist/cjs/{chunk-ZBJZTBIW.cjs → chunk-ASDMDYTC.cjs} +2 -2
- package/dist/cjs/{chunk-QAHHTQ7V.cjs → chunk-ATW6UNT5.cjs} +4 -4
- package/dist/cjs/{chunk-PLO5CVGN.cjs → chunk-AUTOIM57.cjs} +2 -2
- package/dist/cjs/{chunk-KWH6S7PB.cjs → chunk-CK6CQWQU.cjs} +6 -6
- package/dist/cjs/{chunk-RC73RNNQ.cjs → chunk-EGFH6FEG.cjs} +4 -4
- package/dist/cjs/{chunk-T5EGKQAT.cjs → chunk-FCTBCHOT.cjs} +2 -2
- package/dist/cjs/{chunk-S3BKLN4L.cjs → chunk-IJIBMN2F.cjs} +2 -2
- package/dist/cjs/{chunk-262HFM6V.cjs → chunk-JRXPJ45U.cjs} +2 -2
- package/dist/cjs/chunk-KZOSEIWH.cjs +10 -0
- package/dist/cjs/{chunk-3M7YYWGL.cjs → chunk-MUJBB64F.cjs} +3 -7
- package/dist/cjs/{chunk-3NHW3XWK.cjs → chunk-NCFH5MGF.cjs} +2 -2
- package/dist/cjs/{chunk-DWOE6N5S.cjs → chunk-NM4PISTQ.cjs} +189 -188
- package/dist/cjs/{chunk-4MV4GLIA.cjs → chunk-OJISEAMX.cjs} +2 -2
- package/dist/cjs/{chunk-JWWJIJUE.cjs → chunk-PDNKS5R2.cjs} +2 -2
- package/dist/cjs/{chunk-RBM66GW6.cjs → chunk-UXW4XVHF.cjs} +2 -2
- package/dist/cjs/chunk-VEEDEDME.cjs +454 -0
- package/dist/cjs/{chunk-DLT6Q6RB.cjs → chunk-WOSAJSJB.cjs} +163 -149
- package/dist/cjs/{chunk-XCFPRLX3.cjs → chunk-WRTBZRHG.cjs} +161 -161
- package/dist/cjs/{chunk-BCX2D6TE.cjs → chunk-ZHV4J6EM.cjs} +55 -23
- package/dist/cjs/index.cjs +123 -115
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +19 -29
- package/dist/cjs/public-functions/executeRoute.cjs +19 -29
- package/dist/cjs/public-functions/getCosmosGasAmountForMessage.cjs +5 -5
- package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +1 -1
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +6 -5
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +8 -7
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +33 -29
- 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 +7 -7
- package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +9 -9
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +10 -10
- package/dist/cjs/public-functions/waitForTransaction.cjs +10 -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 +1 -1
- 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.js +3 -3
- package/dist/esm/api/postMessages.d.ts +2 -2
- package/dist/esm/api/postMessages.js +3 -3
- package/dist/esm/api/postMessagesDirect.d.ts +1 -1
- package/dist/esm/api/postMessagesDirect.js +3 -3
- package/dist/esm/api/postRecommendAssets.d.ts +1 -1
- package/dist/esm/api/postRecommendAssets.js +3 -3
- package/dist/esm/api/postRoute.d.ts +2 -2
- 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 +72 -68
- package/dist/esm/api/postTransactionStatus.js +3 -3
- package/dist/esm/{callbacks-C-KUJnDv.d.ts → callbacks-CZNSHCBb.d.ts} +5 -5
- package/dist/esm/chunk-22LYQHMA.js +53 -0
- package/dist/esm/{chunk-YLVUKXLR.js → chunk-3JHLVPRG.js} +1 -1
- package/dist/esm/chunk-763YPOJQ.js +431 -0
- package/dist/esm/chunk-7OHBD7I6.js +212 -0
- package/dist/esm/{chunk-FNTPI2AV.js → chunk-A5NZMSTI.js} +1 -1
- package/dist/esm/{chunk-QRKO56DH.js → chunk-BJKCMEMJ.js} +3 -8
- package/dist/esm/chunk-E4NRDAVO.js +65 -0
- package/dist/esm/{chunk-HDW6XFWX.js → chunk-ETBJVFQP.js} +1 -1
- package/dist/esm/{chunk-UIDIKXMB.js → chunk-F2LQB2DP.js} +6 -5
- package/dist/esm/{chunk-VGCTTJO7.js → chunk-F66EKL3W.js} +3 -0
- package/dist/esm/{chunk-V7VKYD4J.js → chunk-G63PICMU.js} +2 -2
- package/dist/esm/{chunk-KNXMSLOB.js → chunk-GLH7IRLX.js} +2 -2
- package/dist/esm/{chunk-RFJYCJK4.js → chunk-HNU2Y3JI.js} +1 -1
- package/dist/esm/{chunk-QL423UEF.js → chunk-HP5EMWC6.js} +163 -149
- package/dist/esm/{chunk-MYGJGC62.js → chunk-J24LYWJE.js} +1 -1
- package/dist/esm/{chunk-JYYCFKB4.js → chunk-KS764SOZ.js} +15 -15
- package/dist/esm/{chunk-SFWTQBQT.js → chunk-KXS5UH7E.js} +4 -4
- package/dist/esm/{chunk-VWOMKMH2.js → chunk-KZKAL5ZN.js} +1 -1
- package/dist/esm/{chunk-IKWC55JU.js → chunk-LAGER3PR.js} +61 -740
- package/dist/esm/{chunk-3WFXBPS2.js → chunk-N4PTRCNT.js} +1 -1
- package/dist/esm/{chunk-IHSSWY3M.js → chunk-P36PE4CR.js} +1 -1
- package/dist/esm/{chunk-UBVBVJPY.js → chunk-QYXGDTUU.js} +1 -1
- package/dist/esm/{chunk-QO2CYYF5.js → chunk-RTDD7HZ3.js} +4 -7
- package/dist/esm/chunk-SWYON2RG.js +7 -0
- package/dist/esm/{chunk-AUNRER4I.js → chunk-SXBG57J3.js} +1 -1
- package/dist/esm/{chunk-HELQO7PA.js → chunk-TGTOO2ZQ.js} +2 -2
- package/dist/esm/{chunk-6M7N6EAO.js → chunk-TON3V7SK.js} +14 -14
- package/dist/esm/{chunk-KXQ2ASHQ.js → chunk-UHCKOKBM.js} +1 -1
- package/dist/esm/{chunk-YGQ4NKTM.js → chunk-UN46DUOV.js} +1 -1
- package/dist/esm/{chunk-2PWROHHX.js → chunk-VMEHGKH7.js} +2 -2
- package/dist/esm/{chunk-5IXH2QPF.js → chunk-WRPS6WK2.js} +52 -20
- package/dist/esm/{chunk-44IX6KPJ.js → chunk-XNU3TKKM.js} +1 -1
- package/dist/esm/{client-types-CGMuZ3zo.d.ts → client-types-BX_0924O.d.ts} +1 -1
- package/dist/esm/{generateApi-D_-Gso-x.d.ts → generateApi-Clc85Kxw.d.ts} +1 -1
- package/dist/esm/index.d.ts +264 -261
- package/dist/esm/index.js +32 -28
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +4 -4
- package/dist/esm/public-functions/executeMultipleRoutes.js +18 -28
- package/dist/esm/public-functions/executeRoute.d.ts +4 -4
- package/dist/esm/public-functions/executeRoute.js +18 -28
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +1 -1
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.js +3 -3
- 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 -4
- package/dist/esm/public-functions/getRecommendedGasPrice.js +7 -6
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +1 -1
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +32 -28
- 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 +6 -6
- 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 +9 -9
- package/dist/esm/public-functions/waitForTransaction.d.ts +712 -74
- package/dist/esm/public-functions/waitForTransaction.js +5 -5
- package/dist/esm/{setClientOptions-C8g92xTm.d.ts → setClientOptions-DD5Mzkw_.d.ts} +3 -3
- package/dist/esm/{swaggerTypes-B_jKfpvz.d.ts → swaggerTypes-Dr4I6vW2.d.ts} +260 -256
- package/package.json +5 -5
- package/dist/cjs/chunk-4NGHNHAS.cjs +0 -46
- package/dist/esm/chunk-TNIGHYH2.js +0 -44
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as SkipApiOptions } from '../apiState-1VvikVK-.js';
|
|
2
|
-
import { A as ApiRequest, a as ApiResponse } from '../generateApi-
|
|
3
|
-
import '../swaggerTypes-
|
|
2
|
+
import { A as ApiRequest, a as ApiResponse } from '../generateApi-Clc85Kxw.js';
|
|
3
|
+
import '../swaggerTypes-Dr4I6vW2.js';
|
|
4
4
|
|
|
5
5
|
declare const submitTransaction: (options?: ({
|
|
6
6
|
tx?: string | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { submitTransaction } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { submitTransaction } from '../chunk-ETBJVFQP.js';
|
|
2
|
+
import '../chunk-F66EKL3W.js';
|
|
3
|
+
import '../chunk-HP5EMWC6.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as SkipApiOptions } from '../apiState-1VvikVK-.js';
|
|
2
|
-
import { A as ApiRequest, P as PollingProps } from '../generateApi-
|
|
3
|
-
import '../swaggerTypes-
|
|
2
|
+
import { A as ApiRequest, P as PollingProps } from '../generateApi-Clc85Kxw.js';
|
|
3
|
+
import '../swaggerTypes-Dr4I6vW2.js';
|
|
4
4
|
|
|
5
5
|
type TrackTxRequest = ApiRequest<"status"> & TrackTxPollingProps & SkipApiOptions;
|
|
6
6
|
type TrackTxPollingProps = Omit<PollingProps<"status">, "isSuccess" | "onError" | "onSuccess">;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { trackTransaction } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { trackTransaction } from '../chunk-SXBG57J3.js';
|
|
2
|
+
import '../chunk-F66EKL3W.js';
|
|
3
|
+
import '../chunk-HP5EMWC6.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ApiResponse } from '../generateApi-
|
|
1
|
+
import { b as TransactionState, P as PacketErrorType, T as TransferState, h as AxelarTransferState, C as ContractCallWithTokenErrorType, c as SendTokenErrorType, A as AxelarTransferType, g as CCTPTransferState, H as HyperlaneTransferState, O as OPInitTransferState, f as StargateTransferState, G as GoFastTransferState, L as LayerZeroTransferState, S as StatusErrorType } from '../swaggerTypes-Dr4I6vW2.js';
|
|
2
|
+
import { a as ApiResponse } from '../generateApi-Clc85Kxw.js';
|
|
3
3
|
import { S as SkipApiOptions } from '../apiState-1VvikVK-.js';
|
|
4
4
|
|
|
5
5
|
declare const transactionStatus: (params?: ({
|
|
@@ -56,39 +56,41 @@ declare const transactionStatus: (params?: ({
|
|
|
56
56
|
fromChainId: string;
|
|
57
57
|
state: AxelarTransferState;
|
|
58
58
|
txs: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
59
|
+
contractCallWithTokenTxs?: {
|
|
60
|
+
approveTx?: {
|
|
61
|
+
chainId?: string | undefined;
|
|
62
|
+
explorerLink: string;
|
|
63
|
+
txHash?: string | undefined;
|
|
64
|
+
onChainAt?: string | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
confirmTx?: {
|
|
67
|
+
chainId?: string | undefined;
|
|
68
|
+
explorerLink: string;
|
|
69
|
+
txHash?: string | undefined;
|
|
70
|
+
onChainAt?: string | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
error?: {
|
|
73
|
+
message?: string | undefined;
|
|
74
|
+
type?: ContractCallWithTokenErrorType | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
executeTx?: {
|
|
77
|
+
chainId?: string | undefined;
|
|
78
|
+
explorerLink: string;
|
|
79
|
+
txHash?: string | undefined;
|
|
80
|
+
onChainAt?: string | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
gasPaidTx?: {
|
|
83
|
+
chainId?: string | undefined;
|
|
84
|
+
explorerLink: string;
|
|
85
|
+
txHash?: string | undefined;
|
|
86
|
+
onChainAt?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
sendTx?: {
|
|
89
|
+
chainId?: string | undefined;
|
|
90
|
+
explorerLink: string;
|
|
91
|
+
txHash?: string | undefined;
|
|
92
|
+
onChainAt?: string | undefined;
|
|
93
|
+
} | undefined;
|
|
92
94
|
} | undefined;
|
|
93
95
|
} | {
|
|
94
96
|
confirmTx?: {
|
|
@@ -383,39 +385,41 @@ declare const transactionStatus: (params?: ({
|
|
|
383
385
|
fromChainId: string;
|
|
384
386
|
state: AxelarTransferState;
|
|
385
387
|
txs: {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
388
|
+
contractCallWithTokenTxs?: {
|
|
389
|
+
approveTx?: {
|
|
390
|
+
chainId?: string | undefined;
|
|
391
|
+
explorerLink: string;
|
|
392
|
+
txHash?: string | undefined;
|
|
393
|
+
onChainAt?: string | undefined;
|
|
394
|
+
} | undefined;
|
|
395
|
+
confirmTx?: {
|
|
396
|
+
chainId?: string | undefined;
|
|
397
|
+
explorerLink: string;
|
|
398
|
+
txHash?: string | undefined;
|
|
399
|
+
onChainAt?: string | undefined;
|
|
400
|
+
} | undefined;
|
|
401
|
+
error?: {
|
|
402
|
+
message?: string | undefined;
|
|
403
|
+
type?: ContractCallWithTokenErrorType | undefined;
|
|
404
|
+
} | undefined;
|
|
405
|
+
executeTx?: {
|
|
406
|
+
chainId?: string | undefined;
|
|
407
|
+
explorerLink: string;
|
|
408
|
+
txHash?: string | undefined;
|
|
409
|
+
onChainAt?: string | undefined;
|
|
410
|
+
} | undefined;
|
|
411
|
+
gasPaidTx?: {
|
|
412
|
+
chainId?: string | undefined;
|
|
413
|
+
explorerLink: string;
|
|
414
|
+
txHash?: string | undefined;
|
|
415
|
+
onChainAt?: string | undefined;
|
|
416
|
+
} | undefined;
|
|
417
|
+
sendTx?: {
|
|
418
|
+
chainId?: string | undefined;
|
|
419
|
+
explorerLink: string;
|
|
420
|
+
txHash?: string | undefined;
|
|
421
|
+
onChainAt?: string | undefined;
|
|
422
|
+
} | undefined;
|
|
419
423
|
} | undefined;
|
|
420
424
|
} | {
|
|
421
425
|
confirmTx?: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { transactionStatus } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { transactionStatus } from '../chunk-N4PTRCNT.js';
|
|
2
|
+
import '../chunk-F66EKL3W.js';
|
|
3
|
+
import '../chunk-HP5EMWC6.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TxStatusResponse } from './api/postTransactionStatus.js';
|
|
2
|
-
import {
|
|
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 { T as TransferState, h as AxelarTransferState, g as CCTPTransferState, H as HyperlaneTransferState, O as OPInitTransferState, G as GoFastTransferState, f as StargateTransferState, L as LayerZeroTransferState, b as TransactionState, bq as RouteResponse, a6 as CosmosMsg, ax as PostHandler, ay as Route, aV as TransferAssetRelease, aW as TransferStatus, a3 as Erc20Approval } from './swaggerTypes-Dr4I6vW2.js';
|
|
3
|
+
import { A as ApiRequest } from './generateApi-Clc85Kxw.js';
|
|
4
|
+
import { S as SignerGetters, b as GasOptions, B as BaseSettings, U as UserAddress, T as TxResult } from './client-types-BX_0924O.js';
|
|
5
5
|
|
|
6
6
|
type OverallStatus = "pending" | "success" | "failed";
|
|
7
7
|
declare function getTransferEventsFromTxStatusResponse(txStatusResponse?: TxStatusResponse[]): {
|
|
@@ -73,7 +73,7 @@ type TransactionDetails = {
|
|
|
73
73
|
routeKeyToStatus?: Record<string, TransactionStatus>;
|
|
74
74
|
routeKey?: string;
|
|
75
75
|
};
|
|
76
|
-
type SimpleRoute = Partial<Pick<Route, "usdAmountIn" | "usdAmountOut" | "amountIn" | "amountOut" | "sourceAssetDenom" | "sourceAssetChainId" | "destAssetDenom" | "destAssetChainId" | "estimatedRouteDurationSeconds">>;
|
|
76
|
+
type SimpleRoute = Partial<Pick<Route, "usdAmountIn" | "usdAmountOut" | "amountIn" | "amountOut" | "sourceAssetDenom" | "sourceAssetChainId" | "destAssetDenom" | "destAssetChainId" | "estimatedRouteDurationSeconds" | "operations">>;
|
|
77
77
|
type RouteDetails = {
|
|
78
78
|
id: string;
|
|
79
79
|
timestamp: number;
|
|
@@ -155,4 +155,4 @@ type TransactionCallbacks = {
|
|
|
155
155
|
}) => Promise<void>;
|
|
156
156
|
};
|
|
157
157
|
|
|
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 };
|
|
158
|
+
export { type ClientTransferEvent as C, type ExecuteRouteOptions as E, type OverallStatus as O, 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 };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createValidAddressList, executeTransactions } from './chunk-LAGER3PR.js';
|
|
2
|
+
import { updateRouteDetails, executeAndSubscribeToRouteStatus } from './chunk-WRPS6WK2.js';
|
|
3
|
+
import { messages } from './chunk-P36PE4CR.js';
|
|
4
|
+
import { ApiState } from './chunk-F66EKL3W.js';
|
|
5
|
+
|
|
6
|
+
// src/public-functions/executeRoute.ts
|
|
7
|
+
var executeRoute = async (options) => {
|
|
8
|
+
const { route, userAddresses, appendCosmosMsgs, timeoutSeconds } = options;
|
|
9
|
+
const { id: routeId } = updateRouteDetails({
|
|
10
|
+
status: "unconfirmed",
|
|
11
|
+
options
|
|
12
|
+
});
|
|
13
|
+
const addressList = await createValidAddressList({
|
|
14
|
+
userAddresses,
|
|
15
|
+
route
|
|
16
|
+
});
|
|
17
|
+
const response = await messages({
|
|
18
|
+
timeoutSeconds,
|
|
19
|
+
amountIn: route?.amountIn,
|
|
20
|
+
amountOut: route.estimatedAmountOut || "0",
|
|
21
|
+
sourceAssetChainId: route?.sourceAssetChainId,
|
|
22
|
+
sourceAssetDenom: route?.sourceAssetDenom,
|
|
23
|
+
destAssetChainId: route?.destAssetChainId,
|
|
24
|
+
destAssetDenom: route?.destAssetDenom,
|
|
25
|
+
operations: route?.operations,
|
|
26
|
+
addressList,
|
|
27
|
+
slippageTolerancePercent: options.slippageTolerancePercent || "1",
|
|
28
|
+
chainIdsToAffiliates: ApiState.chainIdsToAffiliates,
|
|
29
|
+
postRouteHandler: options.postRouteHandler,
|
|
30
|
+
feePayerAddress: options.svmFeePayer?.address
|
|
31
|
+
});
|
|
32
|
+
if (appendCosmosMsgs) {
|
|
33
|
+
Object.entries(appendCosmosMsgs).forEach(([chainId, msgs]) => {
|
|
34
|
+
const txIndex = response?.txs?.findIndex(
|
|
35
|
+
(tx2) => "cosmosTx" in tx2 && tx2.cosmosTx.chainId === chainId
|
|
36
|
+
);
|
|
37
|
+
if (txIndex === void 0 || txIndex === -1) return;
|
|
38
|
+
const tx = response?.txs?.[txIndex];
|
|
39
|
+
if (tx && "cosmosTx" in tx) {
|
|
40
|
+
tx.cosmosTx.msgs?.unshift(...msgs);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const { transactionDetails, executeTransaction } = await executeTransactions({ ...options, routeId, txs: response?.txs });
|
|
45
|
+
await executeAndSubscribeToRouteStatus({
|
|
46
|
+
transactionDetails,
|
|
47
|
+
executeTransaction,
|
|
48
|
+
routeId,
|
|
49
|
+
options
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { executeRoute };
|