@wormhole-foundation/wormhole-connect 3.0.0-beta.12-development → 3.0.0-beta.13-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/dist/assets/{tokens-BjeNFBPV.js → tokens-CrPLX1jh.js} +13 -13
- package/dist/main.js +75 -75
- package/dist/src/components/SampleApp/index.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/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 +2 -1
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/contexts/TokensContext.d.ts.map +1 -1
- package/dist/src/exports/executor.d.ts +1 -1
- package/dist/src/exports/executor.d.ts.map +1 -1
- package/dist/src/icons/ChainIcons.d.ts.map +1 -1
- package/dist/src/icons/Chains/LINEA.d.ts +4 -0
- package/dist/src/icons/Chains/LINEA.d.ts.map +1 -0
- package/dist/src/icons/Chains/POLY.d.ts +2 -2
- package/dist/src/icons/Chains/POLY.d.ts.map +1 -1
- package/dist/src/icons/Chains/SONIC.d.ts +4 -0
- package/dist/src/icons/Chains/SONIC.d.ts.map +1 -0
- package/dist/src/icons/SvgDefs.d.ts.map +1 -1
- package/dist/src/icons/TokenIcons.d.ts.map +1 -1
- package/dist/src/icons/Tokens/POLY.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/utils/coingecko.d.ts.map +1 -1
- package/dist/src/utils/sdkv2.d.ts +1 -1
- package/dist/src/utils/sdkv2.d.ts.map +1 -1
- package/dist/src/utils/wallet/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/GasSlider/index.d.ts +1 -0
- package/dist/src/views/v2/Bridge/GasSlider/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/dist/src/views/v2/Redeem/index.d.ts.map +1 -1
- package/lib/{account-k-CXVcvA.mjs → account-DRrQuG9b.mjs} +1 -1
- package/lib/{account-gVjkECaX.js → account-nmHnnwf-.js} +1 -1
- package/lib/{add-Bgr8Uh8B.mjs → add-B3TOzisV.mjs} +1 -1
- package/lib/{add-CgyvYm-l.js → add-PboF8xOA.js} +1 -1
- package/lib/{address-CrYNZ_Nj.mjs → address-BkeBsCZD.mjs} +1837 -1809
- package/lib/{address-ByLIzxVb.mjs → address-CHEvC20V.mjs} +1 -1
- package/lib/{address-DfgK_jn7.js → address-CslafWGT.js} +1 -1
- package/lib/address-DKM11kf_.js +15 -0
- package/lib/{address-DGYJWkFz.js → address-vHTAfgt6.js} +1 -1
- package/lib/{address-BJNAPSnr.mjs → address-xvE59bSC.mjs} +1 -1
- package/lib/{all-wallets-BeYsJiCM.js → all-wallets-C3KaOAtR.js} +1 -1
- package/lib/{all-wallets-DdRIEq-V.mjs → all-wallets-i8sBvyse.mjs} +1 -1
- package/lib/{app-store-C9yZzH2t.js → app-store-DMPxp7LI.js} +1 -1
- package/lib/{app-store-eKRqPW4N.mjs → app-store-D_gEJYR-.mjs} +1 -1
- package/lib/{apple-DQcCTOa_.mjs → apple-C7dx7WbA.mjs} +1 -1
- package/lib/{apple-B3Aps_l8.js → apple-CBv-wD_N.js} +1 -1
- package/lib/{aptos-DySrgy5u.mjs → aptos-5WdoBDe7.mjs} +3 -3
- package/lib/{aptos-IciOSw-S.js → aptos-7NDR_C5e.js} +2 -2
- package/lib/{aptos-CxfKcGPe.js → aptos-BHb4m4xc.js} +1 -1
- package/lib/{aptos-M18090BQ.mjs → aptos-DjCb_S8U.mjs} +7 -7
- package/lib/{arrow-bottom-CUgsoqql.js → arrow-bottom-JVAM2flH.js} +1 -1
- package/lib/{arrow-bottom-circle-CvfJ5p_y.mjs → arrow-bottom-circle-CNlCzI_j.mjs} +1 -1
- package/lib/{arrow-bottom-circle-u8tFbHrW.js → arrow-bottom-circle-Cwm4Epf6.js} +1 -1
- package/lib/{arrow-bottom-Duiu5Tg_.mjs → arrow-bottom-dGyduTnX.mjs} +1 -1
- package/lib/{arrow-left-IZiFrwcP.js → arrow-left-BCNUIhF5.js} +1 -1
- package/lib/{arrow-left-avYXBHF4.mjs → arrow-left-PKOB36Bh.mjs} +1 -1
- package/lib/{arrow-right-Cbunep5L.mjs → arrow-right-CS5PKMHz.mjs} +1 -1
- package/lib/{arrow-right-CF-NNN4L.js → arrow-right-DmYVvh1l.js} +1 -1
- package/lib/{arrow-top-DBWWW9Oy.mjs → arrow-top-BkM6S1a6.mjs} +1 -1
- package/lib/{arrow-top-DCGkz6k-.js → arrow-top-Bo7YKrfd.js} +1 -1
- package/lib/{bank-C2jhIapN.mjs → bank-CCF3DOdG.mjs} +1 -1
- package/lib/{bank-C-CLDGG9.js → bank-DLZl3tlW.js} +1 -1
- package/lib/{basic-CIBqPAeW.mjs → basic-B3TQQ8Sq.mjs} +2 -2
- package/lib/{basic-DVsxPr6-.js → basic-DVoqEslQ.js} +1 -1
- package/lib/{blake2b-GH2Zzt65.mjs → blake2b-CAi92fbu.mjs} +17 -17
- package/lib/{blake2b-CCJ4LnEi.js → blake2b-DQdnnomV.js} +1 -1
- package/lib/{browser-DFX8bJKi.mjs → browser-8x7RJ5du.mjs} +1 -1
- package/lib/{browser-BQ2hKa4j.js → browser-CRt_zD3Q.js} +1 -1
- package/lib/{browser-ponyfill-JlME40Yz.mjs → browser-ponyfill-B32wgiqZ.mjs} +1 -1
- package/lib/{browser-ponyfill-DqqaJGv_.js → browser-ponyfill-UnUv8h3i.js} +1 -1
- package/lib/{card-CUMXwdG1.js → card-B4Tu3QQo.js} +1 -1
- package/lib/{card-4-u9SA69.mjs → card-CXjBQX3v.mjs} +1 -1
- package/lib/{ccip-FetjJVFw.mjs → ccip-CIIU_fEJ.mjs} +2 -2
- package/lib/{ccip-BTGJ_kF8.js → ccip-DaWU7YTU.js} +1 -1
- package/lib/{chain-DTh9H2Cq.js → chain-CJuQGMF5.js} +1 -1
- package/lib/{chain-Dq8acwHq.mjs → chain-uXEmLNMk.mjs} +1 -1
- package/lib/{checkmark-DDLHlQQ9.mjs → checkmark-BAUqIoTm.mjs} +1 -1
- package/lib/{checkmark-BaLFRM45.js → checkmark-C7_13-xW.js} +1 -1
- package/lib/{checkmark-bold-COMu2UxE.js → checkmark-bold-BAPMY9Va.js} +1 -1
- package/lib/{checkmark-bold-CuRoxeU8.mjs → checkmark-bold-DdxcN-xa.mjs} +1 -1
- package/lib/{chevron-bottom-C4e9WRar.js → chevron-bottom-BhliKUSk.js} +1 -1
- package/lib/{chevron-bottom-BWzCLrD5.mjs → chevron-bottom-DPs0vktV.mjs} +1 -1
- package/lib/{chevron-left-CGVLc133.js → chevron-left-CmxD6cz4.js} +1 -1
- package/lib/{chevron-left--LyUtyQT.mjs → chevron-left-Dk6PhtGR.mjs} +1 -1
- package/lib/{chevron-right-kMciDMkJ.mjs → chevron-right-CkGXlHcz.mjs} +1 -1
- package/lib/{chevron-right-BwKWUL52.js → chevron-right-CsZm-r4d.js} +1 -1
- package/lib/{chevron-top-CAHxogoB.js → chevron-top-COxXTPhY.js} +1 -1
- package/lib/{chevron-top-DwIXDDfD.mjs → chevron-top-Cckcz4Qs.mjs} +1 -1
- package/lib/{chrome-store-KsYwGQZ1.js → chrome-store-BQDKjVx4.js} +1 -1
- package/lib/{chrome-store-BtgUtu2e.mjs → chrome-store-BWCBtyqY.mjs} +1 -1
- package/lib/{chunk-KJH4KKG6-DOESg_ru.js → chunk-KJH4KKG6-CAnNL4lj.js} +1 -1
- package/lib/{chunk-KJH4KKG6-cfe1Zo7n.mjs → chunk-KJH4KKG6-CCerRpgp.mjs} +2 -2
- package/lib/{clock-CeP_x_KK.mjs → clock-BVouBwH-.mjs} +1 -1
- package/lib/{clock-DZ0ehwc-.js → clock-DyD0fxqO.js} +1 -1
- package/lib/{close-fTN6nBRu.mjs → close-BWXb69Wl.mjs} +1 -1
- package/lib/{close-DQfNwzpp.js → close-Cw0rUieJ.js} +1 -1
- package/lib/{coinPlaceholder-DetWjpMK.mjs → coinPlaceholder-BMScJe5r.mjs} +1 -1
- package/lib/{coinPlaceholder-Dg3gZsJM.js → coinPlaceholder-cDwG015N.js} +1 -1
- package/lib/{compass-BNDqAmOT.js → compass-BEkdaonl.js} +1 -1
- package/lib/{compass-Bi1bPHDM.mjs → compass-Ck1hdMBP.mjs} +1 -1
- package/lib/{constants-CoxhiYrX.js → constants-84--TxnQ.js} +1 -1
- package/lib/{constants-CPx3n7t3.mjs → constants-DL79O3Cw.mjs} +4 -4
- package/lib/{contract-D8VzaUQJ.mjs → contract-C26uilM9.mjs} +171 -171
- package/lib/{contract-DYtnmT6F.js → contract-C2wJ6LwN.js} +1 -1
- package/lib/{copy-CYLp0MkE.js → copy-BLHxb-RP.js} +1 -1
- package/lib/{copy-C0ChGAOX.mjs → copy-Db7Dj1yY.mjs} +1 -1
- package/lib/{create-BRB2U1qV.js → create-D2vX2bRe.js} +1 -1
- package/lib/create-OmEBpMgv.mjs +18 -0
- package/lib/{cursor-DsUEeeMn.js → cursor-C1Sin6tb.js} +1 -1
- package/lib/{cursor-C0wqoNp_.mjs → cursor-CNsWvtzA.mjs} +1 -1
- package/lib/{cursor-transparent-DOFMlNyt.mjs → cursor-transparent-BunBBBx5.mjs} +1 -1
- package/lib/{cursor-transparent-Dgi2QAXz.js → cursor-transparent-SER8uk9I.js} +1 -1
- package/lib/{desktop-DvAIpuqU.mjs → desktop-B6mJxAHq.mjs} +1 -1
- package/lib/{desktop-7XDZ1UeO.js → desktop-BxtmfVtX.js} +1 -1
- package/lib/{disconnect-BPZFeB_X.js → disconnect-C41yMwSb.js} +1 -1
- package/lib/{disconnect-CVe77kqf.mjs → disconnect-D7XSHnMT.mjs} +1 -1
- package/lib/{discord-BQnoDtpm.js → discord-B03i6OzP.js} +1 -1
- package/lib/{discord-C8tW30M4.mjs → discord-BYp6ZBO5.mjs} +1 -1
- package/lib/{etherscan-XnmA1DYM.js → etherscan-DLF8GRx-.js} +1 -1
- package/lib/{etherscan-BbTgK2kR.mjs → etherscan-Db4s0bfM.mjs} +1 -1
- package/lib/{evm-BcBUJ9Y7.js → evm-BmUWgBnJ.js} +2 -2
- package/lib/{evm-B1mLJPQm.mjs → evm-Cfbj-u_x.mjs} +9 -9
- package/lib/{evm-B92-10xg.js → evm-DT7UH6jw.js} +3 -3
- package/lib/{evm-DDTF3fsK.mjs → evm-JX0NqvCN.mjs} +9 -9
- package/lib/{exclamation-triangle-BSU-BEmm.js → exclamation-triangle-Bnq3BTWj.js} +1 -1
- package/lib/{exclamation-triangle-CDPTA2Zq.mjs → exclamation-triangle-QwUrQkZz.mjs} +1 -1
- package/lib/executor.js +1 -1
- package/lib/executor.mjs +1130 -487
- package/lib/{extension-BoRmu23R.mjs → extension-BJ8ReR_0.mjs} +1 -1
- package/lib/{extension-JoJqEx2q.js → extension-CgcYwI-C.js} +1 -1
- package/lib/{external-link-BmVFZxUx.mjs → external-link-C-xXuK-w.mjs} +1 -1
- package/lib/{external-link-CDpvnIKV.js → external-link-DyvDlcrJ.js} +1 -1
- package/lib/{facebook-BU0IgAsn.mjs → facebook-0DLWcqgY.mjs} +1 -1
- package/lib/{facebook-DVG-Of9i.js → facebook-BpyxMifX.js} +1 -1
- package/lib/{farcaster-EqU1YhWT.mjs → farcaster-7pF76-yJ.mjs} +1 -1
- package/lib/{farcaster-HjCoTneu.js → farcaster-CWG8svoe.js} +1 -1
- package/lib/{filters-9uiEFQFc.mjs → filters-B13ud8_A.mjs} +1 -1
- package/lib/{filters-Dj4vA-oO.js → filters-QScvFA3B.js} +1 -1
- package/lib/{github-CHTQ7Hhb.js → github-B1QukX4i.js} +1 -1
- package/lib/{github-Bv36prmZ.mjs → github-D82vkMzo.mjs} +1 -1
- package/lib/{google-D4be9Rni.js → google-C6E4oHHf.js} +1 -1
- package/lib/{google-CIdoM_ZL.mjs → google-D4wJMU48.mjs} +1 -1
- package/lib/{help-circle-Cp-RWM01.js → help-circle-C4PprAiX.js} +1 -1
- package/lib/{help-circle-Di6XLLqm.mjs → help-circle-DoiMsREG.mjs} +1 -1
- package/lib/hosted.js +1 -1
- package/lib/hosted.mjs +1 -1
- package/lib/{id-zzAVAbpV.js → id-D6HBBibn.js} +1 -1
- package/lib/{id-BKRrmUYA.mjs → id-DOZCSctU.mjs} +1 -1
- package/lib/{image-CHXv-pfQ.mjs → image-Bz-sq4zu.mjs} +1 -1
- package/lib/{image-D0lV7yfg.js → image-DwgrdoFE.js} +1 -1
- package/lib/{index-CbF5x2NI.js → index-AZ65joOD.js} +1 -1
- package/lib/{index-BsqWniHZ.mjs → index-B0H8aSyJ.mjs} +2 -2
- package/lib/{index-CreVTM0z.mjs → index-B1YHtJKf.mjs} +32 -32
- package/lib/{index-6NFOdkn_.mjs → index-B2v8cGyE.mjs} +5 -5
- package/lib/{index-Bn829hfx.js → index-B586QVP1.js} +1 -1
- package/lib/{index-CjojdPoR.js → index-BOiHIPRm.js} +1 -1
- package/lib/{index-CSf9Xnts.mjs → index-BgvV5NF2.mjs} +5 -5
- package/lib/{index-BxR9BQdY.mjs → index-BjeolB9D.mjs} +5 -5
- package/lib/{index-WR7oDg9u.mjs → index-Bv-BZXf_.mjs} +6 -6
- package/lib/{index-T00Tc9JN.js → index-C2EKjwxb.js} +1 -1
- package/lib/{index-D4dCJIWy.js → index-C2oYdtY8.js} +1 -1
- package/lib/{index-Cj6R9JbK.js → index-CFfjoJR9.js} +1 -1
- package/lib/{index-B6QoC8kC.mjs → index-CIGkn9tA.mjs} +1 -1
- package/lib/{index-D0eLvswO.mjs → index-CNWcuxPc.mjs} +1 -1
- package/lib/{index-Dy8-WjNf.mjs → index-CNhD4Iu8.mjs} +14 -14
- package/lib/{index-Cv26ujGL.js → index-CP6-WHfp.js} +1 -1
- package/lib/{index-BuMERF6V.mjs → index-CRYNS9pm.mjs} +3 -3
- package/lib/{index-CMRsE6Rx.js → index-CZhOgoed.js} +2 -2
- package/lib/{index-C9CCEaud.js → index-Cet7Wvc5.js} +1 -1
- package/lib/{index-CpYW6xKB.mjs → index-Cg5Ko9uq.mjs} +12 -12
- package/lib/{index-iIndJffV.js → index-CjI7Vey3.js} +1 -1
- package/lib/{index-C_DPPfkk.js → index-Cjz6EL9G.js} +1 -1
- package/lib/{index-CJXywlFV.mjs → index-CrKGOs08.mjs} +5 -5
- package/lib/{index-Dg_iItNp.js → index-Cy_GmZ1K.js} +1 -1
- package/lib/{index-B8CSnOaL.mjs → index-D1vSocUD.mjs} +4 -4
- package/lib/{index-Co1W4Raf.mjs → index-D4WbU33f.mjs} +10 -10
- package/lib/{index-B4yQb6w1.mjs → index-DInWB5Ku.mjs} +78 -78
- package/lib/{index-BJjgo7T5.js → index-DQXzR255.js} +1 -1
- package/lib/{index-FyK0K3it.mjs → index-DSGGuRHs.mjs} +7 -7
- package/lib/{index-BOmzGtQH.mjs → index-DVj58Xn9.mjs} +13 -13
- package/lib/{index-CAZoTTeF.js → index-DXD0qvNV.js} +1 -1
- package/lib/{index-DLyteqgH.js → index-Dd0zXo9p.js} +1 -1
- package/lib/{index-BDN9fAFf.js → index-DflOc1lz.js} +1 -1
- package/lib/{index-DZ0LaYyC.js → index-DoubjpWw.js} +1 -1
- package/lib/{index-BBXzsMzy.mjs → index-Dpefdrdb.mjs} +3296 -3074
- package/lib/{index-0V2bg9Sg.mjs → index-DuXi1xNY.mjs} +2 -2
- package/lib/{index-Csb-_vqa.js → index-Dw8nyQGf.js} +1 -1
- package/lib/{index-DUoona4h.mjs → index-Naa9NLXw.mjs} +4 -4
- package/lib/{index-BBwY_mLw.mjs → index-UZaBhUoD.mjs} +4 -4
- package/lib/{index-D5Wl9ZPE.mjs → index-XkPtmd0r.mjs} +7 -7
- package/lib/{index-CFikcYS0.js → index-XrGXGqnM.js} +1 -1
- package/lib/{index--rEdlHs9.js → index-sIkHg4mO.js} +1 -1
- package/lib/{index-w1W7oltR.js → index-tVbvQzum.js} +60 -60
- package/lib/{index-Cvt-EnSZ.mjs → index-wFZO7Yy8.mjs} +19 -19
- package/lib/{index-uqZQu-qU.js → index-yI1a3BCl.js} +1 -1
- package/lib/{index-aoDDl5Bh.js → index-zrsGesGr.js} +1 -1
- package/lib/{index.es-Buu5D0rZ.mjs → index.es-CTerQ-xd.mjs} +6 -6
- package/lib/{index.es-SeoKSGri.js → index.es-DW-Rbcpg.js} +1 -1
- package/lib/{index.es-BjmsZFfK.mjs → index.es-FblCdfpc.mjs} +4 -4
- package/lib/{index.es-B-gAV41L.js → index.es-tq-RvjG8.js} +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{info-Bro13JOm.js → info-BifZFc7t.js} +1 -1
- package/lib/{info-circle-B1XYC5VH.js → info-circle-2P1Yxg4Q.js} +1 -1
- package/lib/{info-circle-Ysma0RJy.mjs → info-circle-BAC0QRkt.mjs} +1 -1
- package/lib/{info-DI_ShZXM.mjs → info-sSeB9YE8.mjs} +1 -1
- package/lib/{lightbulb-llAiUdyo.mjs → lightbulb-EmWyHxHf.mjs} +1 -1
- package/lib/{lightbulb-BWSob509.js → lightbulb-MtN8FDGi.js} +1 -1
- package/lib/{mail-rZToesAW.js → mail-CqXkLFqA.js} +1 -1
- package/lib/{mail-DoQE8IHx.mjs → mail-Kn0E2IkG.mjs} +1 -1
- package/lib/mayan.js +1 -1
- package/lib/mayan.mjs +9 -9
- package/lib/{mint-CyFSbOaj.js → mint-DzKeNBRo.js} +1 -1
- package/lib/{mint-CDUlLJB4.mjs → mint-WjTAjh-p.mjs} +2 -2
- package/lib/{mobile-BbcVkbmr.js → mobile-BE2FxzUq.js} +1 -1
- package/lib/{mobile-EtRDQH27.mjs → mobile-Dj3WE71d.mjs} +1 -1
- package/lib/{more-BK6O3COI.js → more-BGlDHap-.js} +1 -1
- package/lib/{more-DVrhZdB3.mjs → more-D4DDIvdG.mjs} +1 -1
- package/lib/{native-Bdd5l9MQ.js → native-CGkMKXpm.js} +1 -1
- package/lib/{native-D6oc9ERK.mjs → native-DCc4sjxb.mjs} +1 -1
- package/lib/{network-placeholder-BbB6hX07.mjs → network-placeholder-BBNnq4LJ.mjs} +1 -1
- package/lib/{network-placeholder-K8zio41s.js → network-placeholder-DZ6qNrD8.js} +1 -1
- package/lib/{nftPlaceholder-BMuE_429.mjs → nftPlaceholder-BGK-mcGP.mjs} +1 -1
- package/lib/{nftPlaceholder-L3ThVWUO.js → nftPlaceholder-t3eyvw1E.js} +1 -1
- package/lib/ntt.js +1 -1
- package/lib/ntt.mjs +10 -10
- package/lib/{off-CHM9QBcy.js → off-BBGwptS5.js} +1 -1
- package/lib/{off-CUzDZ7SQ.mjs → off-f4sOrEaa.mjs} +1 -1
- package/lib/{platform-CyoDzIPB.mjs → platform-BVScq6Cn.mjs} +6 -6
- package/lib/{platform-Ck9W87gm.mjs → platform-ByoVE-An.mjs} +4 -4
- package/lib/{platform-DbvllBcy.js → platform-DHBUZeaO.js} +1 -1
- package/lib/{platform-C7YwgvxU.js → platform-Yk6Fw43J.js} +1 -1
- package/lib/{platform-CgqczEeE.js → platform-_YLyrJdi.js} +1 -1
- package/lib/{platform-DkmFvjoG.mjs → platform-tSU41623.mjs} +16 -16
- package/lib/{play-store-DodlKRO8.js → play-store-BbN0jXQh.js} +1 -1
- package/lib/{play-store-B_TfUWJP.mjs → play-store-D8C6HS_a.mjs} +1 -1
- package/lib/{plus-BY6E-gA7.mjs → plus-CbTzHTic.mjs} +1 -1
- package/lib/{plus-DVGYUzNZ.js → plus-DmTKVIYx.js} +1 -1
- package/lib/{provider-jsonrpc-D033z3Mz.js → provider-jsonrpc-B0U6Ij-n.js} +1 -1
- package/lib/{provider-jsonrpc-BVvalXMV.mjs → provider-jsonrpc-pHUX5SqN.mjs} +155 -155
- package/lib/{qr-code-MKK1K7_f.js → qr-code-B6qlbkUI.js} +1 -1
- package/lib/{qr-code-DkdB4YWU.mjs → qr-code-BWVtySSk.mjs} +1 -1
- package/lib/{recycle-horizontal-Bg37UVPn.mjs → recycle-horizontal-Bs5gf79m.mjs} +1 -1
- package/lib/{recycle-horizontal-Bjn-ZLNs.js → recycle-horizontal-DzBA56-s.js} +1 -1
- package/lib/{refresh-dRlw97C1.js → refresh-62hm4k6x.js} +1 -1
- package/lib/{refresh-D6TcjIU1.mjs → refresh-ivbjdSCV.mjs} +1 -1
- package/lib/{reown-logo-Kc70GqDZ.js → reown-logo-CVyCROZP.js} +1 -1
- package/lib/{reown-logo-Dk82Zy5_.mjs → reown-logo-DkbDD804.mjs} +1 -1
- package/lib/{search-Dv-LI1Vx.js → search-BAemvNq7.js} +1 -1
- package/lib/{search-D83RKxoH.mjs → search-By1CMDmb.mjs} +1 -1
- package/lib/{secp256k1-BrfK8uV1.mjs → secp256k1-Cgk0g7W_.mjs} +1 -1
- package/lib/{secp256k1-DV6Qne0v.mjs → secp256k1-ClYndPcJ.mjs} +1 -1
- package/lib/{secp256k1-DXHZqO4S.js → secp256k1-DboBd6yN.js} +1 -1
- package/lib/{secp256k1-sf_P35Lc.js → secp256k1-uAsXZq5d.js} +1 -1
- package/lib/{send-Cyopk79y.mjs → send-BIKE35sd.mjs} +1 -1
- package/lib/{send-BSMIYys9.js → send-BQNTa-AX.js} +1 -1
- package/lib/{signer-DIpGs_9B.mjs → signer-CinqaaXD.mjs} +10 -10
- package/lib/{signer-BZ3rTVnM.js → signer-D-HjSIgq.js} +1 -1
- package/lib/{solana-DS2ZcUpG.js → solana-BUWSwHur.js} +4 -4
- package/lib/{solana-CrMvdvfl.mjs → solana-C2S4i5Ij.mjs} +11 -11
- package/lib/solana-CEz8hIFa.mjs +18 -0
- package/lib/solana-Dohpdke6.js +1 -0
- package/lib/{solanaEmbed.esm-Dj8UZAI5.mjs → solanaEmbed.esm-Dk8f6vW0.mjs} +2 -2
- package/lib/{solanaEmbed.esm-1oBtzdki.js → solanaEmbed.esm-lyjsfmH_.js} +1 -1
- package/lib/src/components/SampleApp/index.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/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 +2 -1
- package/lib/src/config/types.d.ts.map +1 -1
- package/lib/src/contexts/TokensContext.d.ts.map +1 -1
- package/lib/src/exports/executor.d.ts +1 -1
- package/lib/src/exports/executor.d.ts.map +1 -1
- package/lib/src/icons/ChainIcons.d.ts.map +1 -1
- package/lib/src/icons/Chains/LINEA.d.ts +4 -0
- package/lib/src/icons/Chains/LINEA.d.ts.map +1 -0
- package/lib/src/icons/Chains/POLY.d.ts +2 -2
- package/lib/src/icons/Chains/POLY.d.ts.map +1 -1
- package/lib/src/icons/Chains/SONIC.d.ts +4 -0
- package/lib/src/icons/Chains/SONIC.d.ts.map +1 -0
- package/lib/src/icons/SvgDefs.d.ts.map +1 -1
- package/lib/src/icons/TokenIcons.d.ts.map +1 -1
- package/lib/src/icons/Tokens/POLY.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/utils/coingecko.d.ts.map +1 -1
- package/lib/src/utils/sdkv2.d.ts +1 -1
- package/lib/src/utils/sdkv2.d.ts.map +1 -1
- package/lib/src/utils/wallet/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/GasSlider/index.d.ts +1 -0
- package/lib/src/views/v2/Bridge/GasSlider/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/lib/src/views/v2/Redeem/index.d.ts.map +1 -1
- package/lib/{sui-wX1yJDdB.js → sui-BCJA_cYx.js} +1 -1
- package/lib/{sui-C6UUvjyd.mjs → sui-BJC_JOkP.mjs} +3 -3
- package/lib/{sui-jsmS--zo.mjs → sui-B_AxArCa.mjs} +31 -31
- package/lib/{sui-mpRuHBm9.js → sui-Bdmfxpd2.js} +1 -1
- package/lib/{swapHorizontal-BiNrGmxY.mjs → swapHorizontal-CGVqXEEp.mjs} +1 -1
- package/lib/{swapHorizontal-Bg8dDuE0.js → swapHorizontal-Wp81JSgX.js} +1 -1
- package/lib/{swapHorizontalBold-DeCMOo5R.js → swapHorizontalBold-D70amlcg.js} +1 -1
- package/lib/{swapHorizontalBold-CNvg6Zjx.mjs → swapHorizontalBold-DfykA661.mjs} +1 -1
- package/lib/{swapHorizontalMedium-DClbbhUH.js → swapHorizontalMedium-B92n1mhC.js} +1 -1
- package/lib/{swapHorizontalMedium-TUPMHawi.mjs → swapHorizontalMedium-C39AY5jR.mjs} +1 -1
- package/lib/{swapHorizontalRoundedBold-Cwu5ydTm.js → swapHorizontalRoundedBold-CWEgSWL3.js} +1 -1
- package/lib/{swapHorizontalRoundedBold-BAlHBaC3.mjs → swapHorizontalRoundedBold-DHWf4C2R.mjs} +1 -1
- package/lib/{swapVertical-DDYEDCbu.mjs → swapVertical-BpTJ-r5m.mjs} +1 -1
- package/lib/{swapVertical-cn4noOLO.js → swapVertical-DbS3f5xB.js} +1 -1
- package/lib/{telegram-BGnemuS8.mjs → telegram-CNeTqCXy.mjs} +1 -1
- package/lib/{telegram-sBtcJjCa.js → telegram-DK-OaZof.js} +1 -1
- package/lib/{three-dots-BS-tA53X.mjs → three-dots-BK0Ca5f9.mjs} +1 -1
- package/lib/{three-dots-Ci3M242Y.js → three-dots-CLOJZeqn.js} +1 -1
- package/lib/{tokens-DprimVrG.js → tokens-BVFCrwUI.js} +1 -1
- package/lib/{tokens-ZJvnv3ye.mjs → tokens-BtPkpuCj.mjs} +3 -3
- package/lib/{twitch-kde2nyWc.js → twitch-6sCGBDD_.js} +1 -1
- package/lib/{twitch-DwEOOcQc.mjs → twitch-RQqv2Pha.mjs} +1 -1
- package/lib/{twitterIcon-EX3YrhMm.js → twitterIcon-A2SY7Ljz.js} +1 -1
- package/lib/{twitterIcon-D-aL497o.mjs → twitterIcon-C8wIxAQv.mjs} +1 -1
- package/lib/{units-BVg9f9bp.js → units-BrJ4CYDZ.js} +1 -1
- package/lib/{units-De4Es9C-.mjs → units-CLOrp1Nk.mjs} +24 -24
- package/lib/{unsignedTransaction-3gDumn1W.js → unsignedTransaction-BwT180qj.js} +1 -1
- package/lib/{unsignedTransaction-DmrfJNQf.mjs → unsignedTransaction-DkC9OIgh.mjs} +17 -17
- package/lib/{verify-DPJd26j0.mjs → verify-CXS0qPBz.mjs} +1 -1
- package/lib/{verify-BuD5oE0Y.js → verify-DnxzVYqj.js} +1 -1
- package/lib/{verify-filled-DgfMnLnW.js → verify-filled-BOz9hX3w.js} +1 -1
- package/lib/{verify-filled-BSJMiVyN.mjs → verify-filled-DOsmzDzC.mjs} +1 -1
- package/lib/{w3m-modal-vqqsLuJC.mjs → w3m-modal-Cdafmb0Z.mjs} +2 -2
- package/lib/{w3m-modal-jDCMhVYM.js → w3m-modal-CpYUxfVT.js} +1 -1
- package/lib/{wallet-DlsCAJmu.js → wallet-Bc87h19O.js} +1 -1
- package/lib/{wallet-CiaeeygI.mjs → wallet-D3sDbpnL.mjs} +1 -1
- package/lib/{wallet-placeholder-DhQ6l48d.mjs → wallet-placeholder-CsEk6mnJ.mjs} +1 -1
- package/lib/{wallet-placeholder-CWeGWgUL.js → wallet-placeholder-D60KEgcO.js} +1 -1
- package/lib/{walletconnect-CHFqRNg_.mjs → walletconnect-D44C2RUp.mjs} +1 -1
- package/lib/{walletconnect-YkYiOGcA.js → walletconnect-isfAM6mU.js} +1 -1
- package/lib/{warning-circle-z__jbYAZ.mjs → warning-circle-D6V7bjdk.mjs} +1 -1
- package/lib/{warning-circle-BKWEaDK7.js → warning-circle-DKsp8DlH.js} +1 -1
- package/lib/{web3-IDpqtkwB.js → web3-DgUW0FuE.js} +1 -1
- package/lib/{web3-CevzYKNd.mjs → web3-L0yKkQfC.mjs} +1 -1
- package/lib/{x-DXPEHEVV.mjs → x-CfYfR6N2.mjs} +1 -1
- package/lib/{x-De5ksSKs.js → x-D1ju5P9d.js} +1 -1
- package/package.json +30 -28
- package/lib/address-CSWlEusF.js +0 -15
- package/lib/create-CRa9FZnZ.mjs +0 -18
- package/lib/solana-BHr-TCKL.js +0 -1
- package/lib/solana-Dhrl0nvx.mjs +0 -18
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Z = (n, f, e) => f in n ?
|
|
1
|
+
var Y = Object.defineProperty;
|
|
2
|
+
var Z = (n, f, e) => f in n ? Y(n, f, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[f] = e;
|
|
3
3
|
var d = (n, f, e) => Z(n, typeof f != "symbol" ? f + "" : f, e);
|
|
4
|
-
import "./index-
|
|
5
|
-
import { EvmWormholeCore as f0 } from "./index-
|
|
6
|
-
import {
|
|
7
|
-
import { E as v, C as S } from "./platform-
|
|
8
|
-
import { a as s0, l as i0, d as r0, I as $, C as E } from "./contract-
|
|
4
|
+
import "./index-D4WbU33f.mjs";
|
|
5
|
+
import { EvmWormholeCore as f0 } from "./index-BjeolB9D.mjs";
|
|
6
|
+
import { bs as y, bk as e0, bq as L, bj as p, ah as a0, au as C, bX as t0, b$ as b0, ac as q, be as D, aR as I, G as U, a3 as F, aU as u, D as H, az as n0, d8 as N, aV as j, aP as d0, ab as c0, aW as V } from "./address-BkeBsCZD.mjs";
|
|
7
|
+
import { E as v, C as S } from "./platform-tSU41623.mjs";
|
|
8
|
+
import { a as s0, l as i0, d as r0, I as $, C as E } from "./contract-C26uilM9.mjs";
|
|
9
9
|
import { E as G } from "./unsignedTransaction-C0V0UbsS.mjs";
|
|
10
|
-
import { r as
|
|
10
|
+
import { r as X } from "./chain-uXEmLNMk.mjs";
|
|
11
11
|
const p0 = new RegExp("^bytes([0-9]+)$"), y0 = new RegExp("^(u?int)([0-9]*)$"), o0 = new RegExp("^(.*)\\[([0-9]*)\\]$");
|
|
12
12
|
function J(n, f, e) {
|
|
13
13
|
switch (n) {
|
|
@@ -62,7 +62,7 @@ class B {
|
|
|
62
62
|
var i, r;
|
|
63
63
|
if (this.network = f, this.chain = e, this.provider = a, this.contracts = t, f === "Devnet")
|
|
64
64
|
throw new Error("CircleBridge not supported on Devnet");
|
|
65
|
-
this.chainId =
|
|
65
|
+
this.chainId = q.get(f, e);
|
|
66
66
|
const b = D.get(f, e);
|
|
67
67
|
if (b === void 0)
|
|
68
68
|
throw new Error(`Circle chain id not found for ${f} ${e}`);
|
|
@@ -88,7 +88,7 @@ class B {
|
|
|
88
88
|
}
|
|
89
89
|
//alternative naming: initiateTransfer
|
|
90
90
|
async *transfer(f, e, a) {
|
|
91
|
-
const t = new I(f).toString(), b = e.address.toUniversalAddress().toUint8Array(), c =
|
|
91
|
+
const t = new I(f).toString(), b = e.address.toUniversalAddress().toUint8Array(), c = H.get(this.network, this.chain), s = v.getTokenImplementation(this.provider, c);
|
|
92
92
|
if (await s.allowance(t, this.tokenMessenger.target) < a) {
|
|
93
93
|
const T = await s.approve.populateTransaction(this.tokenMessenger.target, a);
|
|
94
94
|
yield this.createUnsignedTx(u(T, t), "ERC20.approve of CircleBridge", !1);
|
|
@@ -143,12 +143,12 @@ class O {
|
|
|
143
143
|
var s;
|
|
144
144
|
if (this.network = f, this.chain = e, this.provider = a, this.contracts = t, f === "Devnet")
|
|
145
145
|
throw new Error("AutomaticCircleBridge not supported on Devnet");
|
|
146
|
-
this.chainId =
|
|
146
|
+
this.chainId = q.get(f, e);
|
|
147
147
|
const b = (s = this.contracts.cctp) == null ? void 0 : s.wormholeRelayer;
|
|
148
148
|
if (!b)
|
|
149
149
|
throw new Error(`Wormhole Circle relayer contract for domain ${e} not found`);
|
|
150
150
|
this.circleRelayer = x.connect(b, a);
|
|
151
|
-
const c =
|
|
151
|
+
const c = H.get(this.network, this.chain);
|
|
152
152
|
if (!c)
|
|
153
153
|
throw new Error(`USDC contract not found for ${this.network} ${this.chain}`);
|
|
154
154
|
this.tokenAddr = c, this.core = new f0(f, e, a, t);
|
|
@@ -2329,8 +2329,8 @@ const g0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2329
2329
|
TokenMessenger: h0,
|
|
2330
2330
|
TokenMessenger__factory: R
|
|
2331
2331
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2332
|
-
|
|
2333
|
-
|
|
2332
|
+
X(V, "CircleBridge", B);
|
|
2333
|
+
X(V, "AutomaticCircleBridge", O);
|
|
2334
2334
|
export {
|
|
2335
2335
|
O as EvmAutomaticCircleBridge,
|
|
2336
2336
|
B as EvmCircleBridge,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var P=Object.defineProperty;var U=(u,o,t)=>o in u?P(u,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[o]=t;var h=(u,o,t)=>U(u,typeof o!="symbol"?o+"":o,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./contract-
|
|
1
|
+
"use strict";var P=Object.defineProperty;var U=(u,o,t)=>o in u?P(u,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[o]=t;var h=(u,o,t)=>U(u,typeof o!="symbol"?o+"":o,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./contract-C2wJ6LwN.js"),e=require("./address-DKM11kf_.js"),N=require("./index-DflOc1lz.js"),R=require("./index-AZ65joOD.js"),E=require("./platform-DHBUZeaO.js"),O=require("./unsignedTransaction-B7AZXsTD.js"),$=require("./chain-CJuQGMF5.js"),T=new p.Interface(["function start((bytes32,address,address,address,address,address,uint256,uint256,uint256,uint256)) returns (address,uint16,uint64)","function receiveMessageAndSwap(bytes)"]),Q=new p.Interface(["function quoteExactInputSingle((address,address,uint256,uint24,uint160)) public view returns (uint256,uint160,uint32,uint256)"]),L="https://gfx.relayers.xlabs.xyz/api/v1/swap/quote";class M{static async quoteRelayer(o,t,r){var a;if(e.isNative(t)||e.isNative(r))throw new Error("how did you get here tho?");const n=e.hex.encode(t.toUniversalAddress().toUint8Array(),!1),s=e.hex.encode(r.toUniversalAddress().toUint8Array(),!1),i={targetChain:e.toChainId(o),sourceToken:n,targetToken:s};try{const c=await e.axios.post(L,i);return BigInt(c.data.fee)}catch(c){throw e.axios.isAxiosError(c)?new Error(`Error getting relayer fee: ${(a=c.response)==null?void 0:a.statusText}`):c}}}const g=100,C={ETH:[e.Wormhole.tokenId("Arbitrum","native"),e.Wormhole.tokenId("Base","native"),e.Wormhole.tokenId("Ethereum","native"),e.Wormhole.tokenId("Optimism","native")],WETH:[e.Wormhole.tokenId("Arbitrum","0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),e.Wormhole.tokenId("Avalanche","0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB"),e.Wormhole.tokenId("Base","0x4200000000000000000000000000000000000006"),e.Wormhole.tokenId("Bsc","0x2170Ed0880ac9A755fd29B2688956BD959F933F8"),e.Wormhole.tokenId("Ethereum","0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),e.Wormhole.tokenId("Optimism","0x4200000000000000000000000000000000000006"),e.Wormhole.tokenId("Polygon","0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619")],wstETH:[e.Wormhole.tokenId("Arbitrum","0x5979D7b546E38E414F7E9822514be443A4800529"),e.Wormhole.tokenId("Base","0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452"),e.Wormhole.tokenId("Ethereum","0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"),e.Wormhole.tokenId("Optimism","0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb"),e.Wormhole.tokenId("Polygon","0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD")],USDT:[e.Wormhole.tokenId("Arbitrum","0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),e.Wormhole.tokenId("Avalanche","0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7"),e.Wormhole.tokenId("Base","0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2"),e.Wormhole.tokenId("Bsc","0x55d398326f99059fF775485246999027B3197955"),e.Wormhole.tokenId("Ethereum","0xdAC17F958D2ee523a2206206994597C13D831ec7"),e.Wormhole.tokenId("Optimism","0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"),e.Wormhole.tokenId("Polygon","0xc2132D05D31c914a87C6611C10748AEb04B58e8F"),e.Wormhole.tokenId("Celo","0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e")]};class f{constructor(o,t,r,n){h(this,"network");h(this,"chain");h(this,"provider");h(this,"contracts");h(this,"chainId");h(this,"core");h(this,"tokenBridge");if(this.network=o,this.chain=t,this.provider=r,this.contracts=n,!n.portico)throw new Error("Unsupported chain, no contract addresses for: "+t);this.core=new N.EvmWormholeCore(o,t,r,n),this.tokenBridge=new R.EvmTokenBridge(o,t,r,n),this.chainId=e.networkChainToNativeChainId.get(o,t)}static async fromRpc(o,t){const[r,n]=await E.EvmPlatform.chainFromRpc(o),s=t[n];if(s.network!==r)throw new Error(`Network mismatch: ${s.network} != ${r}`);return new f(r,n,o,s.contracts)}async*transfer(o,t,r,n,s,d,i){const{minAmountStart:a,minAmountFinish:c}=i.swapAmounts;if(a===0n)throw new Error("Invalid min swap amount");if(c===0n)throw new Error("Invalid min swap amount");const k=new e.EvmAddress(o).toString(),[l,w]=e.resolveWrappedToken(this.network,this.chain,r),[I,b]=e.resolveWrappedToken(this.network,t.chain,s),m=e.canonicalAddress(w),v=e.canonicalAddress(await this.getTransferrableToken(m)),F=e.canonicalAddress(t),B=e.canonicalAddress(b),y=new Date().valueOf()%2**4,x=e.PorticoBridge.serializeFlagSet({flags:{shouldWrapNative:l,shouldUnwrapNative:I},recipientChain:e.toChainId(t.chain),bridgeNonce:y,feeTierStart:g,feeTierFinish:g,padding:new Uint8Array(19)}),W=T.encodeFunctionData("start",[[x,m.toLowerCase(),v,B.toLowerCase(),F,d,n.toString(),a.toString(),c.toString(),i.relayerFee.toString()]]),D=this.getTokenGroup(w.address.toString()),A=this.getPorticoAddress(D);l||(yield*this.approve(m,k,n,A));const S=await this.core.getMessageFee(),q={to:A,data:W,value:S+(l?n:0n)};yield this.createUnsignedTransaction(e.addFrom(q,k),"PorticoBridge.Transfer")}async*redeem(o,t){const r=e.toChain(t.payload.payload.flagSet.recipientChain),n=t.payload.payload.finalTokenAddress.toNative(r).toString(),s=this.getTokenGroup(n),d=this.getPorticoAddress(s),a=await new p.Contract(d,T.fragments,this.provider).getFunction("receiveMessageAndSwap").populateTransaction(e.serialize(t)),c=new e.EvmAddress(o).toString();yield this.createUnsignedTransaction(e.addFrom(a,c),"PorticoBridge.Redeem")}async isTransferCompleted(o){return await this.tokenBridge.tokenBridge.isTransferCompleted(e.keccak256(o.hash))}async quoteSwap(o,t,r,n){const[,s]=e.resolveWrappedToken(this.network,this.chain,o),[,d]=e.resolveWrappedToken(this.network,this.chain,t),i=e.canonicalAddress(s),a=e.canonicalAddress(d);if(e.isEqualCaseInsensitive(i,a))return n;const c=this.getQuoterAddress(r);return(await new p.Contract(c,Q.fragments,this.provider).getFunction("quoteExactInputSingle").staticCall([i,a,n,g,0]))[0]}async quoteRelay(o,t){return await M.quoteRelayer(this.chain,o,t)}async getTransferrableToken(o){const t=e.Wormhole.tokenId(this.chain,o),[,r]=e.resolveWrappedToken(this.network,this.chain,t);if(this.chain==="Ethereum")return r;const n=Object.values(C).find(i=>i.find(a=>a.chain===this.chain&&e.canonicalAddress(a)===e.canonicalAddress(r)));if(!n)throw new Error(`No token group found for ${o} on ${this.chain}`);const s=n.find(i=>i.chain==="Ethereum");if(!s)throw new Error(`No Ethereum origin token found for ${o} on ${this.chain}`);const d=await this.tokenBridge.getWrappedAsset(s);return e.Wormhole.tokenId(this.chain,d.toString())}supportedTokens(){const o=[];for(const[t,r]of Object.entries(C))for(const n of r)n.chain===this.chain&&o.push({group:t,token:n});return o}getTokenGroup(o){const r=this.supportedTokens().find(n=>e.canonicalAddress(n.token)===o);if(!r)throw new Error("Token not found");return r.group}async*approve(o,t,r,n){const s=E.EvmPlatform.getTokenImplementation(this.provider,o);if(await s.allowance(t,n)<r){const i=await s.approve.populateTransaction(n,r);yield this.createUnsignedTransaction(e.addFrom(i,t),"PorticoBridge.Approve")}}createUnsignedTransaction(o,t){return new O.EvmUnsignedTransaction(e.addChainId(o,this.chainId),this.network,this.chain,t,!1)}getPorticoAddress(o){const t=this.contracts.portico;return o==="USDT"&&t.porticoPancakeSwap||t.porticoUniswap}getQuoterAddress(o){const t=this.contracts.portico;return o==="USDT"&&t.pancakeSwapQuoterV2||t.uniswapQuoterV2}}$.registerProtocol(e._platform,"PorticoBridge",f);exports.EvmPorticoBridge=f;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var k = Object.defineProperty;
|
|
2
2
|
var v = (u, s, t) => s in u ? k(u, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[s] = t;
|
|
3
3
|
var i = (u, s, t) => v(u, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
-
import { T as f, b as w } from "./platform-
|
|
5
|
-
import { a1 as C, D as S,
|
|
4
|
+
import { T as f, b as w } from "./platform-ByoVE-An.mjs";
|
|
5
|
+
import { a1 as C, D as S, be as _, G as b, a3 as y, d8 as T } from "./address-BkeBsCZD.mjs";
|
|
6
6
|
import { S as M } from "./unsignedTransaction-BD81leu1.mjs";
|
|
7
|
-
import { r as x } from "./chain-
|
|
7
|
+
import { r as x } from "./chain-uXEmLNMk.mjs";
|
|
8
8
|
const j = [
|
|
9
9
|
[
|
|
10
10
|
"Testnet",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("./solana-
|
|
1
|
+
"use strict";const l=require("./solana-BUWSwHur.js"),f={getSpacingStyles(t,e){if(Array.isArray(t))return t[e]?`var(--wui-spacing-${t[e]})`:void 0;if(typeof t=="string")return`var(--wui-spacing-${t})`},getFormattedDate(t){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(t)},getHostName(t){try{return new URL(t).hostname}catch{return""}},getTruncateString({string:t,charsStart:e,charsEnd:r,truncate:o}){return t.length<=e+r?t:o==="end"?`${t.substring(0,e)}...`:o==="start"?`...${t.substring(t.length-r)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(r))}`},generateAvatarColors(t){const r=t.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),o=this.hexToRgb(r),s=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),n=100-3*Number(s==null?void 0:s.replace("px","")),a=`${n}% ${n}% at 65% 40%`,u=[];for(let v=0;v<5;v+=1){const p=this.tintColor(o,.15*v);u.push(`rgb(${p[0]}, ${p[1]}, ${p[2]})`)}return`
|
|
2
2
|
--local-color-1: ${u[0]};
|
|
3
3
|
--local-color-2: ${u[1]};
|
|
4
4
|
--local-color-3: ${u[2]};
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
width: var(--local-width);
|
|
82
82
|
height: var(--local-height);
|
|
83
83
|
}
|
|
84
|
-
`;var C=function(t,e,r,o){var s=arguments.length,i=s<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(i=(s<3?n(i):s>3?n(e,r,i):n(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i};const I={add:async()=>(await Promise.resolve().then(()=>require("./add-
|
|
84
|
+
`;var C=function(t,e,r,o){var s=arguments.length,i=s<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(i=(s<3?n(i):s>3?n(e,r,i):n(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i};const I={add:async()=>(await Promise.resolve().then(()=>require("./add-PboF8xOA.js"))).addSvg,allWallets:async()=>(await Promise.resolve().then(()=>require("./all-wallets-C3KaOAtR.js"))).allWalletsSvg,arrowBottomCircle:async()=>(await Promise.resolve().then(()=>require("./arrow-bottom-circle-Cwm4Epf6.js"))).arrowBottomCircleSvg,appStore:async()=>(await Promise.resolve().then(()=>require("./app-store-DMPxp7LI.js"))).appStoreSvg,apple:async()=>(await Promise.resolve().then(()=>require("./apple-CBv-wD_N.js"))).appleSvg,arrowBottom:async()=>(await Promise.resolve().then(()=>require("./arrow-bottom-JVAM2flH.js"))).arrowBottomSvg,arrowLeft:async()=>(await Promise.resolve().then(()=>require("./arrow-left-BCNUIhF5.js"))).arrowLeftSvg,arrowRight:async()=>(await Promise.resolve().then(()=>require("./arrow-right-DmYVvh1l.js"))).arrowRightSvg,arrowTop:async()=>(await Promise.resolve().then(()=>require("./arrow-top-Bo7YKrfd.js"))).arrowTopSvg,bank:async()=>(await Promise.resolve().then(()=>require("./bank-DLZl3tlW.js"))).bankSvg,browser:async()=>(await Promise.resolve().then(()=>require("./browser-CRt_zD3Q.js"))).browserSvg,card:async()=>(await Promise.resolve().then(()=>require("./card-B4Tu3QQo.js"))).cardSvg,checkmark:async()=>(await Promise.resolve().then(()=>require("./checkmark-C7_13-xW.js"))).checkmarkSvg,checkmarkBold:async()=>(await Promise.resolve().then(()=>require("./checkmark-bold-BAPMY9Va.js"))).checkmarkBoldSvg,chevronBottom:async()=>(await Promise.resolve().then(()=>require("./chevron-bottom-BhliKUSk.js"))).chevronBottomSvg,chevronLeft:async()=>(await Promise.resolve().then(()=>require("./chevron-left-CmxD6cz4.js"))).chevronLeftSvg,chevronRight:async()=>(await Promise.resolve().then(()=>require("./chevron-right-CsZm-r4d.js"))).chevronRightSvg,chevronTop:async()=>(await Promise.resolve().then(()=>require("./chevron-top-COxXTPhY.js"))).chevronTopSvg,chromeStore:async()=>(await Promise.resolve().then(()=>require("./chrome-store-BQDKjVx4.js"))).chromeStoreSvg,clock:async()=>(await Promise.resolve().then(()=>require("./clock-DyD0fxqO.js"))).clockSvg,close:async()=>(await Promise.resolve().then(()=>require("./close-Cw0rUieJ.js"))).closeSvg,compass:async()=>(await Promise.resolve().then(()=>require("./compass-BEkdaonl.js"))).compassSvg,coinPlaceholder:async()=>(await Promise.resolve().then(()=>require("./coinPlaceholder-cDwG015N.js"))).coinPlaceholderSvg,copy:async()=>(await Promise.resolve().then(()=>require("./copy-BLHxb-RP.js"))).copySvg,cursor:async()=>(await Promise.resolve().then(()=>require("./cursor-C1Sin6tb.js"))).cursorSvg,cursorTransparent:async()=>(await Promise.resolve().then(()=>require("./cursor-transparent-SER8uk9I.js"))).cursorTransparentSvg,desktop:async()=>(await Promise.resolve().then(()=>require("./desktop-BxtmfVtX.js"))).desktopSvg,disconnect:async()=>(await Promise.resolve().then(()=>require("./disconnect-C41yMwSb.js"))).disconnectSvg,discord:async()=>(await Promise.resolve().then(()=>require("./discord-B03i6OzP.js"))).discordSvg,etherscan:async()=>(await Promise.resolve().then(()=>require("./etherscan-DLF8GRx-.js"))).etherscanSvg,extension:async()=>(await Promise.resolve().then(()=>require("./extension-CgcYwI-C.js"))).extensionSvg,externalLink:async()=>(await Promise.resolve().then(()=>require("./external-link-DyvDlcrJ.js"))).externalLinkSvg,facebook:async()=>(await Promise.resolve().then(()=>require("./facebook-BpyxMifX.js"))).facebookSvg,farcaster:async()=>(await Promise.resolve().then(()=>require("./farcaster-CWG8svoe.js"))).farcasterSvg,filters:async()=>(await Promise.resolve().then(()=>require("./filters-QScvFA3B.js"))).filtersSvg,github:async()=>(await Promise.resolve().then(()=>require("./github-B1QukX4i.js"))).githubSvg,google:async()=>(await Promise.resolve().then(()=>require("./google-C6E4oHHf.js"))).googleSvg,helpCircle:async()=>(await Promise.resolve().then(()=>require("./help-circle-C4PprAiX.js"))).helpCircleSvg,image:async()=>(await Promise.resolve().then(()=>require("./image-DwgrdoFE.js"))).imageSvg,id:async()=>(await Promise.resolve().then(()=>require("./id-D6HBBibn.js"))).idSvg,infoCircle:async()=>(await Promise.resolve().then(()=>require("./info-circle-2P1Yxg4Q.js"))).infoCircleSvg,lightbulb:async()=>(await Promise.resolve().then(()=>require("./lightbulb-MtN8FDGi.js"))).lightbulbSvg,mail:async()=>(await Promise.resolve().then(()=>require("./mail-CqXkLFqA.js"))).mailSvg,mobile:async()=>(await Promise.resolve().then(()=>require("./mobile-BE2FxzUq.js"))).mobileSvg,more:async()=>(await Promise.resolve().then(()=>require("./more-BGlDHap-.js"))).moreSvg,networkPlaceholder:async()=>(await Promise.resolve().then(()=>require("./network-placeholder-DZ6qNrD8.js"))).networkPlaceholderSvg,nftPlaceholder:async()=>(await Promise.resolve().then(()=>require("./nftPlaceholder-t3eyvw1E.js"))).nftPlaceholderSvg,off:async()=>(await Promise.resolve().then(()=>require("./off-BBGwptS5.js"))).offSvg,playStore:async()=>(await Promise.resolve().then(()=>require("./play-store-BbN0jXQh.js"))).playStoreSvg,plus:async()=>(await Promise.resolve().then(()=>require("./plus-DmTKVIYx.js"))).plusSvg,qrCode:async()=>(await Promise.resolve().then(()=>require("./qr-code-B6qlbkUI.js"))).qrCodeIcon,recycleHorizontal:async()=>(await Promise.resolve().then(()=>require("./recycle-horizontal-DzBA56-s.js"))).recycleHorizontalSvg,refresh:async()=>(await Promise.resolve().then(()=>require("./refresh-62hm4k6x.js"))).refreshSvg,search:async()=>(await Promise.resolve().then(()=>require("./search-BAemvNq7.js"))).searchSvg,send:async()=>(await Promise.resolve().then(()=>require("./send-BQNTa-AX.js"))).sendSvg,swapHorizontal:async()=>(await Promise.resolve().then(()=>require("./swapHorizontal-Wp81JSgX.js"))).swapHorizontalSvg,swapHorizontalMedium:async()=>(await Promise.resolve().then(()=>require("./swapHorizontalMedium-B92n1mhC.js"))).swapHorizontalMediumSvg,swapHorizontalBold:async()=>(await Promise.resolve().then(()=>require("./swapHorizontalBold-D70amlcg.js"))).swapHorizontalBoldSvg,swapHorizontalRoundedBold:async()=>(await Promise.resolve().then(()=>require("./swapHorizontalRoundedBold-CWEgSWL3.js"))).swapHorizontalRoundedBoldSvg,swapVertical:async()=>(await Promise.resolve().then(()=>require("./swapVertical-DbS3f5xB.js"))).swapVerticalSvg,telegram:async()=>(await Promise.resolve().then(()=>require("./telegram-DK-OaZof.js"))).telegramSvg,threeDots:async()=>(await Promise.resolve().then(()=>require("./three-dots-CLOJZeqn.js"))).threeDotsSvg,twitch:async()=>(await Promise.resolve().then(()=>require("./twitch-6sCGBDD_.js"))).twitchSvg,twitter:async()=>(await Promise.resolve().then(()=>require("./x-D1ju5P9d.js"))).xSvg,twitterIcon:async()=>(await Promise.resolve().then(()=>require("./twitterIcon-A2SY7Ljz.js"))).twitterIconSvg,verify:async()=>(await Promise.resolve().then(()=>require("./verify-DnxzVYqj.js"))).verifySvg,verifyFilled:async()=>(await Promise.resolve().then(()=>require("./verify-filled-BOz9hX3w.js"))).verifyFilledSvg,wallet:async()=>(await Promise.resolve().then(()=>require("./wallet-Bc87h19O.js"))).walletSvg,walletConnect:async()=>(await Promise.resolve().then(()=>require("./walletconnect-isfAM6mU.js"))).walletConnectSvg,walletConnectLightBrown:async()=>(await Promise.resolve().then(()=>require("./walletconnect-isfAM6mU.js"))).walletConnectLightBrownSvg,walletConnectBrown:async()=>(await Promise.resolve().then(()=>require("./walletconnect-isfAM6mU.js"))).walletConnectBrownSvg,walletPlaceholder:async()=>(await Promise.resolve().then(()=>require("./wallet-placeholder-D60KEgcO.js"))).walletPlaceholderSvg,warningCircle:async()=>(await Promise.resolve().then(()=>require("./warning-circle-DKsp8DlH.js"))).warningCircleSvg,x:async()=>(await Promise.resolve().then(()=>require("./x-D1ju5P9d.js"))).xSvg,info:async()=>(await Promise.resolve().then(()=>require("./info-BifZFc7t.js"))).infoSvg,exclamationTriangle:async()=>(await Promise.resolve().then(()=>require("./exclamation-triangle-Bnq3BTWj.js"))).exclamationTriangleSvg,reown:async()=>(await Promise.resolve().then(()=>require("./reown-logo-CVyCROZP.js"))).reownSvg};async function ne(t){if(j.has(t))return j.get(t);const r=(I[t]??I.copy)();return j.set(t,r),r}let y=class extends l.i$1{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300",this.aspectRatio="1 / 1"}render(){return this.style.cssText=`
|
|
85
85
|
--local-color: ${`var(--wui-color-${this.color});`}
|
|
86
86
|
--local-width: ${`var(--wui-icon-size-${this.size});`}
|
|
87
87
|
--local-aspect-ratio: ${this.aspectRatio}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var h=(i,e,r)=>e in i?d(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var o=(i,e,r)=>h(i,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./address-
|
|
1
|
+
"use strict";var d=Object.defineProperty;var h=(i,e,r)=>e in i?d(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var o=(i,e,r)=>h(i,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./address-DKM11kf_.js"),u=require("./platform-_YLyrJdi.js"),w=require("./create-D2vX2bRe.js"),g=require("./address-CslafWGT.js"),l=require("./chain-CJuQGMF5.js");class c{constructor(e,r,t,n){o(this,"network");o(this,"chain");o(this,"provider");o(this,"contracts");o(this,"chainId");o(this,"coreBridgePackageId");this.network=e,this.chain=r,this.provider=t,this.contracts=n,this.chainId=m.toChainId(r);const s=n.coreBridge;if(!s)throw new Error(`CoreBridge contract Address for chain ${r} not found`);this.coreBridgePackageId=s}getGuardianSet(e){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,r){const[t,n]=await u.SuiPlatform.chainFromRpc(e),s=r[n];if(s.network!==t)throw new Error(`Network mismatch: ${s.network} !== ${t}`);return new c(t,n,e,s.contracts)}async*verifyMessage(e,r){throw new Error("Method not implemented.")}async*publishMessage(e,r){throw new Error("Method not implemented.")}async parseTransaction(e){return(await this.parseMessages(e)).map(t=>({emitter:t.emitterAddress,sequence:t.sequence,chain:this.chain}))}async getGuardianSetIndex(){throw new Error("Method not implemented.")}async parseMessages(e){var n;const t=(n=(await this.provider.getTransactionBlock({digest:e,options:{showEvents:!0,showEffects:!0,showInput:!0}})).events)==null?void 0:n.filter(s=>s.type.endsWith("WormholeMessage"));if(!t||t.length==0)throw new Error("WormholeMessage not found");return t.map(s=>{const a=s.parsedJson;return w.createVAA("Uint8Array",{emitterChain:this.chain,emitterAddress:new g.SuiAddress(a.sender).toUniversalAddress(),sequence:BigInt(a.sequence),guardianSet:0,timestamp:Number(a.timestamp),consistencyLevel:a.consistency_level,nonce:a.nonce,signatures:[],payload:new Uint8Array(a.payload)})})}}l.registerProtocol("Sui","WormholeCore",c);exports.SuiWormholeCore=c;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var oe = Object.defineProperty;
|
|
2
2
|
var se = (m, t, e) => t in m ? oe(m, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[t] = e;
|
|
3
3
|
var h = (m, t, e) => se(m, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { g as F, e as N, i as $, b as I, f as b, T as _, a as C, p as ae, h as ie, j as R, S as M, k as
|
|
5
|
-
import { i as V, o as ge, q as
|
|
6
|
-
import "./index-
|
|
7
|
-
import { ac as we,
|
|
8
|
-
import { S as
|
|
9
|
-
import { r as ee } from "./chain-
|
|
4
|
+
import { g as F, e as N, i as $, b as I, f as b, T as _, a as C, p as ae, h as ie, j as R, S as M, k as Q, l as ce, m as x, n as de, o as le } from "./platform-ByoVE-An.mjs";
|
|
5
|
+
import { i as V, o as ge, q as X, r as S, S as O, u as ue, k as fe, v as pe, w as he, p as K } from "./address-CHEvC20V.mjs";
|
|
6
|
+
import "./index-CrKGOs08.mjs";
|
|
7
|
+
import { ac as we, d9 as D, _ as H, aB as ye, aP as j, j as v, q as me, a7 as L, aO as ke, L as W, a4 as be, a3 as U, $ as Ie, a0 as G } from "./address-BkeBsCZD.mjs";
|
|
8
|
+
import { S as Z } from "./unsignedTransaction-BD81leu1.mjs";
|
|
9
|
+
import { r as ee } from "./chain-uXEmLNMk.mjs";
|
|
10
10
|
const Y = async (m, t, e) => {
|
|
11
11
|
var d, r, n;
|
|
12
12
|
if (!V(e))
|
|
@@ -37,7 +37,7 @@ const Y = async (m, t, e) => {
|
|
|
37
37
|
const a = (u = (s = o.token_registry) == null ? void 0 : s.fields) == null ? void 0 : u.coin_types, d = (w = (f = a == null ? void 0 : a.fields) == null ? void 0 : f.id) == null ? void 0 : w.id;
|
|
38
38
|
if (!d)
|
|
39
39
|
throw new Error("Unable to fetch coin types");
|
|
40
|
-
const r =
|
|
40
|
+
const r = X(a == null ? void 0 : a.type);
|
|
41
41
|
if (!r)
|
|
42
42
|
throw new Error("Unable to get key type");
|
|
43
43
|
const n = await m.getDynamicFieldObject({
|
|
@@ -185,7 +185,7 @@ class z {
|
|
|
185
185
|
const e = await F(this.provider, this.tokenBridgeObjectId);
|
|
186
186
|
if (!e)
|
|
187
187
|
throw new Error("Unable to fetch object fields from token bridge state");
|
|
188
|
-
const i = (n = (r = e.consumed_vaas) == null ? void 0 : r.fields) == null ? void 0 : n.hashes, o =
|
|
188
|
+
const i = (n = (r = e.consumed_vaas) == null ? void 0 : r.fields) == null ? void 0 : n.hashes, o = X((s = (l = i == null ? void 0 : i.fields) == null ? void 0 : l.items) == null ? void 0 : s.type);
|
|
189
189
|
if (!o)
|
|
190
190
|
throw new Error("Unable to get key type");
|
|
191
191
|
const a = (y = (w = (f = (u = i == null ? void 0 : i.fields) == null ? void 0 : u.items) == null ? void 0 : f.fields) == null ? void 0 : w.id) == null ? void 0 : y.id;
|
|
@@ -271,7 +271,7 @@ class z {
|
|
|
271
271
|
}), yield this.createUnsignedTx(c, "Sui.TokenBridge.SubmitAttestation");
|
|
272
272
|
}
|
|
273
273
|
async *transfer(t, e, i, o, a) {
|
|
274
|
-
const d = 0n, r = 0n, l = t.toString(), s = (v(i) ? M : i).toString(), u = await I.getCoins(this.provider, t, s), [f, ...w] = u.filter((p) =>
|
|
274
|
+
const d = 0n, r = 0n, l = t.toString(), s = (v(i) ? M : i).toString(), u = await I.getCoins(this.provider, t, s), [f, ...w] = u.filter((p) => Q(p.coinType, s));
|
|
275
275
|
if (f === void 0)
|
|
276
276
|
throw new Error(`Coins array doesn't contain any coins of type ${s}`);
|
|
277
277
|
const [y, k] = await this.getPackageIds(), c = new _(), [A] = (() => {
|
|
@@ -419,7 +419,7 @@ class z {
|
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
421
|
createUnsignedTx(t, e, i = !1) {
|
|
422
|
-
return new
|
|
422
|
+
return new Z(t, this.network, this.chain, e, i);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
class q {
|
|
@@ -603,7 +603,7 @@ class q {
|
|
|
603
603
|
}
|
|
604
604
|
async getTokenInfo(t) {
|
|
605
605
|
var n;
|
|
606
|
-
const e = await this.getFields(), o = new O(e.registered_tokens.type).getPackageId(), a = e.registered_tokens.fields.id.id, d = new O(t), r =
|
|
606
|
+
const e = await this.getFields(), o = new O(e.registered_tokens.type).getPackageId(), a = e.registered_tokens.fields.id.id, d = new O(t), r = Q(K, d.unwrap()) ? K : d.getCoinType();
|
|
607
607
|
try {
|
|
608
608
|
const l = await this.connection.getDynamicFieldObject({
|
|
609
609
|
parentId: a,
|
|
@@ -645,7 +645,7 @@ class q {
|
|
|
645
645
|
return { coreBridge: t, tokenBridge: e };
|
|
646
646
|
}
|
|
647
647
|
createUnsignedTx(t, e, i = !1) {
|
|
648
|
-
return new
|
|
648
|
+
return new Z(t, this.network, this.chain, e, i);
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
ee("Sui", "TokenBridge", z);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var w=Object.defineProperty;var T=(o,t,e)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var s=(o,t,e)=>T(o,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./address-
|
|
1
|
+
"use strict";var w=Object.defineProperty;var T=(o,t,e)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var s=(o,t,e)=>T(o,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./address-DKM11kf_.js"),l=require("./index-DflOc1lz.js"),g=require("./contract-C2wJ6LwN.js"),d=require("./platform-DHBUZeaO.js"),u=require("./unsignedTransaction-B7AZXsTD.js"),p=require("./chain-CJuQGMF5.js");class c{constructor(t,e,n,a){s(this,"network");s(this,"chain");s(this,"provider");s(this,"contracts");s(this,"chainId");s(this,"core");s(this,"gatewayAddress");s(this,"gateway");s(this,"tbtcTokenAddr");if(this.network=t,this.chain=e,this.provider=n,this.contracts=a,this.network!=="Mainnet")throw new Error("TBTC is only supported on Mainnet");if(!this.contracts.tbtc)throw new Error("TBTC contract address is required");const i=r.TBTCBridge.getNativeTbtcToken(this.chain);if(!i)throw new Error("Native tbtc token not found");this.chainId=r.networkChainToNativeChainId.get(t,e),this.core=new l.EvmWormholeCore(t,e,n,a),this.gatewayAddress=this.contracts.tbtc,this.gateway=new g.Contract(this.gatewayAddress,["function sendTbtc(uint256 amount, uint16 recipientChain, bytes32 recipient, uint256 arbiterFee, uint32 nonce) payable returns (uint64)","function receiveTbtc(bytes calldata encodedVm)"],n),this.tbtcTokenAddr=r.canonicalAddress(i)}static async fromRpc(t,e){const[n,a]=await d.EvmPlatform.chainFromRpc(t),i=e[a];if(i.network!==n)throw new Error(`Network mismatch: ${i.network} != ${n}`);return new c(n,a,t,i.contracts)}async*transfer(t,e,n){const a=new r.EvmAddress(t).toString(),i=await this.gateway.sendTbtc.populateTransaction(n,r.toChainId(e.chain),e.address.toUniversalAddress().toUint8Array(),0n,0n);i.value=await this.core.getMessageFee(),yield*this.approve(a,n,this.gatewayAddress),yield this.createUnsignedTransaction(r.addFrom(i,a),"TBTCBridge.Send")}async*redeem(t,e){if(e.payloadName!=="GatewayTransfer")throw new Error("Invalid VAA payload");const n=new r.EvmAddress(t).toString(),a=await this.gateway.receiveTbtc.populateTransaction(r.serialize(e));yield this.createUnsignedTransaction(r.addFrom(a,n),"TBTCBridge.Redeem")}async*approve(t,e,n){const a=d.EvmPlatform.getTokenImplementation(this.provider,this.tbtcTokenAddr);if(await a.allowance(t,n)<e){const h=await a.approve.populateTransaction(n,e);yield this.createUnsignedTransaction(r.addFrom(h,t),"TBTC.Approve")}}createUnsignedTransaction(t,e){return new u.EvmUnsignedTransaction(r.addChainId(t,this.chainId),this.network,this.chain,e,!1)}}p.registerProtocol(r._platform,"TBTCBridge",c);exports.EvmTBTCBridge=c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const At=require("./address-
|
|
1
|
+
"use strict";const At=require("./address-DKM11kf_.js"),tt="2.29.3";let G={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${tt}`};class w extends Error{constructor(t,r={}){var i;const n=(()=>{var h;return r.cause instanceof w?r.cause.details:(h=r.cause)!=null&&h.message?r.cause.message:r.details})(),u=r.cause instanceof w&&r.cause.docsPath||r.docsPath,o=(i=G.getDocsUrl)==null?void 0:i.call(G,{...r,docsPath:u}),a=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...n?[`Details: ${n}`]:[],...G.version?[`Version: ${G.version}`]:[]].join(`
|
|
2
2
|
`);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=u,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=tt}walk(t){return rt(this,t)}}function rt(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?rt(e.cause,t):t?null:e}class nt extends w{constructor({max:t,min:r,signed:n,size:u,value:o}){super(`Number "${o}" is not in safe ${u?`${u*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}}class $t extends w{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class Ut extends w{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class Ft extends w{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function ot(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Ne(e){return ot(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function ye(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,n=0;for(let u=0;u<r.length-1&&r[t==="left"?u:r.length-u-1].toString()==="0";u++)n++;return r=t==="left"?r.slice(n):r.slice(0,r.length-n),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}class It extends w{constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class ut extends w{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}}class qt extends w{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${t} ${n} long.`,{name:"InvalidBytesLengthError"})}}function ve(e,{dir:t,size:r=32}={}){return typeof e=="string"?at(e,{dir:t,size:r}):Bt(e,{dir:t,size:r})}function at(e,{dir:t,size:r=32}={}){if(r===null)return e;const n=e.replace("0x","");if(n.length>r*2)throw new ut({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function Bt(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new ut({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let u=0;u<r;u++){const o=t==="right";n[o?u:r-u-1]=e[o?u:e.length-u-1]}return n}const Ht=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function zt(e,t={}){return typeof e=="number"||typeof e=="bigint"?it(e,t):typeof e=="string"?qe(e,t):typeof e=="boolean"?st(e,t):Ie(e,t)}function st(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(pe(r,{size:t.size}),ve(r,{size:t.size})):r}function Ie(e,t={}){let r="";for(let u=0;u<e.length;u++)r+=Ht[e[u]];const n=`0x${r}`;return typeof t.size=="number"?(pe(n,{size:t.size}),ve(n,{dir:"right",size:t.size})):n}function it(e,t={}){const{signed:r,size:n}=t,u=BigInt(e);let o;n?r?o=(1n<<BigInt(n)*8n-1n)-1n:o=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const a=typeof o=="bigint"&&r?-o-1n:0;if(o&&u>o||u<a){const h=typeof e=="bigint"?"n":"";throw new nt({max:o?`${o}${h}`:void 0,min:`${a}${h}`,signed:r,size:n,value:`${e}${h}`})}const i=`0x${(r&&u<0?(1n<<BigInt(n*8))+BigInt(u):u).toString(16)}`;return n?ve(i,{size:n}):i}const Wt=new TextEncoder;function qe(e,t={}){const r=Wt.encode(e);return Ie(r,t)}function pe(e,{size:t}){if(Ne(e)>t)throw new Ft({givenSize:Ne(e),maxSize:t})}function ct(e,t={}){const{signed:r}=t;t.size&&pe(e,{size:t.size});const n=BigInt(e);if(!r)return n;const u=(e.length-2)/2,o=(1n<<BigInt(u)*8n-1n)-1n;return n<=o?n:n-BigInt(`0x${"f".padStart(u*2,"f")}`)-1n}function kt(e,t={}){let r=e;if(t.size&&(pe(r,{size:t.size}),r=ye(r)),ye(r)==="0x00")return!1;if(ye(r)==="0x01")return!0;throw new Ut(r)}function Lt(e,t={}){return Number(ct(e,t))}const Yt={gwei:9,wei:18},Vt={ether:-9,wei:9};function lt(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[u,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${u||"0"}${o?`.${o}`:""}`}function X(e,t="wei"){return lt(e,Vt[t])}class Oe extends w{constructor({cause:t,message:r}={}){var u;const n=(u=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:u.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Oe,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Oe,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class dt extends w{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${X(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(dt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class ft extends w{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${X(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(ft,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class Dt extends w{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(Dt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class ht extends w{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
3
3
|
`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(ht,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class bt extends w{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(bt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class pt extends w{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
4
4
|
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(pt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class gt extends w{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(gt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class wt extends w{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(wt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Et extends w{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Et,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class mt extends w{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${X(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${X(n)} gwei`:""}).`].join(`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var h = (i, e, r) => e in i ? d(i, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[e] = r;
|
|
3
3
|
var n = (i, e, r) => h(i, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { aP as m } from "./address-
|
|
5
|
-
import { b as w } from "./platform-
|
|
6
|
-
import { c as p } from "./create-
|
|
7
|
-
import { S as g } from "./address-
|
|
8
|
-
import { r as u } from "./chain-
|
|
4
|
+
import { aP as m } from "./address-BkeBsCZD.mjs";
|
|
5
|
+
import { b as w } from "./platform-ByoVE-An.mjs";
|
|
6
|
+
import { c as p } from "./create-OmEBpMgv.mjs";
|
|
7
|
+
import { S as g } from "./address-CHEvC20V.mjs";
|
|
8
|
+
import { r as u } from "./chain-uXEmLNMk.mjs";
|
|
9
9
|
class c {
|
|
10
10
|
constructor(e, r, t, o) {
|
|
11
11
|
n(this, "network");
|