@shapeshiftoss/swapper 17.7.2 → 17.7.3

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 (158) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/index.js +7 -17
  3. package/dist/cjs/swappers/AcrossSwapper/utils/acrossService.d.ts +3 -3
  4. package/dist/cjs/swappers/AcrossSwapper/utils/getTrade.js +2 -1
  5. package/dist/cjs/swappers/ArbitrumBridgeSwapper/endpoints.d.ts +3 -3
  6. package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeQuote/getTradeQuote.js +2 -2
  7. package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeRate/getTradeRate.js +2 -1
  8. package/dist/cjs/swappers/ArbitrumBridgeSwapper/utils/fetchArbitrumBridgeSwap.d.ts +2 -2
  9. package/dist/cjs/swappers/AvnuSwapper/endpoints.js +2 -2
  10. package/dist/cjs/swappers/AvnuSwapper/utils/constants.d.ts +1 -1
  11. package/dist/cjs/swappers/BebopSwapper/getBebopSolanaTradeQuote/getBebopSolanaTradeQuote.js +2 -1
  12. package/dist/cjs/swappers/BebopSwapper/getBebopSolanaTradeRate/getBebopSolanaTradeRate.js +2 -1
  13. package/dist/cjs/swappers/BebopSwapper/getBebopTradeQuote/getBebopTradeQuote.js +3 -2
  14. package/dist/cjs/swappers/BebopSwapper/getBebopTradeRate/getBebopTradeRate.js +3 -2
  15. package/dist/cjs/swappers/BebopSwapper/types.d.ts +1 -1
  16. package/dist/cjs/swappers/BebopSwapper/utils/bebopService.d.ts +1 -1
  17. package/dist/cjs/swappers/BebopSwapper/utils/fetchFromBebop.d.ts +4 -4
  18. package/dist/cjs/swappers/BebopSwapper/utils/helpers/helpers.d.ts +1 -2
  19. package/dist/cjs/swappers/ButterSwap/swapperApi/checkTradeStatus.test.js +9 -19
  20. package/dist/cjs/swappers/ButterSwap/swapperApi/getTradeQuote.js +1 -1
  21. package/dist/cjs/swappers/ButterSwap/test-data/routeQuote.js +4 -4
  22. package/dist/cjs/swappers/ButterSwap/utils/butterSwapHistoryService.d.ts +3 -3
  23. package/dist/cjs/swappers/ButterSwap/utils/butterSwapService.d.ts +3 -3
  24. package/dist/cjs/swappers/ButterSwap/xhr.js +4 -4
  25. package/dist/cjs/swappers/CetusSwapper/utils/constants.d.ts +1 -1
  26. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteBoostQuote.js +5 -4
  27. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteEstimatedDurationsSeconds.js +5 -4
  28. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteQuote.js +5 -5
  29. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteQuoteFee.js +5 -5
  30. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusChunkInfo.js +5 -4
  31. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusDca.js +5 -4
  32. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusEgress.js +5 -4
  33. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusSwap.js +5 -4
  34. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasSwapDepositAddress.js +5 -4
  35. package/dist/cjs/swappers/ChainflipSwapper/utils/chainflipService.d.ts +3 -3
  36. package/dist/cjs/swappers/ChainflipSwapper/utils/getQuoteOrRate.js +2 -2
  37. package/dist/cjs/swappers/ChainflipSwapper/utils/getUtxoTxFees.d.ts +1 -1
  38. package/dist/cjs/swappers/ChainflipSwapper/utils/helpers.d.ts +2 -3
  39. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.js +3 -2
  40. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.test.js +8 -8
  41. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeRate/getCowSwapTradeRate.js +3 -2
  42. package/dist/cjs/swappers/CowSwapper/utils/cowService.d.ts +3 -3
  43. package/dist/cjs/swappers/DebridgeSwapper/utils/debridgeService.d.ts +3 -3
  44. package/dist/cjs/swappers/DebridgeSwapper/utils/getTrade.js +2 -1
  45. package/dist/cjs/swappers/NearIntentsSwapper/constants.d.ts +1 -0
  46. package/dist/cjs/swappers/NearIntentsSwapper/constants.js +2 -1
  47. package/dist/cjs/swappers/NearIntentsSwapper/swapperApi/getTradeQuote.js +5 -2
  48. package/dist/cjs/swappers/NearIntentsSwapper/utils/helpers/helpers.d.ts +2 -2
  49. package/dist/cjs/swappers/NearIntentsSwapper/utils/helpers/helpers.js +5 -1
  50. package/dist/cjs/swappers/PortalsSwapper/getPortalsTradeQuote/getPortalsTradeQuote.js +2 -1
  51. package/dist/cjs/swappers/PortalsSwapper/getPortalsTradeRate/getPortalsTradeRate.js +4 -3
  52. package/dist/cjs/swappers/PortalsSwapper/utils/helpers.d.ts +1 -1
  53. package/dist/cjs/swappers/RelaySwapper/constant.d.ts +1 -39
  54. package/dist/cjs/swappers/RelaySwapper/utils/fetchRelayTrade.d.ts +1 -1
  55. package/dist/cjs/swappers/RelaySwapper/utils/getRelayPsbtRelayer.js +7 -17
  56. package/dist/cjs/swappers/RelaySwapper/utils/getTrade.js +2 -1
  57. package/dist/cjs/swappers/RelaySwapper/utils/relayService.d.ts +3 -3
  58. package/dist/cjs/swappers/SunioSwapper/utils/getQuoteOrRate.js +2 -1
  59. package/dist/cjs/swappers/SunioSwapper/utils/helpers/helpers.d.ts +1 -2
  60. package/dist/cjs/swappers/SunioSwapper/utils/sunioService.d.ts +3 -3
  61. package/dist/cjs/swappers/ThorchainSwapper/getTradeQuote/getTradeQuote.test.js +10 -0
  62. package/dist/cjs/swappers/ThorchainSwapper/utils/getL1ToLongtailQuote.js +8 -18
  63. package/dist/cjs/swappers/ThorchainSwapper/utils/getL1ToLongtailRate.js +8 -18
  64. package/dist/cjs/swappers/ThorchainSwapper/utils/getLongtailQuote.js +1 -1
  65. package/dist/cjs/swappers/ThorchainSwapper/utils/getLongtailRate.js +1 -1
  66. package/dist/cjs/swappers/ThorchainSwapper/utils/longTailHelpers.js +2 -2
  67. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeQuote/getZrxTradeQuote.js +2 -1
  68. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeQuote/getZrxTradeQuote.test.js +7 -17
  69. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeRate/getZrxTradeRate.js +2 -1
  70. package/dist/cjs/swappers/ZrxSwapper/utils/fetchFromZrx.js +2 -2
  71. package/dist/cjs/swappers/ZrxSwapper/utils/helpers/helpers.d.ts +3 -2
  72. package/dist/cjs/swappers/ZrxSwapper/utils/zrxService.d.ts +1 -1
  73. package/dist/cjs/swappers/utils/test-data/cryptoMarketDataById.d.ts +1 -35
  74. package/dist/cjs/thorchain-utils/checkTradeStatus.js +8 -1
  75. package/dist/cjs/thorchain-utils/cosmossdk/getThorTxData.d.ts +12 -0
  76. package/dist/cjs/thorchain-utils/cosmossdk/getThorTxData.js +19 -0
  77. package/dist/cjs/thorchain-utils/cosmossdk/index.d.ts +1 -0
  78. package/dist/cjs/thorchain-utils/cosmossdk/index.js +1 -0
  79. package/dist/cjs/thorchain-utils/getCallDataFromQuote.d.ts +1 -1
  80. package/dist/cjs/thorchain-utils/getL1RateOrQuote.js +46 -31
  81. package/dist/cjs/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.d.ts +3 -2
  82. package/dist/cjs/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.js +21 -14
  83. package/dist/cjs/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.test.js +11 -5
  84. package/dist/cjs/thorchain-utils/index.d.ts +1 -0
  85. package/dist/cjs/thorchain-utils/index.js +19 -18
  86. package/dist/cjs/thorchain-utils/parseBuyTxHash.d.ts +1 -1
  87. package/dist/cjs/thorchain-utils/service.d.ts +3 -3
  88. package/dist/cjs/tron-utils/getTronTransactionFees.d.ts +1 -1
  89. package/dist/cjs/types.d.ts +6 -0
  90. package/dist/cjs/utils/tenderly/storageSlots.js +20 -20
  91. package/dist/cjs/utils.d.ts +4 -4
  92. package/dist/esm/.tsbuildinfo +1 -1
  93. package/dist/esm/swappers/AcrossSwapper/utils/acrossService.d.ts +3 -3
  94. package/dist/esm/swappers/ArbitrumBridgeSwapper/endpoints.d.ts +3 -3
  95. package/dist/esm/swappers/ArbitrumBridgeSwapper/utils/fetchArbitrumBridgeSwap.d.ts +2 -2
  96. package/dist/esm/swappers/AvnuSwapper/endpoints.js +2 -2
  97. package/dist/esm/swappers/AvnuSwapper/utils/constants.d.ts +1 -1
  98. package/dist/esm/swappers/BebopSwapper/getBebopTradeQuote/getBebopTradeQuote.js +1 -1
  99. package/dist/esm/swappers/BebopSwapper/getBebopTradeRate/getBebopTradeRate.js +1 -1
  100. package/dist/esm/swappers/BebopSwapper/types.d.ts +1 -1
  101. package/dist/esm/swappers/BebopSwapper/utils/bebopService.d.ts +1 -1
  102. package/dist/esm/swappers/BebopSwapper/utils/fetchFromBebop.d.ts +4 -4
  103. package/dist/esm/swappers/BebopSwapper/utils/helpers/helpers.d.ts +1 -2
  104. package/dist/esm/swappers/ButterSwap/swapperApi/checkTradeStatus.test.js +2 -2
  105. package/dist/esm/swappers/ButterSwap/swapperApi/getTradeQuote.js +1 -1
  106. package/dist/esm/swappers/ButterSwap/test-data/routeQuote.js +4 -4
  107. package/dist/esm/swappers/ButterSwap/utils/butterSwapHistoryService.d.ts +3 -3
  108. package/dist/esm/swappers/ButterSwap/utils/butterSwapService.d.ts +3 -3
  109. package/dist/esm/swappers/CetusSwapper/utils/constants.d.ts +1 -1
  110. package/dist/esm/swappers/ChainflipSwapper/utils/chainflipService.d.ts +3 -3
  111. package/dist/esm/swappers/ChainflipSwapper/utils/getQuoteOrRate.js +2 -2
  112. package/dist/esm/swappers/ChainflipSwapper/utils/getUtxoTxFees.d.ts +1 -1
  113. package/dist/esm/swappers/ChainflipSwapper/utils/helpers.d.ts +2 -3
  114. package/dist/esm/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.js +1 -1
  115. package/dist/esm/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.test.js +8 -8
  116. package/dist/esm/swappers/CowSwapper/getCowSwapTradeRate/getCowSwapTradeRate.js +1 -1
  117. package/dist/esm/swappers/CowSwapper/utils/cowService.d.ts +3 -3
  118. package/dist/esm/swappers/DebridgeSwapper/utils/debridgeService.d.ts +3 -3
  119. package/dist/esm/swappers/NearIntentsSwapper/constants.d.ts +1 -0
  120. package/dist/esm/swappers/NearIntentsSwapper/constants.js +1 -0
  121. package/dist/esm/swappers/NearIntentsSwapper/swapperApi/getTradeQuote.js +7 -4
  122. package/dist/esm/swappers/NearIntentsSwapper/utils/helpers/helpers.d.ts +2 -2
  123. package/dist/esm/swappers/NearIntentsSwapper/utils/helpers/helpers.js +5 -1
  124. package/dist/esm/swappers/PortalsSwapper/getPortalsTradeRate/getPortalsTradeRate.js +2 -2
  125. package/dist/esm/swappers/PortalsSwapper/utils/helpers.d.ts +1 -1
  126. package/dist/esm/swappers/RelaySwapper/constant.d.ts +1 -39
  127. package/dist/esm/swappers/RelaySwapper/utils/fetchRelayTrade.d.ts +1 -1
  128. package/dist/esm/swappers/RelaySwapper/utils/relayService.d.ts +3 -3
  129. package/dist/esm/swappers/SunioSwapper/utils/helpers/helpers.d.ts +1 -2
  130. package/dist/esm/swappers/SunioSwapper/utils/sunioService.d.ts +3 -3
  131. package/dist/esm/swappers/ThorchainSwapper/getTradeQuote/getTradeQuote.test.js +10 -0
  132. package/dist/esm/swappers/ThorchainSwapper/utils/getL1ToLongtailQuote.js +1 -1
  133. package/dist/esm/swappers/ThorchainSwapper/utils/getL1ToLongtailRate.js +1 -1
  134. package/dist/esm/swappers/ThorchainSwapper/utils/getLongtailQuote.js +1 -1
  135. package/dist/esm/swappers/ThorchainSwapper/utils/getLongtailRate.js +1 -1
  136. package/dist/esm/swappers/ZrxSwapper/utils/fetchFromZrx.js +2 -2
  137. package/dist/esm/swappers/ZrxSwapper/utils/helpers/helpers.d.ts +3 -2
  138. package/dist/esm/swappers/ZrxSwapper/utils/zrxService.d.ts +1 -1
  139. package/dist/esm/swappers/utils/test-data/cryptoMarketDataById.d.ts +1 -35
  140. package/dist/esm/thorchain-utils/checkTradeStatus.js +8 -1
  141. package/dist/esm/thorchain-utils/cosmossdk/getThorTxData.d.ts +12 -0
  142. package/dist/esm/thorchain-utils/cosmossdk/getThorTxData.js +15 -0
  143. package/dist/esm/thorchain-utils/cosmossdk/index.d.ts +1 -0
  144. package/dist/esm/thorchain-utils/cosmossdk/index.js +1 -0
  145. package/dist/esm/thorchain-utils/getCallDataFromQuote.d.ts +1 -1
  146. package/dist/esm/thorchain-utils/getL1RateOrQuote.js +39 -14
  147. package/dist/esm/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.d.ts +3 -2
  148. package/dist/esm/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.js +20 -13
  149. package/dist/esm/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.test.js +12 -6
  150. package/dist/esm/thorchain-utils/index.d.ts +1 -0
  151. package/dist/esm/thorchain-utils/index.js +11 -1
  152. package/dist/esm/thorchain-utils/parseBuyTxHash.d.ts +1 -1
  153. package/dist/esm/thorchain-utils/service.d.ts +3 -3
  154. package/dist/esm/tron-utils/getTronTransactionFees.d.ts +1 -1
  155. package/dist/esm/types.d.ts +6 -0
  156. package/dist/esm/utils/tenderly/storageSlots.js +20 -20
  157. package/dist/esm/utils.d.ts +4 -4
  158. package/package.json +2 -2
@@ -14,10 +14,7 @@
14
14
  * Do not edit the class manually.
15
15
  */
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.instanceOfChainflipBaasStatusDca = instanceOfChainflipBaasStatusDca;
18
- exports.ChainflipBaasStatusDcaFromJSON = ChainflipBaasStatusDcaFromJSON;
19
- exports.ChainflipBaasStatusDcaFromJSONTyped = ChainflipBaasStatusDcaFromJSONTyped;
20
- exports.ChainflipBaasStatusDcaToJSON = ChainflipBaasStatusDcaToJSON;
17
+ exports.ChainflipBaasStatusDcaToJSON = exports.ChainflipBaasStatusDcaFromJSONTyped = exports.ChainflipBaasStatusDcaFromJSON = exports.instanceOfChainflipBaasStatusDca = void 0;
21
18
  const runtime_1 = require("../runtime");
22
19
  const ChainflipBaasStatusChunkInfo_1 = require("./ChainflipBaasStatusChunkInfo");
23
20
  /**
@@ -27,9 +24,11 @@ function instanceOfChainflipBaasStatusDca(value) {
27
24
  let isInstance = true;
28
25
  return isInstance;
29
26
  }
27
+ exports.instanceOfChainflipBaasStatusDca = instanceOfChainflipBaasStatusDca;
30
28
  function ChainflipBaasStatusDcaFromJSON(json) {
31
29
  return ChainflipBaasStatusDcaFromJSONTyped(json, false);
32
30
  }
31
+ exports.ChainflipBaasStatusDcaFromJSON = ChainflipBaasStatusDcaFromJSON;
33
32
  function ChainflipBaasStatusDcaFromJSONTyped(json, ignoreDiscriminator) {
34
33
  if ((json === undefined) || (json === null)) {
35
34
  return json;
@@ -41,6 +40,7 @@ function ChainflipBaasStatusDcaFromJSONTyped(json, ignoreDiscriminator) {
41
40
  'remainingChunks': !(0, runtime_1.exists)(json, 'remainingChunks') ? undefined : json['remainingChunks'],
42
41
  };
43
42
  }
43
+ exports.ChainflipBaasStatusDcaFromJSONTyped = ChainflipBaasStatusDcaFromJSONTyped;
44
44
  function ChainflipBaasStatusDcaToJSON(value) {
45
45
  if (value === undefined) {
46
46
  return undefined;
@@ -53,3 +53,4 @@ function ChainflipBaasStatusDcaToJSON(value) {
53
53
  'currentChunk': (0, ChainflipBaasStatusChunkInfo_1.ChainflipBaasStatusChunkInfoToJSON)(value.currentChunk),
54
54
  };
55
55
  }
56
+ exports.ChainflipBaasStatusDcaToJSON = ChainflipBaasStatusDcaToJSON;
@@ -14,10 +14,7 @@
14
14
  * Do not edit the class manually.
15
15
  */
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.instanceOfChainflipBaasStatusEgress = instanceOfChainflipBaasStatusEgress;
18
- exports.ChainflipBaasStatusEgressFromJSON = ChainflipBaasStatusEgressFromJSON;
19
- exports.ChainflipBaasStatusEgressFromJSONTyped = ChainflipBaasStatusEgressFromJSONTyped;
20
- exports.ChainflipBaasStatusEgressToJSON = ChainflipBaasStatusEgressToJSON;
17
+ exports.ChainflipBaasStatusEgressToJSON = exports.ChainflipBaasStatusEgressFromJSONTyped = exports.ChainflipBaasStatusEgressFromJSON = exports.instanceOfChainflipBaasStatusEgress = void 0;
21
18
  const runtime_1 = require("../runtime");
22
19
  const ChainflipBaasStatusFailure_1 = require("./ChainflipBaasStatusFailure");
23
20
  /**
@@ -27,9 +24,11 @@ function instanceOfChainflipBaasStatusEgress(value) {
27
24
  let isInstance = true;
28
25
  return isInstance;
29
26
  }
27
+ exports.instanceOfChainflipBaasStatusEgress = instanceOfChainflipBaasStatusEgress;
30
28
  function ChainflipBaasStatusEgressFromJSON(json) {
31
29
  return ChainflipBaasStatusEgressFromJSONTyped(json, false);
32
30
  }
31
+ exports.ChainflipBaasStatusEgressFromJSON = ChainflipBaasStatusEgressFromJSON;
33
32
  function ChainflipBaasStatusEgressFromJSONTyped(json, ignoreDiscriminator) {
34
33
  if ((json === undefined) || (json === null)) {
35
34
  return json;
@@ -49,6 +48,7 @@ function ChainflipBaasStatusEgressFromJSONTyped(json, ignoreDiscriminator) {
49
48
  'failedBlockIndex': !(0, runtime_1.exists)(json, 'failedBlockIndex') ? undefined : json['failedBlockIndex'],
50
49
  };
51
50
  }
51
+ exports.ChainflipBaasStatusEgressFromJSONTyped = ChainflipBaasStatusEgressFromJSONTyped;
52
52
  function ChainflipBaasStatusEgressToJSON(value) {
53
53
  if (value === undefined) {
54
54
  return undefined;
@@ -60,3 +60,4 @@ function ChainflipBaasStatusEgressToJSON(value) {
60
60
  'failure': (0, ChainflipBaasStatusFailure_1.ChainflipBaasStatusFailureToJSON)(value.failure),
61
61
  };
62
62
  }
63
+ exports.ChainflipBaasStatusEgressToJSON = ChainflipBaasStatusEgressToJSON;
@@ -14,10 +14,7 @@
14
14
  * Do not edit the class manually.
15
15
  */
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.instanceOfChainflipBaasStatusSwap = instanceOfChainflipBaasStatusSwap;
18
- exports.ChainflipBaasStatusSwapFromJSON = ChainflipBaasStatusSwapFromJSON;
19
- exports.ChainflipBaasStatusSwapFromJSONTyped = ChainflipBaasStatusSwapFromJSONTyped;
20
- exports.ChainflipBaasStatusSwapToJSON = ChainflipBaasStatusSwapToJSON;
17
+ exports.ChainflipBaasStatusSwapToJSON = exports.ChainflipBaasStatusSwapFromJSONTyped = exports.ChainflipBaasStatusSwapFromJSON = exports.instanceOfChainflipBaasStatusSwap = void 0;
21
18
  const runtime_1 = require("../runtime");
22
19
  const ChainflipBaasStatusChunkInfo_1 = require("./ChainflipBaasStatusChunkInfo");
23
20
  const ChainflipBaasStatusDca_1 = require("./ChainflipBaasStatusDca");
@@ -28,9 +25,11 @@ function instanceOfChainflipBaasStatusSwap(value) {
28
25
  let isInstance = true;
29
26
  return isInstance;
30
27
  }
28
+ exports.instanceOfChainflipBaasStatusSwap = instanceOfChainflipBaasStatusSwap;
31
29
  function ChainflipBaasStatusSwapFromJSON(json) {
32
30
  return ChainflipBaasStatusSwapFromJSONTyped(json, false);
33
31
  }
32
+ exports.ChainflipBaasStatusSwapFromJSON = ChainflipBaasStatusSwapFromJSON;
34
33
  function ChainflipBaasStatusSwapFromJSONTyped(json, ignoreDiscriminator) {
35
34
  if ((json === undefined) || (json === null)) {
36
35
  return json;
@@ -50,6 +49,7 @@ function ChainflipBaasStatusSwapFromJSONTyped(json, ignoreDiscriminator) {
50
49
  'dca': !(0, runtime_1.exists)(json, 'dca') ? undefined : (0, ChainflipBaasStatusDca_1.ChainflipBaasStatusDcaFromJSON)(json['dca']),
51
50
  };
52
51
  }
52
+ exports.ChainflipBaasStatusSwapFromJSONTyped = ChainflipBaasStatusSwapFromJSONTyped;
53
53
  function ChainflipBaasStatusSwapToJSON(value) {
54
54
  if (value === undefined) {
55
55
  return undefined;
@@ -72,3 +72,4 @@ function ChainflipBaasStatusSwapToJSON(value) {
72
72
  'dca': (0, ChainflipBaasStatusDca_1.ChainflipBaasStatusDcaToJSON)(value.dca),
73
73
  };
74
74
  }
75
+ exports.ChainflipBaasStatusSwapToJSON = ChainflipBaasStatusSwapToJSON;
@@ -14,10 +14,7 @@
14
14
  * Do not edit the class manually.
15
15
  */
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.instanceOfChainflipBaasSwapDepositAddress = instanceOfChainflipBaasSwapDepositAddress;
18
- exports.ChainflipBaasSwapDepositAddressFromJSON = ChainflipBaasSwapDepositAddressFromJSON;
19
- exports.ChainflipBaasSwapDepositAddressFromJSONTyped = ChainflipBaasSwapDepositAddressFromJSONTyped;
20
- exports.ChainflipBaasSwapDepositAddressToJSON = ChainflipBaasSwapDepositAddressToJSON;
17
+ exports.ChainflipBaasSwapDepositAddressToJSON = exports.ChainflipBaasSwapDepositAddressFromJSONTyped = exports.ChainflipBaasSwapDepositAddressFromJSON = exports.instanceOfChainflipBaasSwapDepositAddress = void 0;
21
18
  const runtime_1 = require("../runtime");
22
19
  /**
23
20
  * Check if a given object implements the ChainflipBaasSwapDepositAddress interface.
@@ -26,9 +23,11 @@ function instanceOfChainflipBaasSwapDepositAddress(value) {
26
23
  let isInstance = true;
27
24
  return isInstance;
28
25
  }
26
+ exports.instanceOfChainflipBaasSwapDepositAddress = instanceOfChainflipBaasSwapDepositAddress;
29
27
  function ChainflipBaasSwapDepositAddressFromJSON(json) {
30
28
  return ChainflipBaasSwapDepositAddressFromJSONTyped(json, false);
31
29
  }
30
+ exports.ChainflipBaasSwapDepositAddressFromJSON = ChainflipBaasSwapDepositAddressFromJSON;
32
31
  function ChainflipBaasSwapDepositAddressFromJSONTyped(json, ignoreDiscriminator) {
33
32
  if ((json === undefined) || (json === null)) {
34
33
  return json;
@@ -45,6 +44,7 @@ function ChainflipBaasSwapDepositAddressFromJSONTyped(json, ignoreDiscriminator)
45
44
  'channelOpeningFeeNative': !(0, runtime_1.exists)(json, 'channelOpeningFeeNative') ? undefined : json['channelOpeningFeeNative'],
46
45
  };
47
46
  }
47
+ exports.ChainflipBaasSwapDepositAddressFromJSONTyped = ChainflipBaasSwapDepositAddressFromJSONTyped;
48
48
  function ChainflipBaasSwapDepositAddressToJSON(value) {
49
49
  if (value === undefined) {
50
50
  return undefined;
@@ -56,3 +56,4 @@ function ChainflipBaasSwapDepositAddressToJSON(value) {
56
56
  'id': value.id,
57
57
  };
58
58
  }
59
+ exports.ChainflipBaasSwapDepositAddressToJSON = ChainflipBaasSwapDepositAddressToJSON;
@@ -1,5 +1,5 @@
1
1
  export declare const chainflipService: {
2
- get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
3
- post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
4
- delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
2
+ get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../..").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("../../..").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("../../..").SwapErrorRight>>;
5
5
  };
@@ -231,7 +231,7 @@ const getQuoteOrRate = async (input, deps) => {
231
231
  buyAsset,
232
232
  sellAsset,
233
233
  accountNumber,
234
- allowanceContract: '0x0', // Chainflip does not use contracts
234
+ allowanceContract: '0x0',
235
235
  estimatedExecutionTimeMs: (singleQuoteResponse.boostQuote.estimatedDurationsSeconds?.deposit ?? 0) +
236
236
  (singleQuoteResponse.boostQuote.estimatedDurationsSeconds?.swap ?? 0) * 1000,
237
237
  chainflipSpecific: {
@@ -289,7 +289,7 @@ const getQuoteOrRate = async (input, deps) => {
289
289
  buyAsset,
290
290
  sellAsset,
291
291
  accountNumber,
292
- allowanceContract: '0x0', // Chainflip does not use contracts - all Txs are sends
292
+ allowanceContract: '0x0',
293
293
  estimatedExecutionTimeMs: ((singleQuoteResponse.estimatedDurationsSeconds?.deposit ?? 0) +
294
294
  (singleQuoteResponse.estimatedDurationsSeconds?.swap ?? 0)) *
295
295
  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,7 +3,6 @@ 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';
6
- import type { ChainflipSupportedChainId } from '../constants';
7
6
  import type { ChainflipBaasSwapDepositAddress } from '../models';
8
7
  type ChainFlipBrokerBaseArgs = {
9
8
  brokerUrl: string;
@@ -21,8 +20,8 @@ type GetChainFlipSwapArgs = ChainFlipBrokerBaseArgs & {
21
20
  numberOfChunks?: number;
22
21
  chunkIntervalBlocks?: number;
23
22
  };
24
- export declare const isSupportedChainId: (chainId: ChainId) => chainId is ChainflipSupportedChainId;
25
- export declare const isSupportedAssetId: (chainId: ChainId, assetId: AssetId) => chainId is ChainflipSupportedChainId;
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;
26
25
  export declare const calculateChainflipMinPrice: ({ sellAmountIncludingProtocolFeesCryptoBaseUnit, buyAmountAfterFeesCryptoBaseUnit, slippageTolerancePercentageDecimal, sellAsset, buyAsset, }: {
27
26
  sellAmountIncludingProtocolFeesCryptoBaseUnit: string;
28
27
  buyAmountAfterFeesCryptoBaseUnit: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCowSwapTradeQuote = getCowSwapTradeQuote;
3
+ exports.getCowSwapTradeQuote = void 0;
4
4
  const caip_1 = require("@shapeshiftoss/caip");
5
5
  const types_1 = require("@shapeshiftoss/types");
6
6
  const utils_1 = require("@shapeshiftoss/utils");
@@ -103,7 +103,7 @@ async function getCowSwapTradeQuote(input, config) {
103
103
  allowanceContract: constants_2.COW_SWAP_VAULT_RELAYER_ADDRESS,
104
104
  rate,
105
105
  feeData: {
106
- networkFeeCryptoBaseUnit: '0', // no miner fee for CowSwap
106
+ networkFeeCryptoBaseUnit: '0',
107
107
  protocolFees: {
108
108
  [sellAsset.assetId]: {
109
109
  amountCryptoBaseUnit: feeAmountInSellTokenCryptoBaseUnit,
@@ -135,3 +135,4 @@ async function getCowSwapTradeQuote(input, config) {
135
135
  };
136
136
  return (0, monads_1.Ok)(quote);
137
137
  }
138
+ exports.getCowSwapTradeQuote = getCowSwapTradeQuote;
@@ -308,8 +308,8 @@ const expectedTradeQuoteSmallAmountWethToFox = {
308
308
  networkFeeCryptoBaseUnit: '0',
309
309
  },
310
310
  sellAmountIncludingProtocolFeesCryptoBaseUnit: '1000000000000',
311
- buyAmountBeforeFeesCryptoBaseUnit: '166441655297153832879', // ~166 FOX
312
- buyAmountAfterFeesCryptoBaseUnit: '144293027591563571150', // ~144 FOX
311
+ buyAmountBeforeFeesCryptoBaseUnit: '166441655297153832879',
312
+ buyAmountAfterFeesCryptoBaseUnit: '144293027591563571150',
313
313
  source: types_2.SwapperName.CowSwap,
314
314
  buyAsset: assets_1.FOX_MAINNET,
315
315
  sellAsset: assets_1.WETH,
@@ -341,7 +341,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
341
341
  affiliateBps: '0',
342
342
  supportsEIP1559: false,
343
343
  allowMultiHop: false,
344
- slippageTolerancePercentageDecimal: '0.005', // 0.5%
344
+ slippageTolerancePercentageDecimal: '0.005',
345
345
  quoteOrRate: 'quote',
346
346
  };
347
347
  const maybeTradeQuote = await (0, getCowSwapTradeQuote_1.getCowSwapTradeQuote)(input, MOCK_COWSWAP_CONFIG);
@@ -365,7 +365,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
365
365
  affiliateBps: '0',
366
366
  supportsEIP1559: false,
367
367
  allowMultiHop: false,
368
- slippageTolerancePercentageDecimal: '0.005', // 0.5%
368
+ slippageTolerancePercentageDecimal: '0.005',
369
369
  quoteOrRate: 'quote',
370
370
  };
371
371
  mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
@@ -398,7 +398,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
398
398
  affiliateBps: '0',
399
399
  supportsEIP1559: false,
400
400
  allowMultiHop: false,
401
- slippageTolerancePercentageDecimal: '0.005', // 0.5%
401
+ slippageTolerancePercentageDecimal: '0.005',
402
402
  quoteOrRate: 'quote',
403
403
  };
404
404
  mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
@@ -431,7 +431,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
431
431
  affiliateBps: '0',
432
432
  supportsEIP1559: false,
433
433
  allowMultiHop: false,
434
- slippageTolerancePercentageDecimal: '0.005', // 0.5%
434
+ slippageTolerancePercentageDecimal: '0.005',
435
435
  quoteOrRate: 'quote',
436
436
  };
437
437
  mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
@@ -464,7 +464,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
464
464
  affiliateBps: '0',
465
465
  supportsEIP1559: false,
466
466
  allowMultiHop: false,
467
- slippageTolerancePercentageDecimal: '0.005', // 0.5%
467
+ slippageTolerancePercentageDecimal: '0.005',
468
468
  quoteOrRate: 'quote',
469
469
  };
470
470
  mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
@@ -497,7 +497,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
497
497
  affiliateBps: '0',
498
498
  supportsEIP1559: false,
499
499
  allowMultiHop: false,
500
- slippageTolerancePercentageDecimal: '0.005', // 0.5%
500
+ slippageTolerancePercentageDecimal: '0.005',
501
501
  quoteOrRate: 'quote',
502
502
  };
503
503
  mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCowSwapTradeRate = getCowSwapTradeRate;
3
+ exports.getCowSwapTradeRate = void 0;
4
4
  const caip_1 = require("@shapeshiftoss/caip");
5
5
  const types_1 = require("@shapeshiftoss/types");
6
6
  const utils_1 = require("@shapeshiftoss/utils");
@@ -103,7 +103,7 @@ async function getCowSwapTradeRate(input, config) {
103
103
  allowanceContract: constants_2.COW_SWAP_VAULT_RELAYER_ADDRESS,
104
104
  rate,
105
105
  feeData: {
106
- networkFeeCryptoBaseUnit: '0', // no miner fee for CowSwap
106
+ networkFeeCryptoBaseUnit: '0',
107
107
  protocolFees: {
108
108
  [sellAsset.assetId]: {
109
109
  amountCryptoBaseUnit: feeAmountInSellTokenCryptoBaseUnit,
@@ -133,3 +133,4 @@ async function getCowSwapTradeRate(input, config) {
133
133
  };
134
134
  return (0, monads_1.Ok)(quote);
135
135
  }
136
+ exports.getCowSwapTradeRate = getCowSwapTradeRate;
@@ -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>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
4
- post: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
5
- delete: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
3
+ get: <T = any>(url: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../..").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("../../..").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("../../..").SwapErrorRight>>;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  export declare const debridgeService: {
2
- get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
3
- post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
4
- delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
2
+ get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../..").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("../../..").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("../../..").SwapErrorRight>>;
5
5
  };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getTrade = getTrade;
6
+ exports.getTrade = void 0;
7
7
  const caip_1 = require("@shapeshiftoss/caip");
8
8
  const chain_adapters_1 = require("@shapeshiftoss/chain-adapters");
9
9
  const utils_1 = require("@shapeshiftoss/utils");
@@ -200,6 +200,7 @@ async function getTrade({ input, deps, }) {
200
200
  };
201
201
  return (0, monads_1.Ok)([tradeRate]);
202
202
  }
203
+ exports.getTrade = getTrade;
203
204
  function handleDebridgeError(error) {
204
205
  if (!axios_1.default.isAxiosError(error.cause)) {
205
206
  return (0, monads_1.Err)((0, utils_2.makeSwapErrorRight)({
@@ -1,3 +1,4 @@
1
1
  export declare const ONE_CLICK_BASE_URL = "https://1click.chaindefuser.com";
2
2
  export declare const DEFAULT_SLIPPAGE_BPS = 50;
3
3
  export declare const DEFAULT_QUOTE_DEADLINE_MS: number;
4
+ export declare const BTC_QUOTE_DEADLINE_MS: number;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_QUOTE_DEADLINE_MS = exports.DEFAULT_SLIPPAGE_BPS = exports.ONE_CLICK_BASE_URL = void 0;
3
+ exports.BTC_QUOTE_DEADLINE_MS = exports.DEFAULT_QUOTE_DEADLINE_MS = exports.DEFAULT_SLIPPAGE_BPS = exports.ONE_CLICK_BASE_URL = void 0;
4
4
  exports.ONE_CLICK_BASE_URL = 'https://1click.chaindefuser.com';
5
5
  exports.DEFAULT_SLIPPAGE_BPS = 50;
6
6
  exports.DEFAULT_QUOTE_DEADLINE_MS = 30 * 60 * 1000;
7
+ exports.BTC_QUOTE_DEADLINE_MS = 60 * 60 * 1000;
@@ -52,6 +52,9 @@ const getTradeQuote = async (input, deps) => {
52
52
  message: `Asset ${buyAsset.symbol} on ${buyAsset.networkName || buyAsset.chainId} is not supported by NEAR Intents`,
53
53
  }));
54
54
  }
55
+ const quoteDeadline = sellAsset.chainId === caip_1.btcChainId || buyAsset.chainId === caip_1.btcChainId
56
+ ? constants_2.BTC_QUOTE_DEADLINE_MS
57
+ : constants_2.DEFAULT_QUOTE_DEADLINE_MS;
55
58
  const quoteRequest = {
56
59
  dry: false,
57
60
  swapType: types_2.QuoteRequest.swapType.EXACT_INPUT,
@@ -66,7 +69,7 @@ const getTradeQuote = async (input, deps) => {
66
69
  refundType: types_2.QuoteRequest.refundType.ORIGIN_CHAIN,
67
70
  recipient: receiveAddress,
68
71
  recipientType: types_2.QuoteRequest.recipientType.DESTINATION_CHAIN,
69
- deadline: new Date(Date.now() + constants_2.DEFAULT_QUOTE_DEADLINE_MS).toISOString(),
72
+ deadline: new Date(Date.now() + quoteDeadline).toISOString(),
70
73
  referral: 'shapeshift',
71
74
  appFees: [
72
75
  {
@@ -259,7 +262,7 @@ const getTradeQuote = async (input, deps) => {
259
262
  steps: [
260
263
  {
261
264
  accountNumber,
262
- allowanceContract: quote.depositAddress,
265
+ allowanceContract: '',
263
266
  buyAmountBeforeFeesCryptoBaseUnit: quote.amountOut,
264
267
  buyAmountAfterFeesCryptoBaseUnit: quote.amountOut,
265
268
  buyAsset,
@@ -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;
@@ -50,6 +50,7 @@ exports.getNearIntentsAsset = getNearIntentsAsset;
50
50
  const NEP245_CHAINS = ['bsc', 'pol', 'avax', 'op', 'tron', 'monad', 'plasma'];
51
51
  const TOKEN_LOOKUP_CHAINS = ['sui', 'starknet', 'ton'];
52
52
  const NEAR_CHAIN = 'near';
53
+ const BTC_CHAIN = 'btc';
53
54
  const WNEAR_CONTRACT_ADDRESS = 'wrap.near';
54
55
  const isNep245Chain = (chain) => {
55
56
  return NEP245_CHAINS.includes(chain);
@@ -61,6 +62,9 @@ const assetToNearIntentsAsset = async (asset) => {
61
62
  const nearNetwork = types_1.chainIdToNearIntentsChain[asset.chainId];
62
63
  if (!nearNetwork)
63
64
  return null;
65
+ // https://partners.near-intents.org/omni-migration#partners
66
+ if (nearNetwork === BTC_CHAIN)
67
+ return `1cs_v1:btc:native:coin`;
64
68
  // NEAR chain requires special handling
65
69
  // Native NEAR maps to wNEAR (wrap.near)
66
70
  if (nearNetwork === NEAR_CHAIN) {
@@ -96,7 +100,7 @@ const assetToNearIntentsAsset = async (asset) => {
96
100
  }
97
101
  return match.assetId;
98
102
  }
99
- // NEP-141 chains (ETH, ARB, BASE, GNOSIS, BTC, DOGE): use predictable format
103
+ // NEP-141 chains (ETH, ARB, BASE, GNOSIS, DOGE): use predictable format
100
104
  const contractAddress = (0, utils_1.isToken)(asset.assetId)
101
105
  ? (0, caip_1.fromAssetId)(asset.assetId).assetReference
102
106
  : viem_1.zeroAddress;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPortalsTradeQuote = getPortalsTradeQuote;
3
+ exports.getPortalsTradeQuote = void 0;
4
4
  const caip_1 = require("@shapeshiftoss/caip");
5
5
  const chain_adapters_1 = require("@shapeshiftoss/chain-adapters");
6
6
  const utils_1 = require("@shapeshiftoss/utils");
@@ -227,3 +227,4 @@ async function getPortalsTradeQuote(input, assertGetEvmChainAdapter, swapperConf
227
227
  }));
228
228
  }
229
229
  }
230
+ exports.getPortalsTradeQuote = getPortalsTradeQuote;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPortalsTradeRate = getPortalsTradeRate;
3
+ exports.getPortalsTradeRate = void 0;
4
4
  const caip_1 = require("@shapeshiftoss/caip");
5
5
  const chain_adapters_1 = require("@shapeshiftoss/chain-adapters");
6
6
  const utils_1 = require("@shapeshiftoss/utils");
@@ -82,14 +82,14 @@ async function getPortalsTradeRate(input, assertGetEvmChainAdapter, swapperConfi
82
82
  // Use full quote endpoint (not estimate) to get transaction data for Tenderly simulation
83
83
  // Skip validation since this is just a rate quote
84
84
  const quoteResponse = await (0, fetchPortalsTradeOrder_1.fetchPortalsTradeOrder)({
85
- sender: RATE_DUMMY_ADDRESS, // Dummy address for rates (no wallet yet)
85
+ sender: RATE_DUMMY_ADDRESS,
86
86
  inputToken,
87
87
  outputToken,
88
88
  inputAmount: sellAmountIncludingProtocolFeesCryptoBaseUnit,
89
89
  slippageTolerancePercentage: userSlippageTolerancePercentageDecimalOrDefault,
90
90
  partner: (0, helpers_1.getTreasuryAddressFromChainId)(chainId),
91
91
  feePercentage: affiliateBpsPercentage,
92
- validate: false, // Skip Portals' simulation validation
92
+ validate: false,
93
93
  swapperConfig,
94
94
  });
95
95
  if (!quoteResponse.tx) {
@@ -195,3 +195,4 @@ async function getPortalsTradeRate(input, assertGetEvmChainAdapter, swapperConfi
195
195
  }));
196
196
  }
197
197
  }
198
+ exports.getPortalsTradeRate = getPortalsTradeRate;
@@ -1,4 +1,4 @@
1
1
  import type { ChainId } from '@shapeshiftoss/caip';
2
2
  import type { PortalsSupportedChainId } from '../types';
3
- export declare const isSupportedChainId: (chainId: ChainId) => chainId is PortalsSupportedChainId;
3
+ export declare const isSupportedChainId: (chainId: ChainId) => chainId is import("@shapeshiftoss/types").KnownChainIds;
4
4
  export declare const getPortalsRouterAddressByChainId: (chainId: PortalsSupportedChainId) => string;
@@ -1,45 +1,7 @@
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';
2
1
  import { TradeQuoteError } from '../../types';
3
2
  import { RelayErrorCode } from './utils/types';
4
3
  export declare const chainIdToRelayChainId: {
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;
4
+ [x: string]: number;
43
5
  };
44
6
  export declare enum RelayStatusMessage {
45
7
  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';
4
4
  import type { RelayFetchQuoteParams, RelayQuote } from './types';
5
- export declare const fetchRelayTrade: <T extends "quote" | "rate">(params: RelayFetchQuoteParams<T>, config: SwapperConfig) => Promise<Result<AxiosResponse<RelayQuote, any>, SwapErrorRight>>;
5
+ export declare const fetchRelayTrade: <T extends "rate" | "quote">(params: RelayFetchQuoteParams<T>, config: SwapperConfig) => Promise<Result<AxiosResponse<RelayQuote, any>, SwapErrorRight>>;
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
35
25
  Object.defineProperty(exports, "__esModule", { value: true });
36
26
  exports.getRelayPsbtRelayer = void 0;
37
27
  const bitcoin = __importStar(require("@shapeshiftoss/bitcoinjs-lib"));
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getTrade = getTrade;
6
+ exports.getTrade = void 0;
7
7
  const caip_1 = require("@shapeshiftoss/caip");
8
8
  const chain_adapters_1 = require("@shapeshiftoss/chain-adapters");
9
9
  const utils_1 = require("@shapeshiftoss/utils");
@@ -575,3 +575,4 @@ async function getTrade({ input, deps, relayChainMap, }) {
575
575
  };
576
576
  return (0, monads_1.Ok)([tradeRate]);
577
577
  }
578
+ exports.getTrade = getTrade;
@@ -1,5 +1,5 @@
1
1
  export declare const relayService: {
2
- get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
3
- post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
4
- delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
2
+ get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T, any, {}>, import("../../..").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("../../..").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("../../..").SwapErrorRight>>;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getQuoteOrRate = getQuoteOrRate;
3
+ exports.getQuoteOrRate = void 0;
4
4
  const caip_1 = require("@shapeshiftoss/caip");
5
5
  const utils_1 = require("@shapeshiftoss/utils");
6
6
  const monads_1 = require("@sniptt/monads");
@@ -211,3 +211,4 @@ async function getQuoteOrRate(input, deps) {
211
211
  }));
212
212
  }
213
213
  }
214
+ exports.getQuoteOrRate = getQuoteOrRate;
@@ -1,5 +1,4 @@
1
1
  import type { AssetId } from '@shapeshiftoss/caip';
2
- import { tronChainId } from '@shapeshiftoss/caip';
3
2
  export declare const isSupportedChainId: (chainId: string) => boolean;
4
3
  export declare const assetIdToTronToken: (assetId: AssetId) => string;
5
- export declare const isTronChainId: (chainId: string) => chainId is typeof tronChainId;
4
+ export declare const isTronChainId: (chainId: string) => chainId is import("@shapeshiftoss/caip").ChainId;