@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.
- package/README.md +1 -1
- package/dist/assets/{aptos-C9pj8h2Q.js → aptos-DgUCX7ng.js} +3 -3
- package/dist/assets/{evm-DCydYqBI.js → evm-B6bqAPTR.js} +4 -4
- package/dist/assets/{evm-CJXv6IQV.js → evm-Ve5nG8Fs.js} +1 -1
- package/dist/assets/{index-LvDsy6wR.js → index-BJokXZAc.js} +1 -1
- package/dist/assets/{index-BqxX-Ey7.js → index-BJv9sngo.js} +1 -1
- package/dist/assets/{index-C9cy4cDs.js → index-BjZMFLjq.js} +1 -1
- package/dist/assets/{index-FJ-n91Op.js → index-BwbPlAQZ.js} +1 -1
- package/dist/assets/{index-Clu5I99l.js → index-Bzg4DNh9.js} +1 -1
- package/dist/assets/{index-ezhfpCvx.js → index-CKXa657f.js} +1 -1
- package/dist/assets/index-CXiuP738.js +1 -0
- package/dist/assets/{index-CNExx9Zb.js → index-CvTvoHH-.js} +1 -1
- package/dist/assets/{index-C25bHdOM.js → index-D1ULRVbZ.js} +1 -1
- package/dist/assets/{index-DpabQJOX.js → index-DlH9IMQl.js} +1 -1
- package/dist/assets/{index-C8u74RER.js → index-Dsb-5apv.js} +1 -1
- package/dist/assets/{index-D9ApKauA.js → index-_YFUWLUM.js} +1 -1
- package/dist/assets/{index-CoIvdDsX.js → index-jg26xdEi.js} +1 -1
- package/dist/assets/{provider-jsonrpc-DuMpLBV0.js → provider-jsonrpc-DNgUKjG6.js} +1 -1
- package/dist/assets/{solana-DWuIx6gK.js → solana-D4RepnSA.js} +2 -2
- package/dist/assets/{sui-BcTGBE_4.js → sui-Du5h-f8S.js} +3 -3
- package/dist/main.mjs +185 -140
- package/dist/src/components/ConfigurablePageHeader.d.ts +1 -1
- package/dist/src/components/ConfigurablePageHeader.d.ts.map +1 -1
- package/dist/src/components/Header.d.ts +1 -0
- package/dist/src/components/Header.d.ts.map +1 -1
- package/dist/src/components/PageHeader.d.ts +1 -3
- package/dist/src/components/PageHeader.d.ts.map +1 -1
- package/dist/src/components/SampleApp/index.d.ts.map +1 -1
- package/dist/src/components/v3/BackButton.d.ts +6 -0
- package/dist/src/components/v3/BackButton.d.ts.map +1 -0
- package/dist/src/components/v3/FormContent.d.ts +5 -0
- package/dist/src/components/v3/FormContent.d.ts.map +1 -0
- package/dist/src/config/constants.d.ts.map +1 -1
- package/dist/src/config/events.d.ts +2 -1
- package/dist/src/config/events.d.ts.map +1 -1
- package/dist/src/config/mainnet/chains.d.ts.map +1 -1
- package/dist/src/config/mainnet/rpcs.d.ts.map +1 -1
- package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
- package/dist/src/config/mainnet/wrappedTokens.d.ts +6 -0
- package/dist/src/config/mainnet/wrappedTokens.d.ts.map +1 -1
- package/dist/src/config/testnet/chains.d.ts.map +1 -1
- package/dist/src/config/testnet/rpcs.d.ts.map +1 -1
- package/dist/src/config/testnet/tokens.d.ts.map +1 -1
- package/dist/src/config/types.d.ts +6 -11
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/config/ui.d.ts +9 -0
- package/dist/src/config/ui.d.ts.map +1 -1
- package/dist/src/consts/wallet.d.ts.map +1 -1
- package/dist/src/hooks/useAutoEnableGasDropoff.d.ts +3 -1
- package/dist/src/hooks/useAutoEnableGasDropoff.d.ts.map +1 -1
- package/dist/src/hooks/useConnectToLastUsedWallet.d.ts.map +1 -1
- package/dist/src/hooks/useSortedRoutesWithQuotes.d.ts.map +1 -1
- package/dist/src/hooks/useTransactionHistory.d.ts.map +1 -1
- package/dist/src/hooks/useTransactionHistoryLiFi.d.ts +2 -0
- package/dist/src/hooks/useTransactionHistoryLiFi.d.ts.map +1 -1
- package/dist/src/hooks/useTransactionHistoryMayan.d.ts +2 -0
- package/dist/src/hooks/useTransactionHistoryMayan.d.ts.map +1 -1
- package/dist/src/hooks/useTransactionHistoryWHScan.d.ts +2 -1
- package/dist/src/hooks/useTransactionHistoryWHScan.d.ts.map +1 -1
- package/dist/src/icons/PoweredBy.d.ts.map +1 -1
- package/dist/src/icons/TokenIcons.d.ts.map +1 -1
- package/dist/src/icons/Tokens/AUSD.d.ts +4 -0
- package/dist/src/icons/Tokens/AUSD.d.ts.map +1 -0
- package/dist/src/routes/lifi/LiFiRoute.d.ts.map +1 -1
- package/dist/src/routes/mayan/utils.d.ts.map +1 -1
- package/dist/src/routes/monad/consts.d.ts +1 -0
- package/dist/src/routes/monad/consts.d.ts.map +1 -1
- package/dist/src/routes/monad/monad.test.d.ts +1 -0
- package/dist/src/routes/monad/monad.test.d.ts.map +1 -0
- package/dist/src/routes/monad/utils.d.ts.map +1 -1
- package/dist/src/sdklegacy/config/MAINNET.d.ts.map +1 -1
- package/dist/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
- package/dist/src/telemetry/types.d.ts +4 -2
- package/dist/src/telemetry/types.d.ts.map +1 -1
- package/dist/src/theme.d.ts +4 -3
- package/dist/src/theme.d.ts.map +1 -1
- package/dist/src/utils/errors.d.ts.map +1 -1
- package/dist/src/utils/fees.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/sdkv2.d.ts.map +1 -1
- package/dist/src/utils/wallet/index.d.ts +1 -0
- package/dist/src/utils/wallet/index.d.ts.map +1 -1
- package/dist/src/views/Terms.d.ts.map +1 -1
- package/dist/src/views/TxSearch.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/AssetPicker/TokenPickerButton.d.ts +17 -0
- package/dist/src/views/v3/Bridge/AssetPicker/TokenPickerButton.d.ts.map +1 -0
- package/dist/src/views/v3/Bridge/AssetPicker/TokenPickerButtonContent.d.ts +8 -0
- package/dist/src/views/v3/Bridge/AssetPicker/TokenPickerButtonContent.d.ts.map +1 -0
- package/dist/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButton.test.d.ts +2 -0
- package/dist/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButton.test.d.ts.map +1 -0
- package/dist/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButtonContent.test.d.ts +2 -0
- package/dist/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButtonContent.test.d.ts.map +1 -0
- package/dist/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/Routes/index.d.ts +2 -1
- package/dist/src/views/v3/Bridge/Routes/index.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/WalletConnector/Controller.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/WalletConnector/WalletAddress.d.ts +9 -0
- package/dist/src/views/v3/Bridge/WalletConnector/WalletAddress.d.ts.map +1 -0
- package/dist/src/views/v3/Bridge/WalletConnector/WalletPickerContent.d.ts.map +1 -1
- package/dist/src/views/v3/Bridge/WalletConnector/__tests__/WalletAddress.test.d.ts +2 -0
- package/dist/src/views/v3/Bridge/WalletConnector/__tests__/WalletAddress.test.d.ts.map +1 -0
- package/dist/src/views/v3/Bridge/index.d.ts.map +1 -1
- package/dist/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -1
- package/dist/src/views/v3/Redeem/index.d.ts.map +1 -1
- package/dist/src/views/v3/TxHistory/Item/index.d.ts.map +1 -1
- package/dist/src/views/v3/TxHistory/Widget/Item.d.ts.map +1 -1
- package/lib/{account-cIQhxn1E.js → account-K005OXgL.js} +1 -1
- package/lib/{account-BVl6Reot.mjs → account-TXlxMyv4.mjs} +2 -2
- package/lib/{address-rVHWlcKQ.mjs → address-CX0E32ut.mjs} +1 -1
- package/lib/{address-W9jn6Qdk.js → address-DqbIfKOu.js} +1 -1
- package/lib/{aptos-BRApiL_4.mjs → aptos-B1Gf2eCD.mjs} +5 -5
- package/lib/{aptos-CNHYHK9c.js → aptos-CnswqE-C.js} +2 -2
- package/lib/{aptos-D1WFzBMy.mjs → aptos-DRfXJ8Ba.mjs} +7 -7
- package/lib/{aptos-d56Mw8DO.js → aptos-DcdKyekw.js} +1 -1
- package/lib/{associatedTokenAccount-C4vEEbG5.js → associatedTokenAccount-CeqdaO2m.js} +1 -1
- package/lib/{associatedTokenAccount-DF6phO3l.mjs → associatedTokenAccount-Dsm4Hq32.mjs} +3 -3
- package/lib/{basic-BxzNlZH2.js → basic-BS7Z1PMG.js} +1 -1
- package/lib/{basic-Bj1RjRlj.js → basic-C6VXQ7m-.js} +1 -1
- package/lib/{basic-DR75AlQZ.mjs → basic-CFbslwLM.mjs} +3 -3
- package/lib/{basic-DjAbnFVK.mjs → basic-DnhL0oWa.mjs} +3 -3
- package/lib/{chunk-KJH4KKG6-Brt4fyqz.mjs → chunk-KJH4KKG6-BfVMUPsB.mjs} +3 -3
- package/lib/{chunk-KJH4KKG6-BbF5W1_N.js → chunk-KJH4KKG6-CJx-rDa6.js} +1 -1
- package/lib/constants-BCFTvlgh.js +1 -0
- package/lib/{constants-PWEvTwIh.mjs → constants-CTJ_-E0d.mjs} +5 -4
- package/lib/{core-CkIseV8K.mjs → core-DT6TBPQP.mjs} +6 -6
- package/lib/{core-CCO0WKg_.js → core-RRp0K__1.js} +3 -3
- package/lib/{create-CChLkbGc.mjs → create-C5dhTMHL.mjs} +1 -1
- package/lib/{create-4w0DrcRO.js → create-bA3Gyivs.js} +1 -1
- package/lib/{evm-BAU31wxF.js → evm-BwCfQIyJ.js} +2 -2
- package/lib/{evm-CMxUV_bG.mjs → evm-BxF9XPn4.mjs} +7 -7
- package/lib/{evm-9NnChBii.js → evm-C3B8jHD7.js} +1 -1
- package/lib/{evm-2dSclZz6.mjs → evm-DlOCiplA.mjs} +5 -5
- package/lib/executor.js +1 -1
- package/lib/executor.mjs +13 -15
- package/lib/hosted.js +1 -1
- package/lib/hosted.mjs +1 -1
- package/lib/hypercore-DbqOAqKF.js +4 -0
- package/lib/{hypercore-Bmlyd4uI.mjs → hypercore-H7pw_pN4.mjs} +4858 -3107
- package/lib/{index-qL4D-cpk.js → index-1T4sIL8n.js} +1 -1
- package/lib/{index-Ap7250Gf.mjs → index-39tU5Y5t.mjs} +6 -6
- package/lib/{index-D7gCsil9.js → index-6m7yero0.js} +1 -1
- package/lib/{index-C5I7QiZ7.mjs → index-B6Ppg6EZ.mjs} +3 -3
- package/lib/{index-xvG6cxNx.js → index-BEIFBxtP.js} +1 -1
- package/lib/{index-zIzzPp6D.mjs → index-BHpJUZne.mjs} +3 -3
- package/lib/{index-CS6YnwIH.js → index-BJ0xVutl.js} +1 -1
- package/lib/{index-DUyGY36L.js → index-BNpkgexR.js} +1 -1
- package/lib/{index-C61IKE_V.mjs → index-BSIPYyeZ.mjs} +2 -2
- package/lib/{index-EbSw7SbC.js → index-BTjUHY0e.js} +1 -1
- package/lib/{index-BuHdMHLz.mjs → index-Ba1zbu3Q.mjs} +2 -2
- package/lib/{index-CPGWCfWD.js → index-BbE02hdW.js} +8 -8
- package/lib/{index-BU35GfG0.mjs → index-Bdtj4LUz.mjs} +2 -2
- package/lib/{index-BCKX-m7h.mjs → index-BmP0jPVN.mjs} +12 -11
- package/lib/{index-hyk_rzOj.mjs → index-BnKf2rOm.mjs} +3246 -3039
- package/lib/{index-Ds7-hb1n.mjs → index-BtU67kjy.mjs} +1 -1
- package/lib/{index-Cl9Df47-.mjs → index-BuEKhdrW.mjs} +3 -3
- package/lib/{index-CN7M4gwf.mjs → index-BviSNDV7.mjs} +5 -5
- package/lib/{index-Cys9e11O.js → index-C-SMuVS3.js} +1 -1
- package/lib/{index-Cg1Xo1eZ.js → index-C85u3Gj5.js} +1 -1
- package/lib/{index-arjwwpj2.mjs → index-CGqJokTg.mjs} +1 -1
- package/lib/{index-Da9rvmCc.js → index-Cb0UWLGI.js} +1 -1
- package/lib/{index-DHnmtpvA.mjs → index-CcbY14s5.mjs} +4 -4
- package/lib/{index-BKgliEPZ.mjs → index-CrWTw0Se.mjs} +2 -2
- package/lib/{index-B16yfCYF.mjs → index-CsLyPoC6.mjs} +4 -4
- package/lib/{index-B_JJ50Y-.mjs → index-D-HUNEka.mjs} +4 -4
- package/lib/index-DAJZN12d.js +1 -0
- package/lib/{index-BhMcIAHt.js → index-DJ2w1fz1.js} +1 -1
- package/lib/{index-C5j1HoFr.js → index-DVm_f5E1.js} +1 -1
- package/lib/{index-CO4ZoIAU.mjs → index-DjmVBSGQ.mjs} +4 -4
- package/lib/{index-Co3mm7UN.mjs → index-DrJE8udd.mjs} +1 -1
- package/lib/{index-fTUcaKb4.js → index-DuhYwr0t.js} +1 -1
- package/lib/{index-BQ0lWQfT.mjs → index-DwEx1Hn-.mjs} +2 -2
- package/lib/{index-DBofyYkS.js → index-DziujHu1.js} +1 -1
- package/lib/{index-Dou5sFku.js → index-JWbF-m3e.js} +1 -1
- package/lib/{index-_IZO0QRl.mjs → index-NAUBlFLG.mjs} +4 -4
- package/lib/{index-D1odbjeH.mjs → index-VnJcNK62.mjs} +3 -3
- package/lib/{index-DVxmRy4C.js → index-WrXSs0ic.js} +1 -1
- package/lib/{index-CsdD1TNi.js → index-aMKUba1k.js} +1 -1
- package/lib/{index-BXsTZ9x_.mjs → index-dufPAW5T.mjs} +298 -267
- package/lib/{index-lZY5fTXF.js → index-lAqXlt-a.js} +1 -1
- package/lib/{index-cRi8si5A.js → index-mikg85u5.js} +1 -1
- package/lib/{index-BScgBddV.mjs → index-o1SAPXm_.mjs} +3 -3
- package/lib/{index-CZHdN9pg.js → index-pn6NZmOS.js} +1 -1
- package/lib/{index-DNZ-Pkpm.mjs → index-rxQSA9t0.mjs} +6 -6
- package/lib/{index-CHvWl09c.js → index-t_koRpGi.js} +1 -1
- package/lib/{index-DALvn9lg.js → index-v7w8krM0.js} +1 -1
- package/lib/{index-japympio.js → index-wadjmD_G.js} +1 -1
- package/lib/{index.es-BC9c-IV7.mjs → index.es-3KAM8l3G.mjs} +4 -4
- package/lib/{index.es-DxdcaWwJ.js → index.es-B3FwsRfN.js} +3 -3
- package/lib/{index.es-ByyzusUN.mjs → index.es-CYyuSfPG.mjs} +4 -4
- package/lib/{index.es-BmZ1Eaml.js → index.es-ClIr5Gv-.js} +1 -1
- package/lib/index.js +78 -33
- package/lib/index.mjs +9157 -8833
- package/lib/{keypair-DWucLGoA.js → keypair-DCgXFOw5.js} +1 -1
- package/lib/{keypair-CP7syX9B.mjs → keypair-vpG2fl-q.mjs} +3 -3
- package/lib/lifi.js +1 -1
- package/lib/lifi.mjs +75 -76
- package/lib/mayan.js +2 -2
- package/lib/mayan.mjs +11 -10
- package/lib/{mint-CoNdQTGM.mjs → mint-BPrKG-Zc.mjs} +3 -3
- package/lib/{mint-CxQ6P5lT.js → mint-DW-XgF68.js} +1 -1
- package/lib/monad.js +1 -1
- package/lib/monad.mjs +91 -58
- package/lib/multiToken-B9BoSxdr.js +1 -0
- package/lib/{multiToken-Bm-K5dRJ.mjs → multiToken-DMllgxzT.mjs} +4 -3
- package/lib/ntt.js +2 -2
- package/lib/ntt.mjs +77 -86
- package/lib/{platform-Cil_UtAQ.mjs → platform-CSpAb386.mjs} +2788 -2748
- package/lib/{platform-BMKYxqvv.js → platform-Csj1Outc.js} +1 -1
- package/lib/platform-DCcL7jHP.js +11 -0
- package/lib/{platform-vRQufc6j.mjs → platform-YzJZdSCf.mjs} +3 -3
- package/lib/{secp256k1-D24BZJAq.js → secp256k1-B2G0zB-5.js} +1 -1
- package/lib/{secp256k1-CXRI4XfW.mjs → secp256k1-BZFiBDHQ.mjs} +1 -1
- package/lib/{secp256k1-r0ke-jeG.js → secp256k1-Bz-QjKBU.js} +1 -1
- package/lib/{secp256k1-rufcCDcw.mjs → secp256k1-Cteng3v9.mjs} +1 -1
- package/lib/{secp256k1-BLiUzGcX.js → secp256k1-CxjctkO3.js} +1 -1
- package/lib/{secp256k1-ZQ8UIhmk.mjs → secp256k1-D3i7kc2M.mjs} +1 -1
- package/lib/{signer-0hWrZ5BZ.mjs → signer-D2GRgRrw.mjs} +2 -2
- package/lib/{signer-DyqulDUM.js → signer-gjSiV5v3.js} +1 -1
- package/lib/{solana-CXtk3UX1.js → solana-BE2DAanS.js} +4 -4
- package/lib/{solana-lhrSUH_P.mjs → solana-Df231Yni.mjs} +10 -10
- package/lib/solana-DfW5T_64.mjs +18 -0
- package/lib/solana-Edd9tIkX.js +1 -0
- package/lib/{solanaEmbed.esm-CFu0h50b.mjs → solanaEmbed.esm-B9WG-Afi.mjs} +4 -4
- package/lib/{solanaEmbed.esm-BMynjubZ.js → solanaEmbed.esm-BqcrHrhl.js} +1 -1
- package/lib/{solidity-CbDkqHjE.js → solidity-BW7c8rFv.js} +1 -1
- package/lib/{solidity-Dk_mvceo.mjs → solidity-D9gSgFcp.mjs} +1 -1
- package/lib/src/components/ConfigurablePageHeader.d.ts +1 -1
- package/lib/src/components/ConfigurablePageHeader.d.ts.map +1 -1
- package/lib/src/components/Header.d.ts +1 -0
- package/lib/src/components/Header.d.ts.map +1 -1
- package/lib/src/components/PageHeader.d.ts +1 -3
- package/lib/src/components/PageHeader.d.ts.map +1 -1
- package/lib/src/components/SampleApp/index.d.ts.map +1 -1
- package/lib/src/components/v3/BackButton.d.ts +6 -0
- package/lib/src/components/v3/BackButton.d.ts.map +1 -0
- package/lib/src/components/v3/FormContent.d.ts +5 -0
- package/lib/src/components/v3/FormContent.d.ts.map +1 -0
- package/lib/src/config/constants.d.ts.map +1 -1
- package/lib/src/config/events.d.ts +2 -1
- package/lib/src/config/events.d.ts.map +1 -1
- package/lib/src/config/mainnet/chains.d.ts.map +1 -1
- package/lib/src/config/mainnet/rpcs.d.ts.map +1 -1
- package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
- package/lib/src/config/mainnet/wrappedTokens.d.ts +6 -0
- package/lib/src/config/mainnet/wrappedTokens.d.ts.map +1 -1
- package/lib/src/config/testnet/chains.d.ts.map +1 -1
- package/lib/src/config/testnet/rpcs.d.ts.map +1 -1
- package/lib/src/config/testnet/tokens.d.ts.map +1 -1
- package/lib/src/config/types.d.ts +6 -11
- package/lib/src/config/types.d.ts.map +1 -1
- package/lib/src/config/ui.d.ts +9 -0
- package/lib/src/config/ui.d.ts.map +1 -1
- package/lib/src/consts/wallet.d.ts.map +1 -1
- package/lib/src/hooks/useAutoEnableGasDropoff.d.ts +3 -1
- package/lib/src/hooks/useAutoEnableGasDropoff.d.ts.map +1 -1
- package/lib/src/hooks/useConnectToLastUsedWallet.d.ts.map +1 -1
- package/lib/src/hooks/useSortedRoutesWithQuotes.d.ts.map +1 -1
- package/lib/src/hooks/useTransactionHistory.d.ts.map +1 -1
- package/lib/src/hooks/useTransactionHistoryLiFi.d.ts +2 -0
- package/lib/src/hooks/useTransactionHistoryLiFi.d.ts.map +1 -1
- package/lib/src/hooks/useTransactionHistoryMayan.d.ts +2 -0
- package/lib/src/hooks/useTransactionHistoryMayan.d.ts.map +1 -1
- package/lib/src/hooks/useTransactionHistoryWHScan.d.ts +2 -1
- package/lib/src/hooks/useTransactionHistoryWHScan.d.ts.map +1 -1
- package/lib/src/icons/PoweredBy.d.ts.map +1 -1
- package/lib/src/icons/TokenIcons.d.ts.map +1 -1
- package/lib/src/icons/Tokens/AUSD.d.ts +4 -0
- package/lib/src/icons/Tokens/AUSD.d.ts.map +1 -0
- package/lib/src/routes/lifi/LiFiRoute.d.ts.map +1 -1
- package/lib/src/routes/mayan/utils.d.ts.map +1 -1
- package/lib/src/routes/monad/consts.d.ts +1 -0
- package/lib/src/routes/monad/consts.d.ts.map +1 -1
- package/lib/src/routes/monad/monad.test.d.ts +1 -0
- package/lib/src/routes/monad/monad.test.d.ts.map +1 -0
- package/lib/src/routes/monad/utils.d.ts.map +1 -1
- package/lib/src/sdklegacy/config/MAINNET.d.ts.map +1 -1
- package/lib/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
- package/lib/src/telemetry/types.d.ts +4 -2
- package/lib/src/telemetry/types.d.ts.map +1 -1
- package/lib/src/theme.d.ts +4 -3
- package/lib/src/theme.d.ts.map +1 -1
- package/lib/src/utils/errors.d.ts.map +1 -1
- package/lib/src/utils/fees.d.ts.map +1 -1
- package/lib/src/utils/index.d.ts.map +1 -1
- package/lib/src/utils/sdkv2.d.ts.map +1 -1
- package/lib/src/utils/wallet/index.d.ts +1 -0
- package/lib/src/utils/wallet/index.d.ts.map +1 -1
- package/lib/src/views/Terms.d.ts.map +1 -1
- package/lib/src/views/TxSearch.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/AssetPicker/PickerModal.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/AssetPicker/TokenPickerButton.d.ts +17 -0
- package/lib/src/views/v3/Bridge/AssetPicker/TokenPickerButton.d.ts.map +1 -0
- package/lib/src/views/v3/Bridge/AssetPicker/TokenPickerButtonContent.d.ts +8 -0
- package/lib/src/views/v3/Bridge/AssetPicker/TokenPickerButtonContent.d.ts.map +1 -0
- package/lib/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButton.test.d.ts +2 -0
- package/lib/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButton.test.d.ts.map +1 -0
- package/lib/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButtonContent.test.d.ts +2 -0
- package/lib/src/views/v3/Bridge/AssetPicker/__tests__/TokenPickerButtonContent.test.d.ts.map +1 -0
- package/lib/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/Routes/index.d.ts +2 -1
- package/lib/src/views/v3/Bridge/Routes/index.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/WalletConnector/Controller.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/WalletConnector/ExplorerLink.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/WalletConnector/WalletAddress.d.ts +9 -0
- package/lib/src/views/v3/Bridge/WalletConnector/WalletAddress.d.ts.map +1 -0
- package/lib/src/views/v3/Bridge/WalletConnector/WalletPickerContent.d.ts.map +1 -1
- package/lib/src/views/v3/Bridge/WalletConnector/__tests__/WalletAddress.test.d.ts +2 -0
- package/lib/src/views/v3/Bridge/WalletConnector/__tests__/WalletAddress.test.d.ts.map +1 -0
- package/lib/src/views/v3/Bridge/index.d.ts.map +1 -1
- package/lib/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -1
- package/lib/src/views/v3/Redeem/index.d.ts.map +1 -1
- package/lib/src/views/v3/TxHistory/Item/index.d.ts.map +1 -1
- package/lib/src/views/v3/TxHistory/Widget/Item.d.ts.map +1 -1
- package/lib/{sui-CZNJPZ5q.mjs → sui-B9tYcgyb.mjs} +4 -4
- package/lib/{sui-CBxh7zmc.js → sui-BVwNcgQT.js} +1 -1
- package/lib/{sui-LiXjD27c.js → sui-BtyZE8YC.js} +1 -1
- package/lib/{sui-cpCvd7RC.mjs → sui-QP4AZGNc.mjs} +6 -6
- package/lib/{tokenHelpers-DT6mPtNP.mjs → tokenHelpers-C53sepsl.mjs} +1 -1
- package/lib/{tokenHelpers-DZRdlDO-.js → tokenHelpers-DITWDel1.js} +1 -1
- package/lib/{tokens-FIs8YBYj.mjs → tokens-CO0YQ3R2.mjs} +3 -3
- package/lib/{tokens--uOMY2-j.js → tokens-CiSHS7oi.js} +1 -1
- package/lib/types-CgveSjsw.js +1 -0
- package/lib/{types-iFgwQ7vG.mjs → types-Dxx2g1wS.mjs} +170 -168
- package/lib/{unsignedTransaction-DCDxTFq8.mjs → unsignedTransaction-D2Ja0SuN.mjs} +2 -2
- package/lib/{unsignedTransaction-DA4tlY5u.js → unsignedTransaction-qRBv5Cnd.js} +2 -2
- package/lib/{utils-DMf7wRGI.js → utils-BEljbqMf.js} +1 -1
- package/lib/{utils-BSxsyW2c.mjs → utils-mBHX3Jpu.mjs} +4 -4
- package/lib/{w3m-modal-CBYJj-sR.mjs → w3m-modal-5v-rsnN8.mjs} +2 -2
- package/lib/{w3m-modal-B3FfPDki.js → w3m-modal-B0Lu-6W8.js} +1 -1
- package/lib/{w3m-modal-B5PtkowQ.js → w3m-modal-B2xHxAWg.js} +1 -1
- package/lib/{w3m-modal-h85Jyy9l.mjs → w3m-modal-SlcSCSnx.mjs} +2 -2
- package/lib/{wallet-CMTEE6Oa.mjs → wallet-Cyosy4Hc.mjs} +1 -1
- package/lib/{wallet-BMli0fbu.js → wallet-a0_jwP8j.js} +1 -1
- package/lib/{web3-CUwFm9Lx.mjs → web3-CdErAVj5.mjs} +2 -2
- package/lib/{web3-DdUeM7iQ.js → web3-x1WCGDiy.js} +1 -1
- package/package.json +49 -47
- package/dist/assets/index-_UMHESh0.js +0 -1
- package/dist/src/components/Button.d.ts +0 -13
- package/dist/src/components/Button.d.ts.map +0 -1
- package/dist/src/icons/Down.d.ts +0 -5
- package/dist/src/icons/Down.d.ts.map +0 -1
- package/lib/constants-Bkyn6tLV.js +0 -1
- package/lib/hypercore-DJV-pPts.js +0 -4
- package/lib/index-BYuhx88C.js +0 -1
- package/lib/multiToken-YoNvxjur.js +0 -1
- package/lib/platform-CCG_jgOO.js +0 -11
- package/lib/solana-DKFJvqX8.mjs +0 -18
- package/lib/solana-Dmje_Si8.js +0 -1
- package/lib/src/components/Button.d.ts +0 -13
- package/lib/src/components/Button.d.ts.map +0 -1
- package/lib/src/icons/Down.d.ts +0 -5
- package/lib/src/icons/Down.d.ts.map +0 -1
- package/lib/types-CjNs2oB0.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./unsignedTransaction-
|
|
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-
|
|
2
|
-
import { bt as L, b2 as h, cX as b, cZ as v } from "./platform-
|
|
3
|
-
import { m as M } from "./index-
|
|
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-
|
|
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
|
|
2
|
-
import { g as Q } from "./tokenHelpers-
|
|
3
|
-
import { n as z } from "./index-
|
|
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-
|
|
5
|
-
const $ = (
|
|
6
|
-
if (!
|
|
7
|
-
throw new
|
|
8
|
-
if (!
|
|
9
|
-
throw new
|
|
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:
|
|
12
|
-
fromChainId:
|
|
13
|
-
fromToken:
|
|
14
|
-
fromAmount:
|
|
15
|
-
fromAmountUSD:
|
|
16
|
-
fromAddress:
|
|
17
|
-
toChainId:
|
|
18
|
-
toToken:
|
|
19
|
-
toAmount:
|
|
20
|
-
toAmountMin:
|
|
21
|
-
toAmountUSD:
|
|
22
|
-
toAddress:
|
|
23
|
-
gasCostUSD:
|
|
24
|
-
steps: [
|
|
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: "
|
|
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:
|
|
39
|
-
maxPriceImpact:
|
|
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
|
|
47
|
+
return C(t);
|
|
48
48
|
}
|
|
49
49
|
static isProtocolSupported(t) {
|
|
50
|
-
return
|
|
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,
|
|
54
|
-
return Q(
|
|
53
|
+
static async supportedDestinationTokens(t, n, a) {
|
|
54
|
+
return Q(a.chain);
|
|
55
55
|
}
|
|
56
|
-
async validate(t,
|
|
56
|
+
async validate(t, n) {
|
|
57
57
|
if (t.fromChain.chain === t.toChain.chain)
|
|
58
58
|
return {
|
|
59
59
|
valid: !1,
|
|
60
|
-
params:
|
|
60
|
+
params: n,
|
|
61
61
|
error: new Error("Same chain swaps are disabled")
|
|
62
62
|
};
|
|
63
|
-
const s =
|
|
63
|
+
const s = n.options?.slippage ?? T;
|
|
64
64
|
if (s < 0 || s > 1)
|
|
65
65
|
return {
|
|
66
66
|
valid: !1,
|
|
67
|
-
params:
|
|
67
|
+
params: n,
|
|
68
68
|
error: new Error("Invalid slippage value")
|
|
69
69
|
};
|
|
70
|
-
const o =
|
|
70
|
+
const o = n.options?.maxPriceImpact ?? I;
|
|
71
71
|
if (o < 0 || o > 1)
|
|
72
72
|
return {
|
|
73
73
|
valid: !1,
|
|
74
|
-
params:
|
|
74
|
+
params: n,
|
|
75
75
|
error: new Error("Invalid maxPriceImpact value")
|
|
76
76
|
};
|
|
77
|
-
const c =
|
|
77
|
+
const c = n.options?.bridges ?? P, d = n.options?.exchanges ?? U;
|
|
78
78
|
return {
|
|
79
79
|
valid: !0,
|
|
80
80
|
params: {
|
|
81
|
-
...
|
|
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,
|
|
92
|
-
const { fromChain:
|
|
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(
|
|
97
|
+
fromAmount: V(t.parseAmount(n.amount)).toString(),
|
|
98
98
|
fromAddress: c,
|
|
99
99
|
toAddress: d,
|
|
100
|
-
slippage:
|
|
101
|
-
maxPriceImpact:
|
|
100
|
+
slippage: n.normalizedParams.slippage,
|
|
101
|
+
maxPriceImpact: n.normalizedParams.maxPriceImpact,
|
|
102
102
|
integrator: f,
|
|
103
|
-
referrer:
|
|
103
|
+
referrer: n.options.referrer,
|
|
104
104
|
fee: m
|
|
105
105
|
};
|
|
106
|
-
return
|
|
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,
|
|
111
|
+
async quote(t, n) {
|
|
112
112
|
try {
|
|
113
|
-
const
|
|
113
|
+
const a = await this.fetchQuote(t, n);
|
|
114
114
|
return {
|
|
115
115
|
success: !0,
|
|
116
|
-
params:
|
|
116
|
+
params: n,
|
|
117
117
|
sourceToken: {
|
|
118
118
|
token: t.source.id,
|
|
119
119
|
amount: E(
|
|
120
|
-
BigInt(
|
|
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(
|
|
127
|
+
BigInt(a.estimate?.toAmount.toString()),
|
|
128
128
|
t.destination.decimals
|
|
129
129
|
)
|
|
130
130
|
},
|
|
131
|
-
eta: (
|
|
132
|
-
details:
|
|
133
|
-
provider: i.toolDetails.name
|
|
131
|
+
eta: (a.estimate?.executionDuration || F) * L,
|
|
132
|
+
details: a
|
|
134
133
|
};
|
|
135
|
-
} catch (
|
|
134
|
+
} catch (a) {
|
|
136
135
|
return {
|
|
137
136
|
success: !1,
|
|
138
|
-
error:
|
|
137
|
+
error: a
|
|
139
138
|
};
|
|
140
139
|
}
|
|
141
140
|
}
|
|
142
|
-
async initiate(t,
|
|
143
|
-
const
|
|
144
|
-
...
|
|
145
|
-
fromAddress:
|
|
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:
|
|
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
|
-
|
|
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:
|
|
170
|
+
tool: a.details.tool
|
|
172
171
|
};
|
|
173
|
-
return Object.assign(r, { tool:
|
|
172
|
+
return Object.assign(r, { tool: a.details?.tool });
|
|
174
173
|
}
|
|
175
|
-
async *track(t,
|
|
174
|
+
async *track(t, n = y) {
|
|
176
175
|
if (H(t) || j(t) || X(t))
|
|
177
176
|
return t;
|
|
178
|
-
let
|
|
179
|
-
for (;
|
|
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
|
|
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 (!
|
|
188
|
+
if (!i)
|
|
190
189
|
throw new Error("Failed to fetch transfer status");
|
|
191
|
-
if (
|
|
190
|
+
if (i.status === "DONE") {
|
|
192
191
|
const o = {
|
|
193
192
|
...t,
|
|
194
|
-
originTxs: [{ chain: t.from, txid:
|
|
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 (
|
|
198
|
+
} else if (i.status === "FAILED") {
|
|
200
199
|
const o = {
|
|
201
200
|
...t,
|
|
202
|
-
originTxs: [{ chain: t.from, txid:
|
|
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),
|
|
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(
|
|
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:
|
|
222
|
+
apiUrl: e.apiUrl ?? B
|
|
224
223
|
}), class extends J {
|
|
225
|
-
config =
|
|
224
|
+
config = e;
|
|
226
225
|
};
|
|
227
226
|
}
|
|
228
227
|
export {
|