@skip-go/client 1.6.0-alpha.3 → 1.6.0-alpha.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 +16 -0
- package/dist/cjs/api/getAssetsBetweenChains.cjs +12 -0
- package/dist/cjs/api/getBridges.cjs +12 -0
- package/dist/cjs/api/getChains.cjs +12 -0
- package/dist/cjs/api/getVenues.cjs +12 -0
- package/dist/cjs/api/postAssetsFromSource.cjs +13 -0
- package/dist/cjs/api/postBalances.cjs +12 -0
- package/dist/cjs/api/postIbcOriginAssets.cjs +12 -0
- package/dist/cjs/api/postMessages.cjs +12 -0
- package/dist/cjs/api/postMessagesDirect.cjs +12 -0
- package/dist/cjs/api/postRecommendAssets.cjs +12 -0
- package/dist/cjs/api/postRoute.cjs +12 -0
- package/dist/cjs/api/postSubmitTransaction.cjs +12 -0
- package/dist/cjs/api/postTrackTransaction.cjs +12 -0
- package/dist/cjs/api/postTransactionStatus.cjs +12 -0
- package/dist/cjs/chunk-25TA7Z7R.cjs +460 -0
- package/dist/cjs/chunk-2QPPD3BB.cjs +210 -0
- package/dist/cjs/chunk-2SA3OAIJ.cjs +18 -0
- package/dist/cjs/chunk-3KO2DHFX.cjs +1495 -0
- package/dist/cjs/chunk-477CU2G2.cjs +280 -0
- package/dist/cjs/chunk-4BWE7SOV.cjs +68 -0
- package/dist/cjs/chunk-4GHUZDDP.cjs +16 -0
- package/dist/cjs/chunk-4ZIVDKQN.cjs +387 -0
- package/dist/cjs/chunk-6T4SBY5H.cjs +214 -0
- package/dist/cjs/chunk-A3UNNRKD.cjs +574 -0
- package/dist/cjs/chunk-A5S6SIYN.cjs +12 -0
- package/dist/cjs/chunk-ASDMDYTC.cjs +11 -0
- package/dist/cjs/chunk-ATW6UNT5.cjs +136 -0
- package/dist/cjs/chunk-AUTOIM57.cjs +22 -0
- package/dist/cjs/chunk-AVWWCQ5P.cjs +2264 -0
- package/dist/cjs/chunk-CIZTNJ3K.cjs +24 -0
- package/dist/cjs/chunk-CK6CQWQU.cjs +49 -0
- package/dist/cjs/chunk-EAZQ2ECA.cjs +185 -0
- package/dist/cjs/chunk-F3EB2AQG.cjs +28 -0
- package/dist/cjs/chunk-FCTBCHOT.cjs +12 -0
- package/dist/cjs/chunk-IJIBMN2F.cjs +12 -0
- package/dist/cjs/chunk-IUMMXFGP.cjs +189 -0
- package/dist/cjs/chunk-JRXPJ45U.cjs +12 -0
- package/dist/cjs/chunk-LJV45UGL.cjs +582 -0
- package/dist/cjs/chunk-MUJBB64F.cjs +291 -0
- package/dist/cjs/chunk-NCFH5MGF.cjs +39 -0
- package/dist/cjs/chunk-NM4PISTQ.cjs +3359 -0
- package/dist/cjs/chunk-OJISEAMX.cjs +13 -0
- package/dist/cjs/chunk-OVKHTOBP.cjs +99 -0
- package/dist/cjs/chunk-PDNKS5R2.cjs +13 -0
- package/dist/cjs/chunk-TELXDMYL.cjs +55 -0
- package/dist/cjs/chunk-UXW4XVHF.cjs +15 -0
- package/dist/cjs/index.cjs +349 -0
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +27 -0
- package/dist/cjs/public-functions/executeRoute.cjs +27 -0
- package/dist/cjs/public-functions/getCosmosGasAmountForMessage.cjs +16 -0
- package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +11 -0
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +14 -0
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +15 -0
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +41 -0
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +15 -0
- package/dist/cjs/public-functions/setApiOptions.cjs +12 -0
- package/dist/cjs/public-functions/setClientOptions.cjs +16 -0
- package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +26 -0
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +18 -0
- package/dist/cjs/public-functions/waitForTransaction.cjs +18 -0
- package/dist/esm/api/getAssets.d.ts +19 -0
- package/dist/esm/api/getAssets.js +3 -0
- package/dist/esm/api/getAssetsBetweenChains.d.ts +56 -0
- package/dist/esm/api/getAssetsBetweenChains.js +3 -0
- package/dist/esm/api/getBridges.d.ts +55 -0
- package/dist/esm/api/getBridges.js +3 -0
- package/dist/esm/api/getChains.d.ts +41 -0
- package/dist/esm/api/getChains.js +3 -0
- package/dist/esm/api/getVenues.d.ts +13 -0
- package/dist/esm/api/getVenues.js +3 -0
- package/dist/esm/api/postAssetsFromSource.d.ts +22 -0
- package/dist/esm/api/postAssetsFromSource.js +4 -0
- package/dist/esm/api/postBalances.d.ts +35 -0
- package/dist/esm/api/postBalances.js +3 -0
- package/dist/esm/api/postIbcOriginAssets.d.ts +32 -0
- package/dist/esm/api/postIbcOriginAssets.js +3 -0
- package/dist/esm/api/postMessages.d.ts +101 -0
- package/dist/esm/api/postMessages.js +3 -0
- package/dist/esm/api/postMessagesDirect.d.ts +640 -0
- package/dist/esm/api/postMessagesDirect.js +3 -0
- package/dist/esm/api/postRecommendAssets.d.ts +40 -0
- package/dist/esm/api/postRecommendAssets.js +3 -0
- package/dist/esm/api/postRoute.d.ts +530 -0
- package/dist/esm/api/postRoute.js +3 -0
- package/dist/esm/api/postSubmitTransaction.d.ts +17 -0
- package/dist/esm/api/postSubmitTransaction.js +3 -0
- package/dist/esm/api/postTrackTransaction.d.ts +12 -0
- package/dist/esm/api/postTrackTransaction.js +3 -0
- package/dist/esm/api/postTransactionStatus.d.ts +639 -0
- package/dist/esm/api/postTransactionStatus.js +3 -0
- package/dist/esm/apiState-1VvikVK-.d.ts +8 -0
- package/dist/esm/callbacks-DdC6QMlE.d.ts +158 -0
- package/dist/esm/chunk-3DIX6KRJ.js +566 -0
- package/dist/esm/chunk-3JHLVPRG.js +10 -0
- package/dist/esm/chunk-5WYMRZIO.js +97 -0
- package/dist/esm/chunk-A5NZMSTI.js +10 -0
- package/dist/esm/chunk-BU5RCZQH.js +187 -0
- package/dist/esm/chunk-CGJRRAFS.js +22 -0
- package/dist/esm/chunk-DMJMN4J3.js +379 -0
- package/dist/esm/chunk-E4NRDAVO.js +65 -0
- package/dist/esm/chunk-ETBJVFQP.js +10 -0
- package/dist/esm/chunk-F2LQB2DP.js +3323 -0
- package/dist/esm/chunk-F66EKL3W.js +203 -0
- package/dist/esm/chunk-G665WTT3.js +212 -0
- package/dist/esm/chunk-GPEO2I4P.js +272 -0
- package/dist/esm/chunk-GV2QOWB4.js +26 -0
- package/dist/esm/chunk-GZJLX2CP.js +2258 -0
- package/dist/esm/chunk-HNU2Y3JI.js +13 -0
- package/dist/esm/chunk-IZUHXTBP.js +53 -0
- package/dist/esm/chunk-J24LYWJE.js +130 -0
- package/dist/esm/chunk-KZKAL5ZN.js +16 -0
- package/dist/esm/chunk-N4PTRCNT.js +11 -0
- package/dist/esm/chunk-NUHMTWHP.js +180 -0
- package/dist/esm/chunk-P36PE4CR.js +37 -0
- package/dist/esm/chunk-QYXGDTUU.js +47 -0
- package/dist/esm/chunk-RH7PDDI5.js +433 -0
- package/dist/esm/chunk-RTDD7HZ3.js +275 -0
- package/dist/esm/chunk-SXBG57J3.js +20 -0
- package/dist/esm/chunk-TGTOO2ZQ.js +14 -0
- package/dist/esm/chunk-UHCKOKBM.js +9 -0
- package/dist/esm/chunk-ULUX2CVU.js +557 -0
- package/dist/esm/chunk-UN46DUOV.js +11 -0
- package/dist/esm/chunk-XIVAEU6S.js +1492 -0
- package/dist/esm/chunk-XNU3TKKM.js +10 -0
- package/dist/esm/client-types-D03Tellv.d.ts +114 -0
- package/dist/esm/generateApi-Bv02Xt5y.d.ts +56 -0
- package/dist/esm/index.d.ts +1859 -0
- package/dist/esm/index.js +32 -0
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +80 -0
- package/dist/esm/public-functions/executeMultipleRoutes.js +18 -0
- package/dist/esm/public-functions/executeRoute.d.ts +12 -0
- package/dist/esm/public-functions/executeRoute.js +18 -0
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +8 -0
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.js +3 -0
- package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +14 -0
- package/dist/esm/public-functions/getEvmGasAmountForMessage.js +2 -0
- package/dist/esm/public-functions/getFeeInfoForChain.d.ts +9 -0
- package/dist/esm/public-functions/getFeeInfoForChain.js +5 -0
- package/dist/esm/public-functions/getRecommendedGasPrice.d.ts +9 -0
- package/dist/esm/public-functions/getRecommendedGasPrice.js +6 -0
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +20 -0
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +32 -0
- package/dist/esm/public-functions/getSigningStargateClient.d.ts +13 -0
- package/dist/esm/public-functions/getSigningStargateClient.js +6 -0
- package/dist/esm/public-functions/setApiOptions.d.ts +9 -0
- package/dist/esm/public-functions/setApiOptions.js +3 -0
- package/dist/esm/public-functions/setClientOptions.d.ts +11 -0
- package/dist/esm/public-functions/setClientOptions.js +7 -0
- package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +12 -0
- package/dist/esm/public-functions/subscribeToRouteStatus.js +5 -0
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +44 -0
- package/dist/esm/public-functions/validateCosmosGasBalance.js +9 -0
- package/dist/esm/public-functions/waitForTransaction.d.ts +1279 -0
- package/dist/esm/public-functions/waitForTransaction.js +5 -0
- package/dist/esm/setClientOptions-CTwe8YVX.d.ts +76 -0
- package/dist/esm/swaggerTypes-CzGbnX_b.d.ts +2067 -0
- package/package.json +1 -1
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { TxStatusResponse } from './api/postTransactionStatus.js';
|
|
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, bs as RouteResponse, a8 as CosmosMsg, az as PostHandler, aA as Route, aX as TransferAssetRelease, aY as TransferStatus, a5 as Erc20Approval } from './swaggerTypes-CzGbnX_b.js';
|
|
3
|
+
import { A as ApiRequest } from './generateApi-Bv02Xt5y.js';
|
|
4
|
+
import { S as SignerGetters, b as GasOptions, B as BaseSettings, U as UserAddress, T as TxResult } from './client-types-D03Tellv.js';
|
|
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
|
+
}
|
|
32
|
+
type TransferEventStatus = "unconfirmed" | "signing" | "pending" | "completed" | "failed" | "approving" | "incomplete";
|
|
33
|
+
type ClientTransferEvent = {
|
|
34
|
+
fromChainId: string;
|
|
35
|
+
toChainId: string;
|
|
36
|
+
state: TransferState | AxelarTransferState | CCTPTransferState | HyperlaneTransferState | OPInitTransferState | GoFastTransferState | StargateTransferState | LayerZeroTransferState;
|
|
37
|
+
status?: TransferEventStatus;
|
|
38
|
+
fromExplorerLink?: string;
|
|
39
|
+
toExplorerLink?: string;
|
|
40
|
+
fromTxHash?: string;
|
|
41
|
+
toTxHash?: string;
|
|
42
|
+
explorerLink?: string;
|
|
43
|
+
transferType?: TransferType;
|
|
44
|
+
durationInMs?: number;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** Execute Route Options */
|
|
48
|
+
type ExecuteRouteOptions = SignerGetters & GasOptions & TransactionCallbacks & BaseSettings & Pick<ApiRequest<"msgs">, "timeoutSeconds"> & {
|
|
49
|
+
route: RouteResponse;
|
|
50
|
+
/**
|
|
51
|
+
* Addresses should be in the same order with the `requiredChainAddresses` in the `route`
|
|
52
|
+
*/
|
|
53
|
+
userAddresses: UserAddress[];
|
|
54
|
+
/**
|
|
55
|
+
* If `appendCosmosMsgs` is provided, it will append the specified Cosmos messages to the transactions.
|
|
56
|
+
*/
|
|
57
|
+
appendCosmosMsgs?: Record<string, CosmosMsg[]>;
|
|
58
|
+
/**
|
|
59
|
+
* Specify actions to perform after the route is completed
|
|
60
|
+
*/
|
|
61
|
+
postRouteHandler?: PostHandler;
|
|
62
|
+
};
|
|
63
|
+
declare const executeRoute: (options: ExecuteRouteOptions) => Promise<void>;
|
|
64
|
+
|
|
65
|
+
type RouteStatus = "unconfirmed" | "validating" | "allowance" | "signing" | "pending" | "completed" | "incomplete" | "failed";
|
|
66
|
+
type TransactionStatus = "pending" | "success" | "failed";
|
|
67
|
+
type TransactionDetails = {
|
|
68
|
+
chainId: string;
|
|
69
|
+
txHash?: string;
|
|
70
|
+
status?: TransactionStatus;
|
|
71
|
+
statusResponse?: TxStatusResponse;
|
|
72
|
+
explorerLink?: string;
|
|
73
|
+
routeKeyToStatus?: Record<string, TransactionStatus>;
|
|
74
|
+
routeKey?: string;
|
|
75
|
+
};
|
|
76
|
+
type SimpleRoute = Partial<Pick<Route, "usdAmountIn" | "usdAmountOut" | "amountIn" | "amountOut" | "sourceAssetDenom" | "sourceAssetChainId" | "destAssetDenom" | "destAssetChainId" | "estimatedRouteDurationSeconds" | "operations">>;
|
|
77
|
+
type RouteDetails = {
|
|
78
|
+
id: string;
|
|
79
|
+
timestamp: number;
|
|
80
|
+
status: RouteStatus;
|
|
81
|
+
route: SimpleRoute;
|
|
82
|
+
txsRequired: number;
|
|
83
|
+
txsSigned: number;
|
|
84
|
+
transactionDetails: TransactionDetails[];
|
|
85
|
+
transferEvents: ClientTransferEvent[];
|
|
86
|
+
transferAssetRelease?: TransferAssetRelease;
|
|
87
|
+
transferIndexToRouteKey?: Record<number, string>;
|
|
88
|
+
mainRouteId?: string;
|
|
89
|
+
relatedRoutes?: Partial<RouteDetails>[];
|
|
90
|
+
routeKey?: string;
|
|
91
|
+
userAddresses: UserAddress[];
|
|
92
|
+
};
|
|
93
|
+
declare function getTransactionStatus(state?: TransactionState): TransactionStatus;
|
|
94
|
+
type subscribeToRouteStatusProps = {
|
|
95
|
+
routeDetails?: RouteDetails | RouteDetails[];
|
|
96
|
+
onRouteStatusUpdated?: ExecuteRouteOptions["onRouteStatusUpdated"];
|
|
97
|
+
};
|
|
98
|
+
type executeAndSubscribeToRouteStatusProps = {
|
|
99
|
+
routeDetails?: RouteDetails;
|
|
100
|
+
transactionDetails?: TransactionDetails[];
|
|
101
|
+
trackTxPollingOptions?: ExecuteRouteOptions["trackTxPollingOptions"];
|
|
102
|
+
onRouteStatusUpdated?: ExecuteRouteOptions["onRouteStatusUpdated"];
|
|
103
|
+
executeTransaction?: (index: number) => Promise<TxResult>;
|
|
104
|
+
options?: ExecuteRouteOptions;
|
|
105
|
+
routeId?: string;
|
|
106
|
+
isCancelled?: () => boolean;
|
|
107
|
+
};
|
|
108
|
+
declare const subscribeToRouteStatus: (props: subscribeToRouteStatusProps) => () => void;
|
|
109
|
+
declare const executeAndSubscribeToRouteStatus: ({ transactionDetails, executeTransaction, trackTxPollingOptions, routeDetails, onRouteStatusUpdated, options, routeId, isCancelled, }: executeAndSubscribeToRouteStatusProps) => Promise<void>;
|
|
110
|
+
type updateRouteDetailsProps = {
|
|
111
|
+
routeDetails?: RouteDetails;
|
|
112
|
+
transactionDetails?: TransactionDetails[];
|
|
113
|
+
options?: Partial<ExecuteRouteOptions>;
|
|
114
|
+
status?: RouteStatus;
|
|
115
|
+
routeId?: string;
|
|
116
|
+
mainRouteId?: string;
|
|
117
|
+
transferIndexToRouteKey?: Record<number, string>;
|
|
118
|
+
relatedRoutes?: Partial<RouteDetails>[];
|
|
119
|
+
};
|
|
120
|
+
declare const updateRouteDetails: ({ transactionDetails, routeDetails, options, status, routeId, mainRouteId, transferIndexToRouteKey, relatedRoutes, }: updateRouteDetailsProps) => RouteDetails;
|
|
121
|
+
|
|
122
|
+
type CallbackStatus = "error" | "pending" | "completed";
|
|
123
|
+
type TransactionCallbacks = {
|
|
124
|
+
onTransactionSignRequested?: (value: {
|
|
125
|
+
chainId: string;
|
|
126
|
+
txIndex: number;
|
|
127
|
+
signerAddress?: string;
|
|
128
|
+
}) => Promise<void>;
|
|
129
|
+
onTransactionSigned?: (txInfo: {
|
|
130
|
+
chainId: string;
|
|
131
|
+
}) => Promise<void>;
|
|
132
|
+
onTransactionBroadcast?: (txInfo: {
|
|
133
|
+
txHash: string;
|
|
134
|
+
chainId: string;
|
|
135
|
+
}) => Promise<void>;
|
|
136
|
+
onTransactionTracked?: (txInfo: {
|
|
137
|
+
txHash: string;
|
|
138
|
+
chainId: string;
|
|
139
|
+
explorerLink: string;
|
|
140
|
+
}) => Promise<void>;
|
|
141
|
+
onTransactionCompleted?: (txInfo: {
|
|
142
|
+
chainId: string;
|
|
143
|
+
txHash: string;
|
|
144
|
+
status?: TransferStatus;
|
|
145
|
+
}) => Promise<void>;
|
|
146
|
+
onRouteStatusUpdated?: (routeStatus: RouteDetails) => void;
|
|
147
|
+
onValidateGasBalance?: (value: {
|
|
148
|
+
chainId?: string;
|
|
149
|
+
txIndex?: number;
|
|
150
|
+
status: CallbackStatus;
|
|
151
|
+
}) => Promise<void>;
|
|
152
|
+
onApproveAllowance?: (value: {
|
|
153
|
+
allowance?: Erc20Approval;
|
|
154
|
+
status: CallbackStatus;
|
|
155
|
+
}) => Promise<void>;
|
|
156
|
+
};
|
|
157
|
+
|
|
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 };
|