@skip-go/client 1.3.0 → 1.3.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 +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/postSubmit.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-4R6OCWRR.cjs +1346 -0
- package/dist/cjs/chunk-5FR25GF5.cjs +209 -0
- package/dist/cjs/chunk-AHRSARNR.cjs +38 -0
- package/dist/cjs/chunk-CPTNOPWI.cjs +566 -0
- package/dist/cjs/chunk-CWUD7UGL.cjs +13 -0
- package/dist/cjs/chunk-D2W4UBJB.cjs +136 -0
- package/dist/cjs/chunk-DUJSZRFD.cjs +1445 -0
- package/dist/cjs/chunk-EINQFLWN.cjs +12 -0
- package/dist/cjs/chunk-EQBTNGJJ.cjs +11 -0
- package/dist/cjs/chunk-F3EB2AQG.cjs +28 -0
- package/dist/cjs/chunk-G3G6PBIF.cjs +47 -0
- package/dist/cjs/chunk-HDKNPB2J.cjs +182 -0
- package/dist/cjs/chunk-KMDNP6DN.cjs +24 -0
- package/dist/cjs/chunk-KZOSEIWH.cjs +10 -0
- package/dist/cjs/chunk-MGYSCMET.cjs +273 -0
- package/dist/cjs/chunk-N3LR7KTI.cjs +304 -0
- package/dist/cjs/chunk-NQR3EPN2.cjs +12 -0
- package/dist/cjs/chunk-OA5PE7TW.cjs +18 -0
- package/dist/cjs/chunk-PFCGKAXF.cjs +15 -0
- package/dist/cjs/chunk-PG7RVHOU.cjs +12 -0
- package/dist/cjs/chunk-RFBDXALX.cjs +12 -0
- package/dist/cjs/chunk-SIY2K7TT.cjs +13 -0
- package/dist/cjs/chunk-SLZCWA4K.cjs +2234 -0
- package/dist/cjs/chunk-T5LPU5A2.cjs +188 -0
- package/dist/cjs/chunk-TCQMGBFL.cjs +38 -0
- package/dist/cjs/chunk-TFL5E5A6.cjs +12 -0
- package/dist/cjs/chunk-TWPLCFOH.cjs +16 -0
- package/dist/cjs/chunk-W2DPDT3Y.cjs +22 -0
- package/dist/cjs/chunk-WE7KICKO.cjs +95 -0
- package/dist/cjs/chunk-WMXUOVHN.cjs +3642 -0
- package/dist/cjs/index.cjs +401 -0
- package/dist/cjs/public-functions/executeRoute.cjs +28 -0
- package/dist/cjs/public-functions/getCosmosGasAmountForMessage.cjs +15 -0
- package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +11 -0
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +15 -0
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +17 -0
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +14 -0
- package/dist/cjs/public-functions/setApiOptions.cjs +12 -0
- package/dist/cjs/public-functions/setClientOptions.cjs +14 -0
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +18 -0
- package/dist/cjs/public-functions/waitForTransaction.cjs +14 -0
- package/dist/{callbacks-DK2GxU0a.d.ts → esm/callbacks-C2lXb0AH.d.ts} +5 -0
- package/dist/{chunk-HIJ6YOTK.js → esm/chunk-HAGMHUOI.js} +20 -4
- package/dist/{index.d.ts → esm/index.d.ts} +1 -1
- package/dist/{index.js → esm/index.js} +1 -1
- package/dist/{public-functions → esm/public-functions}/executeRoute.d.ts +1 -1
- package/dist/{public-functions → esm/public-functions}/executeRoute.js +1 -1
- package/dist/{public-functions → esm/public-functions}/validateCosmosGasBalance.d.ts +1 -1
- package/dist/{public-functions → esm/public-functions}/waitForTransaction.d.ts +1 -1
- package/package.json +19 -7
- package/dist/{api → esm/api}/getAssets.d.ts +0 -0
- package/dist/{api → esm/api}/getAssets.js +0 -0
- package/dist/{api → esm/api}/getAssetsBetweenChains.d.ts +0 -0
- package/dist/{api → esm/api}/getAssetsBetweenChains.js +0 -0
- package/dist/{api → esm/api}/getBridges.d.ts +0 -0
- package/dist/{api → esm/api}/getBridges.js +0 -0
- package/dist/{api → esm/api}/getChains.d.ts +0 -0
- package/dist/{api → esm/api}/getChains.js +0 -0
- package/dist/{api → esm/api}/getVenues.d.ts +0 -0
- package/dist/{api → esm/api}/getVenues.js +0 -0
- package/dist/{api → esm/api}/postAssetsFromSource.d.ts +0 -0
- package/dist/{api → esm/api}/postAssetsFromSource.js +0 -0
- package/dist/{api → esm/api}/postBalances.d.ts +0 -0
- package/dist/{api → esm/api}/postBalances.js +0 -0
- package/dist/{api → esm/api}/postIbcOriginAssets.d.ts +0 -0
- package/dist/{api → esm/api}/postIbcOriginAssets.js +0 -0
- package/dist/{api → esm/api}/postMessages.d.ts +0 -0
- package/dist/{api → esm/api}/postMessages.js +0 -0
- package/dist/{api → esm/api}/postMessagesDirect.d.ts +193 -193
- package/dist/{api → esm/api}/postMessagesDirect.js +0 -0
- package/dist/{api → esm/api}/postRecommendAssets.d.ts +0 -0
- package/dist/{api → esm/api}/postRecommendAssets.js +0 -0
- package/dist/{api → esm/api}/postRoute.d.ts +188 -188
- /package/dist/{api → esm/api}/postRoute.js +0 -0
- /package/dist/{api → esm/api}/postSubmit.d.ts +0 -0
- /package/dist/{api → esm/api}/postSubmit.js +0 -0
- /package/dist/{api → esm/api}/postSubmitTransaction.d.ts +0 -0
- /package/dist/{api → esm/api}/postSubmitTransaction.js +0 -0
- /package/dist/{api → esm/api}/postTrackTransaction.d.ts +0 -0
- /package/dist/{api → esm/api}/postTrackTransaction.js +0 -0
- /package/dist/{api → esm/api}/postTransactionStatus.d.ts +0 -0
- /package/dist/{api → esm/api}/postTransactionStatus.js +0 -0
- /package/dist/{apiState-DwZhwVul.d.ts → esm/apiState-DwZhwVul.d.ts} +0 -0
- /package/dist/{chunk-2R5COFPS.js → esm/chunk-2R5COFPS.js} +0 -0
- /package/dist/{chunk-43P4WRGN.js → esm/chunk-43P4WRGN.js} +0 -0
- /package/dist/{chunk-4DI7G6TH.js → esm/chunk-4DI7G6TH.js} +0 -0
- /package/dist/{chunk-6ULKULTX.js → esm/chunk-6ULKULTX.js} +0 -0
- /package/dist/{chunk-6UMMVC2P.js → esm/chunk-6UMMVC2P.js} +0 -0
- /package/dist/{chunk-7ZG7HNNC.js → esm/chunk-7ZG7HNNC.js} +0 -0
- /package/dist/{chunk-C6NHVJ3R.js → esm/chunk-C6NHVJ3R.js} +0 -0
- /package/dist/{chunk-CGZ5DA2T.js → esm/chunk-CGZ5DA2T.js} +0 -0
- /package/dist/{chunk-ERPZHRBM.js → esm/chunk-ERPZHRBM.js} +0 -0
- /package/dist/{chunk-F65QOYUA.js → esm/chunk-F65QOYUA.js} +0 -0
- /package/dist/{chunk-GOD6ESBZ.js → esm/chunk-GOD6ESBZ.js} +0 -0
- /package/dist/{chunk-GV2QOWB4.js → esm/chunk-GV2QOWB4.js} +0 -0
- /package/dist/{chunk-HS2D6FKN.js → esm/chunk-HS2D6FKN.js} +0 -0
- /package/dist/{chunk-I4AMZAHH.js → esm/chunk-I4AMZAHH.js} +0 -0
- /package/dist/{chunk-KYLULQOS.js → esm/chunk-KYLULQOS.js} +0 -0
- /package/dist/{chunk-MAOMQHG5.js → esm/chunk-MAOMQHG5.js} +0 -0
- /package/dist/{chunk-NZVZH6OA.js → esm/chunk-NZVZH6OA.js} +0 -0
- /package/dist/{chunk-PIQZD2VE.js → esm/chunk-PIQZD2VE.js} +0 -0
- /package/dist/{chunk-QPJEHGY7.js → esm/chunk-QPJEHGY7.js} +0 -0
- /package/dist/{chunk-SS5LQKBL.js → esm/chunk-SS5LQKBL.js} +0 -0
- /package/dist/{chunk-SWYON2RG.js → esm/chunk-SWYON2RG.js} +0 -0
- /package/dist/{chunk-TD63P2AG.js → esm/chunk-TD63P2AG.js} +0 -0
- /package/dist/{chunk-TV2XPAIF.js → esm/chunk-TV2XPAIF.js} +0 -0
- /package/dist/{chunk-UZKIIX6A.js → esm/chunk-UZKIIX6A.js} +0 -0
- /package/dist/{chunk-VQ5SIQWU.js → esm/chunk-VQ5SIQWU.js} +0 -0
- /package/dist/{chunk-VUOOTNLG.js → esm/chunk-VUOOTNLG.js} +0 -0
- /package/dist/{chunk-YLMQS52U.js → esm/chunk-YLMQS52U.js} +0 -0
- /package/dist/{chunk-YYXOIRHZ.js → esm/chunk-YYXOIRHZ.js} +0 -0
- /package/dist/{chunk-ZTDLGX7X.js → esm/chunk-ZTDLGX7X.js} +0 -0
- /package/dist/{client-types-DuWWc2_J.d.ts → esm/client-types-DuWWc2_J.d.ts} +0 -0
- /package/dist/{generateApi-DvFEIUee.d.ts → esm/generateApi-DvFEIUee.d.ts} +0 -0
- /package/dist/{public-functions → esm/public-functions}/getCosmosGasAmountForMessage.d.ts +0 -0
- /package/dist/{public-functions → esm/public-functions}/getCosmosGasAmountForMessage.js +0 -0
- /package/dist/{public-functions → esm/public-functions}/getEvmGasAmountForMessage.d.ts +0 -0
- /package/dist/{public-functions → esm/public-functions}/getEvmGasAmountForMessage.js +0 -0
- /package/dist/{public-functions → esm/public-functions}/getFeeInfoForChain.d.ts +0 -0
- /package/dist/{public-functions → esm/public-functions}/getFeeInfoForChain.js +0 -0
- /package/dist/{public-functions → esm/public-functions}/getRecommendedGasPrice.d.ts +0 -0
- /package/dist/{public-functions → esm/public-functions}/getRecommendedGasPrice.js +0 -0
- /package/dist/{public-functions → esm/public-functions}/getSigningStargateClient.d.ts +0 -0
- /package/dist/{public-functions → esm/public-functions}/getSigningStargateClient.js +0 -0
- /package/dist/{public-functions → esm/public-functions}/setApiOptions.d.ts +0 -0
- /package/dist/{public-functions → esm/public-functions}/setApiOptions.js +0 -0
- /package/dist/{public-functions → esm/public-functions}/setClientOptions.d.ts +0 -0
- /package/dist/{public-functions → esm/public-functions}/setClientOptions.js +0 -0
- /package/dist/{public-functions → esm/public-functions}/validateCosmosGasBalance.js +0 -0
- /package/dist/{public-functions → esm/public-functions}/waitForTransaction.js +0 -0
- /package/dist/{setClientOptions-B27lt_6h.d.ts → esm/setClientOptions-B27lt_6h.d.ts} +0 -0
- /package/dist/{swaggerTypes-BrC-ZYnx.d.ts → esm/swaggerTypes-BrC-ZYnx.d.ts} +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/utils/timer.ts
|
|
4
|
+
var wait = (ms) => {
|
|
5
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
// src/utils/convert.ts
|
|
9
|
+
function toSnake(obj) {
|
|
10
|
+
return convertKeys(obj, (key) => key.replace(/([A-Z])/g, "_$1").toLowerCase());
|
|
11
|
+
}
|
|
12
|
+
function toCamel(obj) {
|
|
13
|
+
return convertKeys(obj, (key) => key.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()));
|
|
14
|
+
}
|
|
15
|
+
function convertKeys(obj, convertKey) {
|
|
16
|
+
if (Array.isArray(obj)) {
|
|
17
|
+
return obj.map((item) => convertKeys(item, convertKey));
|
|
18
|
+
} else if (obj !== null && typeof obj === "object") {
|
|
19
|
+
return Object.keys(obj).reduce((acc, key) => {
|
|
20
|
+
acc[convertKey(key)] = convertKeys(obj[key], convertKey);
|
|
21
|
+
return acc;
|
|
22
|
+
}, {});
|
|
23
|
+
} else {
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/utils/generateApi.ts
|
|
29
|
+
var createRequestClient = ({ apiUrl, apiKey, apiHeaders }) => {
|
|
30
|
+
if (!apiUrl?.endsWith("/")) {
|
|
31
|
+
apiUrl += "/";
|
|
32
|
+
}
|
|
33
|
+
const headers = new Headers({
|
|
34
|
+
"content-type": "application/json"
|
|
35
|
+
});
|
|
36
|
+
if (apiKey) {
|
|
37
|
+
headers.set("authorization", apiKey);
|
|
38
|
+
}
|
|
39
|
+
if (apiHeaders) {
|
|
40
|
+
new Headers(apiHeaders).forEach((value, key) => {
|
|
41
|
+
headers.set(key, value);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const handleResponse = async (response) => {
|
|
45
|
+
const contentType = response.headers.get("content-type");
|
|
46
|
+
const isJson = contentType?.includes("application/json");
|
|
47
|
+
const body = isJson ? await response.json() : await response.text();
|
|
48
|
+
if (!response.ok) {
|
|
49
|
+
const message = typeof body === "object" && body?.message ? body.message : response.statusText;
|
|
50
|
+
throw new Error(message);
|
|
51
|
+
}
|
|
52
|
+
return body;
|
|
53
|
+
};
|
|
54
|
+
const get = async (path, params, signal) => {
|
|
55
|
+
if (path?.startsWith("/")) {
|
|
56
|
+
console.warn("paths that start with / are treated as absolute paths, please remove the leading / if this path is intended to be a relative path");
|
|
57
|
+
}
|
|
58
|
+
const url = new URL(path ?? "", apiUrl);
|
|
59
|
+
if (params && typeof params === "object") {
|
|
60
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
61
|
+
if (value !== void 0 && value !== null) {
|
|
62
|
+
url.searchParams.append(key, String(value));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
const response = await fetch(url.toString(), {
|
|
67
|
+
method: "GET",
|
|
68
|
+
headers,
|
|
69
|
+
signal
|
|
70
|
+
});
|
|
71
|
+
return handleResponse(response);
|
|
72
|
+
};
|
|
73
|
+
const post = async (path, data = {}, signal) => {
|
|
74
|
+
if (path?.startsWith("/")) {
|
|
75
|
+
console.warn("paths that start with / are treated as absolute paths, please remove the leading / if this path is intended to be a relative path");
|
|
76
|
+
}
|
|
77
|
+
const response = await fetch(new URL(path, apiUrl).toString(), {
|
|
78
|
+
method: "POST",
|
|
79
|
+
headers,
|
|
80
|
+
body: JSON.stringify(data),
|
|
81
|
+
signal
|
|
82
|
+
});
|
|
83
|
+
return handleResponse(response);
|
|
84
|
+
};
|
|
85
|
+
return { get, post };
|
|
86
|
+
};
|
|
87
|
+
function createRequest({
|
|
88
|
+
path,
|
|
89
|
+
method = "get",
|
|
90
|
+
onSuccess,
|
|
91
|
+
transformResponse
|
|
92
|
+
}) {
|
|
93
|
+
let controller = null;
|
|
94
|
+
const request = async (options) => {
|
|
95
|
+
const { apiKey, apiUrl, apiHeaders, abortDuplicateRequests, ...requestParams } = options ?? {};
|
|
96
|
+
let fetchClient = ApiState.client;
|
|
97
|
+
if (apiUrl || apiKey) {
|
|
98
|
+
fetchClient = createRequestClient({
|
|
99
|
+
apiUrl: apiUrl || "https://api.skip.build",
|
|
100
|
+
apiKey,
|
|
101
|
+
apiHeaders
|
|
102
|
+
});
|
|
103
|
+
} else {
|
|
104
|
+
await ApiState.clientInitialized;
|
|
105
|
+
}
|
|
106
|
+
if (abortDuplicateRequests && controller && !controller?.signal?.aborted) {
|
|
107
|
+
controller?.abort();
|
|
108
|
+
}
|
|
109
|
+
controller = new AbortController();
|
|
110
|
+
try {
|
|
111
|
+
const response = await fetchClient[method](
|
|
112
|
+
path,
|
|
113
|
+
requestParams ? toSnake(requestParams) : void 0,
|
|
114
|
+
controller.signal
|
|
115
|
+
);
|
|
116
|
+
const camelCased = toCamel(response ?? {});
|
|
117
|
+
const finalResponse = transformResponse ? transformResponse(camelCased) : camelCased;
|
|
118
|
+
onSuccess?.(finalResponse, requestParams);
|
|
119
|
+
return finalResponse;
|
|
120
|
+
} catch (error) {
|
|
121
|
+
if (error.name === "AbortError") {
|
|
122
|
+
console.log("Request was cancelled");
|
|
123
|
+
} else {
|
|
124
|
+
console.error("Error:", error);
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
return request;
|
|
130
|
+
}
|
|
131
|
+
function api({
|
|
132
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
133
|
+
methodName,
|
|
134
|
+
path,
|
|
135
|
+
onSuccess,
|
|
136
|
+
method = "get",
|
|
137
|
+
transformResponse
|
|
138
|
+
}) {
|
|
139
|
+
return createRequest({
|
|
140
|
+
path,
|
|
141
|
+
method,
|
|
142
|
+
onSuccess,
|
|
143
|
+
transformResponse
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function pollingApi({
|
|
147
|
+
methodName,
|
|
148
|
+
path,
|
|
149
|
+
method = "get",
|
|
150
|
+
onSuccess,
|
|
151
|
+
onError,
|
|
152
|
+
isSuccess = () => true,
|
|
153
|
+
maxRetries = 5,
|
|
154
|
+
retryInterval = 1e3,
|
|
155
|
+
backoffMultiplier = 2,
|
|
156
|
+
throwOnError = false
|
|
157
|
+
}) {
|
|
158
|
+
const request = async (requestParams) => {
|
|
159
|
+
let attempt = 0;
|
|
160
|
+
let lastError;
|
|
161
|
+
while (attempt < maxRetries) {
|
|
162
|
+
try {
|
|
163
|
+
const result = await api({ methodName, path, method })(requestParams);
|
|
164
|
+
if (result && isSuccess(result)) {
|
|
165
|
+
onSuccess?.(result, attempt);
|
|
166
|
+
return result;
|
|
167
|
+
}
|
|
168
|
+
} catch (err) {
|
|
169
|
+
lastError = err;
|
|
170
|
+
onError?.(err, attempt);
|
|
171
|
+
if (throwOnError) {
|
|
172
|
+
throw err;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const delay = retryInterval * Math.pow(backoffMultiplier, attempt);
|
|
176
|
+
await wait(delay);
|
|
177
|
+
attempt++;
|
|
178
|
+
}
|
|
179
|
+
throw lastError ?? new Error("pollingApi: max retries exceeded");
|
|
180
|
+
};
|
|
181
|
+
return (params) => request(params);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// src/state/apiState.ts
|
|
185
|
+
var ApiState = class _ApiState {
|
|
186
|
+
static client;
|
|
187
|
+
static chainIdsToAffiliates;
|
|
188
|
+
static cumulativeAffiliateFeeBPS = "0";
|
|
189
|
+
static isInitialized = false;
|
|
190
|
+
static resolveInitialization;
|
|
191
|
+
static clientInitialized = new Promise((resolve) => {
|
|
192
|
+
_ApiState.resolveInitialization = () => {
|
|
193
|
+
if (!_ApiState.isInitialized) {
|
|
194
|
+
_ApiState.isInitialized = true;
|
|
195
|
+
resolve();
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
static setClientInitialized() {
|
|
200
|
+
_ApiState.resolveInitialization();
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
exports.ApiState = ApiState;
|
|
205
|
+
exports.api = api;
|
|
206
|
+
exports.createRequestClient = createRequestClient;
|
|
207
|
+
exports.pollingApi = pollingApi;
|
|
208
|
+
exports.toCamel = toCamel;
|
|
209
|
+
exports.wait = wait;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5FR25GF5_cjs = require('./chunk-5FR25GF5.cjs');
|
|
4
|
+
|
|
5
|
+
// src/utils/filterMessagesRequest.ts
|
|
6
|
+
var filterMessagesRequest = (request) => {
|
|
7
|
+
const messagesRequest = {
|
|
8
|
+
sourceAssetDenom: request.sourceAssetDenom,
|
|
9
|
+
sourceAssetChainId: request.sourceAssetChainId,
|
|
10
|
+
destAssetDenom: request.destAssetDenom,
|
|
11
|
+
destAssetChainId: request.destAssetChainId,
|
|
12
|
+
amountIn: request.amountIn,
|
|
13
|
+
amountOut: request.amountOut,
|
|
14
|
+
addressList: request.addressList,
|
|
15
|
+
operations: request.operations,
|
|
16
|
+
estimatedAmountOut: request.estimatedAmountOut,
|
|
17
|
+
slippageTolerancePercent: request.slippageTolerancePercent,
|
|
18
|
+
timeoutSeconds: request.timeoutSeconds,
|
|
19
|
+
postRouteHandler: request.postRouteHandler,
|
|
20
|
+
chainIdsToAffiliates: request.chainIdsToAffiliates,
|
|
21
|
+
enableGasWarnings: request.enableGasWarnings,
|
|
22
|
+
apiUrl: request.apiUrl,
|
|
23
|
+
apiKey: request.apiKey,
|
|
24
|
+
abortDuplicateRequests: request.abortDuplicateRequests
|
|
25
|
+
};
|
|
26
|
+
return messagesRequest;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/api/postMessages.ts
|
|
30
|
+
var messages = async (request) => {
|
|
31
|
+
return chunk5FR25GF5_cjs.api({
|
|
32
|
+
methodName: "msgs",
|
|
33
|
+
method: "post",
|
|
34
|
+
path: "v2/fungible/msgs"
|
|
35
|
+
})(filterMessagesRequest(request));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.messages = messages;
|