@shapeshiftoss/swapper 17.7.2 → 17.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/constants.js +35 -26
  3. package/dist/cjs/index.d.ts +1 -0
  4. package/dist/cjs/index.js +8 -17
  5. package/dist/cjs/swappers/AcrossSwapper/utils/acrossService.d.ts +3 -3
  6. package/dist/cjs/swappers/AcrossSwapper/utils/getTrade.js +2 -1
  7. package/dist/cjs/swappers/ArbitrumBridgeSwapper/endpoints.d.ts +3 -3
  8. package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeQuote/getTradeQuote.js +2 -2
  9. package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeQuote/getTradeQuote.test.js +12 -4
  10. package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeRate/getTradeRate.js +2 -1
  11. package/dist/cjs/swappers/ArbitrumBridgeSwapper/utils/fetchArbitrumBridgeSwap.d.ts +2 -2
  12. package/dist/cjs/swappers/AvnuSwapper/endpoints.js +2 -2
  13. package/dist/cjs/swappers/AvnuSwapper/utils/constants.d.ts +1 -1
  14. package/dist/cjs/swappers/BebopSwapper/getBebopSolanaTradeQuote/getBebopSolanaTradeQuote.js +2 -1
  15. package/dist/cjs/swappers/BebopSwapper/getBebopSolanaTradeRate/getBebopSolanaTradeRate.js +11 -6
  16. package/dist/cjs/swappers/BebopSwapper/getBebopTradeQuote/getBebopTradeQuote.js +4 -11
  17. package/dist/cjs/swappers/BebopSwapper/getBebopTradeRate/getBebopTradeRate.js +12 -15
  18. package/dist/cjs/swappers/BebopSwapper/types.d.ts +65 -79
  19. package/dist/cjs/swappers/BebopSwapper/utils/bebopService.d.ts +1 -1
  20. package/dist/cjs/swappers/BebopSwapper/utils/fetchFromBebop.d.ts +2 -18
  21. package/dist/cjs/swappers/BebopSwapper/utils/fetchFromBebop.js +49 -82
  22. package/dist/cjs/swappers/BebopSwapper/utils/helpers/helpers.d.ts +1 -2
  23. package/dist/cjs/swappers/BobGatewaySwapper/BobGatewaySwapper.d.ts +2 -0
  24. package/dist/cjs/swappers/BobGatewaySwapper/BobGatewaySwapper.js +8 -0
  25. package/dist/cjs/swappers/BobGatewaySwapper/endpoints.d.ts +2 -0
  26. package/dist/cjs/swappers/BobGatewaySwapper/endpoints.js +143 -0
  27. package/dist/cjs/swappers/BobGatewaySwapper/index.d.ts +3 -0
  28. package/dist/cjs/swappers/BobGatewaySwapper/index.js +22 -0
  29. package/dist/cjs/swappers/BobGatewaySwapper/swapperApi/getTradeQuote.d.ts +3 -0
  30. package/dist/cjs/swappers/BobGatewaySwapper/swapperApi/getTradeQuote.js +90 -0
  31. package/dist/cjs/swappers/BobGatewaySwapper/swapperApi/getTradeRate.d.ts +3 -0
  32. package/dist/cjs/swappers/BobGatewaySwapper/swapperApi/getTradeRate.js +73 -0
  33. package/dist/cjs/swappers/BobGatewaySwapper/types.d.ts +20 -0
  34. package/dist/cjs/swappers/BobGatewaySwapper/types.js +2 -0
  35. package/dist/cjs/swappers/BobGatewaySwapper/utils/constants.d.ts +13 -0
  36. package/dist/cjs/swappers/BobGatewaySwapper/utils/constants.js +31 -0
  37. package/dist/cjs/swappers/BobGatewaySwapper/utils/helpers.d.ts +49 -0
  38. package/dist/cjs/swappers/BobGatewaySwapper/utils/helpers.js +314 -0
  39. package/dist/cjs/swappers/ButterSwap/swapperApi/checkTradeStatus.test.js +9 -19
  40. package/dist/cjs/swappers/ButterSwap/swapperApi/getTradeQuote.js +1 -1
  41. package/dist/cjs/swappers/ButterSwap/test-data/routeQuote.js +4 -4
  42. package/dist/cjs/swappers/ButterSwap/utils/butterSwapHistoryService.d.ts +3 -3
  43. package/dist/cjs/swappers/ButterSwap/utils/butterSwapService.d.ts +3 -3
  44. package/dist/cjs/swappers/ButterSwap/xhr.js +4 -4
  45. package/dist/cjs/swappers/CetusSwapper/utils/constants.d.ts +1 -1
  46. package/dist/cjs/swappers/ChainflipSwapper/ChainflipSwapper.js +1 -0
  47. package/dist/cjs/swappers/ChainflipSwapper/constants.d.ts +1 -1
  48. package/dist/cjs/swappers/ChainflipSwapper/constants.js +3 -0
  49. package/dist/cjs/swappers/ChainflipSwapper/endpoints.js +20 -0
  50. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteBoostQuote.js +5 -4
  51. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteEstimatedDurationsSeconds.js +5 -4
  52. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteQuote.js +5 -5
  53. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteQuoteFee.js +5 -5
  54. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusChunkInfo.js +5 -4
  55. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusDca.js +5 -4
  56. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusEgress.js +5 -4
  57. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusSwap.js +5 -4
  58. package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasSwapDepositAddress.js +5 -4
  59. package/dist/cjs/swappers/ChainflipSwapper/types.d.ts +2 -1
  60. package/dist/cjs/swappers/ChainflipSwapper/types.js +1 -0
  61. package/dist/cjs/swappers/ChainflipSwapper/utils/chainflipService.d.ts +3 -3
  62. package/dist/cjs/swappers/ChainflipSwapper/utils/getQuoteOrRate.js +25 -5
  63. package/dist/cjs/swappers/ChainflipSwapper/utils/getUtxoTxFees.d.ts +1 -1
  64. package/dist/cjs/swappers/ChainflipSwapper/utils/helpers.d.ts +2 -3
  65. package/dist/cjs/swappers/ChainflipSwapper/utils/helpers.js +2 -1
  66. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.js +3 -2
  67. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.test.js +8 -8
  68. package/dist/cjs/swappers/CowSwapper/getCowSwapTradeRate/getCowSwapTradeRate.js +3 -2
  69. package/dist/cjs/swappers/CowSwapper/utils/cowService.d.ts +3 -3
  70. package/dist/cjs/swappers/CowSwapper/utils/helpers/helpers.test.js +3 -3
  71. package/dist/cjs/swappers/DebridgeSwapper/utils/debridgeService.d.ts +3 -3
  72. package/dist/cjs/swappers/DebridgeSwapper/utils/getTrade.js +2 -1
  73. package/dist/cjs/swappers/NearIntentsSwapper/constants.d.ts +1 -0
  74. package/dist/cjs/swappers/NearIntentsSwapper/constants.js +2 -1
  75. package/dist/cjs/swappers/NearIntentsSwapper/swapperApi/getTradeQuote.js +5 -2
  76. package/dist/cjs/swappers/NearIntentsSwapper/utils/helpers/helpers.d.ts +2 -2
  77. package/dist/cjs/swappers/NearIntentsSwapper/utils/helpers/helpers.js +5 -1
  78. package/dist/cjs/swappers/PortalsSwapper/getPortalsTradeQuote/getPortalsTradeQuote.js +2 -1
  79. package/dist/cjs/swappers/PortalsSwapper/getPortalsTradeRate/getPortalsTradeRate.js +4 -3
  80. package/dist/cjs/swappers/PortalsSwapper/utils/helpers.d.ts +1 -1
  81. package/dist/cjs/swappers/RelaySwapper/constant.d.ts +1 -39
  82. package/dist/cjs/swappers/RelaySwapper/constant.js +1 -1
  83. package/dist/cjs/swappers/RelaySwapper/utils/fetchRelayTrade.d.ts +1 -1
  84. package/dist/cjs/swappers/RelaySwapper/utils/getRelayPsbtRelayer.js +7 -17
  85. package/dist/cjs/swappers/RelaySwapper/utils/getTrade.js +2 -1
  86. package/dist/cjs/swappers/RelaySwapper/utils/relayService.d.ts +3 -3
  87. package/dist/cjs/swappers/SunioSwapper/endpoints.js +19 -36
  88. package/dist/cjs/swappers/SunioSwapper/utils/buildSwapContractCall.d.ts +6 -0
  89. package/dist/cjs/swappers/SunioSwapper/utils/buildSwapContractCall.js +33 -0
  90. package/dist/cjs/swappers/SunioSwapper/utils/buildSwapRouteParameters.js +6 -6
  91. package/dist/cjs/swappers/SunioSwapper/utils/constants.d.ts +2 -0
  92. package/dist/cjs/swappers/SunioSwapper/utils/constants.js +7 -1
  93. package/dist/cjs/swappers/SunioSwapper/utils/estimateSunioNetworkFee.d.ts +12 -0
  94. package/dist/cjs/swappers/SunioSwapper/utils/estimateSunioNetworkFee.js +78 -0
  95. package/dist/cjs/swappers/SunioSwapper/utils/getQuoteOrRate.js +18 -75
  96. package/dist/cjs/swappers/SunioSwapper/utils/getSunioTransactionFees.d.ts +2 -0
  97. package/dist/cjs/swappers/SunioSwapper/utils/getSunioTransactionFees.js +36 -0
  98. package/dist/cjs/swappers/SunioSwapper/utils/helpers/helpers.d.ts +1 -2
  99. package/dist/cjs/swappers/SunioSwapper/utils/sunioService.d.ts +3 -3
  100. package/dist/cjs/swappers/ThorchainSwapper/getTradeQuote/getTradeQuote.test.js +10 -0
  101. package/dist/cjs/swappers/ThorchainSwapper/utils/getL1ToLongtailQuote.js +8 -18
  102. package/dist/cjs/swappers/ThorchainSwapper/utils/getL1ToLongtailRate.js +8 -18
  103. package/dist/cjs/swappers/ThorchainSwapper/utils/getLongtailQuote.js +1 -1
  104. package/dist/cjs/swappers/ThorchainSwapper/utils/getLongtailRate.js +1 -1
  105. package/dist/cjs/swappers/ThorchainSwapper/utils/longTailHelpers.js +2 -2
  106. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeQuote/getZrxTradeQuote.js +2 -1
  107. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeQuote/getZrxTradeQuote.test.js +7 -17
  108. package/dist/cjs/swappers/ZrxSwapper/getZrxTradeRate/getZrxTradeRate.js +2 -1
  109. package/dist/cjs/swappers/ZrxSwapper/utils/fetchFromZrx.js +2 -2
  110. package/dist/cjs/swappers/ZrxSwapper/utils/helpers/helpers.d.ts +3 -2
  111. package/dist/cjs/swappers/ZrxSwapper/utils/zrxService.d.ts +1 -1
  112. package/dist/cjs/swappers/utils/helpers/helpers.js +1 -0
  113. package/dist/cjs/swappers/utils/test-data/cryptoMarketDataById.d.ts +1 -35
  114. package/dist/cjs/thorchain-utils/checkTradeStatus.js +8 -1
  115. package/dist/cjs/thorchain-utils/cosmossdk/getThorTxData.d.ts +12 -0
  116. package/dist/cjs/thorchain-utils/cosmossdk/getThorTxData.js +19 -0
  117. package/dist/cjs/thorchain-utils/cosmossdk/index.d.ts +1 -0
  118. package/dist/cjs/thorchain-utils/cosmossdk/index.js +1 -0
  119. package/dist/cjs/thorchain-utils/getCallDataFromQuote.d.ts +1 -1
  120. package/dist/cjs/thorchain-utils/getL1RateOrQuote.js +51 -33
  121. package/dist/cjs/thorchain-utils/getQuote.js +27 -29
  122. package/dist/cjs/thorchain-utils/index.d.ts +1 -0
  123. package/dist/cjs/thorchain-utils/index.js +19 -18
  124. package/dist/cjs/thorchain-utils/parseBuyTxHash.d.ts +1 -1
  125. package/dist/cjs/thorchain-utils/service.d.ts +3 -3
  126. package/dist/cjs/thorchain-utils/tron/getTronTransactionFees.js +8 -5
  127. package/dist/cjs/thorchain-utils/types.d.ts +1 -1
  128. package/dist/cjs/tron-utils/getTronTransactionFees.d.ts +1 -1
  129. package/dist/cjs/types.d.ts +16 -3
  130. package/dist/cjs/types.js +5 -0
  131. package/dist/cjs/utils/tenderly/storageSlots.js +20 -20
  132. package/dist/cjs/utils.d.ts +4 -4
  133. package/dist/esm/.tsbuildinfo +1 -1
  134. package/dist/esm/constants.js +9 -0
  135. package/dist/esm/index.d.ts +1 -0
  136. package/dist/esm/index.js +1 -0
  137. package/dist/esm/swappers/AcrossSwapper/utils/acrossService.d.ts +3 -3
  138. package/dist/esm/swappers/ArbitrumBridgeSwapper/endpoints.d.ts +3 -3
  139. package/dist/esm/swappers/ArbitrumBridgeSwapper/getTradeQuote/getTradeQuote.test.js +12 -4
  140. package/dist/esm/swappers/ArbitrumBridgeSwapper/utils/fetchArbitrumBridgeSwap.d.ts +2 -2
  141. package/dist/esm/swappers/AvnuSwapper/endpoints.js +2 -2
  142. package/dist/esm/swappers/AvnuSwapper/utils/constants.d.ts +1 -1
  143. package/dist/esm/swappers/BebopSwapper/getBebopSolanaTradeRate/getBebopSolanaTradeRate.js +10 -6
  144. package/dist/esm/swappers/BebopSwapper/getBebopTradeQuote/getBebopTradeQuote.js +2 -10
  145. package/dist/esm/swappers/BebopSwapper/getBebopTradeRate/getBebopTradeRate.js +11 -15
  146. package/dist/esm/swappers/BebopSwapper/types.d.ts +65 -79
  147. package/dist/esm/swappers/BebopSwapper/utils/bebopService.d.ts +1 -1
  148. package/dist/esm/swappers/BebopSwapper/utils/fetchFromBebop.d.ts +2 -18
  149. package/dist/esm/swappers/BebopSwapper/utils/fetchFromBebop.js +45 -76
  150. package/dist/esm/swappers/BebopSwapper/utils/helpers/helpers.d.ts +1 -2
  151. package/dist/esm/swappers/BobGatewaySwapper/BobGatewaySwapper.d.ts +2 -0
  152. package/dist/esm/swappers/BobGatewaySwapper/BobGatewaySwapper.js +5 -0
  153. package/dist/esm/swappers/BobGatewaySwapper/endpoints.d.ts +2 -0
  154. package/dist/esm/swappers/BobGatewaySwapper/endpoints.js +140 -0
  155. package/dist/esm/swappers/BobGatewaySwapper/index.d.ts +3 -0
  156. package/dist/esm/swappers/BobGatewaySwapper/index.js +3 -0
  157. package/dist/esm/swappers/BobGatewaySwapper/swapperApi/getTradeQuote.d.ts +3 -0
  158. package/dist/esm/swappers/BobGatewaySwapper/swapperApi/getTradeQuote.js +86 -0
  159. package/dist/esm/swappers/BobGatewaySwapper/swapperApi/getTradeRate.d.ts +3 -0
  160. package/dist/esm/swappers/BobGatewaySwapper/swapperApi/getTradeRate.js +69 -0
  161. package/dist/esm/swappers/BobGatewaySwapper/types.d.ts +20 -0
  162. package/dist/esm/swappers/BobGatewaySwapper/utils/constants.d.ts +13 -0
  163. package/dist/esm/swappers/BobGatewaySwapper/utils/constants.js +27 -0
  164. package/dist/esm/swappers/BobGatewaySwapper/utils/helpers.d.ts +49 -0
  165. package/dist/esm/swappers/BobGatewaySwapper/utils/helpers.js +299 -0
  166. package/dist/esm/swappers/ButterSwap/swapperApi/checkTradeStatus.test.js +2 -2
  167. package/dist/esm/swappers/ButterSwap/swapperApi/getTradeQuote.js +1 -1
  168. package/dist/esm/swappers/ButterSwap/test-data/routeQuote.js +4 -4
  169. package/dist/esm/swappers/ButterSwap/utils/butterSwapHistoryService.d.ts +3 -3
  170. package/dist/esm/swappers/ButterSwap/utils/butterSwapService.d.ts +3 -3
  171. package/dist/esm/swappers/CetusSwapper/utils/constants.d.ts +1 -1
  172. package/dist/esm/swappers/ChainflipSwapper/ChainflipSwapper.js +2 -1
  173. package/dist/esm/swappers/ChainflipSwapper/constants.d.ts +1 -1
  174. package/dist/esm/swappers/ChainflipSwapper/constants.js +4 -1
  175. package/dist/esm/swappers/ChainflipSwapper/endpoints.js +20 -0
  176. package/dist/esm/swappers/ChainflipSwapper/types.d.ts +2 -1
  177. package/dist/esm/swappers/ChainflipSwapper/types.js +1 -0
  178. package/dist/esm/swappers/ChainflipSwapper/utils/chainflipService.d.ts +3 -3
  179. package/dist/esm/swappers/ChainflipSwapper/utils/getQuoteOrRate.js +26 -6
  180. package/dist/esm/swappers/ChainflipSwapper/utils/getUtxoTxFees.d.ts +1 -1
  181. package/dist/esm/swappers/ChainflipSwapper/utils/helpers.d.ts +2 -3
  182. package/dist/esm/swappers/ChainflipSwapper/utils/helpers.js +2 -1
  183. package/dist/esm/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.js +1 -1
  184. package/dist/esm/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.test.js +8 -8
  185. package/dist/esm/swappers/CowSwapper/getCowSwapTradeRate/getCowSwapTradeRate.js +1 -1
  186. package/dist/esm/swappers/CowSwapper/utils/cowService.d.ts +3 -3
  187. package/dist/esm/swappers/CowSwapper/utils/helpers/helpers.test.js +3 -3
  188. package/dist/esm/swappers/DebridgeSwapper/utils/debridgeService.d.ts +3 -3
  189. package/dist/esm/swappers/NearIntentsSwapper/constants.d.ts +1 -0
  190. package/dist/esm/swappers/NearIntentsSwapper/constants.js +1 -0
  191. package/dist/esm/swappers/NearIntentsSwapper/swapperApi/getTradeQuote.js +7 -4
  192. package/dist/esm/swappers/NearIntentsSwapper/utils/helpers/helpers.d.ts +2 -2
  193. package/dist/esm/swappers/NearIntentsSwapper/utils/helpers/helpers.js +5 -1
  194. package/dist/esm/swappers/PortalsSwapper/getPortalsTradeRate/getPortalsTradeRate.js +2 -2
  195. package/dist/esm/swappers/PortalsSwapper/utils/helpers.d.ts +1 -1
  196. package/dist/esm/swappers/RelaySwapper/constant.d.ts +1 -39
  197. package/dist/esm/swappers/RelaySwapper/constant.js +1 -1
  198. package/dist/esm/swappers/RelaySwapper/utils/fetchRelayTrade.d.ts +1 -1
  199. package/dist/esm/swappers/RelaySwapper/utils/relayService.d.ts +3 -3
  200. package/dist/esm/swappers/SunioSwapper/endpoints.js +19 -36
  201. package/dist/esm/swappers/SunioSwapper/utils/buildSwapContractCall.d.ts +6 -0
  202. package/dist/esm/swappers/SunioSwapper/utils/buildSwapContractCall.js +29 -0
  203. package/dist/esm/swappers/SunioSwapper/utils/buildSwapRouteParameters.js +6 -6
  204. package/dist/esm/swappers/SunioSwapper/utils/constants.d.ts +2 -0
  205. package/dist/esm/swappers/SunioSwapper/utils/constants.js +6 -0
  206. package/dist/esm/swappers/SunioSwapper/utils/estimateSunioNetworkFee.d.ts +12 -0
  207. package/dist/esm/swappers/SunioSwapper/utils/estimateSunioNetworkFee.js +74 -0
  208. package/dist/esm/swappers/SunioSwapper/utils/getQuoteOrRate.js +16 -74
  209. package/dist/esm/swappers/SunioSwapper/utils/getSunioTransactionFees.d.ts +2 -0
  210. package/dist/esm/swappers/SunioSwapper/utils/getSunioTransactionFees.js +32 -0
  211. package/dist/esm/swappers/SunioSwapper/utils/helpers/helpers.d.ts +1 -2
  212. package/dist/esm/swappers/SunioSwapper/utils/sunioService.d.ts +3 -3
  213. package/dist/esm/swappers/ThorchainSwapper/getTradeQuote/getTradeQuote.test.js +10 -0
  214. package/dist/esm/swappers/ThorchainSwapper/utils/getL1ToLongtailQuote.js +1 -1
  215. package/dist/esm/swappers/ThorchainSwapper/utils/getL1ToLongtailRate.js +1 -1
  216. package/dist/esm/swappers/ThorchainSwapper/utils/getLongtailQuote.js +1 -1
  217. package/dist/esm/swappers/ThorchainSwapper/utils/getLongtailRate.js +1 -1
  218. package/dist/esm/swappers/ZrxSwapper/utils/fetchFromZrx.js +2 -2
  219. package/dist/esm/swappers/ZrxSwapper/utils/helpers/helpers.d.ts +3 -2
  220. package/dist/esm/swappers/ZrxSwapper/utils/zrxService.d.ts +1 -1
  221. package/dist/esm/swappers/utils/helpers/helpers.js +2 -1
  222. package/dist/esm/swappers/utils/test-data/cryptoMarketDataById.d.ts +1 -35
  223. package/dist/esm/thorchain-utils/checkTradeStatus.js +8 -1
  224. package/dist/esm/thorchain-utils/cosmossdk/getThorTxData.d.ts +12 -0
  225. package/dist/esm/thorchain-utils/cosmossdk/getThorTxData.js +15 -0
  226. package/dist/esm/thorchain-utils/cosmossdk/index.d.ts +1 -0
  227. package/dist/esm/thorchain-utils/cosmossdk/index.js +1 -0
  228. package/dist/esm/thorchain-utils/getCallDataFromQuote.d.ts +1 -1
  229. package/dist/esm/thorchain-utils/getL1RateOrQuote.js +44 -16
  230. package/dist/esm/thorchain-utils/getQuote.js +27 -29
  231. package/dist/esm/thorchain-utils/index.d.ts +1 -0
  232. package/dist/esm/thorchain-utils/index.js +11 -1
  233. package/dist/esm/thorchain-utils/parseBuyTxHash.d.ts +1 -1
  234. package/dist/esm/thorchain-utils/service.d.ts +3 -3
  235. package/dist/esm/thorchain-utils/tron/getTronTransactionFees.js +8 -5
  236. package/dist/esm/thorchain-utils/types.d.ts +1 -1
  237. package/dist/esm/tron-utils/getTronTransactionFees.d.ts +1 -1
  238. package/dist/esm/types.d.ts +16 -3
  239. package/dist/esm/types.js +5 -0
  240. package/dist/esm/utils/tenderly/storageSlots.js +20 -20
  241. package/dist/esm/utils.d.ts +4 -4
  242. package/package.json +8 -7
  243. package/dist/cjs/swappers/SunioSwapper/utils/buildSwapTransaction.d.ts +0 -11
  244. package/dist/cjs/swappers/SunioSwapper/utils/buildSwapTransaction.js +0 -57
  245. package/dist/cjs/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.d.ts +0 -11
  246. package/dist/cjs/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.js +0 -40
  247. package/dist/cjs/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.test.js +0 -94
  248. package/dist/esm/swappers/SunioSwapper/utils/buildSwapTransaction.d.ts +0 -11
  249. package/dist/esm/swappers/SunioSwapper/utils/buildSwapTransaction.js +0 -53
  250. package/dist/esm/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.d.ts +0 -11
  251. package/dist/esm/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.js +0 -34
  252. package/dist/esm/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.test.d.ts +0 -1
  253. package/dist/esm/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.test.js +0 -92
  254. /package/dist/{cjs/thorchain-utils/getThresholdedAffiliateBps/getThresholdedAffiliateBps.test.d.ts → esm/swappers/BobGatewaySwapper/types.js} +0 -0
@@ -7,6 +7,8 @@ import { avnuSwapper } from './swappers/AvnuSwapper/AvnuSwapper.js';
7
7
  import { avnuApi } from './swappers/AvnuSwapper/endpoints.js';
8
8
  import { bebopSwapper } from './swappers/BebopSwapper/BebopSwapper.js';
9
9
  import { bebopApi } from './swappers/BebopSwapper/endpoints.js';
10
+ import { bobGatewaySwapper } from './swappers/BobGatewaySwapper/BobGatewaySwapper.js';
11
+ import { bobGatewayApi } from './swappers/BobGatewaySwapper/endpoints.js';
10
12
  import { butterSwap } from './swappers/ButterSwap/ButterSwap.js';
11
13
  import { butterSwapApi } from './swappers/ButterSwap/endpoints.js';
12
14
  import { cetusSwapper } from './swappers/CetusSwapper/CetusSwapper.js';
@@ -111,6 +113,10 @@ export const swappers = {
111
113
  ...debridgeSwapper,
112
114
  ...debridgeApi,
113
115
  },
116
+ [SwapperName.BobGateway]: {
117
+ ...bobGatewaySwapper,
118
+ ...bobGatewayApi,
119
+ },
114
120
  [SwapperName.Test]: undefined,
115
121
  };
116
122
  const DEFAULT_SLIPPAGE_DECIMAL_PERCENTAGE = '0.002';
@@ -129,6 +135,7 @@ const DEFAULT_AVNU_SLIPPAGE_DECIMAL_PERCENTAGE = '0.02';
129
135
  const DEFAULT_STONFI_SLIPPAGE_DECIMAL_PERCENTAGE = '0.01';
130
136
  // deBridge API off-chain simulation overestimates output on some chains (e.g. SEI ~2.4%), so auto slippage (1%) is insufficient
131
137
  const DEFAULT_DEBRIDGE_SLIPPAGE_DECIMAL_PERCENTAGE = '0.03';
138
+ const DEFAULT_BOB_GATEWAY_SLIPPAGE_DECIMAL_PERCENTAGE = '0.03';
132
139
  export const getDefaultSlippageDecimalPercentageForSwapper = (swapperName) => {
133
140
  if (swapperName === undefined)
134
141
  return DEFAULT_SLIPPAGE_DECIMAL_PERCENTAGE;
@@ -167,6 +174,8 @@ export const getDefaultSlippageDecimalPercentageForSwapper = (swapperName) => {
167
174
  return DEFAULT_AVNU_SLIPPAGE_DECIMAL_PERCENTAGE;
168
175
  case SwapperName.Stonfi:
169
176
  return DEFAULT_STONFI_SLIPPAGE_DECIMAL_PERCENTAGE;
177
+ case SwapperName.BobGateway:
178
+ return DEFAULT_BOB_GATEWAY_SLIPPAGE_DECIMAL_PERCENTAGE;
170
179
  default:
171
180
  return assertUnreachable(swapperName);
172
181
  }
@@ -3,6 +3,7 @@ export * from './cowswap-utils/index.js';
3
3
  export * from './safe-utils/index.js';
4
4
  export * from './swapper.js';
5
5
  export * from './swappers/ArbitrumBridgeSwapper/index.js';
6
+ export * from './swappers/BobGatewaySwapper/index.js';
6
7
  export * from './swappers/AvnuSwapper/index.js';
7
8
  export * from './swappers/BebopSwapper/index.js';
8
9
  export * from './swappers/CetusSwapper/index.js';
package/dist/esm/index.js CHANGED
@@ -3,6 +3,7 @@ export * from './cowswap-utils/index.js';
3
3
  export * from './safe-utils/index.js';
4
4
  export * from './swapper.js';
5
5
  export * from './swappers/ArbitrumBridgeSwapper/index.js';
6
+ export * from './swappers/BobGatewaySwapper/index.js';
6
7
  export * from './swappers/AvnuSwapper/index.js';
7
8
  export * from './swappers/BebopSwapper/index.js';
8
9
  export * from './swappers/CetusSwapper/index.js';
@@ -1,5 +1,5 @@
1
1
  export declare const acrossService: {
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>>;
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>>;
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;
8
+ isClassic?: boolean | undefined;
9
9
  }) => Promise<{
10
- isClassic?: boolean;
11
- parentToChildMsg?: ParentToChildMessageReaderClassic | ParentToChildMessageReader;
10
+ isClassic?: boolean | undefined;
11
+ parentToChildMsg?: ParentToChildMessageReaderClassic | ParentToChildMessageReader | undefined;
12
12
  } | undefined>;
13
13
  export declare const arbitrumBridgeApi: SwapperApi;
@@ -51,7 +51,9 @@ describe('getTradeQuote', () => {
51
51
  },
52
52
  }),
53
53
  };
54
- vi.mocked(EthBridger).mockReturnValue(ethBridgerMock);
54
+ vi.mocked(EthBridger).mockImplementation(function () {
55
+ return ethBridgerMock;
56
+ });
55
57
  const maybeQuote = await getTradeQuote(commonInput, {
56
58
  assertGetEvmChainAdapter,
57
59
  getEthersV5Provider: vi.fn(),
@@ -74,7 +76,9 @@ describe('getTradeQuote', () => {
74
76
  },
75
77
  }),
76
78
  };
77
- vi.mocked(EthBridger).mockReturnValue(ethBridgerMock);
79
+ vi.mocked(EthBridger).mockImplementation(function () {
80
+ return ethBridgerMock;
81
+ });
78
82
  const withdrawInput = {
79
83
  ...commonInput,
80
84
  sellAsset: ETH_ARBITRUM,
@@ -109,7 +113,9 @@ describe('getTradeQuote', () => {
109
113
  .fn()
110
114
  .mockResolvedValue('0x0c66f315542fdec1d312c415b14eef614b0910ef'),
111
115
  };
112
- vi.mocked(Erc20Bridger).mockReturnValue(Erc20BridgerMock);
116
+ vi.mocked(Erc20Bridger).mockImplementation(function () {
117
+ return Erc20BridgerMock;
118
+ });
113
119
  const erc20DepositInput = {
114
120
  ...commonInput,
115
121
  sellAsset: FOX_MAINNET,
@@ -144,7 +150,9 @@ describe('getTradeQuote', () => {
144
150
  .fn()
145
151
  .mockResolvedValue('0x0c66f315542fdec1d312c415b14eef614b0910ef'),
146
152
  };
147
- vi.mocked(Erc20Bridger).mockReturnValue(Erc20BridgerMock);
153
+ vi.mocked(Erc20Bridger).mockImplementation(function () {
154
+ return Erc20BridgerMock;
155
+ });
148
156
  const erc20WithdrawInput = {
149
157
  ...commonInput,
150
158
  sellAsset: FOX_ARBITRUM,
@@ -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, // L1
149
- feeDataAvailabilityMode: 0, // L1
148
+ nonceDataAvailabilityMode: 0,
149
+ feeDataAvailabilityMode: 0,
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 (typeof AVNU_SUPPORTED_CHAIN_IDS)[number];
3
+ export declare const isSupportedChainId: (chainId: ChainId) => chainId is ChainId;
4
4
  export declare const DEFAULT_SLIPPAGE_PERCENTAGE = "0.005";
5
5
  export declare const AVNU_API_BASE_URL = "https://starknet.api.avnu.fi";
@@ -3,7 +3,8 @@ import { v4 as uuid } from 'uuid';
3
3
  import { getDefaultSlippageDecimalPercentageForSwapper } from '../../../constants.js';
4
4
  import { SwapperName, TradeQuoteError } from '../../../types.js';
5
5
  import { makeSwapErrorRight } from '../../../utils.js';
6
- import { fetchBebopSolanaPrice } from '../utils/fetchFromBebop.js';
6
+ import { BEBOP_SOLANA_DUMMY_ADDRESS } from '../types.js';
7
+ import { fetchBebopSolanaQuote } from '../utils/fetchFromBebop.js';
7
8
  import { assertValidTrade, calculateRate, isBebopSolanaTxSafe } from '../utils/helpers/helpers.js';
8
9
  export async function getBebopSolanaTradeRate(input, _assetsById, apiKey) {
9
10
  const { sellAsset, buyAsset, accountNumber, receiveAddress, affiliateBps, sellAmountIncludingProtocolFeesCryptoBaseUnit, } = input;
@@ -12,17 +13,20 @@ export async function getBebopSolanaTradeRate(input, _assetsById, apiKey) {
12
13
  return Err(assertion.unwrapErr());
13
14
  const slippageTolerancePercentageDecimal = input.slippageTolerancePercentageDecimal ??
14
15
  getDefaultSlippageDecimalPercentageForSwapper(SwapperName.Bebop);
15
- const maybeBebopPriceResponse = await fetchBebopSolanaPrice({
16
+ const address = receiveAddress ?? BEBOP_SOLANA_DUMMY_ADDRESS;
17
+ const maybeBebopQuoteResponse = await fetchBebopSolanaQuote({
16
18
  buyAsset,
17
19
  sellAsset,
18
20
  sellAmountIncludingProtocolFeesCryptoBaseUnit,
19
- receiveAddress,
21
+ takerAddress: address,
22
+ receiverAddress: address,
23
+ slippageTolerancePercentageDecimal,
20
24
  affiliateBps,
21
25
  apiKey,
22
26
  });
23
- if (maybeBebopPriceResponse.isErr())
24
- return Err(maybeBebopPriceResponse.unwrapErr());
25
- const bebopPriceResponse = maybeBebopPriceResponse.unwrap();
27
+ if (maybeBebopQuoteResponse.isErr())
28
+ return Err(maybeBebopQuoteResponse.unwrapErr());
29
+ const bebopPriceResponse = maybeBebopQuoteResponse.unwrap();
26
30
  const sellTokenAddress = Object.keys(bebopPriceResponse.sellTokens)[0];
27
31
  const buyTokenAddress = Object.keys(bebopPriceResponse.buyTokens)[0];
28
32
  if (!sellTokenAddress || !buyTokenAddress) {
@@ -37,15 +37,7 @@ export async function getBebopTradeQuote(input, assertGetEvmChainAdapter, _asset
37
37
  });
38
38
  if (maybeBebopQuoteResponse.isErr())
39
39
  return Err(maybeBebopQuoteResponse.unwrapErr());
40
- const bebopQuoteResponse = maybeBebopQuoteResponse.unwrap();
41
- const bestRoute = bebopQuoteResponse.routes.find(r => r.type === bebopQuoteResponse.bestPrice);
42
- if (!bestRoute || !bestRoute.quote) {
43
- return Err(makeSwapErrorRight({
44
- message: 'No best route found',
45
- code: TradeQuoteError.NoRouteFound,
46
- }));
47
- }
48
- const quote = bestRoute.quote;
40
+ const quote = maybeBebopQuoteResponse.unwrap();
49
41
  const sellTokenAddress = Object.keys(quote.sellTokens)[0];
50
42
  const buyTokenAddress = Object.keys(quote.buyTokens)[0];
51
43
  if (!isAddress(sellTokenAddress) || !isAddress(buyTokenAddress)) {
@@ -92,7 +84,7 @@ export async function getBebopTradeQuote(input, assertGetEvmChainAdapter, _asset
92
84
  accountNumber,
93
85
  rate,
94
86
  feeData: {
95
- protocolFees: {}, // Bebop doesn't charge protocol fees
87
+ protocolFees: {},
96
88
  networkFeeCryptoBaseUnit,
97
89
  },
98
90
  buyAmountBeforeFeesCryptoBaseUnit,
@@ -8,7 +8,8 @@ import { SwapperName, TradeQuoteError } from '../../../types.js';
8
8
  import { makeSwapErrorRight } from '../../../utils.js';
9
9
  import { buildAffiliateFee } from '../../utils/affiliateFee.js';
10
10
  import { isNativeEvmAsset } from '../../utils/helpers/helpers.js';
11
- import { fetchBebopPrice } from '../utils/fetchFromBebop.js';
11
+ import { BEBOP_DUMMY_ADDRESS } from '../types.js';
12
+ import { fetchBebopQuote } from '../utils/fetchFromBebop.js';
12
13
  import { assertValidTrade, calculateRate } from '../utils/helpers/helpers.js';
13
14
  export async function getBebopTradeRate(input, assertGetEvmChainAdapter, _assetsById, apiKey) {
14
15
  const { sellAsset, buyAsset, accountNumber, receiveAddress, affiliateBps, sellAmountIncludingProtocolFeesCryptoBaseUnit, } = input;
@@ -17,25 +18,20 @@ export async function getBebopTradeRate(input, assertGetEvmChainAdapter, _assets
17
18
  return Err(assertion.unwrapErr());
18
19
  const slippageTolerancePercentageDecimal = input.slippageTolerancePercentageDecimal ??
19
20
  getDefaultSlippageDecimalPercentageForSwapper(SwapperName.Bebop);
20
- const maybeBebopPriceResponse = await fetchBebopPrice({
21
+ const address = receiveAddress ?? BEBOP_DUMMY_ADDRESS;
22
+ const maybeBebopQuoteResponse = await fetchBebopQuote({
21
23
  buyAsset,
22
24
  sellAsset,
23
25
  sellAmountIncludingProtocolFeesCryptoBaseUnit,
24
- receiveAddress,
26
+ takerAddress: address,
27
+ receiverAddress: address,
28
+ slippageTolerancePercentageDecimal,
25
29
  affiliateBps,
26
30
  apiKey,
27
31
  });
28
- if (maybeBebopPriceResponse.isErr())
29
- return Err(maybeBebopPriceResponse.unwrapErr());
30
- const bebopPriceResponse = maybeBebopPriceResponse.unwrap();
31
- const bestRoute = bebopPriceResponse.routes.find(r => r.type === bebopPriceResponse.bestPrice);
32
- if (!bestRoute || !bestRoute.quote) {
33
- return Err(makeSwapErrorRight({
34
- message: 'No best route found',
35
- code: TradeQuoteError.NoRouteFound,
36
- }));
37
- }
38
- const quote = bestRoute.quote;
32
+ if (maybeBebopQuoteResponse.isErr())
33
+ return Err(maybeBebopQuoteResponse.unwrapErr());
34
+ const quote = maybeBebopQuoteResponse.unwrap();
39
35
  const sellTokenAddress = Object.keys(quote.sellTokens)[0];
40
36
  const buyTokenAddress = Object.keys(quote.buyTokens)[0];
41
37
  if (!isAddress(sellTokenAddress) || !isAddress(buyTokenAddress)) {
@@ -76,7 +72,7 @@ export async function getBebopTradeRate(input, assertGetEvmChainAdapter, _assets
76
72
  accountNumber,
77
73
  rate,
78
74
  feeData: {
79
- protocolFees: {}, // Bebop doesn't charge protocol fees
75
+ protocolFees: {},
80
76
  networkFeeCryptoBaseUnit,
81
77
  },
82
78
  buyAmountBeforeFeesCryptoBaseUnit,
@@ -3,91 +3,77 @@ import type { Address, Hex } from 'viem';
3
3
  export declare const bebopSupportedEvmChainIds: readonly [KnownChainIds.EthereumMainnet, KnownChainIds.PolygonMainnet, KnownChainIds.ArbitrumMainnet, KnownChainIds.BaseMainnet, KnownChainIds.AvalancheMainnet, KnownChainIds.OptimismMainnet, KnownChainIds.BnbSmartChainMainnet];
4
4
  export declare const bebopSupportedChainIds: readonly [KnownChainIds.EthereumMainnet, KnownChainIds.PolygonMainnet, KnownChainIds.ArbitrumMainnet, KnownChainIds.BaseMainnet, KnownChainIds.AvalancheMainnet, KnownChainIds.OptimismMainnet, KnownChainIds.BnbSmartChainMainnet, KnownChainIds.SolanaMainnet];
5
5
  export type BebopSupportedChainId = (typeof bebopSupportedChainIds)[number];
6
- export type BebopQuoteRoute = {
6
+ export type BebopQuoteResponse = {
7
+ requestId: string;
7
8
  type: string;
8
- quote: {
9
- requestId: string;
10
- type: string;
11
- status: string;
12
- quoteId: string;
13
- chainId: number;
14
- approvalType: 'Standard' | 'Permit2';
15
- nativeToken: string;
16
- taker: Address;
17
- receiver: Address;
9
+ status: string;
10
+ quoteId: string;
11
+ chainId: number;
12
+ approvalType: 'Standard' | 'Permit' | 'Permit2';
13
+ nativeToken: string;
14
+ taker: Address;
15
+ receiver: Address;
16
+ expiry: number;
17
+ slippage: number;
18
+ gasFee: {
19
+ native: string;
20
+ usd: number;
21
+ };
22
+ buyTokens: Record<Address, {
23
+ amount: string;
24
+ decimals: number;
25
+ priceUsd: number;
26
+ symbol: string;
27
+ minimumAmount: string;
28
+ price: number;
29
+ priceBeforeFee: number;
30
+ amountBeforeFee: string;
31
+ deltaFromExpected: number;
32
+ }>;
33
+ sellTokens: Record<Address, {
34
+ amount: string;
35
+ decimals: number;
36
+ priceUsd: number;
37
+ symbol: string;
38
+ price: number;
39
+ priceBeforeFee: number;
40
+ }>;
41
+ settlementAddress: Address;
42
+ approvalTarget: Address;
43
+ requiredSignatures: string[];
44
+ priceImpact: number;
45
+ warnings: string[];
46
+ toSign: {
47
+ partner_id: number;
18
48
  expiry: number;
19
- slippage: number;
20
- gasFee: {
21
- native: string;
22
- usd: number;
23
- };
24
- buyTokens: Record<Address, {
25
- amount: string;
26
- decimals: number;
27
- priceUsd: number;
28
- symbol: string;
29
- minimumAmount: string;
30
- price: number;
31
- priceBeforeFee: number;
32
- amountBeforeFee: string;
33
- deltaFromExpected: number;
34
- }>;
35
- sellTokens: Record<Address, {
36
- amount: string;
37
- decimals: number;
38
- priceUsd: number;
39
- symbol: string;
40
- price: number;
41
- priceBeforeFee: number;
42
- }>;
43
- settlementAddress: Address;
44
- approvalTarget: Address;
45
- requiredSignatures: string[];
46
- priceImpact: number;
47
- warnings: string[];
48
- toSign: {
49
- partner_id: number;
50
- expiry: number;
51
- taker_address: Address;
52
- maker_address: Address;
53
- maker_nonce: string;
54
- taker_token: Address;
55
- maker_token: Address;
56
- taker_amount: string;
57
- maker_amount: string;
58
- receiver: Address;
59
- packed_commands: string;
60
- };
61
- onchainOrderType?: string;
62
- solver?: string;
63
- makers?: string[];
64
- partialFillOffset?: number;
65
- tx: {
66
- to: Address;
67
- from: Address;
68
- data: Hex;
69
- value: Hex;
70
- gas?: number;
71
- gasPrice?: number;
72
- };
73
- partnerFee?: Record<Address, string>;
74
- protocolFee?: Record<Address, string>;
49
+ taker_address: Address;
50
+ maker_address: Address;
51
+ maker_nonce: string;
52
+ taker_token: Address;
53
+ maker_token: Address;
54
+ taker_amount: string;
55
+ maker_amount: string;
56
+ receiver: Address;
57
+ packed_commands: string;
75
58
  };
76
- };
77
- export type BebopError = {
78
- errorCode: number;
79
- message: string;
80
- requestId: string;
81
- };
82
- export type BebopQuoteResponse = {
83
- routes: BebopQuoteRoute[];
84
- errors: Record<string, BebopError>;
85
- link: string;
86
- bestPrice: string;
59
+ onchainOrderType?: string;
60
+ solver?: string;
61
+ makers?: string[];
62
+ partialFillOffset?: number;
63
+ tx: {
64
+ to: Address;
65
+ from: Address;
66
+ data: Hex;
67
+ value: Hex;
68
+ gas?: number;
69
+ gasPrice?: number;
70
+ };
71
+ partnerFee?: Record<Address, string>;
72
+ protocolFee?: Record<Address, string>;
87
73
  };
88
74
  export declare const chainIdToBebopChain: Record<BebopSupportedChainId, string>;
89
75
  export declare const BEBOP_NATIVE_MARKER = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
90
- export declare const BEBOP_DUMMY_ADDRESS: Address;
76
+ export declare const BEBOP_DUMMY_ADDRESS: `0x${string}`;
91
77
  export declare const BEBOP_SOLANA_DUMMY_ADDRESS = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
92
78
  export type BebopSolanaQuoteResponse = {
93
79
  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;
7
+ wrapper?: AxiosInstanceHoF | undefined;
8
8
  }) => MonadicSwapperAxiosService;
9
9
  export {};
@@ -10,15 +10,7 @@ export declare const fetchBebopQuote: ({ buyAsset, sellAsset, sellAmountIncludin
10
10
  takerAddress: Address;
11
11
  receiverAddress: Address;
12
12
  slippageTolerancePercentageDecimal: string;
13
- affiliateBps?: string;
14
- apiKey: string;
15
- }) => Promise<Result<BebopQuoteResponse, SwapErrorRight>>;
16
- export declare const fetchBebopPrice: ({ buyAsset, sellAsset, sellAmountIncludingProtocolFeesCryptoBaseUnit, receiveAddress, affiliateBps, apiKey, }: {
17
- buyAsset: Asset;
18
- sellAsset: Asset;
19
- sellAmountIncludingProtocolFeesCryptoBaseUnit: string;
20
- receiveAddress: string | undefined;
21
- affiliateBps?: string;
13
+ affiliateBps?: string | undefined;
22
14
  apiKey: string;
23
15
  }) => Promise<Result<BebopQuoteResponse, SwapErrorRight>>;
24
16
  export declare const fetchBebopSolanaQuote: ({ buyAsset, sellAsset, sellAmountIncludingProtocolFeesCryptoBaseUnit, takerAddress, receiverAddress, slippageTolerancePercentageDecimal, affiliateBps, apiKey, }: {
@@ -28,14 +20,6 @@ export declare const fetchBebopSolanaQuote: ({ buyAsset, sellAsset, sellAmountIn
28
20
  takerAddress: string;
29
21
  receiverAddress: string;
30
22
  slippageTolerancePercentageDecimal: string;
31
- affiliateBps?: string;
32
- apiKey: string;
33
- }) => Promise<Result<BebopSolanaQuoteResponse, SwapErrorRight>>;
34
- export declare const fetchBebopSolanaPrice: ({ buyAsset, sellAsset, sellAmountIncludingProtocolFeesCryptoBaseUnit, receiveAddress, affiliateBps, apiKey, }: {
35
- buyAsset: Asset;
36
- sellAsset: Asset;
37
- sellAmountIncludingProtocolFeesCryptoBaseUnit: string;
38
- receiveAddress: string | undefined;
39
- affiliateBps?: string;
23
+ affiliateBps?: string | undefined;
40
24
  apiKey: string;
41
25
  }) => Promise<Result<BebopSolanaQuoteResponse, SwapErrorRight>>;