@skip-go/client 1.0.0 → 1.0.1-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/api/getAssets.cjs +15 -0
- package/dist/api/{getAssets.d.mts → getAssets.d.cts} +2 -2
- package/dist/api/getAssets.d.ts +19 -0
- package/dist/api/getAssets.js +2 -0
- package/dist/api/getAssetsBetweenChains.cjs +11 -0
- package/dist/api/{getAssetsBetweenChains.d.mts → getAssetsBetweenChains.d.cts} +2 -2
- package/dist/api/getAssetsBetweenChains.d.ts +56 -0
- package/dist/api/getAssetsBetweenChains.js +2 -0
- package/dist/api/getBridges.cjs +11 -0
- package/dist/api/{getBridges.d.mts → getBridges.d.cts} +2 -2
- package/dist/api/getBridges.d.ts +54 -0
- package/dist/api/getBridges.js +2 -0
- package/dist/api/getChains.cjs +11 -0
- package/dist/api/{getChains.d.mts → getChains.d.cts} +2 -2
- package/dist/api/getChains.d.ts +41 -0
- package/dist/api/getChains.js +2 -0
- package/dist/api/getVenues.cjs +11 -0
- package/dist/api/{getVenues.d.mts → getVenues.d.cts} +1 -1
- package/dist/api/getVenues.d.ts +13 -0
- package/dist/api/getVenues.js +2 -0
- package/dist/api/postAssetsFromSource.cjs +12 -0
- package/dist/api/{postAssetsFromSource.d.mts → postAssetsFromSource.d.cts} +2 -2
- package/dist/api/postAssetsFromSource.d.ts +13 -0
- package/dist/api/postAssetsFromSource.js +3 -0
- package/dist/api/postBalances.cjs +11 -0
- package/dist/api/{postBalances.d.mts → postBalances.d.cts} +3 -3
- package/dist/api/postBalances.d.ts +35 -0
- package/dist/api/postBalances.js +2 -0
- package/dist/api/postIbcOriginAssets.cjs +11 -0
- package/dist/api/{postIbcOriginAssets.d.mts → postIbcOriginAssets.d.cts} +1 -1
- package/dist/api/postIbcOriginAssets.d.ts +32 -0
- package/dist/api/postIbcOriginAssets.js +2 -0
- package/dist/api/postMessages.cjs +11 -0
- package/dist/api/{postMessages.d.mts → postMessages.d.cts} +3 -3
- package/dist/api/postMessages.d.ts +528 -0
- package/dist/api/postMessages.js +2 -0
- package/dist/api/postMessagesDirect.cjs +11 -0
- package/dist/api/{postMessagesDirect.d.mts → postMessagesDirect.d.cts} +2 -2
- package/dist/api/postMessagesDirect.d.ts +568 -0
- package/dist/api/postMessagesDirect.js +2 -0
- package/dist/api/postRecommendAssets.cjs +11 -0
- package/dist/api/{postRecommendAssets.d.mts → postRecommendAssets.d.cts} +2 -2
- package/dist/api/postRecommendAssets.d.ts +40 -0
- package/dist/api/postRecommendAssets.js +2 -0
- package/dist/api/postRoute.cjs +11 -0
- package/dist/api/{postRoute.d.mts → postRoute.d.cts} +3 -3
- package/dist/api/postRoute.d.ts +460 -0
- package/dist/api/postRoute.js +2 -0
- package/dist/api/postSubmitTransaction.cjs +11 -0
- package/dist/api/{postSubmitTransaction.d.mts → postSubmitTransaction.d.cts} +1 -1
- package/dist/api/postSubmitTransaction.d.ts +13 -0
- package/dist/api/postSubmitTransaction.js +2 -0
- package/dist/api/postTrackTransaction.cjs +11 -0
- package/dist/api/{postTrackTransaction.d.mts → postTrackTransaction.d.cts} +1 -1
- package/dist/api/postTrackTransaction.d.ts +13 -0
- package/dist/api/postTrackTransaction.js +2 -0
- package/dist/api/postTransactionStatus.cjs +11 -0
- package/dist/api/{postTransactionStatus.d.mts → postTransactionStatus.d.cts} +3 -3
- package/dist/api/postTransactionStatus.d.ts +559 -0
- package/dist/api/postTransactionStatus.js +2 -0
- package/dist/apiState-CdzxTxYd.d.ts +6 -0
- package/dist/chunk-32MRDO7V.cjs +12 -0
- package/dist/{chunk-C5CGY2X7.mjs → chunk-33K6EESX.js} +1 -1
- package/dist/{chunk-ZMEQSFOL.mjs → chunk-3N7XVGLX.js} +18 -23
- package/dist/{chunk-OTLFF5OB.mjs → chunk-3OZQ35X3.js} +101 -138
- package/dist/chunk-44PBLFB5.cjs +24 -0
- package/dist/{chunk-7TBBV2YY.mjs → chunk-4JJWOILI.js} +1 -1
- package/dist/chunk-4R6OCWRR.cjs +1346 -0
- package/dist/chunk-5IAEEEOQ.cjs +2251 -0
- package/dist/chunk-77ITCT75.cjs +15 -0
- package/dist/chunk-7OIZPQJB.cjs +3660 -0
- package/dist/chunk-7SK3IFXJ.cjs +188 -0
- package/dist/{chunk-QZ3X6MP3.mjs → chunk-BQTQJQ5E.js} +1 -1
- package/dist/{chunk-IHIJJNTV.mjs → chunk-BRJDNGYH.js} +6 -7
- package/dist/chunk-BRMONS6A.js +130 -0
- package/dist/{chunk-NNZFCKHP.mjs → chunk-C2EDPY6J.js} +1 -1
- package/dist/chunk-DAMZSSOH.cjs +12 -0
- package/dist/{chunk-KPK3Z6QZ.mjs → chunk-DW4U6YI6.js} +1 -1
- package/dist/chunk-ED2OY55G.cjs +136 -0
- package/dist/chunk-GARVPN2H.js +16 -0
- package/dist/chunk-HAR3IXDE.cjs +705 -0
- package/dist/chunk-ISHM4QWP.cjs +16 -0
- package/dist/chunk-J4LI33TK.cjs +95 -0
- package/dist/{chunk-NU7MCJOK.mjs → chunk-JTIHU43D.js} +32 -36
- package/dist/chunk-KDN7RCGP.cjs +13 -0
- package/dist/{chunk-J7GGREYX.mjs → chunk-KNV72XRZ.js} +1 -1
- package/dist/chunk-KZOSEIWH.cjs +10 -0
- package/dist/chunk-L5V5PASH.cjs +12 -0
- package/dist/chunk-LXYLWTNZ.cjs +12 -0
- package/dist/{chunk-CAAR7GDJ.mjs → chunk-MGVXJ2U4.js} +1 -1
- package/dist/{chunk-IGD32L7C.mjs → chunk-MTMPHY3Y.js} +1 -1
- package/dist/chunk-PNWIJSMA.cjs +12 -0
- package/dist/{chunk-CZ27FEZ7.mjs → chunk-PRQ2NHRZ.js} +1 -1
- package/dist/chunk-RDOSNDAQ.cjs +13 -0
- package/dist/{chunk-LJVI5DLG.mjs → chunk-RDRDFJQE.js} +1 -1
- package/dist/{chunk-YWYU6P7W.mjs → chunk-RMP3HM5N.js} +2 -2
- package/dist/chunk-SFMBRLUS.cjs +18 -0
- package/dist/{chunk-DZQJN6OX.mjs → chunk-SQGWZAUC.js} +76 -86
- package/dist/chunk-SW3SEQMJ.cjs +273 -0
- package/dist/{chunk-2ETF4N4H.mjs → chunk-TW77BXMT.js} +4 -5
- package/dist/chunk-URLFWBSC.cjs +11 -0
- package/dist/chunk-VI7UMBQ7.cjs +12 -0
- package/dist/{chunk-2F4MBSMT.mjs → chunk-VMPFHQ7U.js} +14 -20
- package/dist/chunk-W2U2UOFA.js +1790 -0
- package/dist/chunk-W6TBGBV3.js +675 -0
- package/dist/chunk-WWNTHZ6I.cjs +1812 -0
- package/dist/chunk-ZNXE6PUV.cjs +46 -0
- package/dist/{client-types-CVch1pZ-.d.mts → client-types-CxjtffyG.d.ts} +1 -1
- package/dist/client-types-qvyKvyFh.d.cts +60 -0
- package/dist/{executeRoute-CRdeEz1o.d.mts → executeRoute-BKRpODCc.d.cts} +3 -3
- package/dist/executeRoute-BKvMVd1I.d.ts +69 -0
- package/dist/{generateApi-3mHZ6Zbr.d.mts → generateApi-C0amiydg.d.cts} +1 -1
- package/dist/generateApi-DqCp36fX.d.ts +22 -0
- package/dist/index.cjs +209 -0
- package/dist/{index.d.mts → index.d.cts} +25 -27
- package/dist/index.d.ts +35 -0
- package/dist/index.js +24 -0
- package/dist/public-functions/executeRoute.cjs +21 -0
- package/dist/public-functions/{executeRoute.d.mts → executeRoute.d.cts} +4 -4
- package/dist/public-functions/executeRoute.d.ts +9 -0
- package/dist/public-functions/executeRoute.js +12 -0
- package/dist/public-functions/getFeeInfoForChain.cjs +14 -0
- package/dist/public-functions/{getFeeInfoForChain.d.mts → getFeeInfoForChain.d.cts} +2 -2
- package/dist/public-functions/getFeeInfoForChain.d.ts +9 -0
- package/dist/public-functions/getFeeInfoForChain.js +5 -0
- package/dist/public-functions/getRecommendedGasPrice.cjs +16 -0
- package/dist/public-functions/{getRecommendedGasPrice.d.mts → getRecommendedGasPrice.d.cts} +2 -2
- package/dist/public-functions/getRecommendedGasPrice.d.ts +9 -0
- package/dist/public-functions/getRecommendedGasPrice.js +7 -0
- package/dist/public-functions/getSigningStargateClient.cjs +13 -0
- package/dist/public-functions/{getSigningStargateClient.d.mts → getSigningStargateClient.d.cts} +1 -1
- package/dist/public-functions/getSigningStargateClient.d.ts +13 -0
- package/dist/public-functions/getSigningStargateClient.js +4 -0
- package/dist/public-functions/setApiOptions.cjs +11 -0
- package/dist/public-functions/{setApiOptions.d.mts → setApiOptions.d.cts} +2 -2
- package/dist/public-functions/setApiOptions.d.ts +9 -0
- package/dist/public-functions/setApiOptions.js +2 -0
- package/dist/public-functions/setClientOptions.cjs +13 -0
- package/dist/public-functions/setClientOptions.d.cts +9 -0
- package/dist/public-functions/setClientOptions.d.ts +9 -0
- package/dist/public-functions/setClientOptions.js +4 -0
- package/dist/{setClientOptions-CVB_OUIn.d.mts → setClientOptions-CT6CHI9I.d.cts} +2 -2
- package/dist/setClientOptions-DbanEIwL.d.ts +19 -0
- package/dist/swaggerTypes-O9-gvCT1.d.ts +1890 -0
- package/package.json +12 -3
- package/dist/api/getAssets.mjs +0 -2
- package/dist/api/getAssetsBetweenChains.mjs +0 -2
- package/dist/api/getBridges.mjs +0 -2
- package/dist/api/getChains.mjs +0 -2
- package/dist/api/getVenues.mjs +0 -2
- package/dist/api/postAssetsFromSource.mjs +0 -3
- package/dist/api/postBalances.mjs +0 -2
- package/dist/api/postIbcOriginAssets.mjs +0 -2
- package/dist/api/postMessages.mjs +0 -2
- package/dist/api/postMessagesDirect.mjs +0 -2
- package/dist/api/postRecommendAssets.mjs +0 -2
- package/dist/api/postRoute.mjs +0 -2
- package/dist/api/postSubmitTransaction.mjs +0 -2
- package/dist/api/postTrackTransaction.mjs +0 -2
- package/dist/api/postTransactionStatus.mjs +0 -2
- package/dist/chunk-2FYLP573.mjs +0 -15
- package/dist/chunk-DKIWPD5I.mjs +0 -124
- package/dist/chunk-I2MX24LT.mjs +0 -2316
- package/dist/chunk-RXWDHQLG.mjs +0 -231
- package/dist/index.mjs +0 -24
- package/dist/public-functions/executeRoute.mjs +0 -12
- package/dist/public-functions/getFeeInfoForChain.mjs +0 -5
- package/dist/public-functions/getRecommendedGasPrice.mjs +0 -7
- package/dist/public-functions/getSigningStargateClient.mjs +0 -4
- package/dist/public-functions/setApiOptions.mjs +0 -2
- package/dist/public-functions/setClientOptions.d.mts +0 -9
- package/dist/public-functions/setClientOptions.mjs +0 -4
- /package/dist/{apiState-CdzxTxYd.d.mts → apiState-CdzxTxYd.d.cts} +0 -0
- /package/dist/{chunk-ZAF3Z56R.mjs → chunk-SWYON2RG.js} +0 -0
- /package/dist/{chunk-TUBI6VE6.mjs → chunk-VQ5SIQWU.js} +0 -0
- /package/dist/{swaggerTypes-O9-gvCT1.d.mts → swaggerTypes-O9-gvCT1.d.cts} +0 -0
package/dist/chunk-RXWDHQLG.mjs
DELETED
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
var __async = (__this, __arguments, generator) => {
|
|
33
|
-
return new Promise((resolve, reject) => {
|
|
34
|
-
var fulfilled = (value) => {
|
|
35
|
-
try {
|
|
36
|
-
step(generator.next(value));
|
|
37
|
-
} catch (e) {
|
|
38
|
-
reject(e);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
var rejected = (value) => {
|
|
42
|
-
try {
|
|
43
|
-
step(generator.throw(value));
|
|
44
|
-
} catch (e) {
|
|
45
|
-
reject(e);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
49
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
// src/state/apiState.ts
|
|
54
|
-
var _ApiState = class _ApiState {
|
|
55
|
-
static setClientInitialized() {
|
|
56
|
-
_ApiState.resolveInitialization();
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
_ApiState.cumulativeAffiliateFeeBPS = "0";
|
|
60
|
-
_ApiState.isInitialized = false;
|
|
61
|
-
_ApiState.clientInitialized = new Promise((resolve) => {
|
|
62
|
-
_ApiState.resolveInitialization = () => {
|
|
63
|
-
if (!_ApiState.isInitialized) {
|
|
64
|
-
_ApiState.isInitialized = true;
|
|
65
|
-
resolve();
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
var ApiState = _ApiState;
|
|
70
|
-
|
|
71
|
-
// src/utils/convert.ts
|
|
72
|
-
function toSnake(obj) {
|
|
73
|
-
return convertKeys(obj, (key) => key.replace(/([A-Z])/g, "_$1").toLowerCase());
|
|
74
|
-
}
|
|
75
|
-
function toCamel(obj) {
|
|
76
|
-
return convertKeys(obj, (key) => key.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()));
|
|
77
|
-
}
|
|
78
|
-
function convertKeys(obj, convertKey) {
|
|
79
|
-
if (Array.isArray(obj)) {
|
|
80
|
-
return obj.map((item) => convertKeys(item, convertKey));
|
|
81
|
-
} else if (obj !== null && typeof obj === "object") {
|
|
82
|
-
return Object.keys(obj).reduce((acc, key) => {
|
|
83
|
-
acc[convertKey(key)] = convertKeys(obj[key], convertKey);
|
|
84
|
-
return acc;
|
|
85
|
-
}, {});
|
|
86
|
-
} else {
|
|
87
|
-
return obj;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// src/utils/timer.ts
|
|
92
|
-
var wait = (ms) => {
|
|
93
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// src/utils/generateApi.ts
|
|
97
|
-
var createRequestClient = ({ baseUrl, apiKey }) => {
|
|
98
|
-
const defaultHeaders = __spreadValues({
|
|
99
|
-
"content-type": "application/json"
|
|
100
|
-
}, apiKey ? { authorization: apiKey } : {});
|
|
101
|
-
const handleResponse = (response) => __async(void 0, null, function* () {
|
|
102
|
-
const contentType = response.headers.get("content-type");
|
|
103
|
-
const isJson = contentType == null ? void 0 : contentType.includes("application/json");
|
|
104
|
-
const body = isJson ? yield response.json() : yield response.text();
|
|
105
|
-
if (!response.ok) {
|
|
106
|
-
const message = typeof body === "object" && (body == null ? void 0 : body.message) ? body.message : response.statusText;
|
|
107
|
-
throw new Error(message);
|
|
108
|
-
}
|
|
109
|
-
return body;
|
|
110
|
-
});
|
|
111
|
-
const get = (path, params, signal) => __async(void 0, null, function* () {
|
|
112
|
-
const url = new URL(baseUrl + (path != null ? path : ""));
|
|
113
|
-
if (params && typeof params === "object") {
|
|
114
|
-
Object.entries(params).forEach(([key, value]) => {
|
|
115
|
-
if (value !== void 0 && value !== null) {
|
|
116
|
-
url.searchParams.append(key, String(value));
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
const response = yield fetch(url.toString(), {
|
|
121
|
-
method: "GET",
|
|
122
|
-
headers: defaultHeaders,
|
|
123
|
-
signal
|
|
124
|
-
});
|
|
125
|
-
return handleResponse(response);
|
|
126
|
-
});
|
|
127
|
-
const post = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (path, data = {}, signal) {
|
|
128
|
-
const response = yield fetch(new URL(baseUrl + path).toString(), {
|
|
129
|
-
method: "POST",
|
|
130
|
-
headers: defaultHeaders,
|
|
131
|
-
body: JSON.stringify(data),
|
|
132
|
-
signal
|
|
133
|
-
});
|
|
134
|
-
return handleResponse(response);
|
|
135
|
-
});
|
|
136
|
-
return { get, post };
|
|
137
|
-
};
|
|
138
|
-
function createRequest({
|
|
139
|
-
path,
|
|
140
|
-
method = "get",
|
|
141
|
-
onSuccess,
|
|
142
|
-
transformResponse
|
|
143
|
-
}) {
|
|
144
|
-
let controller = null;
|
|
145
|
-
const request = (options) => __async(this, null, function* () {
|
|
146
|
-
var _b;
|
|
147
|
-
const _a = options != null ? options : {}, { apiKey, apiUrl, abortDuplicateRequests } = _a, requestParams = __objRest(_a, ["apiKey", "apiUrl", "abortDuplicateRequests"]);
|
|
148
|
-
let fetchClient = ApiState.client;
|
|
149
|
-
if (apiUrl || apiKey) {
|
|
150
|
-
fetchClient = createRequestClient({
|
|
151
|
-
baseUrl: apiUrl || "https://api.skip.build",
|
|
152
|
-
apiKey
|
|
153
|
-
});
|
|
154
|
-
} else {
|
|
155
|
-
yield ApiState.clientInitialized;
|
|
156
|
-
}
|
|
157
|
-
if (abortDuplicateRequests && controller && !((_b = controller == null ? void 0 : controller.signal) == null ? void 0 : _b.aborted)) {
|
|
158
|
-
controller == null ? void 0 : controller.abort();
|
|
159
|
-
}
|
|
160
|
-
controller = new AbortController();
|
|
161
|
-
try {
|
|
162
|
-
const response = yield fetchClient[method](
|
|
163
|
-
path,
|
|
164
|
-
requestParams ? toSnake(requestParams) : void 0,
|
|
165
|
-
controller.signal
|
|
166
|
-
);
|
|
167
|
-
const camelCased = toCamel(response != null ? response : {});
|
|
168
|
-
const finalResponse = transformResponse ? transformResponse(camelCased) : camelCased;
|
|
169
|
-
onSuccess == null ? void 0 : onSuccess(finalResponse, requestParams);
|
|
170
|
-
return finalResponse;
|
|
171
|
-
} catch (error) {
|
|
172
|
-
if (error.name === "AbortError") {
|
|
173
|
-
console.log("Request was cancelled");
|
|
174
|
-
} else {
|
|
175
|
-
console.error("Error:", error);
|
|
176
|
-
throw error;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
return request;
|
|
181
|
-
}
|
|
182
|
-
function api({
|
|
183
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
184
|
-
methodName,
|
|
185
|
-
path,
|
|
186
|
-
onSuccess,
|
|
187
|
-
method = "get",
|
|
188
|
-
transformResponse
|
|
189
|
-
}) {
|
|
190
|
-
return createRequest({
|
|
191
|
-
path,
|
|
192
|
-
method,
|
|
193
|
-
onSuccess,
|
|
194
|
-
transformResponse
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
function pollingApi({
|
|
198
|
-
methodName,
|
|
199
|
-
path,
|
|
200
|
-
method = "get",
|
|
201
|
-
onSuccess,
|
|
202
|
-
onError,
|
|
203
|
-
isSuccess = () => true,
|
|
204
|
-
maxRetries = 5,
|
|
205
|
-
retryInterval = 1e3,
|
|
206
|
-
backoffMultiplier = 2
|
|
207
|
-
}) {
|
|
208
|
-
const request = (requestParams) => __async(this, null, function* () {
|
|
209
|
-
let attempt = 0;
|
|
210
|
-
let lastError;
|
|
211
|
-
while (attempt < maxRetries) {
|
|
212
|
-
try {
|
|
213
|
-
const result = yield api({ methodName, path, method })(requestParams);
|
|
214
|
-
if (result && isSuccess(result)) {
|
|
215
|
-
onSuccess == null ? void 0 : onSuccess(result, attempt);
|
|
216
|
-
return result;
|
|
217
|
-
}
|
|
218
|
-
} catch (err) {
|
|
219
|
-
lastError = err;
|
|
220
|
-
onError == null ? void 0 : onError(err, attempt);
|
|
221
|
-
}
|
|
222
|
-
const delay = retryInterval * Math.pow(backoffMultiplier, attempt);
|
|
223
|
-
yield wait(delay);
|
|
224
|
-
attempt++;
|
|
225
|
-
}
|
|
226
|
-
throw lastError != null ? lastError : new Error("pollingApi: max retries exceeded");
|
|
227
|
-
});
|
|
228
|
-
return (params) => request(params);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export { ApiState, __async, __objRest, __spreadProps, __spreadValues, api, createRequestClient, pollingApi, toCamel, wait };
|
package/dist/index.mjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export { Api, AutopilotAction, AxelarTransferState, AxelarTransferType, BridgeType, CCTPTransferState, ChainType, ContentType, ContractCallWithTokenErrorType, FeeType, GoFastTransferState, HttpClient, HyperlaneTransferState, LayerZeroTransferState, OPInitTransferState, PacketErrorType, Reason, RoutePriceWarningType, SendTokenErrorType, StargateTransferState, StatusErrorType, TransactionState, TransferState, executeRoute } from './chunk-I2MX24LT.mjs';
|
|
2
|
-
export { getRecommendedGasPrice } from './chunk-IHIJJNTV.mjs';
|
|
3
|
-
import './chunk-TUBI6VE6.mjs';
|
|
4
|
-
export { getFeeInfoForChain } from './chunk-2F4MBSMT.mjs';
|
|
5
|
-
export { GAS_STATION_CHAIN_IDS } from './chunk-ZAF3Z56R.mjs';
|
|
6
|
-
export { getSigningStargateClient } from './chunk-ZMEQSFOL.mjs';
|
|
7
|
-
import './chunk-NU7MCJOK.mjs';
|
|
8
|
-
export { setApiOptions } from './chunk-2ETF4N4H.mjs';
|
|
9
|
-
export { setClientOptions } from './chunk-DZQJN6OX.mjs';
|
|
10
|
-
import './chunk-OTLFF5OB.mjs';
|
|
11
|
-
export { ibcOriginAssets } from './chunk-CZ27FEZ7.mjs';
|
|
12
|
-
export { messages } from './chunk-KPK3Z6QZ.mjs';
|
|
13
|
-
export { messagesDirect } from './chunk-QZ3X6MP3.mjs';
|
|
14
|
-
export { recommendAssets } from './chunk-7TBBV2YY.mjs';
|
|
15
|
-
export { route } from './chunk-2FYLP573.mjs';
|
|
16
|
-
export { submitTransaction } from './chunk-LJVI5DLG.mjs';
|
|
17
|
-
export { trackTransaction } from './chunk-CAAR7GDJ.mjs';
|
|
18
|
-
export { transactionStatus } from './chunk-C5CGY2X7.mjs';
|
|
19
|
-
export { assetsBetweenChains } from './chunk-IGD32L7C.mjs';
|
|
20
|
-
export { bridges } from './chunk-J7GGREYX.mjs';
|
|
21
|
-
export { venues } from './chunk-NNZFCKHP.mjs';
|
|
22
|
-
export { assetsFromSource } from './chunk-YWYU6P7W.mjs';
|
|
23
|
-
export { assets, balances, chains } from './chunk-DKIWPD5I.mjs';
|
|
24
|
-
import './chunk-RXWDHQLG.mjs';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { executeRoute } from '../chunk-I2MX24LT.mjs';
|
|
2
|
-
import '../chunk-TUBI6VE6.mjs';
|
|
3
|
-
import '../chunk-ZAF3Z56R.mjs';
|
|
4
|
-
import '../chunk-ZMEQSFOL.mjs';
|
|
5
|
-
import '../chunk-NU7MCJOK.mjs';
|
|
6
|
-
import '../chunk-OTLFF5OB.mjs';
|
|
7
|
-
import '../chunk-KPK3Z6QZ.mjs';
|
|
8
|
-
import '../chunk-LJVI5DLG.mjs';
|
|
9
|
-
import '../chunk-CAAR7GDJ.mjs';
|
|
10
|
-
import '../chunk-C5CGY2X7.mjs';
|
|
11
|
-
import '../chunk-DKIWPD5I.mjs';
|
|
12
|
-
import '../chunk-RXWDHQLG.mjs';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { s as setClientOptions } from '../setClientOptions-CVB_OUIn.mjs';
|
|
2
|
-
import '@cosmjs/proto-signing';
|
|
3
|
-
import '@cosmjs/stargate';
|
|
4
|
-
import '../apiState-CdzxTxYd.mjs';
|
|
5
|
-
import '../client-types-CVch1pZ-.mjs';
|
|
6
|
-
import '@cosmjs/amino';
|
|
7
|
-
import 'viem';
|
|
8
|
-
import '@solana/wallet-adapter-base';
|
|
9
|
-
import '../swaggerTypes-O9-gvCT1.mjs';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|