@skip-go/client 1.0.0-alpha-4 → 1.0.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.
Files changed (102) hide show
  1. package/dist/api/{getAssets.d.ts → getAssets.d.mts} +2 -2
  2. package/dist/api/getAssets.mjs +2 -0
  3. package/dist/api/{getAssetsBetweenChains.d.ts → getAssetsBetweenChains.d.mts} +2 -2
  4. package/dist/api/getAssetsBetweenChains.mjs +2 -0
  5. package/dist/api/{getBridges.d.ts → getBridges.d.mts} +2 -2
  6. package/dist/api/getBridges.mjs +2 -0
  7. package/dist/api/{getChains.d.ts → getChains.d.mts} +2 -2
  8. package/dist/api/getChains.mjs +2 -0
  9. package/dist/api/{getVenues.d.ts → getVenues.d.mts} +1 -1
  10. package/dist/api/getVenues.mjs +2 -0
  11. package/dist/api/{postAssetsFromSource.d.ts → postAssetsFromSource.d.mts} +2 -2
  12. package/dist/api/postAssetsFromSource.mjs +3 -0
  13. package/dist/api/{postBalances.d.ts → postBalances.d.mts} +3 -3
  14. package/dist/api/postBalances.mjs +2 -0
  15. package/dist/api/{postIbcOriginAssets.d.ts → postIbcOriginAssets.d.mts} +1 -1
  16. package/dist/api/postIbcOriginAssets.mjs +2 -0
  17. package/dist/api/{postMessages.d.ts → postMessages.d.mts} +3 -3
  18. package/dist/api/postMessages.mjs +2 -0
  19. package/dist/api/{postMessagesDirect.d.ts → postMessagesDirect.d.mts} +2 -2
  20. package/dist/api/postMessagesDirect.mjs +2 -0
  21. package/dist/api/{postRecommendAssets.d.ts → postRecommendAssets.d.mts} +2 -2
  22. package/dist/api/postRecommendAssets.mjs +2 -0
  23. package/dist/api/{postRoute.d.ts → postRoute.d.mts} +3 -3
  24. package/dist/api/postRoute.mjs +2 -0
  25. package/dist/api/{postSubmitTransaction.d.ts → postSubmitTransaction.d.mts} +1 -1
  26. package/dist/api/postSubmitTransaction.mjs +2 -0
  27. package/dist/api/{postTrackTransaction.d.ts → postTrackTransaction.d.mts} +1 -1
  28. package/dist/api/postTrackTransaction.mjs +2 -0
  29. package/dist/api/{postTransactionStatus.d.ts → postTransactionStatus.d.mts} +3 -3
  30. package/dist/api/postTransactionStatus.mjs +2 -0
  31. package/dist/{chunk-RSUFWUIE.js → chunk-2ETF4N4H.mjs} +5 -4
  32. package/dist/{chunk-6IZXDY7U.js → chunk-2F4MBSMT.mjs} +20 -14
  33. package/dist/chunk-2FYLP573.mjs +15 -0
  34. package/dist/{chunk-2H4KT24S.js → chunk-7TBBV2YY.mjs} +1 -1
  35. package/dist/{chunk-MKEROBAQ.js → chunk-C5CGY2X7.mjs} +1 -1
  36. package/dist/{chunk-6SEZNZJY.js → chunk-CAAR7GDJ.mjs} +1 -1
  37. package/dist/{chunk-LJ4RFN4L.js → chunk-CZ27FEZ7.mjs} +1 -1
  38. package/dist/chunk-DKIWPD5I.mjs +124 -0
  39. package/dist/{chunk-6JMGI4N7.js → chunk-DZQJN6OX.mjs} +86 -76
  40. package/dist/chunk-I2MX24LT.mjs +2316 -0
  41. package/dist/{chunk-XS6XFYYD.js → chunk-IGD32L7C.mjs} +1 -1
  42. package/dist/{chunk-44YEAWRJ.js → chunk-IHIJJNTV.mjs} +7 -6
  43. package/dist/{chunk-QKCJUB43.js → chunk-J7GGREYX.mjs} +1 -1
  44. package/dist/{chunk-EAVQIWH7.js → chunk-KPK3Z6QZ.mjs} +1 -1
  45. package/dist/{chunk-BQTWTYWD.js → chunk-LJVI5DLG.mjs} +1 -1
  46. package/dist/{chunk-JBPMJE44.js → chunk-NNZFCKHP.mjs} +1 -1
  47. package/dist/{chunk-66DO7NZD.js → chunk-NU7MCJOK.mjs} +36 -32
  48. package/dist/{chunk-3OZQ35X3.js → chunk-OTLFF5OB.mjs} +138 -101
  49. package/dist/{chunk-HFWTLB35.js → chunk-QZ3X6MP3.mjs} +1 -1
  50. package/dist/chunk-RXWDHQLG.mjs +231 -0
  51. package/dist/{chunk-6MCLH626.js → chunk-YWYU6P7W.mjs} +2 -2
  52. package/dist/{chunk-XOC57DJF.js → chunk-ZMEQSFOL.mjs} +23 -18
  53. package/dist/{client-types-CxjtffyG.d.ts → client-types-CVch1pZ-.d.mts} +1 -1
  54. package/dist/{executeRoute-BKvMVd1I.d.ts → executeRoute-CRdeEz1o.d.mts} +3 -3
  55. package/dist/{generateApi-DqCp36fX.d.ts → generateApi-3mHZ6Zbr.d.mts} +1 -1
  56. package/dist/{index.d.ts → index.d.mts} +27 -25
  57. package/dist/index.mjs +24 -0
  58. package/dist/public-functions/{executeRoute.d.ts → executeRoute.d.mts} +4 -4
  59. package/dist/public-functions/executeRoute.mjs +12 -0
  60. package/dist/public-functions/{getFeeInfoForChain.d.ts → getFeeInfoForChain.d.mts} +2 -2
  61. package/dist/public-functions/getFeeInfoForChain.mjs +5 -0
  62. package/dist/public-functions/{getRecommendedGasPrice.d.ts → getRecommendedGasPrice.d.mts} +2 -2
  63. package/dist/public-functions/getRecommendedGasPrice.mjs +7 -0
  64. package/dist/public-functions/{getSigningStargateClient.d.ts → getSigningStargateClient.d.mts} +1 -1
  65. package/dist/public-functions/getSigningStargateClient.mjs +4 -0
  66. package/dist/public-functions/{setApiOptions.d.ts → setApiOptions.d.mts} +2 -2
  67. package/dist/public-functions/setApiOptions.mjs +2 -0
  68. package/dist/public-functions/setClientOptions.d.mts +9 -0
  69. package/dist/public-functions/setClientOptions.mjs +4 -0
  70. package/dist/{setClientOptions-DbanEIwL.d.ts → setClientOptions-CVB_OUIn.d.mts} +2 -2
  71. package/package.json +4 -45
  72. package/dist/api/getAssets.js +0 -2
  73. package/dist/api/getAssetsBetweenChains.js +0 -2
  74. package/dist/api/getBridges.js +0 -2
  75. package/dist/api/getChains.js +0 -2
  76. package/dist/api/getVenues.js +0 -2
  77. package/dist/api/postAssetsFromSource.js +0 -3
  78. package/dist/api/postBalances.js +0 -2
  79. package/dist/api/postIbcOriginAssets.js +0 -2
  80. package/dist/api/postMessages.js +0 -2
  81. package/dist/api/postMessagesDirect.js +0 -2
  82. package/dist/api/postRecommendAssets.js +0 -2
  83. package/dist/api/postRoute.js +0 -2
  84. package/dist/api/postSubmitTransaction.js +0 -2
  85. package/dist/api/postTrackTransaction.js +0 -2
  86. package/dist/api/postTransactionStatus.js +0 -2
  87. package/dist/chunk-DUCP65HQ.js +0 -675
  88. package/dist/chunk-T3G7MVDN.js +0 -16
  89. package/dist/chunk-XEDYWBEU.js +0 -1792
  90. package/dist/chunk-Y325PIRY.js +0 -130
  91. package/dist/index.js +0 -24
  92. package/dist/public-functions/executeRoute.js +0 -12
  93. package/dist/public-functions/getFeeInfoForChain.js +0 -5
  94. package/dist/public-functions/getRecommendedGasPrice.js +0 -7
  95. package/dist/public-functions/getSigningStargateClient.js +0 -4
  96. package/dist/public-functions/setApiOptions.js +0 -2
  97. package/dist/public-functions/setClientOptions.d.ts +0 -9
  98. package/dist/public-functions/setClientOptions.js +0 -4
  99. /package/dist/{apiState-CdzxTxYd.d.ts → apiState-CdzxTxYd.d.mts} +0 -0
  100. /package/dist/{chunk-VQ5SIQWU.js → chunk-TUBI6VE6.mjs} +0 -0
  101. /package/dist/{chunk-SWYON2RG.js → chunk-ZAF3Z56R.mjs} +0 -0
  102. /package/dist/{swaggerTypes-O9-gvCT1.d.ts → swaggerTypes-O9-gvCT1.d.mts} +0 -0
@@ -0,0 +1,231 @@
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 };
@@ -1,5 +1,5 @@
1
- import { transformAssetsMap } from './chunk-Y325PIRY.js';
2
- import { api } from './chunk-DUCP65HQ.js';
1
+ import { transformAssetsMap } from './chunk-DKIWPD5I.mjs';
2
+ import { api } from './chunk-RXWDHQLG.mjs';
3
3
 
4
4
  // src/api/postAssetsFromSource.ts
5
5
  var assetsFromSource = api({
@@ -1,6 +1,8 @@
1
- import { chains, findFirstWorkingEndpoint } from './chunk-66DO7NZD.js';
2
- import { ClientState } from './chunk-Y325PIRY.js';
3
- import { accountFromAny, SigningStargateClient } from '@cosmjs/stargate';
1
+ import { chains, findFirstWorkingEndpoint } from './chunk-NU7MCJOK.mjs';
2
+ import { ClientState } from './chunk-DKIWPD5I.mjs';
3
+ import { __async } from './chunk-RXWDHQLG.mjs';
4
+ import { SigningStargateClient } from '@cosmjs/stargate/build/signingstargateclient';
5
+ import { accountFromAny } from '@cosmjs/stargate';
4
6
  import { assertDefinedAndNotNull } from '@cosmjs/utils';
5
7
  import { BinaryWriter, BinaryReader } from 'cosmjs-types/binary';
6
8
  import { BaseAccount } from 'cosmjs-types/cosmos/auth/v1beta1/auth';
@@ -169,9 +171,10 @@ var StridePeriodicVestingAccount = {
169
171
  }
170
172
  };
171
173
  var accountParser = (acc) => {
174
+ var _a;
172
175
  switch (acc.typeUrl) {
173
176
  case "/stride.vesting.StridePeriodicVestingAccount": {
174
- const baseAccount = StridePeriodicVestingAccount.decode(acc.value).baseVestingAccount?.baseAccount;
177
+ const baseAccount = (_a = StridePeriodicVestingAccount.decode(acc.value).baseVestingAccount) == null ? void 0 : _a.baseAccount;
175
178
  assertDefinedAndNotNull(baseAccount);
176
179
  return {
177
180
  address: baseAccount.address,
@@ -192,7 +195,7 @@ var accountParser = (acc) => {
192
195
  const { address, pubKey, accountNumber, sequence } = BaseAccount.decode(
193
196
  acc.value
194
197
  );
195
- if (pubKey?.typeUrl === "/initia.crypto.v1beta1.ethsecp256k1.PubKey") {
198
+ if ((pubKey == null ? void 0 : pubKey.typeUrl) === "/initia.crypto.v1beta1.ethsecp256k1.PubKey") {
196
199
  const { key } = PubKey.decode(pubKey.value);
197
200
  const pk = encodeSecp256k1Pubkey(key);
198
201
  return {
@@ -209,13 +212,14 @@ var accountParser = (acc) => {
209
212
  };
210
213
 
211
214
  // src/private-functions/getRpcEndpointForChain.ts
212
- var getRpcEndpointForChain = async (chainId) => {
215
+ var getRpcEndpointForChain = (chainId) => __async(void 0, null, function* () {
216
+ var _a, _b, _c, _d, _e;
213
217
  if (ClientState.endpointOptions.getRpcEndpointForChain) {
214
218
  return ClientState.endpointOptions.getRpcEndpointForChain(chainId);
215
219
  }
216
220
  if (ClientState.endpointOptions.endpoints && ClientState.endpointOptions.endpoints[chainId]) {
217
221
  const endpointOptions = ClientState.endpointOptions.endpoints[chainId];
218
- if (endpointOptions?.rpc) {
222
+ if (endpointOptions == null ? void 0 : endpointOptions.rpc) {
219
223
  return endpointOptions.rpc;
220
224
  }
221
225
  }
@@ -226,35 +230,36 @@ var getRpcEndpointForChain = async (chainId) => {
226
230
  if (!chain) {
227
231
  throw new Error(`getRpcEndpointForChain: failed to find chain id '${chainId}' in registry`);
228
232
  }
229
- if (chain.apis?.rpc?.length === 0 || !chain.apis?.rpc) {
233
+ if (((_b = (_a = chain.apis) == null ? void 0 : _a.rpc) == null ? void 0 : _b.length) === 0 || !((_c = chain.apis) == null ? void 0 : _c.rpc)) {
230
234
  throw new Error(
231
235
  `getRpcEndpointForChain error: failed to find RPC endpoint for chain '${chainId}'`
232
236
  );
233
237
  }
234
- const endpoints = chain.apis?.rpc?.map((api) => api.address);
235
- const endpoint = await findFirstWorkingEndpoint(endpoints, "rpc");
238
+ const endpoints = (_e = (_d = chain.apis) == null ? void 0 : _d.rpc) == null ? void 0 : _e.map((api) => api.address);
239
+ const endpoint = yield findFirstWorkingEndpoint(endpoints, "rpc");
236
240
  if (!endpoint) {
237
241
  throw new Error(
238
242
  `getRpcEndpointForChain error: failed to find RPC endpoint for chain '${chainId}'`
239
243
  );
240
244
  }
241
245
  return endpoint;
242
- };
246
+ });
243
247
 
244
248
  // src/public-functions/getSigningStargateClient.ts
245
- var getSigningStargateClient = async ({
249
+ var getSigningStargateClient = (_0) => __async(void 0, [_0], function* ({
246
250
  chainId,
247
251
  getOfflineSigner
248
- }) => {
252
+ }) {
253
+ var _a;
249
254
  if (!getOfflineSigner) {
250
255
  throw new Error("'getCosmosSigner' is not provided or configured in skip router");
251
256
  }
252
- if (!ClientState.signingStargateClientByChainId?.[chainId]) {
253
- const [signer, endpoint] = await Promise.all([
257
+ if (!((_a = ClientState.signingStargateClientByChainId) == null ? void 0 : _a[chainId])) {
258
+ const [signer, endpoint] = yield Promise.all([
254
259
  getOfflineSigner(chainId),
255
260
  getRpcEndpointForChain(chainId)
256
261
  ]);
257
- ClientState.signingStargateClientByChainId[chainId] = await SigningStargateClient.connectWithSigner(endpoint, signer, {
262
+ ClientState.signingStargateClientByChainId[chainId] = yield SigningStargateClient.connectWithSigner(endpoint, signer, {
258
263
  aminoTypes: ClientState.aminoTypes,
259
264
  registry: ClientState.registry,
260
265
  accountParser
@@ -262,8 +267,8 @@ var getSigningStargateClient = async ({
262
267
  }
263
268
  return {
264
269
  stargateClient: ClientState.signingStargateClientByChainId[chainId],
265
- signer: await getOfflineSigner(chainId)
270
+ signer: yield getOfflineSigner(chainId)
266
271
  };
267
- };
272
+ });
268
273
 
269
274
  export { accountParser, getRpcEndpointForChain, getSigningStargateClient };
@@ -3,7 +3,7 @@ import { OfflineDirectSigner } from '@cosmjs/proto-signing';
3
3
  import { StdFee, GasPrice, SignerData } from '@cosmjs/stargate';
4
4
  import { WalletClient } from 'viem';
5
5
  import { Adapter } from '@solana/wallet-adapter-base';
6
- import { a2 as FeeAsset, K as ChainType, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.js';
6
+ import { a2 as FeeAsset, K as ChainType, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.mjs';
7
7
 
8
8
  /** Common Types */
9
9
  type UserAddress = {
@@ -1,6 +1,6 @@
1
- import { aT as TransferStatus, R as Erc20Approval, ap as RouteResponse, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.js';
2
- import { A as ApiRequest } from './generateApi-DqCp36fX.js';
3
- import { S as SignerGetters, b as GasOptions, U as UserAddress } from './client-types-CxjtffyG.js';
1
+ import { aT as TransferStatus, R as Erc20Approval, ap as RouteResponse, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.mjs';
2
+ import { A as ApiRequest } from './generateApi-3mHZ6Zbr.mjs';
3
+ import { S as SignerGetters, b as GasOptions, U as UserAddress } from './client-types-CVch1pZ-.mjs';
4
4
 
5
5
  type CallbackStatus = "success" | "error" | "pending" | "completed";
6
6
  type TransactionCallbacks = {
@@ -1,4 +1,4 @@
1
- import { bc as Api } from './swaggerTypes-O9-gvCT1.js';
1
+ import { bc as Api } from './swaggerTypes-O9-gvCT1.mjs';
2
2
 
3
3
  type CamelKey<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<CamelKey<U>>}` : S;
4
4
  type Camel<T> = T extends (infer U)[] ? Camel<U>[] : T extends object ? {
@@ -1,34 +1,36 @@
1
- export { A as AcknowledgementErrorDetails, a as Affiliate, bc as Api, b8 as ApiConfig, b as ApiError, c as Asset, d as AssetBetweenChains, e as AssetRecommendation, f as AutopilotAction, g as AutopilotMsg, h as AutopilotMsgWrapper, i as AxelarTransfer, j as AxelarTransferInfo, k as AxelarTransferState, l as AxelarTransferType, m as AxelarTransferWrapper, B as BalanceRequestChainEntry, D as BalanceResponseChainEntry, z as BalanceResponseDenomEntry, E as BankSend, F as BankSendWrapper, H as Bridge, I as BridgeType, C as CCTPTransfer, n as CCTPTransferInfo, p as CCTPTransferState, o as CCTPTransferTxs, q as CCTPTransferWrapper, J as Chain, L as ChainAffiliates, al as ChainTransaction, K as ChainType, ba as ContentType, M as ContractCallWithTokenError, N as ContractCallWithTokenErrorType, O as ContractCallWithTokenTxs, P as CosmWasmContractMsg, Q as CosmWasmContractMsgWrapper, b0 as CosmosModuleSupport, V as CosmosMsg, W as CosmosTx, X as CosmosTxWrapper, R as Erc20Approval, U as Error, T as ErrorDetail, aV as EurekaTransfer, aW as EurekaTransferInfo, aX as EurekaTransferWrapper, Y as EvmSwap, Z as EvmSwapWrapper, _ as EvmTx, $ as EvmTxWrapper, b3 as Fee, a2 as FeeAsset, b2 as FeeType, b6 as FullRequestParams, a4 as GRPCStatusCode, a3 as GoFastFee, G as GoFastTransfer, y as GoFastTransferInfo, w as GoFastTransferState, x as GoFastTransferTxs, bb as HttpClient, b9 as HttpResponse, a5 as HyperlaneTransfer, a6 as HyperlaneTransferInfo, a7 as HyperlaneTransferState, a8 as HyperlaneTransferTransactions, a9 as HyperlaneTransferWrapper, aa as IBCTransferInfo, b1 as IbcCapabilities, aY as LayerZeroTransfer, aZ as LayerZeroTransferInfo, aO as LayerZeroTransferState, ah as LayerZeroTransferTransactions, a_ as LayerZeroTransferWrapper, ab as Msg, ad as MultiChainMsg, ae as MultiChainMsgWrapper, aJ as OPInitTransfer, aL as OPInitTransferInfo, aN as OPInitTransferState, aM as OPInitTransferTxs, aK as OPInitTransferWrapper, af as Operation, ag as OptionalAsset, ai as Packet, aj as PacketError, ak as PacketErrorType, am as PostHandler, b4 as QueryParamsType, an as Reason, a$ as RecommendationRequest, b7 as RequestParams, b5 as ResponseFormat, ao as RoutePriceWarningType, ap as RouteResponse, aq as SendTokenError, ar as SendTokenErrorType, as as SendTokenTxs, S as SmartRelayFeeQuote, aC as SmartSwapExactCoinIn, aE as SmartSwapInWrapper, aD as SmartSwapOptions, r as StargateTransfer, u as StargateTransferInfo, s as StargateTransferState, t as StargateTransferTxs, v as StargateTransferWrapper, at as StatusError, au as StatusErrorType, a0 as SvmTx, a1 as SvmTxWrapper, av as Swap, aw as SwapExactCoinIn, ax as SwapExactCoinOut, ay as SwapInWrapper, az as SwapOperation, aA as SwapOutWrapper, aB as SwapRoute, aF as SwapVenue, aG as SwapWrapper, aH as TransactionExecutionErrorDetails, aI as TransactionState, aP as Transfer, aS as TransferAssetRelease, aQ as TransferEvent, aR as TransferState, aT as TransferStatus, aU as TransferWrapper, ac as Tx } from './swaggerTypes-O9-gvCT1.js';
2
- export { E as ExecuteRouteOptions, T as TransactionCallbacks, e as executeRoute } from './executeRoute-BKvMVd1I.js';
3
- export { E as EndpointOptions, b as GasOptions, G as GetFallbackGasAmount, a as GetGasPrice, e as SignCosmosMessageAminoOptions, d as SignCosmosMessageDirectOptions, c as SignCosmosMessageOptionsBase, S as SignerGetters, T as TxResult, U as UserAddress, V as ValidateGasResult } from './client-types-CxjtffyG.js';
4
- export { assets } from './api/getAssets.js';
5
- export { assetsBetweenChains } from './api/getAssetsBetweenChains.js';
6
- export { bridges } from './api/getBridges.js';
7
- export { chains } from './api/getChains.js';
8
- export { venues } from './api/getVenues.js';
9
- export { ibcOriginAssets } from './api/postIbcOriginAssets.js';
10
- export { MessagesRequest, MessagesResponse, messages } from './api/postMessages.js';
11
- export { messagesDirect } from './api/postMessagesDirect.js';
12
- export { recommendAssets } from './api/postRecommendAssets.js';
13
- export { assetsFromSource } from './api/postAssetsFromSource.js';
14
- export { BalanceRequest, BalanceResponse, balances } from './api/postBalances.js';
15
- export { RouteRequest, route } from './api/postRoute.js';
16
- export { submitTransaction } from './api/postSubmitTransaction.js';
17
- export { trackTransaction } from './api/postTrackTransaction.js';
18
- export { TxStatusResponse, transactionStatus } from './api/postTransactionStatus.js';
19
- export { getSigningStargateClient, getSigningStargateClientProps } from './public-functions/getSigningStargateClient.js';
20
- export { S as SkipClientOptions, s as setClientOptions } from './setClientOptions-DbanEIwL.js';
21
- export { getRecommendedGasPrice } from './public-functions/getRecommendedGasPrice.js';
22
- export { getFeeInfoForChain } from './public-functions/getFeeInfoForChain.js';
23
- export { SetApiOptionsProps, setApiOptions } from './public-functions/setApiOptions.js';
24
- import './generateApi-DqCp36fX.js';
1
+ export { A as AcknowledgementErrorDetails, a as Affiliate, bc as Api, b8 as ApiConfig, b as ApiError, c as Asset, d as AssetBetweenChains, e as AssetRecommendation, f as AutopilotAction, g as AutopilotMsg, h as AutopilotMsgWrapper, i as AxelarTransfer, j as AxelarTransferInfo, k as AxelarTransferState, l as AxelarTransferType, m as AxelarTransferWrapper, B as BalanceRequestChainEntry, D as BalanceResponseChainEntry, z as BalanceResponseDenomEntry, E as BankSend, F as BankSendWrapper, H as Bridge, I as BridgeType, C as CCTPTransfer, n as CCTPTransferInfo, p as CCTPTransferState, o as CCTPTransferTxs, q as CCTPTransferWrapper, J as Chain, L as ChainAffiliates, al as ChainTransaction, K as ChainType, ba as ContentType, M as ContractCallWithTokenError, N as ContractCallWithTokenErrorType, O as ContractCallWithTokenTxs, P as CosmWasmContractMsg, Q as CosmWasmContractMsgWrapper, b0 as CosmosModuleSupport, V as CosmosMsg, W as CosmosTx, X as CosmosTxWrapper, R as Erc20Approval, U as Error, T as ErrorDetail, aV as EurekaTransfer, aW as EurekaTransferInfo, aX as EurekaTransferWrapper, Y as EvmSwap, Z as EvmSwapWrapper, _ as EvmTx, $ as EvmTxWrapper, b3 as Fee, a2 as FeeAsset, b2 as FeeType, b6 as FullRequestParams, a4 as GRPCStatusCode, a3 as GoFastFee, G as GoFastTransfer, y as GoFastTransferInfo, w as GoFastTransferState, x as GoFastTransferTxs, bb as HttpClient, b9 as HttpResponse, a5 as HyperlaneTransfer, a6 as HyperlaneTransferInfo, a7 as HyperlaneTransferState, a8 as HyperlaneTransferTransactions, a9 as HyperlaneTransferWrapper, aa as IBCTransferInfo, b1 as IbcCapabilities, aY as LayerZeroTransfer, aZ as LayerZeroTransferInfo, aO as LayerZeroTransferState, ah as LayerZeroTransferTransactions, a_ as LayerZeroTransferWrapper, ab as Msg, ad as MultiChainMsg, ae as MultiChainMsgWrapper, aJ as OPInitTransfer, aL as OPInitTransferInfo, aN as OPInitTransferState, aM as OPInitTransferTxs, aK as OPInitTransferWrapper, af as Operation, ag as OptionalAsset, ai as Packet, aj as PacketError, ak as PacketErrorType, am as PostHandler, b4 as QueryParamsType, an as Reason, a$ as RecommendationRequest, b7 as RequestParams, b5 as ResponseFormat, ao as RoutePriceWarningType, ap as RouteResponse, aq as SendTokenError, ar as SendTokenErrorType, as as SendTokenTxs, S as SmartRelayFeeQuote, aC as SmartSwapExactCoinIn, aE as SmartSwapInWrapper, aD as SmartSwapOptions, r as StargateTransfer, u as StargateTransferInfo, s as StargateTransferState, t as StargateTransferTxs, v as StargateTransferWrapper, at as StatusError, au as StatusErrorType, a0 as SvmTx, a1 as SvmTxWrapper, av as Swap, aw as SwapExactCoinIn, ax as SwapExactCoinOut, ay as SwapInWrapper, az as SwapOperation, aA as SwapOutWrapper, aB as SwapRoute, aF as SwapVenue, aG as SwapWrapper, aH as TransactionExecutionErrorDetails, aI as TransactionState, aP as Transfer, aS as TransferAssetRelease, aQ as TransferEvent, aR as TransferState, aT as TransferStatus, aU as TransferWrapper, ac as Tx } from './swaggerTypes-O9-gvCT1.mjs';
2
+ export { E as ExecuteRouteOptions, T as TransactionCallbacks, e as executeRoute } from './executeRoute-CRdeEz1o.mjs';
3
+ export { E as EndpointOptions, b as GasOptions, G as GetFallbackGasAmount, a as GetGasPrice, e as SignCosmosMessageAminoOptions, d as SignCosmosMessageDirectOptions, c as SignCosmosMessageOptionsBase, S as SignerGetters, T as TxResult, U as UserAddress, V as ValidateGasResult } from './client-types-CVch1pZ-.mjs';
4
+ export { assets } from './api/getAssets.mjs';
5
+ export { assetsBetweenChains } from './api/getAssetsBetweenChains.mjs';
6
+ export { bridges } from './api/getBridges.mjs';
7
+ export { chains } from './api/getChains.mjs';
8
+ export { venues } from './api/getVenues.mjs';
9
+ export { ibcOriginAssets } from './api/postIbcOriginAssets.mjs';
10
+ export { MessagesRequest, MessagesResponse, messages } from './api/postMessages.mjs';
11
+ export { messagesDirect } from './api/postMessagesDirect.mjs';
12
+ export { recommendAssets } from './api/postRecommendAssets.mjs';
13
+ export { assetsFromSource } from './api/postAssetsFromSource.mjs';
14
+ export { BalanceRequest, BalanceResponse, balances } from './api/postBalances.mjs';
15
+ export { RouteRequest, route } from './api/postRoute.mjs';
16
+ export { submitTransaction } from './api/postSubmitTransaction.mjs';
17
+ export { trackTransaction } from './api/postTrackTransaction.mjs';
18
+ export { TxStatusResponse, transactionStatus } from './api/postTransactionStatus.mjs';
19
+ export { getSigningStargateClient, getSigningStargateClientProps } from './public-functions/getSigningStargateClient.mjs';
20
+ export { S as SkipClientOptions, s as setClientOptions } from './setClientOptions-CVB_OUIn.mjs';
21
+ export { getRecommendedGasPrice } from './public-functions/getRecommendedGasPrice.mjs';
22
+ export { getFeeInfoForChain } from './public-functions/getFeeInfoForChain.mjs';
23
+ export { SetApiOptionsProps, setApiOptions } from './public-functions/setApiOptions.mjs';
24
+ import './generateApi-3mHZ6Zbr.mjs';
25
25
  import '@cosmjs/amino';
26
26
  import '@cosmjs/proto-signing';
27
27
  import '@cosmjs/stargate';
28
28
  import 'viem';
29
29
  import '@solana/wallet-adapter-base';
30
- import './apiState-CdzxTxYd.js';
30
+ import './apiState-CdzxTxYd.mjs';
31
31
  import '@cosmjs/proto-signing/build/signer';
32
+ import '@cosmjs/stargate/build/signingstargateclient';
33
+ import '@cosmjs/stargate/build/fee';
32
34
 
33
35
  declare const GAS_STATION_CHAIN_IDS: string[];
34
36
 
package/dist/index.mjs ADDED
@@ -0,0 +1,24 @@
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,7 +1,7 @@
1
- export { E as ExecuteRouteOptions, e as executeRoute } from '../executeRoute-BKvMVd1I.js';
2
- import '../swaggerTypes-O9-gvCT1.js';
3
- import '../generateApi-DqCp36fX.js';
4
- import '../client-types-CxjtffyG.js';
1
+ export { E as ExecuteRouteOptions, e as executeRoute } from '../executeRoute-CRdeEz1o.mjs';
2
+ import '../swaggerTypes-O9-gvCT1.mjs';
3
+ import '../generateApi-3mHZ6Zbr.mjs';
4
+ import '../client-types-CVch1pZ-.mjs';
5
5
  import '@cosmjs/amino';
6
6
  import '@cosmjs/proto-signing';
7
7
  import '@cosmjs/stargate';
@@ -0,0 +1,12 @@
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,5 +1,5 @@
1
- import { a2 as FeeAsset } from '../swaggerTypes-O9-gvCT1.js';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { a2 as FeeAsset } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
3
 
4
4
  type GetFeeInfoForChainProps = {
5
5
  chainId: string;
@@ -0,0 +1,5 @@
1
+ export { getFeeInfoForChain } from '../chunk-2F4MBSMT.mjs';
2
+ import '../chunk-ZAF3Z56R.mjs';
3
+ import '../chunk-NU7MCJOK.mjs';
4
+ import '../chunk-DKIWPD5I.mjs';
5
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
- import { GasPrice } from '@cosmjs/stargate';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { GasPrice } from '@cosmjs/stargate/build/fee';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
3
 
4
4
  type getRecommendedGasPriceProps = {
5
5
  chainId: string;
@@ -0,0 +1,7 @@
1
+ export { getRecommendedGasPrice } from '../chunk-IHIJJNTV.mjs';
2
+ import '../chunk-TUBI6VE6.mjs';
3
+ import '../chunk-2F4MBSMT.mjs';
4
+ import '../chunk-ZAF3Z56R.mjs';
5
+ import '../chunk-NU7MCJOK.mjs';
6
+ import '../chunk-DKIWPD5I.mjs';
7
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
1
  import { OfflineSigner } from '@cosmjs/proto-signing/build/signer';
2
- import { SigningStargateClient } from '@cosmjs/stargate';
2
+ import { SigningStargateClient } from '@cosmjs/stargate/build/signingstargateclient';
3
3
 
4
4
  type getSigningStargateClientProps = {
5
5
  chainId: string;
@@ -0,0 +1,4 @@
1
+ export { getSigningStargateClient } from '../chunk-ZMEQSFOL.mjs';
2
+ import '../chunk-NU7MCJOK.mjs';
3
+ import '../chunk-DKIWPD5I.mjs';
4
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
- import { L as ChainAffiliates } from '../swaggerTypes-O9-gvCT1.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { L as ChainAffiliates } from '../swaggerTypes-O9-gvCT1.mjs';
3
3
 
4
4
  type SetApiOptionsProps = {
5
5
  chainIdsToAffiliates?: Record<string, ChainAffiliates>;
@@ -0,0 +1,2 @@
1
+ export { setApiOptions } from '../chunk-2ETF4N4H.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -0,0 +1,9 @@
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';
@@ -0,0 +1,4 @@
1
+ export { setClientOptions } from '../chunk-DZQJN6OX.mjs';
2
+ import '../chunk-OTLFF5OB.mjs';
3
+ import '../chunk-DKIWPD5I.mjs';
4
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,7 +1,7 @@
1
1
  import { GeneratedType } from '@cosmjs/proto-signing';
2
2
  import { AminoConverters } from '@cosmjs/stargate';
3
- import { S as SkipApiOptions } from './apiState-CdzxTxYd.js';
4
- import { E as EndpointOptions } from './client-types-CxjtffyG.js';
3
+ import { S as SkipApiOptions } from './apiState-CdzxTxYd.mjs';
4
+ import { E as EndpointOptions } from './client-types-CVch1pZ-.mjs';
5
5
 
6
6
  type SkipClientOptions = SkipApiOptions & {
7
7
  endpointOptions?: {