@shapeshiftoss/swapper 17.7.1 → 17.7.2

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 (130) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/index.d.ts +1 -0
  3. package/dist/cjs/index.js +18 -7
  4. package/dist/cjs/swappers/AcrossSwapper/utils/acrossService.d.ts +3 -3
  5. package/dist/cjs/swappers/AcrossSwapper/utils/getTrade.js +1 -2
  6. package/dist/cjs/swappers/ArbitrumBridgeSwapper/endpoints.d.ts +3 -3
  7. package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeQuote/getTradeQuote.js +2 -2
  8. package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeRate/getTradeRate.js +1 -2
  9. package/dist/cjs/swappers/ArbitrumBridgeSwapper/utils/fetchArbitrumBridgeSwap.d.ts +2 -2
  10. package/dist/cjs/swappers/AvnuSwapper/endpoints.js +2 -2
  11. package/dist/cjs/swappers/AvnuSwapper/utils/constants.d.ts +1 -1
  12. package/dist/cjs/swappers/BebopSwapper/getBebopSolanaTradeQuote/getBebopSolanaTradeQuote.js +1 -2
  13. package/dist/cjs/swappers/BebopSwapper/getBebopSolanaTradeRate/getBebopSolanaTradeRate.js +1 -2
  14. package/dist/cjs/swappers/BebopSwapper/getBebopTradeQuote/getBebopTradeQuote.js +2 -3
  15. package/dist/cjs/swappers/BebopSwapper/getBebopTradeRate/getBebopTradeRate.js +2 -3
  16. package/dist/cjs/swappers/BebopSwapper/types.d.ts +1 -1
  17. package/dist/cjs/swappers/BebopSwapper/utils/bebopService.d.ts +1 -1
  18. package/dist/cjs/swappers/BebopSwapper/utils/fetchFromBebop.d.ts +4 -4
  19. package/dist/cjs/swappers/BebopSwapper/utils/helpers/helpers.d.ts +2 -1
  20. package/dist/cjs/swappers/ButterSwap/swapperApi/checkTradeStatus.test.js +19 -9
  21. package/dist/cjs/swappers/ButterSwap/swapperApi/getTradeQuote.js +1 -1
  22. package/dist/cjs/swappers/ButterSwap/test-data/routeQuote.js +4 -4
  23. package/dist/cjs/swappers/ButterSwap/utils/butterSwapHistoryService.d.ts +3 -3
  24. package/dist/cjs/swappers/ButterSwap/utils/butterSwapService.d.ts +3 -3
  25. package/dist/cjs/swappers/ButterSwap/xhr.js +4 -4
  26. package/dist/cjs/swappers/CetusSwapper/utils/constants.d.ts +1 -1
  27. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteBoostQuote.js +4 -5
  28. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteEstimatedDurationsSeconds.js +4 -5
  29. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteQuote.js +5 -5
  30. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteQuoteFee.js +5 -5
  31. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusChunkInfo.js +4 -5
  32. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusDca.js +4 -5
  33. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusEgress.js +4 -5
  34. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusSwap.js +4 -5
  35. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasSwapDepositAddress.js +4 -5
  36. package/dist/cjs/swappers/ChainflipSwapper/utils/chainflipService.d.ts +3 -3
  37. package/dist/cjs/swappers/ChainflipSwapper/utils/getQuoteOrRate.js +2 -2
  38. package/dist/cjs/swappers/ChainflipSwapper/utils/getUtxoTxFees.d.ts +1 -1
  39. package/dist/cjs/swappers/ChainflipSwapper/utils/helpers.d.ts +3 -2
  40. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.js +2 -3
  41. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.test.js +8 -8
  42. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeRate/getCowSwapTradeRate.js +2 -3
  43. package/dist/cjs/swappers/CowSwapper/utils/cowService.d.ts +3 -3
  44. package/dist/cjs/swappers/DebridgeSwapper/utils/debridgeService.d.ts +3 -3
  45. package/dist/cjs/swappers/DebridgeSwapper/utils/getTrade.js +1 -2
  46. package/dist/cjs/swappers/NearIntentsSwapper/utils/helpers/helpers.d.ts +2 -2
  47. package/dist/cjs/swappers/PortalsSwapper/getPortalsTradeQuote/getPortalsTradeQuote.js +1 -2
  48. package/dist/cjs/swappers/PortalsSwapper/getPortalsTradeRate/getPortalsTradeRate.js +3 -4
  49. package/dist/cjs/swappers/PortalsSwapper/utils/helpers.d.ts +1 -1
  50. package/dist/cjs/swappers/RelaySwapper/constant.d.ts +39 -1
  51. package/dist/cjs/swappers/RelaySwapper/utils/fetchRelayTrade.d.ts +1 -1
  52. package/dist/cjs/swappers/RelaySwapper/utils/getRelayPsbtRelayer.js +17 -7
  53. package/dist/cjs/swappers/RelaySwapper/utils/getTrade.js +1 -2
  54. package/dist/cjs/swappers/RelaySwapper/utils/relayService.d.ts +3 -3
  55. package/dist/cjs/swappers/SunioSwapper/utils/getQuoteOrRate.js +1 -2
  56. package/dist/cjs/swappers/SunioSwapper/utils/helpers/helpers.d.ts +2 -1
  57. package/dist/cjs/swappers/SunioSwapper/utils/sunioService.d.ts +3 -3
  58. package/dist/cjs/swappers/ThorchainSwapper/utils/getL1ToLongtailQuote.js +18 -8
  59. package/dist/cjs/swappers/ThorchainSwapper/utils/getL1ToLongtailRate.js +18 -8
  60. package/dist/cjs/swappers/ThorchainSwapper/utils/getLongtailQuote.js +1 -1
  61. package/dist/cjs/swappers/ThorchainSwapper/utils/getLongtailRate.js +1 -1
  62. package/dist/cjs/swappers/ThorchainSwapper/utils/longTailHelpers.js +2 -2
  63. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeQuote/getZrxTradeQuote.js +1 -2
  64. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeQuote/getZrxTradeQuote.test.js +17 -7
  65. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeRate/getZrxTradeRate.js +1 -2
  66. package/dist/cjs/swappers/ZrxSwapper/utils/fetchFromZrx.js +2 -2
  67. package/dist/cjs/swappers/ZrxSwapper/utils/helpers/helpers.d.ts +2 -3
  68. package/dist/cjs/swappers/ZrxSwapper/utils/zrxService.d.ts +1 -1
  69. package/dist/cjs/swappers/utils/test-data/cryptoMarketDataById.d.ts +35 -1
  70. package/dist/cjs/thorchain-utils/getCallDataFromQuote.d.ts +1 -1
  71. package/dist/cjs/thorchain-utils/getL1RateOrQuote.js +21 -11
  72. package/dist/cjs/thorchain-utils/index.js +17 -7
  73. package/dist/cjs/thorchain-utils/parseBuyTxHash.d.ts +1 -1
  74. package/dist/cjs/thorchain-utils/service.d.ts +3 -3
  75. package/dist/cjs/tron-utils/getTronTransactionFees.d.ts +1 -1
  76. package/dist/cjs/utils/tenderly/storageSlots.js +20 -20
  77. package/dist/cjs/utils.d.ts +4 -4
  78. package/dist/esm/.tsbuildinfo +1 -1
  79. package/dist/esm/index.d.ts +1 -0
  80. package/dist/esm/index.js +1 -0
  81. package/dist/esm/swappers/AcrossSwapper/utils/acrossService.d.ts +3 -3
  82. package/dist/esm/swappers/ArbitrumBridgeSwapper/endpoints.d.ts +3 -3
  83. package/dist/esm/swappers/ArbitrumBridgeSwapper/utils/fetchArbitrumBridgeSwap.d.ts +2 -2
  84. package/dist/esm/swappers/AvnuSwapper/endpoints.js +2 -2
  85. package/dist/esm/swappers/AvnuSwapper/utils/constants.d.ts +1 -1
  86. package/dist/esm/swappers/BebopSwapper/getBebopTradeQuote/getBebopTradeQuote.js +1 -1
  87. package/dist/esm/swappers/BebopSwapper/getBebopTradeRate/getBebopTradeRate.js +1 -1
  88. package/dist/esm/swappers/BebopSwapper/types.d.ts +1 -1
  89. package/dist/esm/swappers/BebopSwapper/utils/bebopService.d.ts +1 -1
  90. package/dist/esm/swappers/BebopSwapper/utils/fetchFromBebop.d.ts +4 -4
  91. package/dist/esm/swappers/BebopSwapper/utils/helpers/helpers.d.ts +2 -1
  92. package/dist/esm/swappers/ButterSwap/swapperApi/checkTradeStatus.test.js +2 -2
  93. package/dist/esm/swappers/ButterSwap/swapperApi/getTradeQuote.js +1 -1
  94. package/dist/esm/swappers/ButterSwap/test-data/routeQuote.js +4 -4
  95. package/dist/esm/swappers/ButterSwap/utils/butterSwapHistoryService.d.ts +3 -3
  96. package/dist/esm/swappers/ButterSwap/utils/butterSwapService.d.ts +3 -3
  97. package/dist/esm/swappers/CetusSwapper/utils/constants.d.ts +1 -1
  98. package/dist/esm/swappers/ChainflipSwapper/utils/chainflipService.d.ts +3 -3
  99. package/dist/esm/swappers/ChainflipSwapper/utils/getQuoteOrRate.js +2 -2
  100. package/dist/esm/swappers/ChainflipSwapper/utils/getUtxoTxFees.d.ts +1 -1
  101. package/dist/esm/swappers/ChainflipSwapper/utils/helpers.d.ts +3 -2
  102. package/dist/esm/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.js +1 -1
  103. package/dist/esm/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.test.js +8 -8
  104. package/dist/esm/swappers/CowSwapper/getCowSwapTradeRate/getCowSwapTradeRate.js +1 -1
  105. package/dist/esm/swappers/CowSwapper/utils/cowService.d.ts +3 -3
  106. package/dist/esm/swappers/DebridgeSwapper/utils/debridgeService.d.ts +3 -3
  107. package/dist/esm/swappers/NearIntentsSwapper/utils/helpers/helpers.d.ts +2 -2
  108. package/dist/esm/swappers/PortalsSwapper/getPortalsTradeRate/getPortalsTradeRate.js +2 -2
  109. package/dist/esm/swappers/PortalsSwapper/utils/helpers.d.ts +1 -1
  110. package/dist/esm/swappers/RelaySwapper/constant.d.ts +39 -1
  111. package/dist/esm/swappers/RelaySwapper/utils/fetchRelayTrade.d.ts +1 -1
  112. package/dist/esm/swappers/RelaySwapper/utils/relayService.d.ts +3 -3
  113. package/dist/esm/swappers/SunioSwapper/utils/helpers/helpers.d.ts +2 -1
  114. package/dist/esm/swappers/SunioSwapper/utils/sunioService.d.ts +3 -3
  115. package/dist/esm/swappers/ThorchainSwapper/utils/getL1ToLongtailQuote.js +1 -1
  116. package/dist/esm/swappers/ThorchainSwapper/utils/getL1ToLongtailRate.js +1 -1
  117. package/dist/esm/swappers/ThorchainSwapper/utils/getLongtailQuote.js +1 -1
  118. package/dist/esm/swappers/ThorchainSwapper/utils/getLongtailRate.js +1 -1
  119. package/dist/esm/swappers/ZrxSwapper/utils/fetchFromZrx.js +2 -2
  120. package/dist/esm/swappers/ZrxSwapper/utils/helpers/helpers.d.ts +2 -3
  121. package/dist/esm/swappers/ZrxSwapper/utils/zrxService.d.ts +1 -1
  122. package/dist/esm/swappers/utils/test-data/cryptoMarketDataById.d.ts +35 -1
  123. package/dist/esm/thorchain-utils/getCallDataFromQuote.d.ts +1 -1
  124. package/dist/esm/thorchain-utils/getL1RateOrQuote.js +4 -4
  125. package/dist/esm/thorchain-utils/parseBuyTxHash.d.ts +1 -1
  126. package/dist/esm/thorchain-utils/service.d.ts +3 -3
  127. package/dist/esm/tron-utils/getTronTransactionFees.d.ts +1 -1
  128. package/dist/esm/utils/tenderly/storageSlots.js +20 -20
  129. package/dist/esm/utils.d.ts +4 -4
  130. package/package.json +3 -3
@@ -14,6 +14,7 @@ export * from './swappers/PortalsSwapper/index.js';
14
14
  export * from './swappers/ThorchainSwapper/index.js';
15
15
  export * from './swappers/MayachainSwapper/index.js';
16
16
  export * from './swappers/ButterSwap/index.js';
17
+ export * from './swappers/RelaySwapper/index.js';
17
18
  export * from './swappers/utils/helpers/helpers.js';
18
19
  export * from './thorchain-utils/index.js';
19
20
  export * from './types.js';
package/dist/esm/index.js CHANGED
@@ -14,6 +14,7 @@ export * from './swappers/PortalsSwapper/index.js';
14
14
  export * from './swappers/ThorchainSwapper/index.js';
15
15
  export * from './swappers/MayachainSwapper/index.js';
16
16
  export * from './swappers/ButterSwap/index.js';
17
+ export * from './swappers/RelaySwapper/index.js';
17
18
  export * from './swappers/utils/helpers/helpers.js';
18
19
  export * from './thorchain-utils/index.js';
19
20
  export * from './types.js';
@@ -1,5 +1,5 @@
1
1
  export declare const acrossService: {
2
- get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../../index.js").SwapErrorRight>>;
3
- post: <T_1 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_1, any, {}>, import("../../../index.js").SwapErrorRight>>;
4
- delete: <T_2 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_2, any, {}>, import("../../../index.js").SwapErrorRight>>;
2
+ get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
3
+ post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
4
+ delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
5
5
  };
@@ -5,9 +5,9 @@ export declare const getParentToChildMessageDataFromParentTxHash: ({ depositTxId
5
5
  depositTxId: string;
6
6
  parentProvider: ethersv5.providers.JsonRpcProvider;
7
7
  childProvider: ethersv5.providers.JsonRpcProvider;
8
- isClassic?: boolean | undefined;
8
+ isClassic?: boolean;
9
9
  }) => Promise<{
10
- isClassic?: boolean | undefined;
11
- parentToChildMsg?: ParentToChildMessageReaderClassic | ParentToChildMessageReader | undefined;
10
+ isClassic?: boolean;
11
+ parentToChildMsg?: ParentToChildMessageReaderClassic | ParentToChildMessageReader;
12
12
  } | undefined>;
13
13
  export declare const arbitrumBridgeApi: SwapperApi;
@@ -23,12 +23,12 @@ export type FetchArbitrumBridgeQuoteInput = {
23
23
  assertGetEvmChainAdapter: (chainId: ChainId) => EvmChainAdapter;
24
24
  };
25
25
  export declare const fetchArbitrumBridgePrice: (args: FetchArbitrumBridgePriceInput) => Promise<{
26
- request: Omit<ParentToChildTransactionRequest | ChildToParentTransactionRequest, 'retryableData'> | undefined;
26
+ request: Omit<ParentToChildTransactionRequest | ChildToParentTransactionRequest, "retryableData"> | undefined;
27
27
  allowanceContract: string;
28
28
  networkFeeCryptoBaseUnit: string;
29
29
  }>;
30
30
  export declare const fetchArbitrumBridgeQuote: (args: FetchArbitrumBridgeQuoteInput) => Promise<{
31
- request: Omit<ParentToChildTransactionRequest | ChildToParentTransactionRequest, 'retryableData'> | undefined;
31
+ request: Omit<ParentToChildTransactionRequest | ChildToParentTransactionRequest, "retryableData"> | undefined;
32
32
  allowanceContract: string;
33
33
  networkFeeCryptoBaseUnit: string;
34
34
  }>;
@@ -145,8 +145,8 @@ export const avnuApi = {
145
145
  compiledCalldata: formattedCalldata,
146
146
  chainId: chainIdHex,
147
147
  nonce,
148
- nonceDataAvailabilityMode: 0,
149
- feeDataAvailabilityMode: 0,
148
+ nonceDataAvailabilityMode: 0, // L1
149
+ feeDataAvailabilityMode: 0, // L1
150
150
  resourceBounds: {
151
151
  l1_gas: {
152
152
  max_amount: resourceBounds.l1_gas.max_amount,
@@ -1,5 +1,5 @@
1
1
  import type { ChainId } from '@shapeshiftoss/caip';
2
2
  export declare const AVNU_SUPPORTED_CHAIN_IDS: readonly ChainId[];
3
- export declare const isSupportedChainId: (chainId: ChainId) => chainId is ChainId;
3
+ export declare const isSupportedChainId: (chainId: ChainId) => chainId is (typeof AVNU_SUPPORTED_CHAIN_IDS)[number];
4
4
  export declare const DEFAULT_SLIPPAGE_PERCENTAGE = "0.005";
5
5
  export declare const AVNU_API_BASE_URL = "https://starknet.api.avnu.fi";
@@ -92,7 +92,7 @@ export async function getBebopTradeQuote(input, assertGetEvmChainAdapter, _asset
92
92
  accountNumber,
93
93
  rate,
94
94
  feeData: {
95
- protocolFees: {},
95
+ protocolFees: {}, // Bebop doesn't charge protocol fees
96
96
  networkFeeCryptoBaseUnit,
97
97
  },
98
98
  buyAmountBeforeFeesCryptoBaseUnit,
@@ -76,7 +76,7 @@ export async function getBebopTradeRate(input, assertGetEvmChainAdapter, _assets
76
76
  accountNumber,
77
77
  rate,
78
78
  feeData: {
79
- protocolFees: {},
79
+ protocolFees: {}, // Bebop doesn't charge protocol fees
80
80
  networkFeeCryptoBaseUnit,
81
81
  },
82
82
  buyAmountBeforeFeesCryptoBaseUnit,
@@ -87,7 +87,7 @@ export type BebopQuoteResponse = {
87
87
  };
88
88
  export declare const chainIdToBebopChain: Record<BebopSupportedChainId, string>;
89
89
  export declare const BEBOP_NATIVE_MARKER = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
90
- export declare const BEBOP_DUMMY_ADDRESS: `0x${string}`;
90
+ export declare const BEBOP_DUMMY_ADDRESS: Address;
91
91
  export declare const BEBOP_SOLANA_DUMMY_ADDRESS = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
92
92
  export type BebopSolanaQuoteResponse = {
93
93
  requestId: string;
@@ -4,6 +4,6 @@ import type { MonadicSwapperAxiosService } from '../../../types.js';
4
4
  type AxiosInstanceHoF = (instance: AxiosInstance, options?: Omit<RetryConfig, 'instance'>) => AxiosInstance;
5
5
  export declare const bebopServiceFactory: ({ apiKey, wrapper, }: {
6
6
  apiKey: string;
7
- wrapper?: AxiosInstanceHoF | undefined;
7
+ wrapper?: AxiosInstanceHoF;
8
8
  }) => MonadicSwapperAxiosService;
9
9
  export {};
@@ -10,7 +10,7 @@ export declare const fetchBebopQuote: ({ buyAsset, sellAsset, sellAmountIncludin
10
10
  takerAddress: Address;
11
11
  receiverAddress: Address;
12
12
  slippageTolerancePercentageDecimal: string;
13
- affiliateBps?: string | undefined;
13
+ affiliateBps?: string;
14
14
  apiKey: string;
15
15
  }) => Promise<Result<BebopQuoteResponse, SwapErrorRight>>;
16
16
  export declare const fetchBebopPrice: ({ buyAsset, sellAsset, sellAmountIncludingProtocolFeesCryptoBaseUnit, receiveAddress, affiliateBps, apiKey, }: {
@@ -18,7 +18,7 @@ export declare const fetchBebopPrice: ({ buyAsset, sellAsset, sellAmountIncludin
18
18
  sellAsset: Asset;
19
19
  sellAmountIncludingProtocolFeesCryptoBaseUnit: string;
20
20
  receiveAddress: string | undefined;
21
- affiliateBps?: string | undefined;
21
+ affiliateBps?: string;
22
22
  apiKey: string;
23
23
  }) => Promise<Result<BebopQuoteResponse, SwapErrorRight>>;
24
24
  export declare const fetchBebopSolanaQuote: ({ buyAsset, sellAsset, sellAmountIncludingProtocolFeesCryptoBaseUnit, takerAddress, receiverAddress, slippageTolerancePercentageDecimal, affiliateBps, apiKey, }: {
@@ -28,7 +28,7 @@ export declare const fetchBebopSolanaQuote: ({ buyAsset, sellAsset, sellAmountIn
28
28
  takerAddress: string;
29
29
  receiverAddress: string;
30
30
  slippageTolerancePercentageDecimal: string;
31
- affiliateBps?: string | undefined;
31
+ affiliateBps?: string;
32
32
  apiKey: string;
33
33
  }) => Promise<Result<BebopSolanaQuoteResponse, SwapErrorRight>>;
34
34
  export declare const fetchBebopSolanaPrice: ({ buyAsset, sellAsset, sellAmountIncludingProtocolFeesCryptoBaseUnit, receiveAddress, affiliateBps, apiKey, }: {
@@ -36,6 +36,6 @@ export declare const fetchBebopSolanaPrice: ({ buyAsset, sellAsset, sellAmountIn
36
36
  sellAsset: Asset;
37
37
  sellAmountIncludingProtocolFeesCryptoBaseUnit: string;
38
38
  receiveAddress: string | undefined;
39
- affiliateBps?: string | undefined;
39
+ affiliateBps?: string;
40
40
  apiKey: string;
41
41
  }) => Promise<Result<BebopSolanaQuoteResponse, SwapErrorRight>>;
@@ -1,9 +1,10 @@
1
1
  import type { AssetId, ChainId } from '@shapeshiftoss/caip';
2
2
  import type { Asset } from '@shapeshiftoss/types';
3
+ import type { BebopSupportedChainId } from '../../types.js';
3
4
  export declare const isSolanaChainId: (chainId: ChainId) => boolean;
4
5
  export declare const assetIdToBebopToken: (assetId: AssetId) => string;
5
6
  export declare const assetIdToBebopSolanaToken: (assetId: AssetId) => string;
6
- export declare const isSupportedChainId: (chainId: ChainId) => chainId is import("@shapeshiftoss/types").KnownChainIds.EthereumMainnet | import("@shapeshiftoss/types").KnownChainIds.AvalancheMainnet | import("@shapeshiftoss/types").KnownChainIds.OptimismMainnet | import("@shapeshiftoss/types").KnownChainIds.BnbSmartChainMainnet | import("@shapeshiftoss/types").KnownChainIds.PolygonMainnet | import("@shapeshiftoss/types").KnownChainIds.ArbitrumMainnet | import("@shapeshiftoss/types").KnownChainIds.BaseMainnet | import("@shapeshiftoss/types").KnownChainIds.SolanaMainnet;
7
+ export declare const isSupportedChainId: (chainId: ChainId) => chainId is BebopSupportedChainId;
7
8
  export declare const assertValidTrade: ({ buyAsset, sellAsset, }: {
8
9
  buyAsset: Asset;
9
10
  sellAsset: Asset;
@@ -120,7 +120,7 @@ describe('checkTradeStatus same-chain short-circuit', () => {
120
120
  it('should proceed to bridge polling for cross-chain swaps', async () => {
121
121
  const mockBridgeInfo = {
122
122
  id: 12345,
123
- state: 1,
123
+ state: 1, // Confirmed
124
124
  toHash: 'dest-tx',
125
125
  relayerHash: 'relayer-tx',
126
126
  relayerChain: { scanUrl: 'https://scan.url' },
@@ -164,7 +164,7 @@ describe('checkTradeStatus same-chain short-circuit', () => {
164
164
  txHash: mockTxHash,
165
165
  chainId: mockEvmChainId,
166
166
  address: mockAddress,
167
- swap: undefined,
167
+ swap: undefined, // No swap data
168
168
  assertGetEvmChainAdapter: mockAssertGetEvmChainAdapter,
169
169
  assertGetSolanaChainAdapter: mockAssertGetSolanaChainAdapter,
170
170
  fetchIsSmartContractAddressQuery: mockFetchIsSmartContractAddressQuery,
@@ -71,7 +71,7 @@ export const getTradeQuote = async (input, _deps) => {
71
71
  const buildTxResult = await fetchTxData({
72
72
  hash: route.hash,
73
73
  slippage,
74
- from: sendAddress,
74
+ from: sendAddress, // from (source chain address)
75
75
  receiver: receiveAddress, // receiver (destination chain address)
76
76
  });
77
77
  if (buildTxResult.isErr())
@@ -14,12 +14,12 @@ export const ROUTE_QUOTE = {
14
14
  },
15
15
  tradeType: 0,
16
16
  gasFee: {
17
- amount: '0.001333043669759539',
17
+ amount: '0.001333043669759539', // human units
18
18
  symbol: 'ETH',
19
19
  inUSD: '3.0629382849310107',
20
20
  },
21
21
  swapFee: {
22
- nativeFee: '0.0',
22
+ nativeFee: '0.0', // human units
23
23
  tokenFee: '0.001', // human units
24
24
  },
25
25
  feeConfig: {
@@ -50,8 +50,8 @@ export const ROUTE_QUOTE = {
50
50
  symbol: 'USDC',
51
51
  icon: 'https://s3.amazonaws.com/map-static-file/mapSwap/ethereum/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/logo.png',
52
52
  },
53
- totalAmountIn: '0.999',
54
- totalAmountOut: '2296.409699',
53
+ totalAmountIn: '0.999', // in human units
54
+ totalAmountOut: '2296.409699', // in human units
55
55
  route: [
56
56
  {
57
57
  amountIn: '0.999',
@@ -1,6 +1,6 @@
1
1
  import type { AxiosRequestConfig } from 'axios';
2
2
  export declare const butterHistoryService: {
3
- get: <T = any>(url: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../../index.js").SwapErrorRight>>;
4
- post: <T_1 = any>(url: string, data: any, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_1, any, {}>, import("../../../index.js").SwapErrorRight>>;
5
- delete: <T_2 = any>(url: string, data: any, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_2, any, {}>, import("../../../index.js").SwapErrorRight>>;
3
+ get: <T = any>(url: string, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
4
+ post: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
5
+ delete: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import type { AxiosRequestConfig } from 'axios';
2
2
  export declare const butterService: {
3
- get: <T = any>(url: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../../index.js").SwapErrorRight>>;
4
- post: <T_1 = any>(url: string, data: any, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_1, any, {}>, import("../../../index.js").SwapErrorRight>>;
5
- delete: <T_2 = any>(url: string, data: any, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_2, any, {}>, import("../../../index.js").SwapErrorRight>>;
3
+ get: <T = any>(url: string, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
4
+ post: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
5
+ delete: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
6
6
  };
@@ -1,4 +1,4 @@
1
1
  import type { ChainId } from '@shapeshiftoss/caip';
2
2
  export declare const SUPPORTED_CETUS_CHAIN_IDS: readonly ChainId[];
3
- export declare const isSupportedChainId: (chainId: ChainId) => chainId is ChainId;
3
+ export declare const isSupportedChainId: (chainId: ChainId) => chainId is (typeof SUPPORTED_CETUS_CHAIN_IDS)[number];
4
4
  export declare const PYTH_DEPENDENT_PROVIDERS: string[];
@@ -1,5 +1,5 @@
1
1
  export declare const chainflipService: {
2
- get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../../index.js").SwapErrorRight>>;
3
- post: <T_1 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_1, any, {}>, import("../../../index.js").SwapErrorRight>>;
4
- delete: <T_2 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_2, any, {}>, import("../../../index.js").SwapErrorRight>>;
2
+ get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
3
+ post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
4
+ delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
5
5
  };
@@ -228,7 +228,7 @@ export const getQuoteOrRate = async (input, deps) => {
228
228
  buyAsset,
229
229
  sellAsset,
230
230
  accountNumber,
231
- allowanceContract: '0x0',
231
+ allowanceContract: '0x0', // Chainflip does not use contracts
232
232
  estimatedExecutionTimeMs: (singleQuoteResponse.boostQuote.estimatedDurationsSeconds?.deposit ?? 0) +
233
233
  (singleQuoteResponse.boostQuote.estimatedDurationsSeconds?.swap ?? 0) * 1000,
234
234
  chainflipSpecific: {
@@ -286,7 +286,7 @@ export const getQuoteOrRate = async (input, deps) => {
286
286
  buyAsset,
287
287
  sellAsset,
288
288
  accountNumber,
289
- allowanceContract: '0x0',
289
+ allowanceContract: '0x0', // Chainflip does not use contracts - all Txs are sends
290
290
  estimatedExecutionTimeMs: ((singleQuoteResponse.estimatedDurationsSeconds?.deposit ?? 0) +
291
291
  (singleQuoteResponse.estimatedDurationsSeconds?.swap ?? 0)) *
292
292
  1000,
@@ -5,5 +5,5 @@ type GetUtxoTxFeesInput = {
5
5
  sellAdapter: UtxoChainAdapter;
6
6
  pubKey: string | undefined;
7
7
  };
8
- export declare const getUtxoTxFees: ({ sellAmountCryptoBaseUnit, sellAdapter, pubKey, }: GetUtxoTxFeesInput) => Promise<Omit<QuoteFeeData, 'protocolFees'>>;
8
+ export declare const getUtxoTxFees: ({ sellAmountCryptoBaseUnit, sellAdapter, pubKey, }: GetUtxoTxFeesInput) => Promise<Omit<QuoteFeeData, "protocolFees">>;
9
9
  export {};
@@ -3,6 +3,7 @@ import type { Asset } from '@shapeshiftoss/types';
3
3
  import type { Result } from '@sniptt/monads';
4
4
  import type { AxiosResponse } from 'axios';
5
5
  import type { SwapErrorRight } from '../../../types.js';
6
+ import type { ChainflipSupportedChainId } from '../constants.js';
6
7
  import type { ChainflipBaasSwapDepositAddress } from '../models/index.js';
7
8
  type ChainFlipBrokerBaseArgs = {
8
9
  brokerUrl: string;
@@ -20,8 +21,8 @@ type GetChainFlipSwapArgs = ChainFlipBrokerBaseArgs & {
20
21
  numberOfChunks?: number;
21
22
  chunkIntervalBlocks?: number;
22
23
  };
23
- export declare const isSupportedChainId: (chainId: ChainId) => chainId is import("@shapeshiftoss/types").KnownChainIds.EthereumMainnet | import("@shapeshiftoss/types").KnownChainIds.ArbitrumMainnet | import("@shapeshiftoss/types").KnownChainIds.BitcoinMainnet | import("@shapeshiftoss/types").KnownChainIds.SolanaMainnet;
24
- export declare const isSupportedAssetId: (chainId: ChainId, assetId: AssetId) => chainId is import("@shapeshiftoss/types").KnownChainIds.EthereumMainnet | import("@shapeshiftoss/types").KnownChainIds.ArbitrumMainnet | import("@shapeshiftoss/types").KnownChainIds.BitcoinMainnet | import("@shapeshiftoss/types").KnownChainIds.SolanaMainnet;
24
+ export declare const isSupportedChainId: (chainId: ChainId) => chainId is ChainflipSupportedChainId;
25
+ export declare const isSupportedAssetId: (chainId: ChainId, assetId: AssetId) => chainId is ChainflipSupportedChainId;
25
26
  export declare const calculateChainflipMinPrice: ({ sellAmountIncludingProtocolFeesCryptoBaseUnit, buyAmountAfterFeesCryptoBaseUnit, slippageTolerancePercentageDecimal, sellAsset, buyAsset, }: {
26
27
  sellAmountIncludingProtocolFeesCryptoBaseUnit: string;
27
28
  buyAmountAfterFeesCryptoBaseUnit: string;
@@ -100,7 +100,7 @@ export async function getCowSwapTradeQuote(input, config) {
100
100
  allowanceContract: COW_SWAP_VAULT_RELAYER_ADDRESS,
101
101
  rate,
102
102
  feeData: {
103
- networkFeeCryptoBaseUnit: '0',
103
+ networkFeeCryptoBaseUnit: '0', // no miner fee for CowSwap
104
104
  protocolFees: {
105
105
  [sellAsset.assetId]: {
106
106
  amountCryptoBaseUnit: feeAmountInSellTokenCryptoBaseUnit,
@@ -306,8 +306,8 @@ const expectedTradeQuoteSmallAmountWethToFox = {
306
306
  networkFeeCryptoBaseUnit: '0',
307
307
  },
308
308
  sellAmountIncludingProtocolFeesCryptoBaseUnit: '1000000000000',
309
- buyAmountBeforeFeesCryptoBaseUnit: '166441655297153832879',
310
- buyAmountAfterFeesCryptoBaseUnit: '144293027591563571150',
309
+ buyAmountBeforeFeesCryptoBaseUnit: '166441655297153832879', // ~166 FOX
310
+ buyAmountAfterFeesCryptoBaseUnit: '144293027591563571150', // ~144 FOX
311
311
  source: SwapperName.CowSwap,
312
312
  buyAsset: FOX_MAINNET,
313
313
  sellAsset: WETH,
@@ -339,7 +339,7 @@ describe('getCowSwapTradeQuote', () => {
339
339
  affiliateBps: '0',
340
340
  supportsEIP1559: false,
341
341
  allowMultiHop: false,
342
- slippageTolerancePercentageDecimal: '0.005',
342
+ slippageTolerancePercentageDecimal: '0.005', // 0.5%
343
343
  quoteOrRate: 'quote',
344
344
  };
345
345
  const maybeTradeQuote = await getCowSwapTradeQuote(input, MOCK_COWSWAP_CONFIG);
@@ -363,7 +363,7 @@ describe('getCowSwapTradeQuote', () => {
363
363
  affiliateBps: '0',
364
364
  supportsEIP1559: false,
365
365
  allowMultiHop: false,
366
- slippageTolerancePercentageDecimal: '0.005',
366
+ slippageTolerancePercentageDecimal: '0.005', // 0.5%
367
367
  quoteOrRate: 'quote',
368
368
  };
369
369
  mockedCowService.post.mockReturnValue(Promise.resolve(Ok({
@@ -396,7 +396,7 @@ describe('getCowSwapTradeQuote', () => {
396
396
  affiliateBps: '0',
397
397
  supportsEIP1559: false,
398
398
  allowMultiHop: false,
399
- slippageTolerancePercentageDecimal: '0.005',
399
+ slippageTolerancePercentageDecimal: '0.005', // 0.5%
400
400
  quoteOrRate: 'quote',
401
401
  };
402
402
  mockedCowService.post.mockReturnValue(Promise.resolve(Ok({
@@ -429,7 +429,7 @@ describe('getCowSwapTradeQuote', () => {
429
429
  affiliateBps: '0',
430
430
  supportsEIP1559: false,
431
431
  allowMultiHop: false,
432
- slippageTolerancePercentageDecimal: '0.005',
432
+ slippageTolerancePercentageDecimal: '0.005', // 0.5%
433
433
  quoteOrRate: 'quote',
434
434
  };
435
435
  mockedCowService.post.mockReturnValue(Promise.resolve(Ok({
@@ -462,7 +462,7 @@ describe('getCowSwapTradeQuote', () => {
462
462
  affiliateBps: '0',
463
463
  supportsEIP1559: false,
464
464
  allowMultiHop: false,
465
- slippageTolerancePercentageDecimal: '0.005',
465
+ slippageTolerancePercentageDecimal: '0.005', // 0.5%
466
466
  quoteOrRate: 'quote',
467
467
  };
468
468
  mockedCowService.post.mockReturnValue(Promise.resolve(Ok({
@@ -495,7 +495,7 @@ describe('getCowSwapTradeQuote', () => {
495
495
  affiliateBps: '0',
496
496
  supportsEIP1559: false,
497
497
  allowMultiHop: false,
498
- slippageTolerancePercentageDecimal: '0.005',
498
+ slippageTolerancePercentageDecimal: '0.005', // 0.5%
499
499
  quoteOrRate: 'quote',
500
500
  };
501
501
  mockedCowService.post.mockReturnValue(Promise.resolve(Ok({
@@ -100,7 +100,7 @@ export async function getCowSwapTradeRate(input, config) {
100
100
  allowanceContract: COW_SWAP_VAULT_RELAYER_ADDRESS,
101
101
  rate,
102
102
  feeData: {
103
- networkFeeCryptoBaseUnit: '0',
103
+ networkFeeCryptoBaseUnit: '0', // no miner fee for CowSwap
104
104
  protocolFees: {
105
105
  [sellAsset.assetId]: {
106
106
  amountCryptoBaseUnit: feeAmountInSellTokenCryptoBaseUnit,
@@ -1,6 +1,6 @@
1
1
  import type { AxiosRequestConfig } from 'axios';
2
2
  export declare const cowService: {
3
- get: <T = any>(url: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../../index.js").SwapErrorRight>>;
4
- post: <T_1 = any>(url: string, data: any, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_1, any, {}>, import("../../../index.js").SwapErrorRight>>;
5
- delete: <T_2 = any>(url: string, data: any, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_2, any, {}>, import("../../../index.js").SwapErrorRight>>;
3
+ get: <T = any>(url: string, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
4
+ post: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
5
+ delete: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  export declare const debridgeService: {
2
- get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../../index.js").SwapErrorRight>>;
3
- post: <T_1 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_1, any, {}>, import("../../../index.js").SwapErrorRight>>;
4
- delete: <T_2 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_2, any, {}>, import("../../../index.js").SwapErrorRight>>;
2
+ get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
3
+ post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
4
+ delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
5
5
  };
@@ -8,5 +8,5 @@ export declare const getNearIntentsAsset: ({ nearNetwork, contractAddress, }: {
8
8
  contractAddress: string;
9
9
  }) => string;
10
10
  export declare const assetToNearIntentsAsset: (asset: Asset) => Promise<string | null>;
11
- export declare const mapNearIntentsStatus: (status: GetExecutionStatusResponse['status']) => TxStatus;
12
- export declare const getNearIntentsStatusMessage: (status: GetExecutionStatusResponse['status']) => string | undefined;
11
+ export declare const mapNearIntentsStatus: (status: GetExecutionStatusResponse["status"]) => TxStatus;
12
+ export declare const getNearIntentsStatusMessage: (status: GetExecutionStatusResponse["status"]) => string | undefined;
@@ -79,14 +79,14 @@ export async function getPortalsTradeRate(input, assertGetEvmChainAdapter, swapp
79
79
  // Use full quote endpoint (not estimate) to get transaction data for Tenderly simulation
80
80
  // Skip validation since this is just a rate quote
81
81
  const quoteResponse = await fetchPortalsTradeOrder({
82
- sender: RATE_DUMMY_ADDRESS,
82
+ sender: RATE_DUMMY_ADDRESS, // Dummy address for rates (no wallet yet)
83
83
  inputToken,
84
84
  outputToken,
85
85
  inputAmount: sellAmountIncludingProtocolFeesCryptoBaseUnit,
86
86
  slippageTolerancePercentage: userSlippageTolerancePercentageDecimalOrDefault,
87
87
  partner: getTreasuryAddressFromChainId(chainId),
88
88
  feePercentage: affiliateBpsPercentage,
89
- validate: false,
89
+ validate: false, // Skip Portals' simulation validation
90
90
  swapperConfig,
91
91
  });
92
92
  if (!quoteResponse.tx) {
@@ -1,4 +1,4 @@
1
1
  import type { ChainId } from '@shapeshiftoss/caip';
2
2
  import type { PortalsSupportedChainId } from '../types.js';
3
- export declare const isSupportedChainId: (chainId: ChainId) => chainId is import("@shapeshiftoss/types").KnownChainIds;
3
+ export declare const isSupportedChainId: (chainId: ChainId) => chainId is PortalsSupportedChainId;
4
4
  export declare const getPortalsRouterAddressByChainId: (chainId: PortalsSupportedChainId) => string;
@@ -1,7 +1,45 @@
1
+ import { abstractChainId, arbitrumChainId, avalancheChainId, baseChainId, berachainChainId, blastChainId, bobChainId, bscChainId, btcChainId, celoChainId, cronosChainId, ethChainId, etherealChainId, flowEvmChainId, gnosisChainId, hemiChainId, hyperEvmChainId, inkChainId, katanaChainId, lineaChainId, mantleChainId, megaethChainId, modeChainId, monadChainId, optimismChainId, plasmaChainId, plumeChainId, polygonChainId, scrollChainId, seiChainId, solanaChainId, soneiumChainId, sonicChainId, storyChainId, tronChainId, unichainChainId, worldChainChainId, zkSyncEraChainId } from '@shapeshiftoss/caip';
1
2
  import { TradeQuoteError } from '../../types.js';
2
3
  import { RelayErrorCode } from './utils/types.js';
3
4
  export declare const chainIdToRelayChainId: {
4
- [x: string]: number;
5
+ [btcChainId]: number;
6
+ [ethChainId]: 1;
7
+ [arbitrumChainId]: 42161;
8
+ [baseChainId]: 8453;
9
+ [optimismChainId]: 10;
10
+ [polygonChainId]: 137;
11
+ [solanaChainId]: number;
12
+ [gnosisChainId]: 100;
13
+ [avalancheChainId]: 43114;
14
+ [bscChainId]: 56;
15
+ [tronChainId]: number;
16
+ [monadChainId]: 143;
17
+ [hyperEvmChainId]: 999;
18
+ [mantleChainId]: 5000;
19
+ [inkChainId]: 57073;
20
+ [megaethChainId]: number;
21
+ [plasmaChainId]: 9745;
22
+ [katanaChainId]: 747474;
23
+ [etherealChainId]: number;
24
+ [celoChainId]: 42220;
25
+ [flowEvmChainId]: 747;
26
+ [plumeChainId]: 98866;
27
+ [storyChainId]: 1514;
28
+ [zkSyncEraChainId]: 324;
29
+ [blastChainId]: 81457;
30
+ [worldChainChainId]: 480;
31
+ [hemiChainId]: 43111;
32
+ [lineaChainId]: 59144;
33
+ [berachainChainId]: 80094;
34
+ [scrollChainId]: 534352;
35
+ [cronosChainId]: 25;
36
+ [sonicChainId]: 146;
37
+ [unichainChainId]: 130;
38
+ [bobChainId]: 60808;
39
+ [modeChainId]: 34443;
40
+ [soneiumChainId]: 1868;
41
+ [seiChainId]: 1329;
42
+ [abstractChainId]: number;
5
43
  };
6
44
  export declare enum RelayStatusMessage {
7
45
  WaitingForDeposit = "Waiting for deposit...",
@@ -2,4 +2,4 @@ import type { Result } from '@sniptt/monads';
2
2
  import type { AxiosResponse } from 'axios';
3
3
  import type { SwapErrorRight, SwapperConfig } from '../../../types.js';
4
4
  import type { RelayFetchQuoteParams, RelayQuote } from './types.js';
5
- export declare const fetchRelayTrade: <T extends "rate" | "quote">(params: RelayFetchQuoteParams<T>, config: SwapperConfig) => Promise<Result<AxiosResponse<RelayQuote, any>, SwapErrorRight>>;
5
+ export declare const fetchRelayTrade: <T extends "quote" | "rate">(params: RelayFetchQuoteParams<T>, config: SwapperConfig) => Promise<Result<AxiosResponse<RelayQuote, any>, SwapErrorRight>>;
@@ -1,5 +1,5 @@
1
1
  export declare const relayService: {
2
- get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../../index.js").SwapErrorRight>>;
3
- post: <T_1 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_1, any, {}>, import("../../../index.js").SwapErrorRight>>;
4
- delete: <T_2 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_2, any, {}>, import("../../../index.js").SwapErrorRight>>;
2
+ get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
3
+ post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
4
+ delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
5
5
  };
@@ -1,4 +1,5 @@
1
1
  import type { AssetId } from '@shapeshiftoss/caip';
2
+ import { tronChainId } from '@shapeshiftoss/caip';
2
3
  export declare const isSupportedChainId: (chainId: string) => boolean;
3
4
  export declare const assetIdToTronToken: (assetId: AssetId) => string;
4
- export declare const isTronChainId: (chainId: string) => chainId is import("@shapeshiftoss/caip").ChainId;
5
+ export declare const isTronChainId: (chainId: string) => chainId is typeof tronChainId;
@@ -1,6 +1,6 @@
1
1
  export declare const sunioServiceFactory: () => {
2
- get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../../index.js").SwapErrorRight>>;
3
- post: <T_1 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_1, any, {}>, import("../../../index.js").SwapErrorRight>>;
4
- delete: <T_2 = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T_2, any, {}>, import("../../../index.js").SwapErrorRight>>;
2
+ get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
3
+ post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
4
+ delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../../index.js").SwapErrorRight>>;
5
5
  };
6
6
  export type SunioService = ReturnType<typeof sunioServiceFactory>;
@@ -101,7 +101,7 @@ export const getL1ToLongtailQuote = async (input, deps, streamingInterval, swapp
101
101
  // This is wrong, we should get the get the value before fees or display ETH value received after the thorchain bridge
102
102
  buyAmountBeforeFeesCryptoBaseUnit: quotedAmountOut.toString(),
103
103
  allowanceContract: TS_AGGREGATOR_TOKEN_TRANSFER_PROXY_CONTRACT_MAINNET,
104
- })),
104
+ })), // assuming multi-hop quote steps here since we're mapping over quote steps,
105
105
  isLongtail: true,
106
106
  longtailData: {
107
107
  L1ToLongtailExpectedAmountOut: quotedAmountOut.toString(),
@@ -89,7 +89,7 @@ export const getL1ToLongtailRate = async (input, deps, streamingInterval, swappe
89
89
  // This is wrong, we should get the get the value before fees or display ETH value received after the thorchain bridge
90
90
  buyAmountBeforeFeesCryptoBaseUnit: quotedAmountOut.toString(),
91
91
  allowanceContract: TS_AGGREGATOR_TOKEN_TRANSFER_PROXY_CONTRACT_MAINNET,
92
- })),
92
+ })), // assuming multi-hop rate steps here since we're mapping over quote steps,
93
93
  isLongtail: true,
94
94
  longtailData: {
95
95
  L1ToLongtailExpectedAmountOut: quotedAmountOut.toString(),
@@ -55,7 +55,7 @@ export const getLongtailToL1Quote = async (input, deps, streamingInterval, swapp
55
55
  sellAmountIncludingProtocolFeesCryptoBaseUnit,
56
56
  sellAsset,
57
57
  allowanceContract: TS_AGGREGATOR_TOKEN_TRANSFER_PROXY_CONTRACT_MAINNET,
58
- })),
58
+ })), // assuming multi-hop quote steps here since we're mapping over quote steps
59
59
  isLongtail: true,
60
60
  longtailData: {
61
61
  longtailToL1ExpectedAmountOut: quotedAmountOut.toString(),
@@ -55,7 +55,7 @@ export const getLongtailToL1Rate = async (input, deps, streamingInterval, swappe
55
55
  sellAmountIncludingProtocolFeesCryptoBaseUnit,
56
56
  sellAsset,
57
57
  allowanceContract: TS_AGGREGATOR_TOKEN_TRANSFER_PROXY_CONTRACT_MAINNET,
58
- })),
58
+ })), // assuming multi-hop quote steps here since we're mapping over quote steps
59
59
  isLongtail: true,
60
60
  longtailData: {
61
61
  longtailToL1ExpectedAmountOut: quotedAmountOut.toString(),