@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
@@ -1,5 +1,5 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
- import { c as Asset } from '../swaggerTypes-O9-gvCT1.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { c as Asset } from '../swaggerTypes-O9-gvCT1.mjs';
3
3
 
4
4
  declare const assets: (options?: ({
5
5
  chainIds?: string[] | undefined;
@@ -0,0 +1,2 @@
1
+ export { assets, transformAssetsMap } from '../chunk-DKIWPD5I.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
- import { I as BridgeType } from '../swaggerTypes-O9-gvCT1.js';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { I as BridgeType } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
3
 
4
4
  declare const assetsBetweenChains: (options?: ({
5
5
  sourceChainId?: string | undefined;
@@ -0,0 +1,2 @@
1
+ export { assetsBetweenChains } from '../chunk-IGD32L7C.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
- import { ba as ContentType, I as BridgeType } from '../swaggerTypes-O9-gvCT1.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { ba as ContentType, I as BridgeType } from '../swaggerTypes-O9-gvCT1.mjs';
3
3
 
4
4
  declare const bridges: (options?: ({
5
5
  cache?: RequestCache | undefined;
@@ -0,0 +1,2 @@
1
+ export { bridges } from '../chunk-J7GGREYX.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
- import { K as ChainType } from '../swaggerTypes-O9-gvCT1.js';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { K as ChainType } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
3
 
4
4
  declare const chains: (options?: ({
5
5
  chainIds?: string[] | undefined;
@@ -0,0 +1,2 @@
1
+ export { chains } from '../chunk-DKIWPD5I.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,4 +1,4 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
2
 
3
3
  declare const venues: (options?: ({
4
4
  onlyTestnets?: boolean | undefined;
@@ -0,0 +1,2 @@
1
+ export { venues } from '../chunk-NNZFCKHP.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
- import { c as Asset } from '../swaggerTypes-O9-gvCT1.js';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { c as Asset } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
3
 
4
4
  declare const assetsFromSource: (options?: ({
5
5
  sourceAssetDenom: string;
@@ -0,0 +1,3 @@
1
+ export { assetsFromSource } from '../chunk-YWYU6P7W.mjs';
2
+ import '../chunk-DKIWPD5I.mjs';
3
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,6 +1,6 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
- import { A as ApiRequest, a as ApiResponse } from '../generateApi-DqCp36fX.js';
3
- import '../swaggerTypes-O9-gvCT1.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { A as ApiRequest, a as ApiResponse } from '../generateApi-3mHZ6Zbr.mjs';
3
+ import '../swaggerTypes-O9-gvCT1.mjs';
4
4
 
5
5
  declare const balances: (options?: ({
6
6
  chains?: {
@@ -0,0 +1,2 @@
1
+ export { balances } from '../chunk-DKIWPD5I.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,4 +1,4 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
2
 
3
3
  declare const ibcOriginAssets: (options?: ({
4
4
  assets?: {
@@ -0,0 +1,2 @@
1
+ export { ibcOriginAssets } from '../chunk-CZ27FEZ7.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,6 +1,6 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
- import { I as BridgeType, f as AutopilotAction, b2 as FeeType } from '../swaggerTypes-O9-gvCT1.js';
3
- import { A as ApiRequest, a as ApiResponse } from '../generateApi-DqCp36fX.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { I as BridgeType, f as AutopilotAction, b2 as FeeType } from '../swaggerTypes-O9-gvCT1.mjs';
3
+ import { A as ApiRequest, a as ApiResponse } from '../generateApi-3mHZ6Zbr.mjs';
4
4
 
5
5
  declare const messages: (options?: ({
6
6
  sourceAssetDenom: string;
@@ -0,0 +1,2 @@
1
+ export { messages } from '../chunk-KPK3Z6QZ.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
- import { f as AutopilotAction, I as BridgeType, ao as RoutePriceWarningType, b2 as FeeType } from '../swaggerTypes-O9-gvCT1.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { f as AutopilotAction, I as BridgeType, ao as RoutePriceWarningType, b2 as FeeType } from '../swaggerTypes-O9-gvCT1.mjs';
3
3
 
4
4
  declare const messagesDirect: (options?: ({
5
5
  sourceAssetDenom?: string | undefined;
@@ -0,0 +1,2 @@
1
+ export { messagesDirect } from '../chunk-QZ3X6MP3.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,5 +1,5 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
- import { an as Reason } from '../swaggerTypes-O9-gvCT1.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { an as Reason } from '../swaggerTypes-O9-gvCT1.mjs';
3
3
 
4
4
  declare const recommendAssets: (options?: ({
5
5
  requests?: {
@@ -0,0 +1,2 @@
1
+ export { recommendAssets } from '../chunk-7TBBV2YY.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,6 +1,6 @@
1
- import { I as BridgeType, ao as RoutePriceWarningType, b2 as FeeType } from '../swaggerTypes-O9-gvCT1.js';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
3
- import { A as ApiRequest } from '../generateApi-DqCp36fX.js';
1
+ import { I as BridgeType, ao as RoutePriceWarningType, b2 as FeeType } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
+ import { A as ApiRequest } from '../generateApi-3mHZ6Zbr.mjs';
4
4
 
5
5
  declare const route: (request: RouteRequest) => Promise<{
6
6
  amountIn: string;
@@ -0,0 +1,2 @@
1
+ export { route } from '../chunk-2FYLP573.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,4 +1,4 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
2
 
3
3
  declare const submitTransaction: (options?: ({
4
4
  tx?: string | undefined;
@@ -0,0 +1,2 @@
1
+ export { submitTransaction } from '../chunk-LJVI5DLG.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,4 +1,4 @@
1
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
2
 
3
3
  declare const trackTransaction: (params?: ({
4
4
  txHash: string;
@@ -0,0 +1,2 @@
1
+ export { trackTransaction } from '../chunk-CAAR7GDJ.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,6 +1,6 @@
1
- import { au as StatusErrorType, aI as TransactionState, ak as PacketErrorType, aR as TransferState, k as AxelarTransferState, N as ContractCallWithTokenErrorType, ar as SendTokenErrorType, l as AxelarTransferType, p as CCTPTransferState, a7 as HyperlaneTransferState, aN as OPInitTransferState, s as StargateTransferState, w as GoFastTransferState, aO as LayerZeroTransferState } from '../swaggerTypes-O9-gvCT1.js';
2
- import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
3
- import { a as ApiResponse } from '../generateApi-DqCp36fX.js';
1
+ import { au as StatusErrorType, aI as TransactionState, ak as PacketErrorType, aR as TransferState, k as AxelarTransferState, N as ContractCallWithTokenErrorType, ar as SendTokenErrorType, l as AxelarTransferType, p as CCTPTransferState, a7 as HyperlaneTransferState, aN as OPInitTransferState, s as StargateTransferState, w as GoFastTransferState, aO as LayerZeroTransferState } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
+ import { a as ApiResponse } from '../generateApi-3mHZ6Zbr.mjs';
4
4
 
5
5
  declare const transactionStatus: (params?: ({
6
6
  txHash: string;
@@ -0,0 +1,2 @@
1
+ export { transactionStatus } from '../chunk-C5CGY2X7.mjs';
2
+ import '../chunk-RXWDHQLG.mjs';
@@ -1,4 +1,4 @@
1
- import { ApiState, createRequestClient } from './chunk-DUCP65HQ.js';
1
+ import { ApiState, createRequestClient } from './chunk-RXWDHQLG.mjs';
2
2
 
3
3
  // src/public-functions/setApiOptions.ts
4
4
  var setApiOptions = (options = {}) => {
@@ -14,8 +14,9 @@ var setApiOptions = (options = {}) => {
14
14
  return ApiState.clientInitialized;
15
15
  };
16
16
  function validateChainIdsToAffiliates(chainIdsToAffiliates) {
17
+ var _a;
17
18
  const affiliatesArray = Object.values(chainIdsToAffiliates).map((chain) => chain.affiliates).filter((a) => a !== void 0);
18
- const firstAffiliateBasisPointsFee = affiliatesArray[0]?.reduce((acc, affiliate) => {
19
+ const firstAffiliateBasisPointsFee = (_a = affiliatesArray[0]) == null ? void 0 : _a.reduce((acc, affiliate) => {
19
20
  if (!affiliate.basisPointsFee) {
20
21
  throw new Error("basisPointFee must exist in each affiliate");
21
22
  }
@@ -29,7 +30,7 @@ function validateChainIdsToAffiliates(chainIdsToAffiliates) {
29
30
  if (!affiliate2.address) {
30
31
  throw new Error("address to receive fee must exist in each affiliate");
31
32
  }
32
- return acc + parseInt(affiliate2?.basisPointsFee, 10);
33
+ return acc + parseInt(affiliate2 == null ? void 0 : affiliate2.basisPointsFee, 10);
33
34
  }, 0);
34
35
  return totalBasisPointsFee === firstAffiliateBasisPointsFee;
35
36
  });
@@ -38,7 +39,7 @@ function validateChainIdsToAffiliates(chainIdsToAffiliates) {
38
39
  "basisPointFee does not add up to the same number for each chain in chainIdsToAffiliates"
39
40
  );
40
41
  }
41
- return firstAffiliateBasisPointsFee?.toFixed(0);
42
+ return firstAffiliateBasisPointsFee == null ? void 0 : firstAffiliateBasisPointsFee.toFixed(0);
42
43
  }
43
44
 
44
45
  export { setApiOptions };
@@ -1,9 +1,11 @@
1
- import { DEFAULT_GAS_DENOM_OVERRIDES } from './chunk-SWYON2RG.js';
2
- import { chains } from './chunk-66DO7NZD.js';
3
- import { ClientState } from './chunk-Y325PIRY.js';
1
+ import { DEFAULT_GAS_DENOM_OVERRIDES } from './chunk-ZAF3Z56R.mjs';
2
+ import { chains } from './chunk-NU7MCJOK.mjs';
3
+ import { ClientState } from './chunk-DKIWPD5I.mjs';
4
+ import { __async } from './chunk-RXWDHQLG.mjs';
4
5
 
5
6
  // src/private-functions/getDefaultGasTokenForChain.ts
6
- var getDefaultGasTokenForChain = async (chainId) => {
7
+ var getDefaultGasTokenForChain = (chainId) => __async(void 0, null, function* () {
8
+ var _a;
7
9
  const gasDenom = DEFAULT_GAS_DENOM_OVERRIDES[chainId];
8
10
  if (gasDenom) {
9
11
  return gasDenom;
@@ -18,7 +20,10 @@ var getDefaultGasTokenForChain = async (chainId) => {
18
20
  const stakingTokens = getStakingTokensForChain(chainId);
19
21
  if (stakingTokens && stakingTokens.length > 0) {
20
22
  const feeAsset = chain.fees.fee_tokens.find(
21
- (feeToken) => feeToken.denom === stakingTokens[0]?.denom
23
+ (feeToken) => {
24
+ var _a2;
25
+ return feeToken.denom === ((_a2 = stakingTokens[0]) == null ? void 0 : _a2.denom);
26
+ }
22
27
  );
23
28
  if (feeAsset) {
24
29
  return feeAsset.denom;
@@ -34,8 +39,8 @@ var getDefaultGasTokenForChain = async (chainId) => {
34
39
  if (nonL2Asset) {
35
40
  return nonL2Asset.denom;
36
41
  }
37
- return chain.fees.fee_tokens[0]?.denom;
38
- };
42
+ return (_a = chain.fees.fee_tokens[0]) == null ? void 0 : _a.denom;
43
+ });
39
44
  var getStakingTokensForChain = (chainId) => {
40
45
  const chain = chains().find((chain2) => chain2.chain_id === chainId);
41
46
  if (!chain) {
@@ -50,19 +55,20 @@ var getStakingTokensForChain = (chainId) => {
50
55
  };
51
56
 
52
57
  // src/public-functions/getFeeInfoForChain.ts
53
- var getFeeInfoForChain = async ({ chainId, apiUrl, apiKey }) => {
54
- const skipChains = await ClientState.getSkipChains({ apiUrl, apiKey });
58
+ var getFeeInfoForChain = (_0) => __async(void 0, [_0], function* ({ chainId, apiUrl, apiKey }) {
59
+ var _a, _b, _c, _d, _e;
60
+ const skipChains = yield ClientState.getSkipChains({ apiUrl, apiKey });
55
61
  const skipChain = skipChains.find((chain2) => chain2.chainId === chainId);
56
62
  if (!skipChain) {
57
63
  return void 0;
58
64
  }
59
- const defaultGasToken = await getDefaultGasTokenForChain(chainId);
65
+ const defaultGasToken = yield getDefaultGasTokenForChain(chainId);
60
66
  if (!defaultGasToken && !skipChain.feeAssets) {
61
67
  return void 0;
62
68
  }
63
- const skipFeeInfo = defaultGasToken ? skipChain.feeAssets?.find((skipFee) => skipFee.denom === defaultGasToken) : skipChain.feeAssets?.[0];
64
- if (!skipFeeInfo && skipChain.feeAssets?.[0]?.gasPrice !== null) {
65
- return skipChain.feeAssets?.[0];
69
+ const skipFeeInfo = defaultGasToken ? (_a = skipChain.feeAssets) == null ? void 0 : _a.find((skipFee) => skipFee.denom === defaultGasToken) : (_b = skipChain.feeAssets) == null ? void 0 : _b[0];
70
+ if (!skipFeeInfo && ((_d = (_c = skipChain.feeAssets) == null ? void 0 : _c[0]) == null ? void 0 : _d.gasPrice) !== null) {
71
+ return (_e = skipChain.feeAssets) == null ? void 0 : _e[0];
66
72
  }
67
73
  if (skipFeeInfo && skipFeeInfo.gasPrice !== null) {
68
74
  return skipFeeInfo;
@@ -88,6 +94,6 @@ var getFeeInfoForChain = async ({ chainId, apiUrl, apiKey }) => {
88
94
  high: registryFeeInfo.high_gas_price ? `${registryFeeInfo.high_gas_price}` : ""
89
95
  }
90
96
  };
91
- };
97
+ });
92
98
 
93
99
  export { getFeeInfoForChain };
@@ -0,0 +1,15 @@
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 };
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-DUCP65HQ.js';
1
+ import { api } from './chunk-RXWDHQLG.mjs';
2
2
 
3
3
  // src/api/postRecommendAssets.ts
4
4
  var recommendAssets = api({
@@ -1,4 +1,4 @@
1
- import { pollingApi } from './chunk-DUCP65HQ.js';
1
+ import { pollingApi } from './chunk-RXWDHQLG.mjs';
2
2
 
3
3
  // src/api/postTransactionStatus.ts
4
4
  var transactionStatus = pollingApi({
@@ -1,4 +1,4 @@
1
- import { pollingApi } from './chunk-DUCP65HQ.js';
1
+ import { pollingApi } from './chunk-RXWDHQLG.mjs';
2
2
 
3
3
  // src/api/postTrackTransaction.ts
4
4
  var trackTransaction = pollingApi({
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-DUCP65HQ.js';
1
+ import { api } from './chunk-RXWDHQLG.mjs';
2
2
 
3
3
  // src/api/postIbcOriginAssets.ts
4
4
  var ibcOriginAssets = api({
@@ -0,0 +1,124 @@
1
+ import { api, __async, __spreadValues, __objRest } from './chunk-RXWDHQLG.mjs';
2
+
3
+ // src/private-functions/getMainnetAndTestnetChains.ts
4
+ var getMainnetAndTestnetChains = (apiOptions) => __async(void 0, null, function* () {
5
+ const [mainnetRes, testnetRes] = yield Promise.all([
6
+ chains(__spreadValues({
7
+ includeEvm: true,
8
+ includeSvm: true
9
+ }, apiOptions)),
10
+ chains(__spreadValues({
11
+ includeEvm: true,
12
+ includeSvm: true,
13
+ onlyTestnets: true
14
+ }, apiOptions))
15
+ ]);
16
+ const combinedChains = [...mainnetRes != null ? mainnetRes : [], ...testnetRes != null ? testnetRes : []];
17
+ ClientState.skipChains = combinedChains;
18
+ return combinedChains;
19
+ });
20
+
21
+ // src/api/getAssets.ts
22
+ var assets = api({
23
+ methodName: "getAssets",
24
+ path: "/v2/fungible/assets",
25
+ transformResponse: (response) => {
26
+ return transformAssetsMap(response.chainToAssetsMap);
27
+ },
28
+ onSuccess: (response, options) => {
29
+ if ((options == null ? void 0 : options.includeEvmAssets) && (options == null ? void 0 : options.includeSvmAssets) && (options == null ? void 0 : options.includeCw20Assets)) {
30
+ ClientState.skipAssets = response;
31
+ }
32
+ }
33
+ });
34
+ var transformAssetsMap = (input) => Object.entries(input != null ? input : {}).reduce(
35
+ (acc, [chainId, { assets: assets2 }]) => {
36
+ acc[chainId] = (assets2 != null ? assets2 : []).map((asset) => asset);
37
+ return acc;
38
+ },
39
+ {}
40
+ );
41
+
42
+ // src/private-functions/getMainnetAndTestnetAssets.ts
43
+ var getMainnetAndTestnetAssets = (_a) => __async(void 0, null, function* () {
44
+ var _b = _a, {
45
+ chainId
46
+ } = _b, apiOptions = __objRest(_b, [
47
+ "chainId"
48
+ ]);
49
+ const [assetsMainnet, assetsTestnet] = yield Promise.all([
50
+ assets(__spreadValues({
51
+ chainIds: chainId ? [chainId] : void 0
52
+ }, apiOptions)),
53
+ assets(__spreadValues({
54
+ chainIds: chainId ? [chainId] : void 0,
55
+ onlyTestnets: true
56
+ }, apiOptions))
57
+ ]);
58
+ const mainnet = assetsMainnet;
59
+ const testnet = assetsTestnet;
60
+ const merged = __spreadValues(__spreadValues({}, mainnet), testnet);
61
+ ClientState.skipAssets = merged;
62
+ return merged;
63
+ });
64
+
65
+ // src/api/postBalances.ts
66
+ var balances = api({
67
+ methodName: "getBalances",
68
+ method: "post",
69
+ path: "/v2/info/balances",
70
+ onSuccess: (response, options) => {
71
+ if (!options) {
72
+ ClientState.skipBalances = response;
73
+ }
74
+ }
75
+ });
76
+
77
+ // src/state/clientState.ts
78
+ var ClientState = class {
79
+ static getSkipChains(apiOptions) {
80
+ return __async(this, null, function* () {
81
+ if (this.skipChains) {
82
+ return this.skipChains;
83
+ }
84
+ const response = yield getMainnetAndTestnetChains(apiOptions);
85
+ this.skipChains = response;
86
+ return response;
87
+ });
88
+ }
89
+ static getSkipAssets(props) {
90
+ return __async(this, null, function* () {
91
+ if (this.skipAssets) {
92
+ return this.skipAssets;
93
+ }
94
+ const response = yield getMainnetAndTestnetAssets(props);
95
+ this.skipAssets = response;
96
+ return response;
97
+ });
98
+ }
99
+ static getSkipBalances() {
100
+ return __async(this, null, function* () {
101
+ if (this.skipBalances) {
102
+ return this.skipBalances;
103
+ }
104
+ const response = yield balances();
105
+ this.skipBalances = response;
106
+ return response;
107
+ });
108
+ }
109
+ };
110
+ ClientState.signingStargateClientByChainId = {};
111
+
112
+ // src/api/getChains.ts
113
+ var chains = api({
114
+ methodName: "getChains",
115
+ path: "/v2/info/chains",
116
+ transformResponse: (response) => response.chains,
117
+ onSuccess: (response, options) => {
118
+ if ((options == null ? void 0 : options.includeEvm) && (options == null ? void 0 : options.includeSvm)) {
119
+ ClientState.skipChains = response;
120
+ }
121
+ }
122
+ });
123
+
124
+ export { ClientState, assets, balances, chains, transformAssetsMap };