@skip-go/client 1.0.0-alpha-3 → 1.0.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.
Files changed (102) hide show
  1. package/dist/api/{getAssets.d.mts → getAssets.d.ts} +2 -2
  2. package/dist/api/getAssets.js +2 -0
  3. package/dist/api/{getAssetsBetweenChains.d.mts → getAssetsBetweenChains.d.ts} +2 -2
  4. package/dist/api/getAssetsBetweenChains.js +2 -0
  5. package/dist/api/{getBridges.d.mts → getBridges.d.ts} +2 -2
  6. package/dist/api/getBridges.js +2 -0
  7. package/dist/api/{getChains.d.mts → getChains.d.ts} +2 -2
  8. package/dist/api/getChains.js +2 -0
  9. package/dist/api/{getVenues.d.mts → getVenues.d.ts} +1 -1
  10. package/dist/api/getVenues.js +2 -0
  11. package/dist/api/{postAssetsFromSource.d.mts → postAssetsFromSource.d.ts} +2 -2
  12. package/dist/api/postAssetsFromSource.js +3 -0
  13. package/dist/api/{postBalances.d.mts → postBalances.d.ts} +3 -3
  14. package/dist/api/postBalances.js +2 -0
  15. package/dist/api/{postIbcOriginAssets.d.mts → postIbcOriginAssets.d.ts} +1 -1
  16. package/dist/api/postIbcOriginAssets.js +2 -0
  17. package/dist/api/{postMessages.d.mts → postMessages.d.ts} +3 -3
  18. package/dist/api/postMessages.js +2 -0
  19. package/dist/api/{postMessagesDirect.d.mts → postMessagesDirect.d.ts} +2 -2
  20. package/dist/api/postMessagesDirect.js +2 -0
  21. package/dist/api/{postRecommendAssets.d.mts → postRecommendAssets.d.ts} +2 -2
  22. package/dist/api/postRecommendAssets.js +2 -0
  23. package/dist/api/{postRoute.d.mts → postRoute.d.ts} +3 -3
  24. package/dist/api/postRoute.js +2 -0
  25. package/dist/api/{postSubmitTransaction.d.mts → postSubmitTransaction.d.ts} +1 -1
  26. package/dist/api/postSubmitTransaction.js +2 -0
  27. package/dist/api/{postTrackTransaction.d.mts → postTrackTransaction.d.ts} +1 -1
  28. package/dist/api/postTrackTransaction.js +2 -0
  29. package/dist/api/{postTransactionStatus.d.mts → postTransactionStatus.d.ts} +3 -3
  30. package/dist/api/postTransactionStatus.js +2 -0
  31. package/dist/{chunk-7TBBV2YY.mjs → chunk-2H4KT24S.js} +1 -1
  32. package/dist/{chunk-OTLFF5OB.mjs → chunk-3OZQ35X3.js} +101 -138
  33. package/dist/{chunk-WDMGUHWR.mjs → chunk-44YEAWRJ.js} +5 -6
  34. package/dist/{chunk-NU7MCJOK.mjs → chunk-66DO7NZD.js} +32 -36
  35. package/dist/{chunk-2F4MBSMT.mjs → chunk-6IZXDY7U.js} +14 -20
  36. package/dist/{chunk-PEZHVPSR.mjs → chunk-6JMGI4N7.js} +75 -83
  37. package/dist/{chunk-YWYU6P7W.mjs → chunk-6MCLH626.js} +2 -2
  38. package/dist/{chunk-CAAR7GDJ.mjs → chunk-6SEZNZJY.js} +1 -1
  39. package/dist/{chunk-LJVI5DLG.mjs → chunk-BQTWTYWD.js} +1 -1
  40. package/dist/chunk-DUCP65HQ.js +675 -0
  41. package/dist/{chunk-KPK3Z6QZ.mjs → chunk-EAVQIWH7.js} +1 -1
  42. package/dist/{chunk-QZ3X6MP3.mjs → chunk-HFWTLB35.js} +1 -1
  43. package/dist/{chunk-NNZFCKHP.mjs → chunk-JBPMJE44.js} +1 -1
  44. package/dist/{chunk-CZ27FEZ7.mjs → chunk-LJ4RFN4L.js} +1 -1
  45. package/dist/{chunk-C5CGY2X7.mjs → chunk-MKEROBAQ.js} +1 -1
  46. package/dist/{chunk-J7GGREYX.mjs → chunk-QKCJUB43.js} +1 -1
  47. package/dist/{chunk-2ETF4N4H.mjs → chunk-RSUFWUIE.js} +4 -5
  48. package/dist/chunk-T3G7MVDN.js +16 -0
  49. package/dist/chunk-XEDYWBEU.js +1792 -0
  50. package/dist/{chunk-B72MYSG5.mjs → chunk-XOC57DJF.js} +17 -21
  51. package/dist/{chunk-IGD32L7C.mjs → chunk-XS6XFYYD.js} +1 -1
  52. package/dist/chunk-Y325PIRY.js +130 -0
  53. package/dist/{client-types-CVch1pZ-.d.mts → client-types-CxjtffyG.d.ts} +1 -1
  54. package/dist/{executeRoute-CRdeEz1o.d.mts → executeRoute-BKvMVd1I.d.ts} +3 -3
  55. package/dist/{generateApi-3mHZ6Zbr.d.mts → generateApi-DqCp36fX.d.ts} +1 -1
  56. package/dist/{index.d.mts → index.d.ts} +25 -25
  57. package/dist/index.js +24 -0
  58. package/dist/public-functions/{executeRoute.d.mts → executeRoute.d.ts} +4 -4
  59. package/dist/public-functions/executeRoute.js +12 -0
  60. package/dist/public-functions/{getFeeInfoForChain.d.mts → getFeeInfoForChain.d.ts} +2 -2
  61. package/dist/public-functions/getFeeInfoForChain.js +5 -0
  62. package/dist/public-functions/{getRecommendedGasPrice.d.mts → getRecommendedGasPrice.d.ts} +1 -1
  63. package/dist/public-functions/getRecommendedGasPrice.js +7 -0
  64. package/dist/public-functions/getSigningStargateClient.js +4 -0
  65. package/dist/public-functions/{setApiOptions.d.mts → setApiOptions.d.ts} +2 -2
  66. package/dist/public-functions/setApiOptions.js +2 -0
  67. package/dist/public-functions/setClientOptions.d.ts +9 -0
  68. package/dist/public-functions/setClientOptions.js +4 -0
  69. package/dist/{setClientOptions-CVB_OUIn.d.mts → setClientOptions-DbanEIwL.d.ts} +2 -2
  70. package/package.json +45 -4
  71. package/dist/api/getAssets.mjs +0 -2
  72. package/dist/api/getAssetsBetweenChains.mjs +0 -2
  73. package/dist/api/getBridges.mjs +0 -2
  74. package/dist/api/getChains.mjs +0 -2
  75. package/dist/api/getVenues.mjs +0 -2
  76. package/dist/api/postAssetsFromSource.mjs +0 -3
  77. package/dist/api/postBalances.mjs +0 -2
  78. package/dist/api/postIbcOriginAssets.mjs +0 -2
  79. package/dist/api/postMessages.mjs +0 -2
  80. package/dist/api/postMessagesDirect.mjs +0 -2
  81. package/dist/api/postRecommendAssets.mjs +0 -2
  82. package/dist/api/postRoute.mjs +0 -2
  83. package/dist/api/postSubmitTransaction.mjs +0 -2
  84. package/dist/api/postTrackTransaction.mjs +0 -2
  85. package/dist/api/postTransactionStatus.mjs +0 -2
  86. package/dist/chunk-2FYLP573.mjs +0 -15
  87. package/dist/chunk-DKIWPD5I.mjs +0 -124
  88. package/dist/chunk-KSMJWLEH.mjs +0 -2315
  89. package/dist/chunk-RXWDHQLG.mjs +0 -231
  90. package/dist/index.mjs +0 -24
  91. package/dist/public-functions/executeRoute.mjs +0 -12
  92. package/dist/public-functions/getFeeInfoForChain.mjs +0 -5
  93. package/dist/public-functions/getRecommendedGasPrice.mjs +0 -7
  94. package/dist/public-functions/getSigningStargateClient.mjs +0 -4
  95. package/dist/public-functions/setApiOptions.mjs +0 -2
  96. package/dist/public-functions/setClientOptions.d.mts +0 -9
  97. package/dist/public-functions/setClientOptions.mjs +0 -4
  98. /package/dist/{apiState-CdzxTxYd.d.mts → apiState-CdzxTxYd.d.ts} +0 -0
  99. /package/dist/{chunk-ZAF3Z56R.mjs → chunk-SWYON2RG.js} +0 -0
  100. /package/dist/{chunk-TUBI6VE6.mjs → chunk-VQ5SIQWU.js} +0 -0
  101. /package/dist/public-functions/{getSigningStargateClient.d.mts → getSigningStargateClient.d.ts} +0 -0
  102. /package/dist/{swaggerTypes-O9-gvCT1.d.mts → swaggerTypes-O9-gvCT1.d.ts} +0 -0
@@ -1,6 +1,5 @@
1
- import { chains, findFirstWorkingEndpoint } from './chunk-NU7MCJOK.mjs';
2
- import { ClientState } from './chunk-DKIWPD5I.mjs';
3
- import { __async } from './chunk-RXWDHQLG.mjs';
1
+ import { chains, findFirstWorkingEndpoint } from './chunk-66DO7NZD.js';
2
+ import { ClientState } from './chunk-Y325PIRY.js';
4
3
  import { accountFromAny, SigningStargateClient } from '@cosmjs/stargate';
5
4
  import { assertDefinedAndNotNull } from '@cosmjs/utils';
6
5
  import { BinaryWriter, BinaryReader } from 'cosmjs-types/binary';
@@ -170,10 +169,9 @@ var StridePeriodicVestingAccount = {
170
169
  }
171
170
  };
172
171
  var accountParser = (acc) => {
173
- var _a;
174
172
  switch (acc.typeUrl) {
175
173
  case "/stride.vesting.StridePeriodicVestingAccount": {
176
- const baseAccount = (_a = StridePeriodicVestingAccount.decode(acc.value).baseVestingAccount) == null ? void 0 : _a.baseAccount;
174
+ const baseAccount = StridePeriodicVestingAccount.decode(acc.value).baseVestingAccount?.baseAccount;
177
175
  assertDefinedAndNotNull(baseAccount);
178
176
  return {
179
177
  address: baseAccount.address,
@@ -194,7 +192,7 @@ var accountParser = (acc) => {
194
192
  const { address, pubKey, accountNumber, sequence } = BaseAccount.decode(
195
193
  acc.value
196
194
  );
197
- if ((pubKey == null ? void 0 : pubKey.typeUrl) === "/initia.crypto.v1beta1.ethsecp256k1.PubKey") {
195
+ if (pubKey?.typeUrl === "/initia.crypto.v1beta1.ethsecp256k1.PubKey") {
198
196
  const { key } = PubKey.decode(pubKey.value);
199
197
  const pk = encodeSecp256k1Pubkey(key);
200
198
  return {
@@ -211,14 +209,13 @@ var accountParser = (acc) => {
211
209
  };
212
210
 
213
211
  // src/private-functions/getRpcEndpointForChain.ts
214
- var getRpcEndpointForChain = (chainId) => __async(void 0, null, function* () {
215
- var _a, _b, _c, _d, _e;
212
+ var getRpcEndpointForChain = async (chainId) => {
216
213
  if (ClientState.endpointOptions.getRpcEndpointForChain) {
217
214
  return ClientState.endpointOptions.getRpcEndpointForChain(chainId);
218
215
  }
219
216
  if (ClientState.endpointOptions.endpoints && ClientState.endpointOptions.endpoints[chainId]) {
220
217
  const endpointOptions = ClientState.endpointOptions.endpoints[chainId];
221
- if (endpointOptions == null ? void 0 : endpointOptions.rpc) {
218
+ if (endpointOptions?.rpc) {
222
219
  return endpointOptions.rpc;
223
220
  }
224
221
  }
@@ -229,36 +226,35 @@ var getRpcEndpointForChain = (chainId) => __async(void 0, null, function* () {
229
226
  if (!chain) {
230
227
  throw new Error(`getRpcEndpointForChain: failed to find chain id '${chainId}' in registry`);
231
228
  }
232
- if (((_b = (_a = chain.apis) == null ? void 0 : _a.rpc) == null ? void 0 : _b.length) === 0 || !((_c = chain.apis) == null ? void 0 : _c.rpc)) {
229
+ if (chain.apis?.rpc?.length === 0 || !chain.apis?.rpc) {
233
230
  throw new Error(
234
231
  `getRpcEndpointForChain error: failed to find RPC endpoint for chain '${chainId}'`
235
232
  );
236
233
  }
237
- const endpoints = (_e = (_d = chain.apis) == null ? void 0 : _d.rpc) == null ? void 0 : _e.map((api) => api.address);
238
- const endpoint = yield findFirstWorkingEndpoint(endpoints, "rpc");
234
+ const endpoints = chain.apis?.rpc?.map((api) => api.address);
235
+ const endpoint = await findFirstWorkingEndpoint(endpoints, "rpc");
239
236
  if (!endpoint) {
240
237
  throw new Error(
241
238
  `getRpcEndpointForChain error: failed to find RPC endpoint for chain '${chainId}'`
242
239
  );
243
240
  }
244
241
  return endpoint;
245
- });
242
+ };
246
243
 
247
244
  // src/public-functions/getSigningStargateClient.ts
248
- var getSigningStargateClient = (_0) => __async(void 0, [_0], function* ({
245
+ var getSigningStargateClient = async ({
249
246
  chainId,
250
247
  getOfflineSigner
251
- }) {
252
- var _a;
248
+ }) => {
253
249
  if (!getOfflineSigner) {
254
250
  throw new Error("'getCosmosSigner' is not provided or configured in skip router");
255
251
  }
256
- if (!((_a = ClientState.signingStargateClientByChainId) == null ? void 0 : _a[chainId])) {
257
- const [signer, endpoint] = yield Promise.all([
252
+ if (!ClientState.signingStargateClientByChainId?.[chainId]) {
253
+ const [signer, endpoint] = await Promise.all([
258
254
  getOfflineSigner(chainId),
259
255
  getRpcEndpointForChain(chainId)
260
256
  ]);
261
- ClientState.signingStargateClientByChainId[chainId] = yield SigningStargateClient.connectWithSigner(endpoint, signer, {
257
+ ClientState.signingStargateClientByChainId[chainId] = await SigningStargateClient.connectWithSigner(endpoint, signer, {
262
258
  aminoTypes: ClientState.aminoTypes,
263
259
  registry: ClientState.registry,
264
260
  accountParser
@@ -266,8 +262,8 @@ var getSigningStargateClient = (_0) => __async(void 0, [_0], function* ({
266
262
  }
267
263
  return {
268
264
  stargateClient: ClientState.signingStargateClientByChainId[chainId],
269
- signer: yield getOfflineSigner(chainId)
265
+ signer: await getOfflineSigner(chainId)
270
266
  };
271
- });
267
+ };
272
268
 
273
269
  export { accountParser, getRpcEndpointForChain, getSigningStargateClient };
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-RXWDHQLG.mjs';
1
+ import { api } from './chunk-DUCP65HQ.js';
2
2
 
3
3
  // src/api/getAssetsBetweenChains.ts
4
4
  var assetsBetweenChains = api({
@@ -0,0 +1,130 @@
1
+ import { api } from './chunk-DUCP65HQ.js';
2
+
3
+ // src/private-functions/getMainnetAndTestnetChains.ts
4
+ var getMainnetAndTestnetChains = async (apiOptions) => {
5
+ const [mainnetRes, testnetRes] = await Promise.all([
6
+ chains({
7
+ includeEvm: true,
8
+ includeSvm: true,
9
+ ...apiOptions
10
+ }),
11
+ chains({
12
+ includeEvm: true,
13
+ includeSvm: true,
14
+ onlyTestnets: true,
15
+ ...apiOptions
16
+ })
17
+ ]);
18
+ const combinedChains = [...mainnetRes ?? [], ...testnetRes ?? []];
19
+ ClientState.skipChains = combinedChains;
20
+ return combinedChains;
21
+ };
22
+
23
+ // src/api/getAssets.ts
24
+ var assets = api({
25
+ methodName: "getAssets",
26
+ path: "/v2/fungible/assets",
27
+ transformResponse: (response) => {
28
+ return transformAssetsMap(response.chainToAssetsMap);
29
+ },
30
+ onSuccess: (response, options) => {
31
+ if (options?.includeEvmAssets && options?.includeSvmAssets && options?.includeCw20Assets) {
32
+ ClientState.skipAssets = response;
33
+ }
34
+ }
35
+ });
36
+ var transformAssetsMap = (input) => Object.entries(input ?? {}).reduce(
37
+ (acc, [chainId, { assets: assets2 }]) => {
38
+ acc[chainId] = (assets2 ?? []).map((asset) => asset);
39
+ return acc;
40
+ },
41
+ {}
42
+ );
43
+
44
+ // src/private-functions/getMainnetAndTestnetAssets.ts
45
+ var getMainnetAndTestnetAssets = async ({
46
+ chainId,
47
+ ...apiOptions
48
+ }) => {
49
+ const [assetsMainnet, assetsTestnet] = await Promise.all([
50
+ assets({
51
+ chainIds: chainId ? [chainId] : void 0,
52
+ ...apiOptions
53
+ }),
54
+ assets({
55
+ chainIds: chainId ? [chainId] : void 0,
56
+ onlyTestnets: true,
57
+ ...apiOptions
58
+ })
59
+ ]);
60
+ const mainnet = assetsMainnet;
61
+ const testnet = assetsTestnet;
62
+ const merged = {
63
+ ...mainnet,
64
+ ...testnet
65
+ };
66
+ ClientState.skipAssets = merged;
67
+ return merged;
68
+ };
69
+
70
+ // src/api/postBalances.ts
71
+ var balances = api({
72
+ methodName: "getBalances",
73
+ method: "post",
74
+ path: "/v2/info/balances",
75
+ onSuccess: (response, options) => {
76
+ if (!options) {
77
+ ClientState.skipBalances = response;
78
+ }
79
+ }
80
+ });
81
+
82
+ // src/state/clientState.ts
83
+ var ClientState = class {
84
+ static aminoTypes;
85
+ static registry;
86
+ static endpointOptions;
87
+ static skipChains;
88
+ static skipAssets;
89
+ static skipBalances;
90
+ static async getSkipChains(apiOptions) {
91
+ if (this.skipChains) {
92
+ return this.skipChains;
93
+ }
94
+ const response = await getMainnetAndTestnetChains(apiOptions);
95
+ this.skipChains = response;
96
+ return response;
97
+ }
98
+ static async getSkipAssets(props) {
99
+ if (this.skipAssets) {
100
+ return this.skipAssets;
101
+ }
102
+ const response = await getMainnetAndTestnetAssets(props);
103
+ this.skipAssets = response;
104
+ return response;
105
+ }
106
+ static async getSkipBalances() {
107
+ if (this.skipBalances) {
108
+ return this.skipBalances;
109
+ }
110
+ const response = await balances();
111
+ this.skipBalances = response;
112
+ return response;
113
+ }
114
+ static signingStargateClientByChainId = {};
115
+ static validateGasResults;
116
+ };
117
+
118
+ // src/api/getChains.ts
119
+ var chains = api({
120
+ methodName: "getChains",
121
+ path: "/v2/info/chains",
122
+ transformResponse: (response) => response.chains,
123
+ onSuccess: (response, options) => {
124
+ if (options?.includeEvm && options?.includeSvm) {
125
+ ClientState.skipChains = response;
126
+ }
127
+ }
128
+ });
129
+
130
+ export { ClientState, assets, balances, chains, transformAssetsMap };
@@ -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.mjs';
6
+ import { a2 as FeeAsset, K as ChainType, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.js';
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.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';
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';
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.mjs';
1
+ import { bc as Api } from './swaggerTypes-O9-gvCT1.js';
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,33 +1,33 @@
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';
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';
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.mjs';
30
+ import './apiState-CdzxTxYd.js';
31
31
  import '@cosmjs/proto-signing/build/signer';
32
32
 
33
33
  declare const GAS_STATION_CHAIN_IDS: string[];
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ export { executeRoute } from './chunk-XEDYWBEU.js';
2
+ export { getRecommendedGasPrice } from './chunk-44YEAWRJ.js';
3
+ import './chunk-VQ5SIQWU.js';
4
+ export { getFeeInfoForChain } from './chunk-6IZXDY7U.js';
5
+ export { GAS_STATION_CHAIN_IDS } from './chunk-SWYON2RG.js';
6
+ export { getSigningStargateClient } from './chunk-XOC57DJF.js';
7
+ import './chunk-66DO7NZD.js';
8
+ export { setApiOptions } from './chunk-RSUFWUIE.js';
9
+ export { setClientOptions } from './chunk-6JMGI4N7.js';
10
+ import './chunk-3OZQ35X3.js';
11
+ export { ibcOriginAssets } from './chunk-LJ4RFN4L.js';
12
+ export { messages } from './chunk-EAVQIWH7.js';
13
+ export { messagesDirect } from './chunk-HFWTLB35.js';
14
+ export { recommendAssets } from './chunk-2H4KT24S.js';
15
+ export { route } from './chunk-T3G7MVDN.js';
16
+ export { submitTransaction } from './chunk-BQTWTYWD.js';
17
+ export { trackTransaction } from './chunk-6SEZNZJY.js';
18
+ export { transactionStatus } from './chunk-MKEROBAQ.js';
19
+ export { assetsBetweenChains } from './chunk-XS6XFYYD.js';
20
+ export { bridges } from './chunk-QKCJUB43.js';
21
+ export { venues } from './chunk-JBPMJE44.js';
22
+ export { assetsFromSource } from './chunk-6MCLH626.js';
23
+ export { assets, balances, chains } from './chunk-Y325PIRY.js';
24
+ export { Api, AutopilotAction, AxelarTransferState, AxelarTransferType, BridgeType, CCTPTransferState, ChainType, ContentType, ContractCallWithTokenErrorType, FeeType, GoFastTransferState, HttpClient, HyperlaneTransferState, LayerZeroTransferState, OPInitTransferState, PacketErrorType, Reason, RoutePriceWarningType, SendTokenErrorType, StargateTransferState, StatusErrorType, TransactionState, TransferState } from './chunk-DUCP65HQ.js';
@@ -1,7 +1,7 @@
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';
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';
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-XEDYWBEU.js';
2
+ import '../chunk-VQ5SIQWU.js';
3
+ import '../chunk-SWYON2RG.js';
4
+ import '../chunk-XOC57DJF.js';
5
+ import '../chunk-66DO7NZD.js';
6
+ import '../chunk-3OZQ35X3.js';
7
+ import '../chunk-EAVQIWH7.js';
8
+ import '../chunk-BQTWTYWD.js';
9
+ import '../chunk-6SEZNZJY.js';
10
+ import '../chunk-MKEROBAQ.js';
11
+ import '../chunk-Y325PIRY.js';
12
+ import '../chunk-DUCP65HQ.js';
@@ -1,5 +1,5 @@
1
- import { a2 as FeeAsset } from '../swaggerTypes-O9-gvCT1.mjs';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
1
+ import { a2 as FeeAsset } from '../swaggerTypes-O9-gvCT1.js';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
3
3
 
4
4
  type GetFeeInfoForChainProps = {
5
5
  chainId: string;
@@ -0,0 +1,5 @@
1
+ export { getFeeInfoForChain } from '../chunk-6IZXDY7U.js';
2
+ import '../chunk-SWYON2RG.js';
3
+ import '../chunk-66DO7NZD.js';
4
+ import '../chunk-Y325PIRY.js';
5
+ import '../chunk-DUCP65HQ.js';
@@ -1,5 +1,5 @@
1
1
  import { GasPrice } from '@cosmjs/stargate';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
3
3
 
4
4
  type getRecommendedGasPriceProps = {
5
5
  chainId: string;
@@ -0,0 +1,7 @@
1
+ export { getRecommendedGasPrice } from '../chunk-44YEAWRJ.js';
2
+ import '../chunk-VQ5SIQWU.js';
3
+ import '../chunk-6IZXDY7U.js';
4
+ import '../chunk-SWYON2RG.js';
5
+ import '../chunk-66DO7NZD.js';
6
+ import '../chunk-Y325PIRY.js';
7
+ import '../chunk-DUCP65HQ.js';
@@ -0,0 +1,4 @@
1
+ export { getSigningStargateClient } from '../chunk-XOC57DJF.js';
2
+ import '../chunk-66DO7NZD.js';
3
+ import '../chunk-Y325PIRY.js';
4
+ import '../chunk-DUCP65HQ.js';
@@ -1,5 +1,5 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
- import { L as ChainAffiliates } from '../swaggerTypes-O9-gvCT1.mjs';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
+ import { L as ChainAffiliates } from '../swaggerTypes-O9-gvCT1.js';
3
3
 
4
4
  type SetApiOptionsProps = {
5
5
  chainIdsToAffiliates?: Record<string, ChainAffiliates>;
@@ -0,0 +1,2 @@
1
+ export { setApiOptions } from '../chunk-RSUFWUIE.js';
2
+ import '../chunk-DUCP65HQ.js';
@@ -0,0 +1,9 @@
1
+ export { s as setClientOptions } from '../setClientOptions-DbanEIwL.js';
2
+ import '@cosmjs/proto-signing';
3
+ import '@cosmjs/stargate';
4
+ import '../apiState-CdzxTxYd.js';
5
+ import '../client-types-CxjtffyG.js';
6
+ import '@cosmjs/amino';
7
+ import 'viem';
8
+ import '@solana/wallet-adapter-base';
9
+ import '../swaggerTypes-O9-gvCT1.js';
@@ -0,0 +1,4 @@
1
+ export { setClientOptions } from '../chunk-6JMGI4N7.js';
2
+ import '../chunk-3OZQ35X3.js';
3
+ import '../chunk-Y325PIRY.js';
4
+ import '../chunk-DUCP65HQ.js';
@@ -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.mjs';
4
- import { E as EndpointOptions } from './client-types-CVch1pZ-.mjs';
3
+ import { S as SkipApiOptions } from './apiState-CdzxTxYd.js';
4
+ import { E as EndpointOptions } from './client-types-CxjtffyG.js';
5
5
 
6
6
  type SkipClientOptions = SkipApiOptions & {
7
7
  endpointOptions?: {
package/package.json CHANGED
@@ -1,16 +1,57 @@
1
1
  {
2
2
  "name": "@skip-go/client",
3
3
  "description": "JavaScript SDK for Skip Go API",
4
- "version": "1.0.0-alpha-3",
4
+ "version": "1.0.0-alpha-4",
5
5
  "repository": "https://github.com/skip-mev/skip-go",
6
- "main": "dist/index.mjs",
7
- "types": "dist/index.d.mts",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
8
17
  "files": [
9
18
  "dist/*",
10
19
  "*.js",
11
20
  "*.d.ts"
12
21
  ],
13
22
  "sideEffects": false,
23
+ "scripts": {
24
+ "build": "yarn run codegen && tsup",
25
+ "clean": "rm -rf dist",
26
+ "codegen": "node scripts/codegen.js",
27
+ "e2e:clean": "make stop clean",
28
+ "e2e:setup": "make setup && make setup-kind",
29
+ "e2e:start": "make start",
30
+ "e2e:stop": "make stop",
31
+ "e2e:test": "vitest --dangerouslyIgnoreUnhandledErrors -c vitest.e2e.config.mjs --test-timeout=30000",
32
+ "postpublish": "git reset --hard",
33
+ "test": "vitest -c vitest.unit.config.mjs",
34
+ "watch": "tsup --watch",
35
+ "watch:link": "tsup --watch --onSuccess \"yalc push\"",
36
+ "update-registries": "yarn up @initia/initia-registry chain-registry",
37
+ "update-types": "node generateTypes.mjs"
38
+ },
39
+ "devDependencies": {
40
+ "@cosmjs/faucet": "0.32.3",
41
+ "@cosmjs/faucet-client": "0.32.3",
42
+ "@cosmology/telescope": "1.8.3",
43
+ "@initia/initia-registry": "^1.0.5",
44
+ "@protobufs/gogoproto": "0.0.10",
45
+ "@protobufs/google": "0.0.10",
46
+ "@types/keccak": "3.0.4",
47
+ "chain-registry": "^1.69.212",
48
+ "eslint-plugin-esm": "^0.8.1",
49
+ "eslint-plugin-import": "^2.31.0",
50
+ "minimatch": "^9.0.3",
51
+ "proxy-from-env": "^1.1.0",
52
+ "swagger-typescript-api": "^13.0.28",
53
+ "vitest": "^1.2.2"
54
+ },
14
55
  "peerDependencies": {
15
56
  "@solana/web3.js": "^1.95.8",
16
57
  "viem": "2.x"
@@ -33,4 +74,4 @@
33
74
  "publishConfig": {
34
75
  "access": "public"
35
76
  }
36
- }
77
+ }
@@ -1,2 +0,0 @@
1
- export { assets, transformAssetsMap } from '../chunk-DKIWPD5I.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { assetsBetweenChains } from '../chunk-IGD32L7C.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { bridges } from '../chunk-J7GGREYX.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { chains } from '../chunk-DKIWPD5I.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { venues } from '../chunk-NNZFCKHP.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,3 +0,0 @@
1
- export { assetsFromSource } from '../chunk-YWYU6P7W.mjs';
2
- import '../chunk-DKIWPD5I.mjs';
3
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { balances } from '../chunk-DKIWPD5I.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { ibcOriginAssets } from '../chunk-CZ27FEZ7.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { messages } from '../chunk-KPK3Z6QZ.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { messagesDirect } from '../chunk-QZ3X6MP3.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { recommendAssets } from '../chunk-7TBBV2YY.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { route } from '../chunk-2FYLP573.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { submitTransaction } from '../chunk-LJVI5DLG.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { trackTransaction } from '../chunk-CAAR7GDJ.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,2 +0,0 @@
1
- export { transactionStatus } from '../chunk-C5CGY2X7.mjs';
2
- import '../chunk-RXWDHQLG.mjs';
@@ -1,15 +0,0 @@
1
- import { __async, __spreadProps, __spreadValues, ApiState, api } from './chunk-RXWDHQLG.mjs';
2
-
3
- // src/api/postRoute.ts
4
- var route = (request) => __async(void 0, null, function* () {
5
- const requestWithAffiliateFeeBps = __spreadProps(__spreadValues({}, request), {
6
- cumulativeAffiliateFeeBps: ApiState.cumulativeAffiliateFeeBPS
7
- });
8
- return api({
9
- methodName: "getRouteV2",
10
- method: "post",
11
- path: "/v2/fungible/route"
12
- })(requestWithAffiliateFeeBps);
13
- });
14
-
15
- export { route };