@wormhole-foundation/wormhole-connect 4.1.0-beta.0-development → 4.2.0-beta.0-development

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 (359) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{aptos-C9pj8h2Q.js → aptos-DgUCX7ng.js} +3 -3
  3. package/dist/assets/{evm-DCydYqBI.js → evm-B6bqAPTR.js} +4 -4
  4. package/dist/assets/{evm-CJXv6IQV.js → evm-Ve5nG8Fs.js} +1 -1
  5. package/dist/assets/{index-LvDsy6wR.js → index-BJokXZAc.js} +1 -1
  6. package/dist/assets/{index-BqxX-Ey7.js → index-BJv9sngo.js} +1 -1
  7. package/dist/assets/{index-C9cy4cDs.js → index-BjZMFLjq.js} +1 -1
  8. package/dist/assets/{index-FJ-n91Op.js → index-BwbPlAQZ.js} +1 -1
  9. package/dist/assets/{index-Clu5I99l.js → index-Bzg4DNh9.js} +1 -1
  10. package/dist/assets/{index-ezhfpCvx.js → index-CKXa657f.js} +1 -1
  11. package/dist/assets/index-CXiuP738.js +1 -0
  12. package/dist/assets/{index-CNExx9Zb.js → index-CvTvoHH-.js} +1 -1
  13. package/dist/assets/{index-C25bHdOM.js → index-D1ULRVbZ.js} +1 -1
  14. package/dist/assets/{index-DpabQJOX.js → index-DlH9IMQl.js} +1 -1
  15. package/dist/assets/{index-C8u74RER.js → index-Dsb-5apv.js} +1 -1
  16. package/dist/assets/{index-D9ApKauA.js → index-_YFUWLUM.js} +1 -1
  17. package/dist/assets/{index-CoIvdDsX.js → index-jg26xdEi.js} +1 -1
  18. package/dist/assets/{provider-jsonrpc-DuMpLBV0.js → provider-jsonrpc-DNgUKjG6.js} +1 -1
  19. package/dist/assets/{solana-DWuIx6gK.js → solana-D4RepnSA.js} +2 -2
  20. package/dist/assets/{sui-BcTGBE_4.js → sui-Du5h-f8S.js} +3 -3
  21. package/dist/main.mjs +185 -140
  22. package/dist/src/components/ConfigurablePageHeader.d.ts +1 -1
  23. package/dist/src/components/ConfigurablePageHeader.d.ts.map +1 -1
  24. package/dist/src/components/Header.d.ts +1 -0
  25. package/dist/src/components/Header.d.ts.map +1 -1
  26. package/dist/src/components/PageHeader.d.ts +1 -3
  27. package/dist/src/components/PageHeader.d.ts.map +1 -1
  28. package/dist/src/components/SampleApp/index.d.ts.map +1 -1
  29. package/dist/src/components/v3/BackButton.d.ts +6 -0
  30. package/dist/src/components/v3/BackButton.d.ts.map +1 -0
  31. package/dist/src/components/v3/FormContent.d.ts +5 -0
  32. package/dist/src/components/v3/FormContent.d.ts.map +1 -0
  33. package/dist/src/config/constants.d.ts.map +1 -1
  34. package/dist/src/config/events.d.ts +2 -1
  35. package/dist/src/config/events.d.ts.map +1 -1
  36. package/dist/src/config/mainnet/chains.d.ts.map +1 -1
  37. package/dist/src/config/mainnet/rpcs.d.ts.map +1 -1
  38. package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
  39. package/dist/src/config/mainnet/wrappedTokens.d.ts +6 -0
  40. package/dist/src/config/mainnet/wrappedTokens.d.ts.map +1 -1
  41. package/dist/src/config/testnet/chains.d.ts.map +1 -1
  42. package/dist/src/config/testnet/rpcs.d.ts.map +1 -1
  43. package/dist/src/config/testnet/tokens.d.ts.map +1 -1
  44. package/dist/src/config/types.d.ts +6 -11
  45. package/dist/src/config/types.d.ts.map +1 -1
  46. package/dist/src/config/ui.d.ts +9 -0
  47. package/dist/src/config/ui.d.ts.map +1 -1
  48. package/dist/src/consts/wallet.d.ts.map +1 -1
  49. package/dist/src/hooks/useAutoEnableGasDropoff.d.ts +3 -1
  50. package/dist/src/hooks/useAutoEnableGasDropoff.d.ts.map +1 -1
  51. package/dist/src/hooks/useConnectToLastUsedWallet.d.ts.map +1 -1
  52. package/dist/src/hooks/useSortedRoutesWithQuotes.d.ts.map +1 -1
  53. package/dist/src/hooks/useTransactionHistory.d.ts.map +1 -1
  54. package/dist/src/hooks/useTransactionHistoryLiFi.d.ts +2 -0
  55. package/dist/src/hooks/useTransactionHistoryLiFi.d.ts.map +1 -1
  56. package/dist/src/hooks/useTransactionHistoryMayan.d.ts +2 -0
  57. package/dist/src/hooks/useTransactionHistoryMayan.d.ts.map +1 -1
  58. package/dist/src/hooks/useTransactionHistoryWHScan.d.ts +2 -1
  59. package/dist/src/hooks/useTransactionHistoryWHScan.d.ts.map +1 -1
  60. package/dist/src/icons/PoweredBy.d.ts.map +1 -1
  61. package/dist/src/icons/TokenIcons.d.ts.map +1 -1
  62. package/dist/src/icons/Tokens/AUSD.d.ts +4 -0
  63. package/dist/src/icons/Tokens/AUSD.d.ts.map +1 -0
  64. package/dist/src/routes/lifi/LiFiRoute.d.ts.map +1 -1
  65. package/dist/src/routes/mayan/utils.d.ts.map +1 -1
  66. package/dist/src/routes/monad/consts.d.ts +1 -0
  67. package/dist/src/routes/monad/consts.d.ts.map +1 -1
  68. package/dist/src/routes/monad/monad.test.d.ts +1 -0
  69. package/dist/src/routes/monad/monad.test.d.ts.map +1 -0
  70. package/dist/src/routes/monad/utils.d.ts.map +1 -1
  71. package/dist/src/sdklegacy/config/MAINNET.d.ts.map +1 -1
  72. package/dist/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
  73. package/dist/src/telemetry/types.d.ts +4 -2
  74. package/dist/src/telemetry/types.d.ts.map +1 -1
  75. package/dist/src/theme.d.ts +4 -3
  76. package/dist/src/theme.d.ts.map +1 -1
  77. package/dist/src/utils/errors.d.ts.map +1 -1
  78. package/dist/src/utils/fees.d.ts.map +1 -1
  79. package/dist/src/utils/index.d.ts.map +1 -1
  80. package/dist/src/utils/sdkv2.d.ts.map +1 -1
  81. package/dist/src/utils/wallet/index.d.ts +1 -0
  82. package/dist/src/utils/wallet/index.d.ts.map +1 -1
  83. package/dist/src/views/Terms.d.ts.map +1 -1
  84. package/dist/src/views/TxSearch.d.ts.map +1 -1
  85. package/dist/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts.map +1 -1
  86. package/dist/src/views/v3/Bridge/AssetPicker/TokenPickerButton.d.ts +17 -0
  87. package/dist/src/views/v3/Bridge/AssetPicker/TokenPickerButton.d.ts.map +1 -0
  88. package/dist/src/views/v3/Bridge/AssetPicker/TokenPickerButtonContent.d.ts +8 -0
  89. package/dist/src/views/v3/Bridge/AssetPicker/TokenPickerButtonContent.d.ts.map +1 -0
  90. package/dist/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButton.test.d.ts +2 -0
  91. package/dist/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButton.test.d.ts.map +1 -0
  92. package/dist/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButtonContent.test.d.ts +2 -0
  93. package/dist/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButtonContent.test.d.ts.map +1 -0
  94. package/dist/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -1
  95. package/dist/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -1
  96. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  97. package/dist/src/views/v3/Bridge/Routes/index.d.ts +2 -1
  98. package/dist/src/views/v3/Bridge/Routes/index.d.ts.map +1 -1
  99. package/dist/src/views/v3/Bridge/WalletConnector/Controller.d.ts.map +1 -1
  100. package/dist/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts.map +1 -1
  101. package/dist/src/views/v3/Bridge/WalletConnector/WalletAddress.d.ts +9 -0
  102. package/dist/src/views/v3/Bridge/WalletConnector/WalletAddress.d.ts.map +1 -0
  103. package/dist/src/views/v3/Bridge/WalletConnector/WalletPickerContent.d.ts.map +1 -1
  104. package/dist/src/views/v3/Bridge/WalletConnector/__tests__/WalletAddress.test.d.ts +2 -0
  105. package/dist/src/views/v3/Bridge/WalletConnector/__tests__/WalletAddress.test.d.ts.map +1 -0
  106. package/dist/src/views/v3/Bridge/index.d.ts.map +1 -1
  107. package/dist/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -1
  108. package/dist/src/views/v3/Redeem/index.d.ts.map +1 -1
  109. package/dist/src/views/v3/TxHistory/Item/index.d.ts.map +1 -1
  110. package/dist/src/views/v3/TxHistory/Widget/Item.d.ts.map +1 -1
  111. package/lib/{account-cIQhxn1E.js → account-K005OXgL.js} +1 -1
  112. package/lib/{account-BVl6Reot.mjs → account-TXlxMyv4.mjs} +2 -2
  113. package/lib/{address-rVHWlcKQ.mjs → address-CX0E32ut.mjs} +1 -1
  114. package/lib/{address-W9jn6Qdk.js → address-DqbIfKOu.js} +1 -1
  115. package/lib/{aptos-BRApiL_4.mjs → aptos-B1Gf2eCD.mjs} +5 -5
  116. package/lib/{aptos-CNHYHK9c.js → aptos-CnswqE-C.js} +2 -2
  117. package/lib/{aptos-D1WFzBMy.mjs → aptos-DRfXJ8Ba.mjs} +7 -7
  118. package/lib/{aptos-d56Mw8DO.js → aptos-DcdKyekw.js} +1 -1
  119. package/lib/{associatedTokenAccount-C4vEEbG5.js → associatedTokenAccount-CeqdaO2m.js} +1 -1
  120. package/lib/{associatedTokenAccount-DF6phO3l.mjs → associatedTokenAccount-Dsm4Hq32.mjs} +3 -3
  121. package/lib/{basic-BxzNlZH2.js → basic-BS7Z1PMG.js} +1 -1
  122. package/lib/{basic-Bj1RjRlj.js → basic-C6VXQ7m-.js} +1 -1
  123. package/lib/{basic-DR75AlQZ.mjs → basic-CFbslwLM.mjs} +3 -3
  124. package/lib/{basic-DjAbnFVK.mjs → basic-DnhL0oWa.mjs} +3 -3
  125. package/lib/{chunk-KJH4KKG6-Brt4fyqz.mjs → chunk-KJH4KKG6-BfVMUPsB.mjs} +3 -3
  126. package/lib/{chunk-KJH4KKG6-BbF5W1_N.js → chunk-KJH4KKG6-CJx-rDa6.js} +1 -1
  127. package/lib/constants-BCFTvlgh.js +1 -0
  128. package/lib/{constants-PWEvTwIh.mjs → constants-CTJ_-E0d.mjs} +5 -4
  129. package/lib/{core-CkIseV8K.mjs → core-DT6TBPQP.mjs} +6 -6
  130. package/lib/{core-CCO0WKg_.js → core-RRp0K__1.js} +3 -3
  131. package/lib/{create-CChLkbGc.mjs → create-C5dhTMHL.mjs} +1 -1
  132. package/lib/{create-4w0DrcRO.js → create-bA3Gyivs.js} +1 -1
  133. package/lib/{evm-BAU31wxF.js → evm-BwCfQIyJ.js} +2 -2
  134. package/lib/{evm-CMxUV_bG.mjs → evm-BxF9XPn4.mjs} +7 -7
  135. package/lib/{evm-9NnChBii.js → evm-C3B8jHD7.js} +1 -1
  136. package/lib/{evm-2dSclZz6.mjs → evm-DlOCiplA.mjs} +5 -5
  137. package/lib/executor.js +1 -1
  138. package/lib/executor.mjs +13 -15
  139. package/lib/hosted.js +1 -1
  140. package/lib/hosted.mjs +1 -1
  141. package/lib/hypercore-DbqOAqKF.js +4 -0
  142. package/lib/{hypercore-Bmlyd4uI.mjs → hypercore-H7pw_pN4.mjs} +4858 -3107
  143. package/lib/{index-qL4D-cpk.js → index-1T4sIL8n.js} +1 -1
  144. package/lib/{index-Ap7250Gf.mjs → index-39tU5Y5t.mjs} +6 -6
  145. package/lib/{index-D7gCsil9.js → index-6m7yero0.js} +1 -1
  146. package/lib/{index-C5I7QiZ7.mjs → index-B6Ppg6EZ.mjs} +3 -3
  147. package/lib/{index-xvG6cxNx.js → index-BEIFBxtP.js} +1 -1
  148. package/lib/{index-zIzzPp6D.mjs → index-BHpJUZne.mjs} +3 -3
  149. package/lib/{index-CS6YnwIH.js → index-BJ0xVutl.js} +1 -1
  150. package/lib/{index-DUyGY36L.js → index-BNpkgexR.js} +1 -1
  151. package/lib/{index-C61IKE_V.mjs → index-BSIPYyeZ.mjs} +2 -2
  152. package/lib/{index-EbSw7SbC.js → index-BTjUHY0e.js} +1 -1
  153. package/lib/{index-BuHdMHLz.mjs → index-Ba1zbu3Q.mjs} +2 -2
  154. package/lib/{index-CPGWCfWD.js → index-BbE02hdW.js} +8 -8
  155. package/lib/{index-BU35GfG0.mjs → index-Bdtj4LUz.mjs} +2 -2
  156. package/lib/{index-BCKX-m7h.mjs → index-BmP0jPVN.mjs} +12 -11
  157. package/lib/{index-hyk_rzOj.mjs → index-BnKf2rOm.mjs} +3246 -3039
  158. package/lib/{index-Ds7-hb1n.mjs → index-BtU67kjy.mjs} +1 -1
  159. package/lib/{index-Cl9Df47-.mjs → index-BuEKhdrW.mjs} +3 -3
  160. package/lib/{index-CN7M4gwf.mjs → index-BviSNDV7.mjs} +5 -5
  161. package/lib/{index-Cys9e11O.js → index-C-SMuVS3.js} +1 -1
  162. package/lib/{index-Cg1Xo1eZ.js → index-C85u3Gj5.js} +1 -1
  163. package/lib/{index-arjwwpj2.mjs → index-CGqJokTg.mjs} +1 -1
  164. package/lib/{index-Da9rvmCc.js → index-Cb0UWLGI.js} +1 -1
  165. package/lib/{index-DHnmtpvA.mjs → index-CcbY14s5.mjs} +4 -4
  166. package/lib/{index-BKgliEPZ.mjs → index-CrWTw0Se.mjs} +2 -2
  167. package/lib/{index-B16yfCYF.mjs → index-CsLyPoC6.mjs} +4 -4
  168. package/lib/{index-B_JJ50Y-.mjs → index-D-HUNEka.mjs} +4 -4
  169. package/lib/index-DAJZN12d.js +1 -0
  170. package/lib/{index-BhMcIAHt.js → index-DJ2w1fz1.js} +1 -1
  171. package/lib/{index-C5j1HoFr.js → index-DVm_f5E1.js} +1 -1
  172. package/lib/{index-CO4ZoIAU.mjs → index-DjmVBSGQ.mjs} +4 -4
  173. package/lib/{index-Co3mm7UN.mjs → index-DrJE8udd.mjs} +1 -1
  174. package/lib/{index-fTUcaKb4.js → index-DuhYwr0t.js} +1 -1
  175. package/lib/{index-BQ0lWQfT.mjs → index-DwEx1Hn-.mjs} +2 -2
  176. package/lib/{index-DBofyYkS.js → index-DziujHu1.js} +1 -1
  177. package/lib/{index-Dou5sFku.js → index-JWbF-m3e.js} +1 -1
  178. package/lib/{index-_IZO0QRl.mjs → index-NAUBlFLG.mjs} +4 -4
  179. package/lib/{index-D1odbjeH.mjs → index-VnJcNK62.mjs} +3 -3
  180. package/lib/{index-DVxmRy4C.js → index-WrXSs0ic.js} +1 -1
  181. package/lib/{index-CsdD1TNi.js → index-aMKUba1k.js} +1 -1
  182. package/lib/{index-BXsTZ9x_.mjs → index-dufPAW5T.mjs} +298 -267
  183. package/lib/{index-lZY5fTXF.js → index-lAqXlt-a.js} +1 -1
  184. package/lib/{index-cRi8si5A.js → index-mikg85u5.js} +1 -1
  185. package/lib/{index-BScgBddV.mjs → index-o1SAPXm_.mjs} +3 -3
  186. package/lib/{index-CZHdN9pg.js → index-pn6NZmOS.js} +1 -1
  187. package/lib/{index-DNZ-Pkpm.mjs → index-rxQSA9t0.mjs} +6 -6
  188. package/lib/{index-CHvWl09c.js → index-t_koRpGi.js} +1 -1
  189. package/lib/{index-DALvn9lg.js → index-v7w8krM0.js} +1 -1
  190. package/lib/{index-japympio.js → index-wadjmD_G.js} +1 -1
  191. package/lib/{index.es-BC9c-IV7.mjs → index.es-3KAM8l3G.mjs} +4 -4
  192. package/lib/{index.es-DxdcaWwJ.js → index.es-B3FwsRfN.js} +3 -3
  193. package/lib/{index.es-ByyzusUN.mjs → index.es-CYyuSfPG.mjs} +4 -4
  194. package/lib/{index.es-BmZ1Eaml.js → index.es-ClIr5Gv-.js} +1 -1
  195. package/lib/index.js +78 -33
  196. package/lib/index.mjs +9157 -8833
  197. package/lib/{keypair-DWucLGoA.js → keypair-DCgXFOw5.js} +1 -1
  198. package/lib/{keypair-CP7syX9B.mjs → keypair-vpG2fl-q.mjs} +3 -3
  199. package/lib/lifi.js +1 -1
  200. package/lib/lifi.mjs +75 -76
  201. package/lib/mayan.js +2 -2
  202. package/lib/mayan.mjs +11 -10
  203. package/lib/{mint-CoNdQTGM.mjs → mint-BPrKG-Zc.mjs} +3 -3
  204. package/lib/{mint-CxQ6P5lT.js → mint-DW-XgF68.js} +1 -1
  205. package/lib/monad.js +1 -1
  206. package/lib/monad.mjs +91 -58
  207. package/lib/multiToken-B9BoSxdr.js +1 -0
  208. package/lib/{multiToken-Bm-K5dRJ.mjs → multiToken-DMllgxzT.mjs} +4 -3
  209. package/lib/ntt.js +2 -2
  210. package/lib/ntt.mjs +77 -86
  211. package/lib/{platform-Cil_UtAQ.mjs → platform-CSpAb386.mjs} +2788 -2748
  212. package/lib/{platform-BMKYxqvv.js → platform-Csj1Outc.js} +1 -1
  213. package/lib/platform-DCcL7jHP.js +11 -0
  214. package/lib/{platform-vRQufc6j.mjs → platform-YzJZdSCf.mjs} +3 -3
  215. package/lib/{secp256k1-D24BZJAq.js → secp256k1-B2G0zB-5.js} +1 -1
  216. package/lib/{secp256k1-CXRI4XfW.mjs → secp256k1-BZFiBDHQ.mjs} +1 -1
  217. package/lib/{secp256k1-r0ke-jeG.js → secp256k1-Bz-QjKBU.js} +1 -1
  218. package/lib/{secp256k1-rufcCDcw.mjs → secp256k1-Cteng3v9.mjs} +1 -1
  219. package/lib/{secp256k1-BLiUzGcX.js → secp256k1-CxjctkO3.js} +1 -1
  220. package/lib/{secp256k1-ZQ8UIhmk.mjs → secp256k1-D3i7kc2M.mjs} +1 -1
  221. package/lib/{signer-0hWrZ5BZ.mjs → signer-D2GRgRrw.mjs} +2 -2
  222. package/lib/{signer-DyqulDUM.js → signer-gjSiV5v3.js} +1 -1
  223. package/lib/{solana-CXtk3UX1.js → solana-BE2DAanS.js} +4 -4
  224. package/lib/{solana-lhrSUH_P.mjs → solana-Df231Yni.mjs} +10 -10
  225. package/lib/solana-DfW5T_64.mjs +18 -0
  226. package/lib/solana-Edd9tIkX.js +1 -0
  227. package/lib/{solanaEmbed.esm-CFu0h50b.mjs → solanaEmbed.esm-B9WG-Afi.mjs} +4 -4
  228. package/lib/{solanaEmbed.esm-BMynjubZ.js → solanaEmbed.esm-BqcrHrhl.js} +1 -1
  229. package/lib/{solidity-CbDkqHjE.js → solidity-BW7c8rFv.js} +1 -1
  230. package/lib/{solidity-Dk_mvceo.mjs → solidity-D9gSgFcp.mjs} +1 -1
  231. package/lib/src/components/ConfigurablePageHeader.d.ts +1 -1
  232. package/lib/src/components/ConfigurablePageHeader.d.ts.map +1 -1
  233. package/lib/src/components/Header.d.ts +1 -0
  234. package/lib/src/components/Header.d.ts.map +1 -1
  235. package/lib/src/components/PageHeader.d.ts +1 -3
  236. package/lib/src/components/PageHeader.d.ts.map +1 -1
  237. package/lib/src/components/SampleApp/index.d.ts.map +1 -1
  238. package/lib/src/components/v3/BackButton.d.ts +6 -0
  239. package/lib/src/components/v3/BackButton.d.ts.map +1 -0
  240. package/lib/src/components/v3/FormContent.d.ts +5 -0
  241. package/lib/src/components/v3/FormContent.d.ts.map +1 -0
  242. package/lib/src/config/constants.d.ts.map +1 -1
  243. package/lib/src/config/events.d.ts +2 -1
  244. package/lib/src/config/events.d.ts.map +1 -1
  245. package/lib/src/config/mainnet/chains.d.ts.map +1 -1
  246. package/lib/src/config/mainnet/rpcs.d.ts.map +1 -1
  247. package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
  248. package/lib/src/config/mainnet/wrappedTokens.d.ts +6 -0
  249. package/lib/src/config/mainnet/wrappedTokens.d.ts.map +1 -1
  250. package/lib/src/config/testnet/chains.d.ts.map +1 -1
  251. package/lib/src/config/testnet/rpcs.d.ts.map +1 -1
  252. package/lib/src/config/testnet/tokens.d.ts.map +1 -1
  253. package/lib/src/config/types.d.ts +6 -11
  254. package/lib/src/config/types.d.ts.map +1 -1
  255. package/lib/src/config/ui.d.ts +9 -0
  256. package/lib/src/config/ui.d.ts.map +1 -1
  257. package/lib/src/consts/wallet.d.ts.map +1 -1
  258. package/lib/src/hooks/useAutoEnableGasDropoff.d.ts +3 -1
  259. package/lib/src/hooks/useAutoEnableGasDropoff.d.ts.map +1 -1
  260. package/lib/src/hooks/useConnectToLastUsedWallet.d.ts.map +1 -1
  261. package/lib/src/hooks/useSortedRoutesWithQuotes.d.ts.map +1 -1
  262. package/lib/src/hooks/useTransactionHistory.d.ts.map +1 -1
  263. package/lib/src/hooks/useTransactionHistoryLiFi.d.ts +2 -0
  264. package/lib/src/hooks/useTransactionHistoryLiFi.d.ts.map +1 -1
  265. package/lib/src/hooks/useTransactionHistoryMayan.d.ts +2 -0
  266. package/lib/src/hooks/useTransactionHistoryMayan.d.ts.map +1 -1
  267. package/lib/src/hooks/useTransactionHistoryWHScan.d.ts +2 -1
  268. package/lib/src/hooks/useTransactionHistoryWHScan.d.ts.map +1 -1
  269. package/lib/src/icons/PoweredBy.d.ts.map +1 -1
  270. package/lib/src/icons/TokenIcons.d.ts.map +1 -1
  271. package/lib/src/icons/Tokens/AUSD.d.ts +4 -0
  272. package/lib/src/icons/Tokens/AUSD.d.ts.map +1 -0
  273. package/lib/src/routes/lifi/LiFiRoute.d.ts.map +1 -1
  274. package/lib/src/routes/mayan/utils.d.ts.map +1 -1
  275. package/lib/src/routes/monad/consts.d.ts +1 -0
  276. package/lib/src/routes/monad/consts.d.ts.map +1 -1
  277. package/lib/src/routes/monad/monad.test.d.ts +1 -0
  278. package/lib/src/routes/monad/monad.test.d.ts.map +1 -0
  279. package/lib/src/routes/monad/utils.d.ts.map +1 -1
  280. package/lib/src/sdklegacy/config/MAINNET.d.ts.map +1 -1
  281. package/lib/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
  282. package/lib/src/telemetry/types.d.ts +4 -2
  283. package/lib/src/telemetry/types.d.ts.map +1 -1
  284. package/lib/src/theme.d.ts +4 -3
  285. package/lib/src/theme.d.ts.map +1 -1
  286. package/lib/src/utils/errors.d.ts.map +1 -1
  287. package/lib/src/utils/fees.d.ts.map +1 -1
  288. package/lib/src/utils/index.d.ts.map +1 -1
  289. package/lib/src/utils/sdkv2.d.ts.map +1 -1
  290. package/lib/src/utils/wallet/index.d.ts +1 -0
  291. package/lib/src/utils/wallet/index.d.ts.map +1 -1
  292. package/lib/src/views/Terms.d.ts.map +1 -1
  293. package/lib/src/views/TxSearch.d.ts.map +1 -1
  294. package/lib/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts.map +1 -1
  295. package/lib/src/views/v3/Bridge/AssetPicker/TokenPickerButton.d.ts +17 -0
  296. package/lib/src/views/v3/Bridge/AssetPicker/TokenPickerButton.d.ts.map +1 -0
  297. package/lib/src/views/v3/Bridge/AssetPicker/TokenPickerButtonContent.d.ts +8 -0
  298. package/lib/src/views/v3/Bridge/AssetPicker/TokenPickerButtonContent.d.ts.map +1 -0
  299. package/lib/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButton.test.d.ts +2 -0
  300. package/lib/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButton.test.d.ts.map +1 -0
  301. package/lib/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButtonContent.test.d.ts +2 -0
  302. package/lib/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButtonContent.test.d.ts.map +1 -0
  303. package/lib/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -1
  304. package/lib/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -1
  305. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  306. package/lib/src/views/v3/Bridge/Routes/index.d.ts +2 -1
  307. package/lib/src/views/v3/Bridge/Routes/index.d.ts.map +1 -1
  308. package/lib/src/views/v3/Bridge/WalletConnector/Controller.d.ts.map +1 -1
  309. package/lib/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts.map +1 -1
  310. package/lib/src/views/v3/Bridge/WalletConnector/WalletAddress.d.ts +9 -0
  311. package/lib/src/views/v3/Bridge/WalletConnector/WalletAddress.d.ts.map +1 -0
  312. package/lib/src/views/v3/Bridge/WalletConnector/WalletPickerContent.d.ts.map +1 -1
  313. package/lib/src/views/v3/Bridge/WalletConnector/__tests__/WalletAddress.test.d.ts +2 -0
  314. package/lib/src/views/v3/Bridge/WalletConnector/__tests__/WalletAddress.test.d.ts.map +1 -0
  315. package/lib/src/views/v3/Bridge/index.d.ts.map +1 -1
  316. package/lib/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -1
  317. package/lib/src/views/v3/Redeem/index.d.ts.map +1 -1
  318. package/lib/src/views/v3/TxHistory/Item/index.d.ts.map +1 -1
  319. package/lib/src/views/v3/TxHistory/Widget/Item.d.ts.map +1 -1
  320. package/lib/{sui-CZNJPZ5q.mjs → sui-B9tYcgyb.mjs} +4 -4
  321. package/lib/{sui-CBxh7zmc.js → sui-BVwNcgQT.js} +1 -1
  322. package/lib/{sui-LiXjD27c.js → sui-BtyZE8YC.js} +1 -1
  323. package/lib/{sui-cpCvd7RC.mjs → sui-QP4AZGNc.mjs} +6 -6
  324. package/lib/{tokenHelpers-DT6mPtNP.mjs → tokenHelpers-C53sepsl.mjs} +1 -1
  325. package/lib/{tokenHelpers-DZRdlDO-.js → tokenHelpers-DITWDel1.js} +1 -1
  326. package/lib/{tokens-FIs8YBYj.mjs → tokens-CO0YQ3R2.mjs} +3 -3
  327. package/lib/{tokens--uOMY2-j.js → tokens-CiSHS7oi.js} +1 -1
  328. package/lib/types-CgveSjsw.js +1 -0
  329. package/lib/{types-iFgwQ7vG.mjs → types-Dxx2g1wS.mjs} +170 -168
  330. package/lib/{unsignedTransaction-DCDxTFq8.mjs → unsignedTransaction-D2Ja0SuN.mjs} +2 -2
  331. package/lib/{unsignedTransaction-DA4tlY5u.js → unsignedTransaction-qRBv5Cnd.js} +2 -2
  332. package/lib/{utils-DMf7wRGI.js → utils-BEljbqMf.js} +1 -1
  333. package/lib/{utils-BSxsyW2c.mjs → utils-mBHX3Jpu.mjs} +4 -4
  334. package/lib/{w3m-modal-CBYJj-sR.mjs → w3m-modal-5v-rsnN8.mjs} +2 -2
  335. package/lib/{w3m-modal-B3FfPDki.js → w3m-modal-B0Lu-6W8.js} +1 -1
  336. package/lib/{w3m-modal-B5PtkowQ.js → w3m-modal-B2xHxAWg.js} +1 -1
  337. package/lib/{w3m-modal-h85Jyy9l.mjs → w3m-modal-SlcSCSnx.mjs} +2 -2
  338. package/lib/{wallet-CMTEE6Oa.mjs → wallet-Cyosy4Hc.mjs} +1 -1
  339. package/lib/{wallet-BMli0fbu.js → wallet-a0_jwP8j.js} +1 -1
  340. package/lib/{web3-CUwFm9Lx.mjs → web3-CdErAVj5.mjs} +2 -2
  341. package/lib/{web3-DdUeM7iQ.js → web3-x1WCGDiy.js} +1 -1
  342. package/package.json +49 -47
  343. package/dist/assets/index-_UMHESh0.js +0 -1
  344. package/dist/src/components/Button.d.ts +0 -13
  345. package/dist/src/components/Button.d.ts.map +0 -1
  346. package/dist/src/icons/Down.d.ts +0 -5
  347. package/dist/src/icons/Down.d.ts.map +0 -1
  348. package/lib/constants-Bkyn6tLV.js +0 -1
  349. package/lib/hypercore-DJV-pPts.js +0 -4
  350. package/lib/index-BYuhx88C.js +0 -1
  351. package/lib/multiToken-YoNvxjur.js +0 -1
  352. package/lib/platform-CCG_jgOO.js +0 -11
  353. package/lib/solana-DKFJvqX8.mjs +0 -18
  354. package/lib/solana-Dmje_Si8.js +0 -1
  355. package/lib/src/components/Button.d.ts +0 -13
  356. package/lib/src/components/Button.d.ts.map +0 -1
  357. package/lib/src/icons/Down.d.ts +0 -5
  358. package/lib/src/icons/Down.d.ts.map +0 -1
  359. package/lib/types-CjNs2oB0.js +0 -1
@@ -1 +1 @@
1
- "use strict";const r=require("./unsignedTransaction-DA4tlY5u.js"),a=require("./platform-CCG_jgOO.js"),I=require("./index-fTUcaKb4.js");function S(s,e){return r.suiBcs.IntentMessage(r.suiBcs.fixedArray(e.length,r.suiBcs.u8())).serialize({intent:{scope:{[s]:!0},version:{V0:!0},appId:{Sui:!0}},value:e}).toBytes()}const h={ED25519:0,Secp256k1:1,Secp256r1:2,MultiSig:3,ZkLogin:5,Passkey:6},B={ED25519:32,Secp256k1:33,Secp256r1:33,Passkey:33},w={0:"ED25519",1:"Secp256k1",2:"Secp256r1",3:"MultiSig",5:"ZkLogin",6:"Passkey"};function E(s,e){if(s===e)return!0;if(s.length!==e.length)return!1;for(let t=0;t<s.length;t++)if(s[t]!==e[t])return!1;return!0}class A{equals(e){return E(this.toRawBytes(),e.toRawBytes())}toBase64(){return r.toBase64(this.toRawBytes())}toString(){throw new Error("`toString` is not implemented on public keys. Use `toBase64()` or `toRawBytes()` instead.")}toSuiPublicKey(){const e=this.toSuiBytes();return r.toBase64(e)}verifyWithIntent(e,t,n){const i=S(n,e),c=r.blake2b(i,{dkLen:32});return this.verify(c,t)}verifyPersonalMessage(e,t){return this.verifyWithIntent(r.suiBcs.vector(r.suiBcs.u8()).serialize(e).toBytes(),t,"PersonalMessage")}verifyTransaction(e,t){return this.verifyWithIntent(e,t,"TransactionData")}verifyAddress(e){return this.toSuiAddress()===e}toSuiBytes(){const e=this.toRawBytes(),t=new Uint8Array(e.length+1);return t.set([this.flag()]),t.set(e,1),t}toSuiAddress(){return r.normalizeSuiAddress(a.bytesToHex(r.blake2b(this.toSuiBytes(),{dkLen:32})).slice(0,r.SUI_ADDRESS_LENGTH*2))}}function k(s){const e=r.fromBase64(s),t=w[e[0]];switch(t){case"ED25519":case"Secp256k1":case"Secp256r1":const n=B[t],i=e.slice(1,e.length-n),c=e.slice(1+i.length);return{serializedSignature:s,signatureScheme:t,signature:i,publicKey:c,bytes:e};default:throw new Error("Unsupported signature scheme")}}function P({signature:s,signatureScheme:e,publicKey:t}){if(!t)throw new Error("`publicKey` is required");const n=t.toRawBytes(),i=new Uint8Array(1+s.length+n.length);return i.set([h[e]]),i.set(s,1),i.set(n,1+s.length),r.toBase64(i)}const l=32,m="suiprivkey";class T{async signWithIntent(e,t){const n=S(t,e),i=r.blake2b(n,{dkLen:32});return{signature:P({signature:await this.sign(i),signatureScheme:this.getKeyScheme(),publicKey:this.getPublicKey()}),bytes:r.toBase64(e)}}async signTransaction(e){return this.signWithIntent(e,"TransactionData")}async signPersonalMessage(e){const{signature:t}=await this.signWithIntent(r.bcs.vector(r.bcs.u8()).serialize(e).toBytes(),"PersonalMessage");return{bytes:r.toBase64(e),signature:t}}async signAndExecuteTransaction({transaction:e,client:t}){const n=await e.build({client:t}),{signature:i}=await this.signTransaction(n);return(await t.core.executeTransaction({transaction:n,signatures:[i]})).transaction}toSuiAddress(){return this.getPublicKey().toSuiAddress()}}class R extends T{}function D(s){const{prefix:e,words:t}=a.bech32.decode(s);if(e!==m)throw new Error("invalid private key prefix");const n=new Uint8Array(a.bech32.fromWords(t)),i=n.slice(1),c=w[n[0]];return{scheme:c,schema:c,secretKey:i}}function x(s,e){if(s.length!==l)throw new Error("Invalid bytes length");const t=h[e],n=new Uint8Array(s.length+1);return n.set([t]),n.set(s,1),a.bech32.encode(m,a.bech32.toWords(n))}function g(s){return!!new RegExp("^m\\/44'\\/784'\\/[0-9]+'\\/[0-9]+'\\/[0-9]+'+$").test(s)}function U(s){return I.mnemonicToSeedSync(s,"")}function _(s){return r.toHex(U(s))}const L="ed25519 seed",M=2147483648,H=new RegExp("^m(\\/[0-9]+')+$"),K=s=>s.replace("'",""),W=s=>{const t=a.hmac.create(a.sha512$1,L).update(r.fromHex(s)).digest(),n=t.slice(0,32),i=t.slice(32);return{key:n,chainCode:i}},C=({key:s,chainCode:e},t)=>{const n=new ArrayBuffer(4);new DataView(n).setUint32(0,t);const c=new Uint8Array(1+s.length+n.byteLength);c.set(new Uint8Array(1).fill(0)),c.set(s,1),c.set(new Uint8Array(n,0,n.byteLength),s.length+1);const o=a.hmac.create(a.sha512$1,e).update(c).digest(),y=o.slice(0,32),v=o.slice(32);return{key:y,chainCode:v}},V=s=>H.test(s)?!s.split("/").slice(1).map(K).some(isNaN):!1,f=(s,e,t=M)=>{if(!V(s))throw new Error("Invalid derivation path");const{key:n,chainCode:i}=W(e);return s.split("/").slice(1).map(K).map(o=>parseInt(o,10)).reduce((o,y)=>C(o,y+t),{key:n,chainCode:i})},d=32;class b extends A{constructor(e){if(super(),typeof e=="string"?this.data=r.fromBase64(e):e instanceof Uint8Array?this.data=e:this.data=Uint8Array.from(e),this.data.length!==d)throw new Error(`Invalid public key input. Expected ${d} bytes, got ${this.data.length}`)}equals(e){return super.equals(e)}toRawBytes(){return this.data}flag(){return h.ED25519}async verify(e,t){let n;if(typeof t=="string"){const i=k(t);if(i.signatureScheme!=="ED25519")throw new Error("Invalid signature scheme");if(!E(this.toRawBytes(),i.publicKey))throw new Error("Signature does not match public key");n=i.signature}else n=t;return r.ed25519.verify(n,e,this.toRawBytes())}}b.SIZE=d;const p="m/44'/784'/0'/0'/0'";class u extends R{constructor(e){if(super(),e)this.keypair={publicKey:e.publicKey,secretKey:e.secretKey.slice(0,32)};else{const t=r.ed25519.utils.randomPrivateKey();this.keypair={publicKey:r.ed25519.getPublicKey(t),secretKey:t}}}getKeyScheme(){return"ED25519"}static generate(){const e=r.ed25519.utils.randomPrivateKey();return new u({publicKey:r.ed25519.getPublicKey(e),secretKey:e})}static fromSecretKey(e,t){if(typeof e=="string"){const c=D(e);if(c.schema!=="ED25519")throw new Error(`Expected a ED25519 keypair, got ${c.schema}`);return this.fromSecretKey(c.secretKey,t)}const n=e.length;if(n!==l)throw new Error(`Wrong secretKey size. Expected ${l} bytes, got ${n}.`);const i={publicKey:r.ed25519.getPublicKey(e),secretKey:e};if(!t||!t.skipValidation){const o=new TextEncoder().encode("sui validation"),y=r.ed25519.sign(o,e);if(!r.ed25519.verify(y,o,i.publicKey))throw new Error("provided secretKey is invalid")}return new u(i)}getPublicKey(){return new b(this.keypair.publicKey)}getSecretKey(){return x(this.keypair.secretKey.slice(0,l),this.getKeyScheme())}async sign(e){return r.ed25519.sign(e,this.keypair.secretKey)}static deriveKeypair(e,t){if(t==null&&(t=p),!g(t))throw new Error("Invalid derivation path");const{key:n}=f(t,_(e));return u.fromSecretKey(n)}static deriveKeypairFromSeed(e,t){if(t==null&&(t=p),!g(t))throw new Error("Invalid derivation path");const{key:n}=f(t,e);return u.fromSecretKey(n)}}exports.Ed25519Keypair=u;
1
+ "use strict";const r=require("./unsignedTransaction-qRBv5Cnd.js"),a=require("./platform-DCcL7jHP.js"),I=require("./index-DuhYwr0t.js");function S(s,e){return r.suiBcs.IntentMessage(r.suiBcs.fixedArray(e.length,r.suiBcs.u8())).serialize({intent:{scope:{[s]:!0},version:{V0:!0},appId:{Sui:!0}},value:e}).toBytes()}const h={ED25519:0,Secp256k1:1,Secp256r1:2,MultiSig:3,ZkLogin:5,Passkey:6},B={ED25519:32,Secp256k1:33,Secp256r1:33,Passkey:33},w={0:"ED25519",1:"Secp256k1",2:"Secp256r1",3:"MultiSig",5:"ZkLogin",6:"Passkey"};function E(s,e){if(s===e)return!0;if(s.length!==e.length)return!1;for(let t=0;t<s.length;t++)if(s[t]!==e[t])return!1;return!0}class A{equals(e){return E(this.toRawBytes(),e.toRawBytes())}toBase64(){return r.toBase64(this.toRawBytes())}toString(){throw new Error("`toString` is not implemented on public keys. Use `toBase64()` or `toRawBytes()` instead.")}toSuiPublicKey(){const e=this.toSuiBytes();return r.toBase64(e)}verifyWithIntent(e,t,n){const i=S(n,e),c=r.blake2b(i,{dkLen:32});return this.verify(c,t)}verifyPersonalMessage(e,t){return this.verifyWithIntent(r.suiBcs.vector(r.suiBcs.u8()).serialize(e).toBytes(),t,"PersonalMessage")}verifyTransaction(e,t){return this.verifyWithIntent(e,t,"TransactionData")}verifyAddress(e){return this.toSuiAddress()===e}toSuiBytes(){const e=this.toRawBytes(),t=new Uint8Array(e.length+1);return t.set([this.flag()]),t.set(e,1),t}toSuiAddress(){return r.normalizeSuiAddress(a.bytesToHex(r.blake2b(this.toSuiBytes(),{dkLen:32})).slice(0,r.SUI_ADDRESS_LENGTH*2))}}function k(s){const e=r.fromBase64(s),t=w[e[0]];switch(t){case"ED25519":case"Secp256k1":case"Secp256r1":const n=B[t],i=e.slice(1,e.length-n),c=e.slice(1+i.length);return{serializedSignature:s,signatureScheme:t,signature:i,publicKey:c,bytes:e};default:throw new Error("Unsupported signature scheme")}}function P({signature:s,signatureScheme:e,publicKey:t}){if(!t)throw new Error("`publicKey` is required");const n=t.toRawBytes(),i=new Uint8Array(1+s.length+n.length);return i.set([h[e]]),i.set(s,1),i.set(n,1+s.length),r.toBase64(i)}const l=32,m="suiprivkey";class T{async signWithIntent(e,t){const n=S(t,e),i=r.blake2b(n,{dkLen:32});return{signature:P({signature:await this.sign(i),signatureScheme:this.getKeyScheme(),publicKey:this.getPublicKey()}),bytes:r.toBase64(e)}}async signTransaction(e){return this.signWithIntent(e,"TransactionData")}async signPersonalMessage(e){const{signature:t}=await this.signWithIntent(r.bcs.vector(r.bcs.u8()).serialize(e).toBytes(),"PersonalMessage");return{bytes:r.toBase64(e),signature:t}}async signAndExecuteTransaction({transaction:e,client:t}){const n=await e.build({client:t}),{signature:i}=await this.signTransaction(n);return(await t.core.executeTransaction({transaction:n,signatures:[i]})).transaction}toSuiAddress(){return this.getPublicKey().toSuiAddress()}}class R extends T{}function D(s){const{prefix:e,words:t}=a.bech32.decode(s);if(e!==m)throw new Error("invalid private key prefix");const n=new Uint8Array(a.bech32.fromWords(t)),i=n.slice(1),c=w[n[0]];return{scheme:c,schema:c,secretKey:i}}function x(s,e){if(s.length!==l)throw new Error("Invalid bytes length");const t=h[e],n=new Uint8Array(s.length+1);return n.set([t]),n.set(s,1),a.bech32.encode(m,a.bech32.toWords(n))}function g(s){return!!new RegExp("^m\\/44'\\/784'\\/[0-9]+'\\/[0-9]+'\\/[0-9]+'+$").test(s)}function U(s){return I.mnemonicToSeedSync(s,"")}function _(s){return r.toHex(U(s))}const L="ed25519 seed",M=2147483648,H=new RegExp("^m(\\/[0-9]+')+$"),K=s=>s.replace("'",""),W=s=>{const t=a.hmac.create(a.sha512$1,L).update(r.fromHex(s)).digest(),n=t.slice(0,32),i=t.slice(32);return{key:n,chainCode:i}},C=({key:s,chainCode:e},t)=>{const n=new ArrayBuffer(4);new DataView(n).setUint32(0,t);const c=new Uint8Array(1+s.length+n.byteLength);c.set(new Uint8Array(1).fill(0)),c.set(s,1),c.set(new Uint8Array(n,0,n.byteLength),s.length+1);const o=a.hmac.create(a.sha512$1,e).update(c).digest(),y=o.slice(0,32),v=o.slice(32);return{key:y,chainCode:v}},V=s=>H.test(s)?!s.split("/").slice(1).map(K).some(isNaN):!1,f=(s,e,t=M)=>{if(!V(s))throw new Error("Invalid derivation path");const{key:n,chainCode:i}=W(e);return s.split("/").slice(1).map(K).map(o=>parseInt(o,10)).reduce((o,y)=>C(o,y+t),{key:n,chainCode:i})},d=32;class b extends A{constructor(e){if(super(),typeof e=="string"?this.data=r.fromBase64(e):e instanceof Uint8Array?this.data=e:this.data=Uint8Array.from(e),this.data.length!==d)throw new Error(`Invalid public key input. Expected ${d} bytes, got ${this.data.length}`)}equals(e){return super.equals(e)}toRawBytes(){return this.data}flag(){return h.ED25519}async verify(e,t){let n;if(typeof t=="string"){const i=k(t);if(i.signatureScheme!=="ED25519")throw new Error("Invalid signature scheme");if(!E(this.toRawBytes(),i.publicKey))throw new Error("Signature does not match public key");n=i.signature}else n=t;return r.ed25519.verify(n,e,this.toRawBytes())}}b.SIZE=d;const p="m/44'/784'/0'/0'/0'";class u extends R{constructor(e){if(super(),e)this.keypair={publicKey:e.publicKey,secretKey:e.secretKey.slice(0,32)};else{const t=r.ed25519.utils.randomPrivateKey();this.keypair={publicKey:r.ed25519.getPublicKey(t),secretKey:t}}}getKeyScheme(){return"ED25519"}static generate(){const e=r.ed25519.utils.randomPrivateKey();return new u({publicKey:r.ed25519.getPublicKey(e),secretKey:e})}static fromSecretKey(e,t){if(typeof e=="string"){const c=D(e);if(c.schema!=="ED25519")throw new Error(`Expected a ED25519 keypair, got ${c.schema}`);return this.fromSecretKey(c.secretKey,t)}const n=e.length;if(n!==l)throw new Error(`Wrong secretKey size. Expected ${l} bytes, got ${n}.`);const i={publicKey:r.ed25519.getPublicKey(e),secretKey:e};if(!t||!t.skipValidation){const o=new TextEncoder().encode("sui validation"),y=r.ed25519.sign(o,e);if(!r.ed25519.verify(y,o,i.publicKey))throw new Error("provided secretKey is invalid")}return new u(i)}getPublicKey(){return new b(this.keypair.publicKey)}getSecretKey(){return x(this.keypair.secretKey.slice(0,l),this.getKeyScheme())}async sign(e){return r.ed25519.sign(e,this.keypair.secretKey)}static deriveKeypair(e,t){if(t==null&&(t=p),!g(t))throw new Error("Invalid derivation path");const{key:n}=f(t,_(e));return u.fromSecretKey(n)}static deriveKeypairFromSeed(e,t){if(t==null&&(t=p),!g(t))throw new Error("Invalid derivation path");const{key:n}=f(t,e);return u.fromSecretKey(n)}}exports.Ed25519Keypair=u;
@@ -1,6 +1,6 @@
1
- import { ar as y, t as l, ab as g, o as D, as as x, p as K, F as S, at as U, au as _, aj as o } from "./unsignedTransaction-DCDxTFq8.mjs";
2
- import { bt as L, b2 as h, cX as b, cZ as v } from "./platform-Cil_UtAQ.mjs";
3
- import { m as M } from "./index-Co3mm7UN.mjs";
1
+ import { ar as y, t as l, ab as g, o as D, as as x, p as K, F as S, at as U, au as _, aj as o } from "./unsignedTransaction-D2Ja0SuN.mjs";
2
+ import { bt as L, b2 as h, cX as b, cZ as v } from "./platform-CSpAb386.mjs";
3
+ import { m as M } from "./index-DrJE8udd.mjs";
4
4
  function I(s, e) {
5
5
  return y.IntentMessage(y.fixedArray(e.length, y.u8())).serialize({
6
6
  intent: {
package/lib/lifi.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils-DMf7wRGI.js"),T=require("./tokenHelpers-DZRdlDO-.js"),S=require("./index-CPGWCfWD.js"),s=require("./platform-CCG_jgOO.js"),C=n=>{if(!n.estimate.fromAmountUSD)throw new e.SDKError(new e.ValidationError("Missing 'fromAmountUSD' in step estimate."));if(!n.estimate.toAmountUSD)throw new e.SDKError(new e.ValidationError("Missing 'toAmountUSD' in step estimate."));return{id:n.id,fromChainId:n.action.fromToken.chainId,fromToken:n.action.fromToken,fromAmount:n.action.fromAmount,fromAmountUSD:n.estimate.fromAmountUSD,fromAddress:n.action.fromAddress,toChainId:n.action.toToken.chainId,toToken:n.action.toToken,toAmount:n.estimate.toAmount,toAmountMin:n.estimate.toAmountMin,toAmountUSD:n.estimate.toAmountUSD,toAddress:n.action.toAddress||n.action.fromAddress,gasCostUSD:n.estimate.gasCosts?.[0]?.amountUSD||"0",steps:[n],insurance:{state:"NOT_INSURABLE",feeAmountUsd:"0"}}};class h extends s.AutomaticRoute{static meta={name:"LiFi",provider:"LiFi"};static NATIVE_GAS_DROPOFF_SUPPORTED=!1;static IS_AUTOMATIC=!0;config;getDefaultOptions(){return{slippage:e.DEFAULT_SLIPPAGE_PERCENT,maxPriceImpact:e.DEFAULT_MAX_PRICE_IMPACT_PERCENT,allowDestinationCall:!1}}static supportedNetworks(){return["Mainnet"]}static supportedChains(t){return e.supportedChains(t)}static isProtocolSupported(t){return e.supportedChains(t.network).includes(t.chain)}static async supportedDestinationTokens(t,i,o){return T.getAllTokenIdsForChain(o.chain)}async validate(t,i){if(t.fromChain.chain===t.toChain.chain)return{valid:!1,params:i,error:new Error("Same chain swaps are disabled")};const d=i.options?.slippage??e.DEFAULT_SLIPPAGE_PERCENT;if(d<0||d>1)return{valid:!1,params:i,error:new Error("Invalid slippage value")};const r=i.options?.maxPriceImpact??e.DEFAULT_MAX_PRICE_IMPACT_PERCENT;if(r<0||r>1)return{valid:!1,params:i,error:new Error("Invalid maxPriceImpact value")};const f=i.options?.bridges??e.DEFAULT_BRIDGES,l=i.options?.exchanges??e.DEFAULT_EXCHANGES;return{valid:!0,params:{...i,normalizedParams:{slippage:d,maxPriceImpact:r,bridges:f,exchanges:l}}}}fetchQuote(t,i){const{fromChain:o,toChain:d}=t,{normalizedParams:a}=i,r=e.toLifiChainId(o.chain),g=e.toLifiChainId(d.chain),f=t.sender?s.canonicalAddress(t.sender):e.generateThrowawayAddress(o.chain),l=t.recipient?s.canonicalAddress(t.recipient):e.generateThrowawayAddress(d.chain),{integrator:m,feePercent:u}=this.getFeeConfig(t),c={fromChain:r,toChain:g,fromToken:e.toLifiTokenAddress(t.source.id),toToken:e.toLifiTokenAddress(t.destination.id),fromAmount:s.units(t.parseAmount(i.amount)).toString(),fromAddress:f,toAddress:l,slippage:i.normalizedParams.slippage,maxPriceImpact:i.normalizedParams.maxPriceImpact,integrator:m,referrer:i.options.referrer,fee:u};return a.bridges?.allow&&(c.allowBridges=a.bridges.allow),a.bridges?.deny&&(c.denyBridges=a.bridges.deny),a.bridges?.prefer&&(c.preferBridges=a.bridges.prefer),a.exchanges?.allow&&(c.allowExchanges=a.exchanges.allow),a.exchanges?.deny&&(c.denyExchanges=a.exchanges.deny),a.exchanges?.prefer&&(c.preferExchanges=a.exchanges.prefer),e.getQuote(c)}getFeeConfig(t){return this.config?.getFeeConfig?this.config.getFeeConfig(t):{integrator:e.DEFAULT_INTEGRATOR,feePercent:0}}async quote(t,i){try{const o=await this.fetchQuote(t,i);return{success:!0,params:i,sourceToken:{token:t.source.id,amount:s.fromBaseUnits(BigInt(o.estimate?.fromAmount.toString()),t.source.decimals)},destinationToken:{token:t.destination.id,amount:s.fromBaseUnits(BigInt(o.estimate?.toAmount.toString()),t.destination.decimals)},eta:(o.estimate?.executionDuration||e.DEFAULT_ETA_SECONDS)*e.MILLISECONDS_PER_SECOND,details:o,provider:o.toolDetails.name}}catch(o){return{success:!1,error:o}}}async initiate(t,i,o,d){const a=i.address(),r=s.canonicalAddress(d),g=await t.fromChain.getRpc(),f=[],l={...o.details,fromAddress:a,toAddress:r},m=C(l),u={request:t,signer:i,rpc:g,txs:f};if(t.fromChain.chain==="Solana")await e.executeSolanaSteps(m,u);else if(t.fromChain.chain==="Sui")await e.executeSuiSteps(m,u);else{const A=await e.getNativeChainId(t.fromChain);await e.executeEvmSteps(m,u,o,A,e.toLifiTokenAddress)}const c={from:t.fromChain.chain,to:t.toChain.chain,state:s.TransferState.SourceInitiated,originTxs:f,tool:o.details.tool};return Object.assign(c,{tool:o.details?.tool})}async*track(t,i=e.DEFAULT_TIMEOUT){if(s.isCompleted(t)||s.isRedeemed(t)||s.isRefunded(t))return t;let o=i;for(;o>0;){const d=Date.now();if(s.isSourceInitiated(t)||s.isSourceFinalized(t)||s.isAttested(t)){const a=await e.getTransactionStatus(this.wh.network,t.originTxs[t.originTxs.length-1],e.toLifiChainId(t.from).toString(),e.toLifiChainId(t.to).toString(),t.tool);if(!a)throw new Error("Failed to fetch transfer status");if(a.status==="DONE"){const r={...t,originTxs:[{chain:t.from,txid:a.sending.txHash}],attestation:{},state:s.TransferState.DestinationFinalized};return yield r,r}else if(a.status==="FAILED"){const r={...t,originTxs:[{chain:t.from,txid:a.sending.txHash}],refundTxs:[],state:s.TransferState.Refunded,attestation:{}};return yield r,r}}await S.sleep(e.POLLING_INTERVAL_MS),o-=Date.now()-d}return t}transferUrl(t){return`https://scan.li.fi/tx/${t}`}}function E(n){return e.config.set({integrator:e.DEFAULT_INTEGRATOR,apiUrl:n.apiUrl??e.DEFAULT_API_URL}),class extends h{config=n}}exports.LiFiRoute=h;exports.createLiFiRouteWithConfig=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils-BEljbqMf.js"),T=require("./tokenHelpers-DITWDel1.js"),S=require("./index-BbE02hdW.js"),s=require("./platform-DCcL7jHP.js"),C=i=>{if(!i.estimate.fromAmountUSD)throw new e.SDKError(new e.ValidationError("Missing 'fromAmountUSD' in step estimate."));if(!i.estimate.toAmountUSD)throw new e.SDKError(new e.ValidationError("Missing 'toAmountUSD' in step estimate."));return{id:i.id,fromChainId:i.action.fromToken.chainId,fromToken:i.action.fromToken,fromAmount:i.action.fromAmount,fromAmountUSD:i.estimate.fromAmountUSD,fromAddress:i.action.fromAddress,toChainId:i.action.toToken.chainId,toToken:i.action.toToken,toAmount:i.estimate.toAmount,toAmountMin:i.estimate.toAmountMin,toAmountUSD:i.estimate.toAmountUSD,toAddress:i.action.toAddress||i.action.fromAddress,gasCostUSD:i.estimate.gasCosts?.[0]?.amountUSD||"0",steps:[i],insurance:{state:"NOT_INSURABLE",feeAmountUsd:"0"}}};class h extends s.AutomaticRoute{static meta={name:"LiFi",provider:"LI.FI"};static NATIVE_GAS_DROPOFF_SUPPORTED=!1;static IS_AUTOMATIC=!0;config;getDefaultOptions(){return{slippage:e.DEFAULT_SLIPPAGE_PERCENT,maxPriceImpact:e.DEFAULT_MAX_PRICE_IMPACT_PERCENT,allowDestinationCall:!1}}static supportedNetworks(){return["Mainnet"]}static supportedChains(t){return e.supportedChains(t)}static isProtocolSupported(t){return e.supportedChains(t.network).includes(t.chain)}static async supportedDestinationTokens(t,n,a){return T.getAllTokenIdsForChain(a.chain)}async validate(t,n){if(t.fromChain.chain===t.toChain.chain)return{valid:!1,params:n,error:new Error("Same chain swaps are disabled")};const d=n.options?.slippage??e.DEFAULT_SLIPPAGE_PERCENT;if(d<0||d>1)return{valid:!1,params:n,error:new Error("Invalid slippage value")};const r=n.options?.maxPriceImpact??e.DEFAULT_MAX_PRICE_IMPACT_PERCENT;if(r<0||r>1)return{valid:!1,params:n,error:new Error("Invalid maxPriceImpact value")};const f=n.options?.bridges??e.DEFAULT_BRIDGES,l=n.options?.exchanges??e.DEFAULT_EXCHANGES;return{valid:!0,params:{...n,normalizedParams:{slippage:d,maxPriceImpact:r,bridges:f,exchanges:l}}}}fetchQuote(t,n){const{fromChain:a,toChain:d}=t,{normalizedParams:o}=n,r=e.toLifiChainId(a.chain),g=e.toLifiChainId(d.chain),f=t.sender?s.canonicalAddress(t.sender):e.generateThrowawayAddress(a.chain),l=t.recipient?s.canonicalAddress(t.recipient):e.generateThrowawayAddress(d.chain),{integrator:m,feePercent:u}=this.getFeeConfig(t),c={fromChain:r,toChain:g,fromToken:e.toLifiTokenAddress(t.source.id),toToken:e.toLifiTokenAddress(t.destination.id),fromAmount:s.units(t.parseAmount(n.amount)).toString(),fromAddress:f,toAddress:l,slippage:n.normalizedParams.slippage,maxPriceImpact:n.normalizedParams.maxPriceImpact,integrator:m,referrer:n.options.referrer,fee:u};return o.bridges?.allow&&(c.allowBridges=o.bridges.allow),o.bridges?.deny&&(c.denyBridges=o.bridges.deny),o.bridges?.prefer&&(c.preferBridges=o.bridges.prefer),o.exchanges?.allow&&(c.allowExchanges=o.exchanges.allow),o.exchanges?.deny&&(c.denyExchanges=o.exchanges.deny),o.exchanges?.prefer&&(c.preferExchanges=o.exchanges.prefer),e.getQuote(c)}getFeeConfig(t){return this.config?.getFeeConfig?this.config.getFeeConfig(t):{integrator:e.DEFAULT_INTEGRATOR,feePercent:0}}async quote(t,n){try{const a=await this.fetchQuote(t,n);return{success:!0,params:n,sourceToken:{token:t.source.id,amount:s.fromBaseUnits(BigInt(a.estimate?.fromAmount.toString()),t.source.decimals)},destinationToken:{token:t.destination.id,amount:s.fromBaseUnits(BigInt(a.estimate?.toAmount.toString()),t.destination.decimals)},eta:(a.estimate?.executionDuration||e.DEFAULT_ETA_SECONDS)*e.MILLISECONDS_PER_SECOND,details:a}}catch(a){return{success:!1,error:a}}}async initiate(t,n,a,d){const o=n.address(),r=s.canonicalAddress(d),g=await t.fromChain.getRpc(),f=[],l={...a.details,fromAddress:o,toAddress:r},m=C(l),u={request:t,signer:n,rpc:g,txs:f};if(t.fromChain.chain==="Solana")await e.executeSolanaSteps(m,u);else if(t.fromChain.chain==="Sui")await e.executeSuiSteps(m,u);else{const A=await e.getNativeChainId(t.fromChain);await e.executeEvmSteps(m,u,a,A,e.toLifiTokenAddress)}const c={from:t.fromChain.chain,to:t.toChain.chain,state:s.TransferState.SourceInitiated,originTxs:f,tool:a.details.tool};return Object.assign(c,{tool:a.details?.tool})}async*track(t,n=e.DEFAULT_TIMEOUT){if(s.isCompleted(t)||s.isRedeemed(t)||s.isRefunded(t))return t;let a=n;for(;a>0;){const d=Date.now();if(s.isSourceInitiated(t)||s.isSourceFinalized(t)||s.isAttested(t)){const o=await e.getTransactionStatus(this.wh.network,t.originTxs[t.originTxs.length-1],e.toLifiChainId(t.from).toString(),e.toLifiChainId(t.to).toString(),t.tool);if(!o)throw new Error("Failed to fetch transfer status");if(o.status==="DONE"){const r={...t,originTxs:[{chain:t.from,txid:o.sending.txHash}],attestation:{},state:s.TransferState.DestinationFinalized};return yield r,r}else if(o.status==="FAILED"){const r={...t,originTxs:[{chain:t.from,txid:o.sending.txHash}],refundTxs:[],state:s.TransferState.Refunded,attestation:{}};return yield r,r}}await S.sleep(e.POLLING_INTERVAL_MS),a-=Date.now()-d}return t}transferUrl(t){return`https://scan.li.fi/tx/${t}`}}function I(i){return e.config.set({integrator:e.DEFAULT_INTEGRATOR,apiUrl:i.apiUrl??e.DEFAULT_API_URL}),class extends h{config=i}}exports.LiFiRoute=h;exports.createLiFiRouteWithConfig=I;
package/lib/lifi.mjs CHANGED
@@ -1,42 +1,42 @@
1
- import { S as p, V as S, D as T, a as C, s as I, b as P, c as U, t as g, g as x, d as h, e as _, f as w, h as F, M as L, i as R, j as k, k as v, m as N, n as y, o as M, P as O, p as b, q as B } from "./utils-BSxsyW2c.mjs";
2
- import { g as Q } from "./tokenHelpers-DT6mPtNP.mjs";
3
- import { n as z } from "./index-hyk_rzOj.mjs";
4
- import { M as G, N as u, u as V, f as E, e as A, q as H, Y as j, x as X, _ as K, $ as W, v as Y } from "./platform-Cil_UtAQ.mjs";
5
- const $ = (n) => {
6
- if (!n.estimate.fromAmountUSD)
7
- throw new p(new S("Missing 'fromAmountUSD' in step estimate."));
8
- if (!n.estimate.toAmountUSD)
9
- throw new p(new S("Missing 'toAmountUSD' in step estimate."));
1
+ import { S, V as p, D as I, a as T, s as C, b as P, c as U, t as g, g as x, d as h, e as _, f as w, h as F, M as L, i as R, j as k, k as v, m as N, n as y, o as M, P as O, p as b, q as B } from "./utils-mBHX3Jpu.mjs";
2
+ import { g as Q } from "./tokenHelpers-C53sepsl.mjs";
3
+ import { n as z } from "./index-BnKf2rOm.mjs";
4
+ import { M as G, N as u, u as V, f as E, e as A, q as H, Y as j, x as X, _ as K, $ as W, v as Y } from "./platform-CSpAb386.mjs";
5
+ const $ = (e) => {
6
+ if (!e.estimate.fromAmountUSD)
7
+ throw new S(new p("Missing 'fromAmountUSD' in step estimate."));
8
+ if (!e.estimate.toAmountUSD)
9
+ throw new S(new p("Missing 'toAmountUSD' in step estimate."));
10
10
  return {
11
- id: n.id,
12
- fromChainId: n.action.fromToken.chainId,
13
- fromToken: n.action.fromToken,
14
- fromAmount: n.action.fromAmount,
15
- fromAmountUSD: n.estimate.fromAmountUSD,
16
- fromAddress: n.action.fromAddress,
17
- toChainId: n.action.toToken.chainId,
18
- toToken: n.action.toToken,
19
- toAmount: n.estimate.toAmount,
20
- toAmountMin: n.estimate.toAmountMin,
21
- toAmountUSD: n.estimate.toAmountUSD,
22
- toAddress: n.action.toAddress || n.action.fromAddress,
23
- gasCostUSD: n.estimate.gasCosts?.[0]?.amountUSD || "0",
24
- steps: [n],
11
+ id: e.id,
12
+ fromChainId: e.action.fromToken.chainId,
13
+ fromToken: e.action.fromToken,
14
+ fromAmount: e.action.fromAmount,
15
+ fromAmountUSD: e.estimate.fromAmountUSD,
16
+ fromAddress: e.action.fromAddress,
17
+ toChainId: e.action.toToken.chainId,
18
+ toToken: e.action.toToken,
19
+ toAmount: e.estimate.toAmount,
20
+ toAmountMin: e.estimate.toAmountMin,
21
+ toAmountUSD: e.estimate.toAmountUSD,
22
+ toAddress: e.action.toAddress || e.action.fromAddress,
23
+ gasCostUSD: e.estimate.gasCosts?.[0]?.amountUSD || "0",
24
+ steps: [e],
25
25
  insurance: { state: "NOT_INSURABLE", feeAmountUsd: "0" }
26
26
  };
27
27
  };
28
28
  class J extends G {
29
29
  static meta = {
30
30
  name: "LiFi",
31
- provider: "LiFi"
31
+ provider: "LI.FI"
32
32
  };
33
33
  static NATIVE_GAS_DROPOFF_SUPPORTED = !1;
34
34
  static IS_AUTOMATIC = !0;
35
35
  config;
36
36
  getDefaultOptions() {
37
37
  return {
38
- slippage: C,
39
- maxPriceImpact: T,
38
+ slippage: T,
39
+ maxPriceImpact: I,
40
40
  allowDestinationCall: !1
41
41
  };
42
42
  }
@@ -44,41 +44,41 @@ class J extends G {
44
44
  return ["Mainnet"];
45
45
  }
46
46
  static supportedChains(t) {
47
- return I(t);
47
+ return C(t);
48
48
  }
49
49
  static isProtocolSupported(t) {
50
- return I(t.network).includes(t.chain);
50
+ return C(t.network).includes(t.chain);
51
51
  }
52
52
  // LiFi can handle any input and output token that has liquidity on a DeX
53
- static async supportedDestinationTokens(t, e, i) {
54
- return Q(i.chain);
53
+ static async supportedDestinationTokens(t, n, a) {
54
+ return Q(a.chain);
55
55
  }
56
- async validate(t, e) {
56
+ async validate(t, n) {
57
57
  if (t.fromChain.chain === t.toChain.chain)
58
58
  return {
59
59
  valid: !1,
60
- params: e,
60
+ params: n,
61
61
  error: new Error("Same chain swaps are disabled")
62
62
  };
63
- const s = e.options?.slippage ?? C;
63
+ const s = n.options?.slippage ?? T;
64
64
  if (s < 0 || s > 1)
65
65
  return {
66
66
  valid: !1,
67
- params: e,
67
+ params: n,
68
68
  error: new Error("Invalid slippage value")
69
69
  };
70
- const o = e.options?.maxPriceImpact ?? T;
70
+ const o = n.options?.maxPriceImpact ?? I;
71
71
  if (o < 0 || o > 1)
72
72
  return {
73
73
  valid: !1,
74
- params: e,
74
+ params: n,
75
75
  error: new Error("Invalid maxPriceImpact value")
76
76
  };
77
- const c = e.options?.bridges ?? P, d = e.options?.exchanges ?? U;
77
+ const c = n.options?.bridges ?? P, d = n.options?.exchanges ?? U;
78
78
  return {
79
79
  valid: !0,
80
80
  params: {
81
- ...e,
81
+ ...n,
82
82
  normalizedParams: {
83
83
  slippage: s,
84
84
  maxPriceImpact: o,
@@ -88,63 +88,62 @@ class J extends G {
88
88
  }
89
89
  };
90
90
  }
91
- fetchQuote(t, e) {
92
- const { fromChain: i, toChain: s } = t, { normalizedParams: a } = e, o = g(i.chain), l = g(s.chain), c = t.sender ? u(t.sender) : x(i.chain), d = t.recipient ? u(t.recipient) : x(s.chain), { integrator: f, feePercent: m } = this.getFeeConfig(t), r = {
91
+ fetchQuote(t, n) {
92
+ const { fromChain: a, toChain: s } = t, { normalizedParams: i } = n, o = g(a.chain), l = g(s.chain), c = t.sender ? u(t.sender) : x(a.chain), d = t.recipient ? u(t.recipient) : x(s.chain), { integrator: f, feePercent: m } = this.getFeeConfig(t), r = {
93
93
  fromChain: o,
94
94
  toChain: l,
95
95
  fromToken: h(t.source.id),
96
96
  toToken: h(t.destination.id),
97
- fromAmount: V(t.parseAmount(e.amount)).toString(),
97
+ fromAmount: V(t.parseAmount(n.amount)).toString(),
98
98
  fromAddress: c,
99
99
  toAddress: d,
100
- slippage: e.normalizedParams.slippage,
101
- maxPriceImpact: e.normalizedParams.maxPriceImpact,
100
+ slippage: n.normalizedParams.slippage,
101
+ maxPriceImpact: n.normalizedParams.maxPriceImpact,
102
102
  integrator: f,
103
- referrer: e.options.referrer,
103
+ referrer: n.options.referrer,
104
104
  fee: m
105
105
  };
106
- return a.bridges?.allow && (r.allowBridges = a.bridges.allow), a.bridges?.deny && (r.denyBridges = a.bridges.deny), a.bridges?.prefer && (r.preferBridges = a.bridges.prefer), a.exchanges?.allow && (r.allowExchanges = a.exchanges.allow), a.exchanges?.deny && (r.denyExchanges = a.exchanges.deny), a.exchanges?.prefer && (r.preferExchanges = a.exchanges.prefer), _(r);
106
+ return i.bridges?.allow && (r.allowBridges = i.bridges.allow), i.bridges?.deny && (r.denyBridges = i.bridges.deny), i.bridges?.prefer && (r.preferBridges = i.bridges.prefer), i.exchanges?.allow && (r.allowExchanges = i.exchanges.allow), i.exchanges?.deny && (r.denyExchanges = i.exchanges.deny), i.exchanges?.prefer && (r.preferExchanges = i.exchanges.prefer), _(r);
107
107
  }
108
108
  getFeeConfig(t) {
109
109
  return this.config?.getFeeConfig ? this.config.getFeeConfig(t) : { integrator: w, feePercent: 0 };
110
110
  }
111
- async quote(t, e) {
111
+ async quote(t, n) {
112
112
  try {
113
- const i = await this.fetchQuote(t, e);
113
+ const a = await this.fetchQuote(t, n);
114
114
  return {
115
115
  success: !0,
116
- params: e,
116
+ params: n,
117
117
  sourceToken: {
118
118
  token: t.source.id,
119
119
  amount: E(
120
- BigInt(i.estimate?.fromAmount.toString()),
120
+ BigInt(a.estimate?.fromAmount.toString()),
121
121
  t.source.decimals
122
122
  )
123
123
  },
124
124
  destinationToken: {
125
125
  token: t.destination.id,
126
126
  amount: E(
127
- BigInt(i.estimate?.toAmount.toString()),
127
+ BigInt(a.estimate?.toAmount.toString()),
128
128
  t.destination.decimals
129
129
  )
130
130
  },
131
- eta: (i.estimate?.executionDuration || F) * L,
132
- details: i,
133
- provider: i.toolDetails.name
131
+ eta: (a.estimate?.executionDuration || F) * L,
132
+ details: a
134
133
  };
135
- } catch (i) {
134
+ } catch (a) {
136
135
  return {
137
136
  success: !1,
138
- error: i
137
+ error: a
139
138
  };
140
139
  }
141
140
  }
142
- async initiate(t, e, i, s) {
143
- const a = e.address(), o = u(s), l = await t.fromChain.getRpc(), c = [], d = {
144
- ...i.details,
145
- fromAddress: a,
141
+ async initiate(t, n, a, s) {
142
+ const i = n.address(), o = u(s), l = await t.fromChain.getRpc(), c = [], d = {
143
+ ...a.details,
144
+ fromAddress: i,
146
145
  toAddress: o
147
- }, f = $(d), m = { request: t, signer: e, rpc: l, txs: c };
146
+ }, f = $(d), m = { request: t, signer: n, rpc: l, txs: c };
148
147
  if (t.fromChain.chain === "Solana")
149
148
  await R(f, m);
150
149
  else if (t.fromChain.chain === "Sui")
@@ -154,7 +153,7 @@ class J extends G {
154
153
  await N(
155
154
  f,
156
155
  m,
157
- i,
156
+ a,
158
157
  D,
159
158
  h
160
159
  );
@@ -168,38 +167,38 @@ class J extends G {
168
167
  // transfers when no bridge param is specified.
169
168
  // Set it here on the receipt for the track() method below.
170
169
  // Can remove this when the LiFi API is fixed.
171
- tool: i.details.tool
170
+ tool: a.details.tool
172
171
  };
173
- return Object.assign(r, { tool: i.details?.tool });
172
+ return Object.assign(r, { tool: a.details?.tool });
174
173
  }
175
- async *track(t, e = y) {
174
+ async *track(t, n = y) {
176
175
  if (H(t) || j(t) || X(t))
177
176
  return t;
178
- let i = e;
179
- for (; i > 0; ) {
177
+ let a = n;
178
+ for (; a > 0; ) {
180
179
  const s = Date.now();
181
180
  if (K(t) || W(t) || Y(t)) {
182
- const a = await M(
181
+ const i = await M(
183
182
  this.wh.network,
184
183
  t.originTxs[t.originTxs.length - 1],
185
184
  g(t.from).toString(),
186
185
  g(t.to).toString(),
187
186
  t.tool
188
187
  );
189
- if (!a)
188
+ if (!i)
190
189
  throw new Error("Failed to fetch transfer status");
191
- if (a.status === "DONE") {
190
+ if (i.status === "DONE") {
192
191
  const o = {
193
192
  ...t,
194
- originTxs: [{ chain: t.from, txid: a.sending.txHash }],
193
+ originTxs: [{ chain: t.from, txid: i.sending.txHash }],
195
194
  attestation: {},
196
195
  state: A.DestinationFinalized
197
196
  };
198
197
  return yield o, o;
199
- } else if (a.status === "FAILED") {
198
+ } else if (i.status === "FAILED") {
200
199
  const o = {
201
200
  ...t,
202
- originTxs: [{ chain: t.from, txid: a.sending.txHash }],
201
+ originTxs: [{ chain: t.from, txid: i.sending.txHash }],
203
202
  refundTxs: [],
204
203
  state: A.Refunded,
205
204
  attestation: {}
@@ -207,7 +206,7 @@ class J extends G {
207
206
  return yield o, o;
208
207
  }
209
208
  }
210
- await z(O), i -= Date.now() - s;
209
+ await z(O), a -= Date.now() - s;
211
210
  }
212
211
  return t;
213
212
  }
@@ -215,14 +214,14 @@ class J extends G {
215
214
  return `https://scan.li.fi/tx/${t}`;
216
215
  }
217
216
  }
218
- function it(n) {
217
+ function it(e) {
219
218
  return b.set({
220
219
  // The integrator is required here so just set it to the default.
221
220
  // The actual integrator used will be set per-quote in fetchQuote().
222
221
  integrator: w,
223
- apiUrl: n.apiUrl ?? B
222
+ apiUrl: e.apiUrl ?? B
224
223
  }), class extends J {
225
- config = n;
224
+ config = e;
226
225
  };
227
226
  }
228
227
  export {