@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,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ke=require("./index-w1W7oltR.js"),B=require("./address-CSWlEusF.js"),Le=require("./evm-B92-10xg.js"),I=require("./index.es-SeoKSGri.js"),j=require("./index-C_DPPfkk.js"),kv=Object.freeze(Object.defineProperty({__proto__:null,IEvents:I.IEvents},Symbol.toStringTag,{value:"Module"})),Lv=":";function Kv(o){const[t,r]=o.split(Lv);return{namespace:t,reference:r}}function Hv(o,t=[]){const r=[];return Object.keys(o).forEach(s=>{if(t.length&&!t.includes(s))return;const a=o[s];r.push(...a.accounts)}),r}function ch(o,t){return o.includes(":")?[o]:t.chains||[]}const uh="base10",Te="base16",co="base64pad",bo="utf8",hh=0,sr=1,Vv=0,au=1,uo=12,Eo=32;function Bv(){const o=Le.x25519.generateKeyPair();return{privateKey:I.toString(o.secretKey,Te),publicKey:I.toString(o.publicKey,Te)}}function ho(){const o=Le.random.randomBytes(Eo);return I.toString(o,Te)}function Wv(o,t){const r=Le.x25519.sharedKey(I.fromString(o,Te),I.fromString(t,Te),!0),s=new Le.HKDF_1(Le.sha256.SHA256,r).expand(Eo);return I.toString(s,Te)}function Jv(o){const t=Le.sha256.hash(I.fromString(o,Te));return I.toString(t,Te)}function Sr(o){const t=Le.sha256.hash(I.fromString(o,bo));return I.toString(t,Te)}function Gv(o){return I.fromString(`${o}`,uh)}function li(o){return Number(I.toString(o,uh))}function Qv(o){const t=Gv(typeof o.type<"u"?o.type:hh);if(li(t)===sr&&typeof o.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof o.senderPublicKey<"u"?I.fromString(o.senderPublicKey,Te):void 0,s=typeof o.iv<"u"?I.fromString(o.iv,Te):Le.random.randomBytes(uo),a=new Le.chacha20poly1305.ChaCha20Poly1305(I.fromString(o.symKey,Te)).seal(s,I.fromString(o.message,bo));return Zv({type:t,sealed:a,iv:s,senderPublicKey:r})}function Yv(o){const t=new Le.chacha20poly1305.ChaCha20Poly1305(I.fromString(o.symKey,Te)),{sealed:r,iv:s}=ms(o.encoded),a=t.open(s,r);if(a===null)throw new Error("Failed to decrypt");return I.toString(a,bo)}function Zv(o){if(li(o.type)===sr){if(typeof o.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return I.toString(I.concat([o.type,o.senderPublicKey,o.iv,o.sealed]),co)}return I.toString(I.concat([o.type,o.iv,o.sealed]),co)}function ms(o){const t=I.fromString(o,co),r=t.slice(Vv,au),s=au;if(li(r)===sr){const g=s+Eo,w=g+uo,d=t.slice(s,g),b=t.slice(g,w),E=t.slice(w);return{type:r,sealed:E,iv:b,senderPublicKey:d}}const a=s+uo,u=t.slice(s,a),l=t.slice(a);return{type:r,sealed:l,iv:u}}function Xv(o,t){const r=ms(o);return lh({type:li(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?I.toString(r.senderPublicKey,Te):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function lh(o){const t=(o==null?void 0:o.type)||hh;if(t===sr){if(typeof(o==null?void 0:o.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(o==null?void 0:o.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:o==null?void 0:o.senderPublicKey,receiverPublicKey:o==null?void 0:o.receiverPublicKey}}function cu(o){return o.type===sr&&typeof o.senderPublicKey=="string"&&typeof o.receiverPublicKey=="string"}var ew=Object.defineProperty,uu=Object.getOwnPropertySymbols,tw=Object.prototype.hasOwnProperty,rw=Object.prototype.propertyIsEnumerable,hu=(o,t,r)=>t in o?ew(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,lu=(o,t)=>{for(var r in t||(t={}))tw.call(t,r)&&hu(o,r,t[r]);if(uu)for(var r of uu(t))rw.call(t,r)&&hu(o,r,t[r]);return o};const iw="ReactNative",Qe={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},sw="js";function Io(){return typeof B.dist.process<"u"&&typeof B.dist.process.versions<"u"&&typeof B.dist.process.versions.node<"u"}function Or(){return!j.getDocument_1()&&!!j.getNavigator_1()&&navigator.product===iw}function $r(){return!Io()&&!!j.getNavigator_1()&&!!j.getDocument_1()}function pi(){return Or()?Qe.reactNative:Io()?Qe.node:$r()?Qe.browser:Qe.unknown}function nw(){var o;try{return Or()&&typeof B.dist.global<"u"&&typeof(B.dist.global==null?void 0:B.dist.global.Application)<"u"?(o=B.dist.global.Application)==null?void 0:o.applicationId:void 0}catch{return}}function ow(o,t){let r=Le.queryString.parse(o);return r=lu(lu({},r),t),o=Le.queryString.stringify(r),o}function aw(){return j.getWindowMetadata_1()||{name:"",description:"",url:"",icons:[""]}}function cw(){if(pi()===Qe.reactNative&&typeof B.dist.global<"u"&&typeof(B.dist.global==null?void 0:B.dist.global.Platform)<"u"){const{OS:r,Version:s}=B.dist.global.Platform;return[r,s].join("-")}const o=I.detect();if(o===null)return"unknown";const t=o.os?o.os.replace(" ","").toLowerCase():"unknown";return o.type==="browser"?[t,o.name,o.version].join("-"):[t,o.version].join("-")}function uw(){var o;const t=pi();return t===Qe.browser?[t,((o=j.getLocation_1())==null?void 0:o.host)||"unknown"].join(":"):t}function hw(o,t,r){const s=cw(),a=uw();return[[o,t].join("-"),[sw,r].join("-"),s,a].join("/")}function lw({protocol:o,version:t,relayUrl:r,sdkVersion:s,auth:a,projectId:u,useOnCloseEvent:l,bundleId:g}){const w=r.split("?"),d=hw(o,t,s),b={auth:a,ua:d,projectId:u,useOnCloseEvent:l,origin:g||void 0},E=ow(w[1]||"",b);return w[0]+"?"+E}function ir(o,t){return o.filter(r=>t.includes(r)).length===o.length}function ph(o){return Object.fromEntries(o.entries())}function fh(o){return new Map(Object.entries(o))}function Ir(o=j.cjs.FIVE_MINUTES,t){const r=j.cjs.toMiliseconds(o||j.cjs.FIVE_MINUTES);let s,a,u;return{resolve:l=>{u&&s&&(clearTimeout(u),s(l))},reject:l=>{u&&a&&(clearTimeout(u),a(l))},done:()=>new Promise((l,g)=>{u=setTimeout(()=>{g(new Error(t))},r),s=l,a=g})}}function ui(o,t,r){return new Promise(async(s,a)=>{const u=setTimeout(()=>a(new Error(r)),t);try{const l=await o;s(l)}catch(l){a(l)}clearTimeout(u)})}function dh(o,t){if(typeof t=="string"&&t.startsWith(`${o}:`))return t;if(o.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(o.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${o}`)}function pw(o){return dh("topic",o)}function fw(o){return dh("id",o)}function gh(o){const[t,r]=o.split(":"),s={id:void 0,topic:void 0};if(t==="topic"&&typeof r=="string")s.topic=r;else if(t==="id"&&Number.isInteger(Number(r)))s.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return s}function ft(o,t){return j.cjs.fromMiliseconds(Date.now()+j.cjs.toMiliseconds(o))}function Ht(o){return Date.now()>=j.cjs.toMiliseconds(o)}function ge(o,t){return`${o}${t?`:${t}`:""}`}function Jn(o=[],t=[]){return[...new Set([...o,...t])]}async function dw({id:o,topic:t,wcDeepLink:r}){try{if(!r)return;const s=typeof r=="string"?JSON.parse(r):r;let a=s==null?void 0:s.href;if(typeof a!="string")return;a.endsWith("/")&&(a=a.slice(0,-1));const u=`${a}/wc?requestId=${o}&sessionTopic=${t}`,l=pi();l===Qe.browser?u.startsWith("https://")?window.open(u,"_blank","noreferrer noopener"):window.open(u,"_self","noreferrer noopener"):l===Qe.reactNative&&typeof(B.dist.global==null?void 0:B.dist.global.Linking)<"u"&&await B.dist.global.Linking.openURL(u)}catch(s){console.error(s)}}async function gw(o,t){try{return await o.getItem(t)||($r()?localStorage.getItem(t):void 0)}catch(r){console.error(r)}}const yw="irn";function lo(o){return(o==null?void 0:o.relay)||{protocol:yw}}function fs(o){const t=I.C[o];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${o}`);return t}var mw=Object.defineProperty,pu=Object.getOwnPropertySymbols,vw=Object.prototype.hasOwnProperty,ww=Object.prototype.propertyIsEnumerable,fu=(o,t,r)=>t in o?mw(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,_w=(o,t)=>{for(var r in t||(t={}))vw.call(t,r)&&fu(o,r,t[r]);if(pu)for(var r of pu(t))ww.call(t,r)&&fu(o,r,t[r]);return o};function bw(o,t="-"){const r={},s="relay"+t;return Object.keys(o).forEach(a=>{if(a.startsWith(s)){const u=a.replace(s,""),l=o[a];r[u]=l}}),r}function du(o){o=o.includes("wc://")?o.replace("wc://",""):o,o=o.includes("wc:")?o.replace("wc:",""):o;const t=o.indexOf(":"),r=o.indexOf("?")!==-1?o.indexOf("?"):void 0,s=o.substring(0,t),a=o.substring(t+1,r).split("@"),u=typeof r<"u"?o.substring(r):"",l=Le.queryString.parse(u);return{protocol:s,topic:Ew(a[0]),version:parseInt(a[1],10),symKey:l.symKey,relay:bw(l)}}function Ew(o){return o.startsWith("//")?o.substring(2):o}function Iw(o,t="-"){const r="relay",s={};return Object.keys(o).forEach(a=>{const u=r+t+a;o[a]&&(s[u]=o[a])}),s}function Pw(o){return`${o.protocol}:${o.topic}@${o.version}?`+Le.queryString.stringify(_w({symKey:o.symKey},Iw(o.relay)))}function Cr(o){const t=[];return o.forEach(r=>{const[s,a]=r.split(":");t.push(`${s}:${a}`)}),t}function Sw(o){const t=[];return Object.values(o).forEach(r=>{t.push(...Cr(r.accounts))}),t}function Rw(o,t){const r=[];return Object.values(o).forEach(s=>{Cr(s.accounts).includes(t)&&r.push(...s.methods)}),r}function Ow(o,t){const r=[];return Object.values(o).forEach(s=>{Cr(s.accounts).includes(t)&&r.push(...s.events)}),r}function $w(o,t){const r=ds(o,t);if(r)throw new Error(r.message);const s={};for(const[a,u]of Object.entries(o))s[a]={methods:u.methods,events:u.events,chains:u.accounts.map(l=>`${l.split(":")[0]}:${l.split(":")[1]}`)};return s}function Po(o){return o.includes(":")}function oi(o){return Po(o)?o.split(":")[0]:o}const Cw={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},xw={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function N(o,t){const{message:r,code:s}=xw[o];return{message:t?`${r} ${t}`:r,code:s}}function le(o,t){const{message:r,code:s}=Cw[o];return{message:t?`${r} ${t}`:r,code:s}}function wt(o,t){return!!Array.isArray(o)}function Rr(o){return Object.getPrototypeOf(o)===Object.prototype&&Object.keys(o).length}function Ae(o){return typeof o>"u"}function be(o,t){return t&&Ae(o)?!0:typeof o=="string"&&!!o.trim().length}function So(o,t){return t&&Ae(o)?!0:typeof o=="number"&&!isNaN(o)}function Nw(o,t){const{requiredNamespaces:r}=t,s=Object.keys(o.namespaces),a=Object.keys(r);let u=!0;return ir(a,s)?(s.forEach(l=>{const{accounts:g,methods:w,events:d}=o.namespaces[l],b=Cr(g),E=r[l];(!ir(ch(l,E),b)||!ir(E.methods,w)||!ir(E.events,d))&&(u=!1)}),u):!1}function vs(o){return be(o,!1)&&o.includes(":")?o.split(":").length===2:!1}function Aw(o){if(be(o,!1)&&o.includes(":")){const t=o.split(":");if(t.length===3){const r=t[0]+":"+t[1];return!!t[2]&&vs(r)}}return!1}function Tw(o){if(be(o,!1))try{return typeof new URL(o)<"u"}catch{return!1}return!1}function Dw(o){var t;return(t=o==null?void 0:o.proposer)==null?void 0:t.publicKey}function jw(o){return o==null?void 0:o.topic}function Fw(o,t){let r=null;return be(o==null?void 0:o.publicKey,!1)||(r=N("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function gu(o){let t=!0;return wt(o)?o.length&&(t=o.every(r=>be(r,!1))):t=!1,t}function qw(o,t,r){let s=null;return wt(t)&&t.length?t.forEach(a=>{s||vs(a)||(s=le("UNSUPPORTED_CHAINS",`${r}, chain ${a} should be a string and conform to "namespace:chainId" format`))}):vs(o)||(s=le("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),s}function Mw(o,t,r){let s=null;return Object.entries(o).forEach(([a,u])=>{if(s)return;const l=qw(a,ch(a,u),`${t} ${r}`);l&&(s=l)}),s}function Uw(o,t){let r=null;return wt(o)?o.forEach(s=>{r||Aw(s)||(r=le("UNSUPPORTED_ACCOUNTS",`${t}, account ${s} should be a string and conform to "namespace:chainId:address" format`))}):r=le("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function zw(o,t){let r=null;return Object.values(o).forEach(s=>{if(r)return;const a=Uw(s==null?void 0:s.accounts,`${t} namespace`);a&&(r=a)}),r}function kw(o,t){let r=null;return gu(o==null?void 0:o.methods)?gu(o==null?void 0:o.events)||(r=le("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=le("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function yh(o,t){let r=null;return Object.values(o).forEach(s=>{if(r)return;const a=kw(s,`${t}, namespace`);a&&(r=a)}),r}function Lw(o,t,r){let s=null;if(o&&Rr(o)){const a=yh(o,t);a&&(s=a);const u=Mw(o,t,r);u&&(s=u)}else s=N("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return s}function ds(o,t){let r=null;if(o&&Rr(o)){const s=yh(o,t);s&&(r=s);const a=zw(o,t);a&&(r=a)}else r=N("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function mh(o){return be(o.protocol,!0)}function Kw(o,t){let r=!1;return o?o&&wt(o)&&o.length&&o.forEach(s=>{r=mh(s)}):r=!0,r}function Hw(o){return typeof o=="number"}function ke(o){return typeof o<"u"&&typeof o!==null}function Vw(o){return!(!o||typeof o!="object"||!o.code||!So(o.code,!1)||!o.message||!be(o.message,!1))}function Bw(o){return!(Ae(o)||!be(o.method,!1))}function Ww(o){return!(Ae(o)||Ae(o.result)&&Ae(o.error)||!So(o.id,!1)||!be(o.jsonrpc,!1))}function Jw(o){return!(Ae(o)||!be(o.name,!1))}function yu(o,t){return!(!vs(t)||!Sw(o).includes(t))}function Gw(o,t,r){return be(r,!1)?Rw(o,t).includes(r):!1}function Qw(o,t,r){return be(r,!1)?Ow(o,t).includes(r):!1}function mu(o,t,r){let s=null;const a=Yw(o),u=Zw(t),l=Object.keys(a),g=Object.keys(u),w=vu(Object.keys(o)),d=vu(Object.keys(t)),b=w.filter(E=>!d.includes(E));return b.length&&(s=N("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ke=require("./index-tVbvQzum.js"),B=require("./address-DKM11kf_.js"),Le=require("./evm-DT7UH6jw.js"),I=require("./index.es-DW-Rbcpg.js"),j=require("./index-Cjz6EL9G.js"),kv=Object.freeze(Object.defineProperty({__proto__:null,IEvents:I.IEvents},Symbol.toStringTag,{value:"Module"})),Lv=":";function Kv(o){const[t,r]=o.split(Lv);return{namespace:t,reference:r}}function Hv(o,t=[]){const r=[];return Object.keys(o).forEach(s=>{if(t.length&&!t.includes(s))return;const a=o[s];r.push(...a.accounts)}),r}function ch(o,t){return o.includes(":")?[o]:t.chains||[]}const uh="base10",Te="base16",co="base64pad",bo="utf8",hh=0,sr=1,Vv=0,au=1,uo=12,Eo=32;function Bv(){const o=Le.x25519.generateKeyPair();return{privateKey:I.toString(o.secretKey,Te),publicKey:I.toString(o.publicKey,Te)}}function ho(){const o=Le.random.randomBytes(Eo);return I.toString(o,Te)}function Wv(o,t){const r=Le.x25519.sharedKey(I.fromString(o,Te),I.fromString(t,Te),!0),s=new Le.HKDF_1(Le.sha256.SHA256,r).expand(Eo);return I.toString(s,Te)}function Jv(o){const t=Le.sha256.hash(I.fromString(o,Te));return I.toString(t,Te)}function Sr(o){const t=Le.sha256.hash(I.fromString(o,bo));return I.toString(t,Te)}function Gv(o){return I.fromString(`${o}`,uh)}function li(o){return Number(I.toString(o,uh))}function Qv(o){const t=Gv(typeof o.type<"u"?o.type:hh);if(li(t)===sr&&typeof o.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof o.senderPublicKey<"u"?I.fromString(o.senderPublicKey,Te):void 0,s=typeof o.iv<"u"?I.fromString(o.iv,Te):Le.random.randomBytes(uo),a=new Le.chacha20poly1305.ChaCha20Poly1305(I.fromString(o.symKey,Te)).seal(s,I.fromString(o.message,bo));return Zv({type:t,sealed:a,iv:s,senderPublicKey:r})}function Yv(o){const t=new Le.chacha20poly1305.ChaCha20Poly1305(I.fromString(o.symKey,Te)),{sealed:r,iv:s}=ms(o.encoded),a=t.open(s,r);if(a===null)throw new Error("Failed to decrypt");return I.toString(a,bo)}function Zv(o){if(li(o.type)===sr){if(typeof o.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return I.toString(I.concat([o.type,o.senderPublicKey,o.iv,o.sealed]),co)}return I.toString(I.concat([o.type,o.iv,o.sealed]),co)}function ms(o){const t=I.fromString(o,co),r=t.slice(Vv,au),s=au;if(li(r)===sr){const g=s+Eo,w=g+uo,d=t.slice(s,g),b=t.slice(g,w),E=t.slice(w);return{type:r,sealed:E,iv:b,senderPublicKey:d}}const a=s+uo,u=t.slice(s,a),l=t.slice(a);return{type:r,sealed:l,iv:u}}function Xv(o,t){const r=ms(o);return lh({type:li(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?I.toString(r.senderPublicKey,Te):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function lh(o){const t=(o==null?void 0:o.type)||hh;if(t===sr){if(typeof(o==null?void 0:o.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(o==null?void 0:o.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:o==null?void 0:o.senderPublicKey,receiverPublicKey:o==null?void 0:o.receiverPublicKey}}function cu(o){return o.type===sr&&typeof o.senderPublicKey=="string"&&typeof o.receiverPublicKey=="string"}var ew=Object.defineProperty,uu=Object.getOwnPropertySymbols,tw=Object.prototype.hasOwnProperty,rw=Object.prototype.propertyIsEnumerable,hu=(o,t,r)=>t in o?ew(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,lu=(o,t)=>{for(var r in t||(t={}))tw.call(t,r)&&hu(o,r,t[r]);if(uu)for(var r of uu(t))rw.call(t,r)&&hu(o,r,t[r]);return o};const iw="ReactNative",Qe={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},sw="js";function Io(){return typeof B.dist.process<"u"&&typeof B.dist.process.versions<"u"&&typeof B.dist.process.versions.node<"u"}function Or(){return!j.getDocument_1()&&!!j.getNavigator_1()&&navigator.product===iw}function $r(){return!Io()&&!!j.getNavigator_1()&&!!j.getDocument_1()}function pi(){return Or()?Qe.reactNative:Io()?Qe.node:$r()?Qe.browser:Qe.unknown}function nw(){var o;try{return Or()&&typeof B.dist.global<"u"&&typeof(B.dist.global==null?void 0:B.dist.global.Application)<"u"?(o=B.dist.global.Application)==null?void 0:o.applicationId:void 0}catch{return}}function ow(o,t){let r=Le.queryString.parse(o);return r=lu(lu({},r),t),o=Le.queryString.stringify(r),o}function aw(){return j.getWindowMetadata_1()||{name:"",description:"",url:"",icons:[""]}}function cw(){if(pi()===Qe.reactNative&&typeof B.dist.global<"u"&&typeof(B.dist.global==null?void 0:B.dist.global.Platform)<"u"){const{OS:r,Version:s}=B.dist.global.Platform;return[r,s].join("-")}const o=I.detect();if(o===null)return"unknown";const t=o.os?o.os.replace(" ","").toLowerCase():"unknown";return o.type==="browser"?[t,o.name,o.version].join("-"):[t,o.version].join("-")}function uw(){var o;const t=pi();return t===Qe.browser?[t,((o=j.getLocation_1())==null?void 0:o.host)||"unknown"].join(":"):t}function hw(o,t,r){const s=cw(),a=uw();return[[o,t].join("-"),[sw,r].join("-"),s,a].join("/")}function lw({protocol:o,version:t,relayUrl:r,sdkVersion:s,auth:a,projectId:u,useOnCloseEvent:l,bundleId:g}){const w=r.split("?"),d=hw(o,t,s),b={auth:a,ua:d,projectId:u,useOnCloseEvent:l,origin:g||void 0},E=ow(w[1]||"",b);return w[0]+"?"+E}function ir(o,t){return o.filter(r=>t.includes(r)).length===o.length}function ph(o){return Object.fromEntries(o.entries())}function fh(o){return new Map(Object.entries(o))}function Ir(o=j.cjs.FIVE_MINUTES,t){const r=j.cjs.toMiliseconds(o||j.cjs.FIVE_MINUTES);let s,a,u;return{resolve:l=>{u&&s&&(clearTimeout(u),s(l))},reject:l=>{u&&a&&(clearTimeout(u),a(l))},done:()=>new Promise((l,g)=>{u=setTimeout(()=>{g(new Error(t))},r),s=l,a=g})}}function ui(o,t,r){return new Promise(async(s,a)=>{const u=setTimeout(()=>a(new Error(r)),t);try{const l=await o;s(l)}catch(l){a(l)}clearTimeout(u)})}function dh(o,t){if(typeof t=="string"&&t.startsWith(`${o}:`))return t;if(o.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(o.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${o}`)}function pw(o){return dh("topic",o)}function fw(o){return dh("id",o)}function gh(o){const[t,r]=o.split(":"),s={id:void 0,topic:void 0};if(t==="topic"&&typeof r=="string")s.topic=r;else if(t==="id"&&Number.isInteger(Number(r)))s.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return s}function ft(o,t){return j.cjs.fromMiliseconds(Date.now()+j.cjs.toMiliseconds(o))}function Ht(o){return Date.now()>=j.cjs.toMiliseconds(o)}function ge(o,t){return`${o}${t?`:${t}`:""}`}function Jn(o=[],t=[]){return[...new Set([...o,...t])]}async function dw({id:o,topic:t,wcDeepLink:r}){try{if(!r)return;const s=typeof r=="string"?JSON.parse(r):r;let a=s==null?void 0:s.href;if(typeof a!="string")return;a.endsWith("/")&&(a=a.slice(0,-1));const u=`${a}/wc?requestId=${o}&sessionTopic=${t}`,l=pi();l===Qe.browser?u.startsWith("https://")?window.open(u,"_blank","noreferrer noopener"):window.open(u,"_self","noreferrer noopener"):l===Qe.reactNative&&typeof(B.dist.global==null?void 0:B.dist.global.Linking)<"u"&&await B.dist.global.Linking.openURL(u)}catch(s){console.error(s)}}async function gw(o,t){try{return await o.getItem(t)||($r()?localStorage.getItem(t):void 0)}catch(r){console.error(r)}}const yw="irn";function lo(o){return(o==null?void 0:o.relay)||{protocol:yw}}function fs(o){const t=I.C[o];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${o}`);return t}var mw=Object.defineProperty,pu=Object.getOwnPropertySymbols,vw=Object.prototype.hasOwnProperty,ww=Object.prototype.propertyIsEnumerable,fu=(o,t,r)=>t in o?mw(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,_w=(o,t)=>{for(var r in t||(t={}))vw.call(t,r)&&fu(o,r,t[r]);if(pu)for(var r of pu(t))ww.call(t,r)&&fu(o,r,t[r]);return o};function bw(o,t="-"){const r={},s="relay"+t;return Object.keys(o).forEach(a=>{if(a.startsWith(s)){const u=a.replace(s,""),l=o[a];r[u]=l}}),r}function du(o){o=o.includes("wc://")?o.replace("wc://",""):o,o=o.includes("wc:")?o.replace("wc:",""):o;const t=o.indexOf(":"),r=o.indexOf("?")!==-1?o.indexOf("?"):void 0,s=o.substring(0,t),a=o.substring(t+1,r).split("@"),u=typeof r<"u"?o.substring(r):"",l=Le.queryString.parse(u);return{protocol:s,topic:Ew(a[0]),version:parseInt(a[1],10),symKey:l.symKey,relay:bw(l)}}function Ew(o){return o.startsWith("//")?o.substring(2):o}function Iw(o,t="-"){const r="relay",s={};return Object.keys(o).forEach(a=>{const u=r+t+a;o[a]&&(s[u]=o[a])}),s}function Pw(o){return`${o.protocol}:${o.topic}@${o.version}?`+Le.queryString.stringify(_w({symKey:o.symKey},Iw(o.relay)))}function Cr(o){const t=[];return o.forEach(r=>{const[s,a]=r.split(":");t.push(`${s}:${a}`)}),t}function Sw(o){const t=[];return Object.values(o).forEach(r=>{t.push(...Cr(r.accounts))}),t}function Rw(o,t){const r=[];return Object.values(o).forEach(s=>{Cr(s.accounts).includes(t)&&r.push(...s.methods)}),r}function Ow(o,t){const r=[];return Object.values(o).forEach(s=>{Cr(s.accounts).includes(t)&&r.push(...s.events)}),r}function $w(o,t){const r=ds(o,t);if(r)throw new Error(r.message);const s={};for(const[a,u]of Object.entries(o))s[a]={methods:u.methods,events:u.events,chains:u.accounts.map(l=>`${l.split(":")[0]}:${l.split(":")[1]}`)};return s}function Po(o){return o.includes(":")}function oi(o){return Po(o)?o.split(":")[0]:o}const Cw={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},xw={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function N(o,t){const{message:r,code:s}=xw[o];return{message:t?`${r} ${t}`:r,code:s}}function le(o,t){const{message:r,code:s}=Cw[o];return{message:t?`${r} ${t}`:r,code:s}}function wt(o,t){return!!Array.isArray(o)}function Rr(o){return Object.getPrototypeOf(o)===Object.prototype&&Object.keys(o).length}function Ae(o){return typeof o>"u"}function be(o,t){return t&&Ae(o)?!0:typeof o=="string"&&!!o.trim().length}function So(o,t){return t&&Ae(o)?!0:typeof o=="number"&&!isNaN(o)}function Nw(o,t){const{requiredNamespaces:r}=t,s=Object.keys(o.namespaces),a=Object.keys(r);let u=!0;return ir(a,s)?(s.forEach(l=>{const{accounts:g,methods:w,events:d}=o.namespaces[l],b=Cr(g),E=r[l];(!ir(ch(l,E),b)||!ir(E.methods,w)||!ir(E.events,d))&&(u=!1)}),u):!1}function vs(o){return be(o,!1)&&o.includes(":")?o.split(":").length===2:!1}function Aw(o){if(be(o,!1)&&o.includes(":")){const t=o.split(":");if(t.length===3){const r=t[0]+":"+t[1];return!!t[2]&&vs(r)}}return!1}function Tw(o){if(be(o,!1))try{return typeof new URL(o)<"u"}catch{return!1}return!1}function Dw(o){var t;return(t=o==null?void 0:o.proposer)==null?void 0:t.publicKey}function jw(o){return o==null?void 0:o.topic}function Fw(o,t){let r=null;return be(o==null?void 0:o.publicKey,!1)||(r=N("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function gu(o){let t=!0;return wt(o)?o.length&&(t=o.every(r=>be(r,!1))):t=!1,t}function qw(o,t,r){let s=null;return wt(t)&&t.length?t.forEach(a=>{s||vs(a)||(s=le("UNSUPPORTED_CHAINS",`${r}, chain ${a} should be a string and conform to "namespace:chainId" format`))}):vs(o)||(s=le("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),s}function Mw(o,t,r){let s=null;return Object.entries(o).forEach(([a,u])=>{if(s)return;const l=qw(a,ch(a,u),`${t} ${r}`);l&&(s=l)}),s}function Uw(o,t){let r=null;return wt(o)?o.forEach(s=>{r||Aw(s)||(r=le("UNSUPPORTED_ACCOUNTS",`${t}, account ${s} should be a string and conform to "namespace:chainId:address" format`))}):r=le("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function zw(o,t){let r=null;return Object.values(o).forEach(s=>{if(r)return;const a=Uw(s==null?void 0:s.accounts,`${t} namespace`);a&&(r=a)}),r}function kw(o,t){let r=null;return gu(o==null?void 0:o.methods)?gu(o==null?void 0:o.events)||(r=le("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=le("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function yh(o,t){let r=null;return Object.values(o).forEach(s=>{if(r)return;const a=kw(s,`${t}, namespace`);a&&(r=a)}),r}function Lw(o,t,r){let s=null;if(o&&Rr(o)){const a=yh(o,t);a&&(s=a);const u=Mw(o,t,r);u&&(s=u)}else s=N("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return s}function ds(o,t){let r=null;if(o&&Rr(o)){const s=yh(o,t);s&&(r=s);const a=zw(o,t);a&&(r=a)}else r=N("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function mh(o){return be(o.protocol,!0)}function Kw(o,t){let r=!1;return o?o&&wt(o)&&o.length&&o.forEach(s=>{r=mh(s)}):r=!0,r}function Hw(o){return typeof o=="number"}function ke(o){return typeof o<"u"&&typeof o!==null}function Vw(o){return!(!o||typeof o!="object"||!o.code||!So(o.code,!1)||!o.message||!be(o.message,!1))}function Bw(o){return!(Ae(o)||!be(o.method,!1))}function Ww(o){return!(Ae(o)||Ae(o.result)&&Ae(o.error)||!So(o.id,!1)||!be(o.jsonrpc,!1))}function Jw(o){return!(Ae(o)||!be(o.name,!1))}function yu(o,t){return!(!vs(t)||!Sw(o).includes(t))}function Gw(o,t,r){return be(r,!1)?Rw(o,t).includes(r):!1}function Qw(o,t,r){return be(r,!1)?Ow(o,t).includes(r):!1}function mu(o,t,r){let s=null;const a=Yw(o),u=Zw(t),l=Object.keys(a),g=Object.keys(u),w=vu(Object.keys(o)),d=vu(Object.keys(t)),b=w.filter(E=>!d.includes(E));return b.length&&(s=N("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
|
|
2
2
|
Required: ${b.toString()}
|
|
3
3
|
Received: ${Object.keys(t).toString()}`)),ir(l,g)||(s=N("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
|
|
4
4
|
Required: ${l.toString()}
|
|
@@ -43,4 +43,4 @@ __p += '`),Q&&(C+=`' +
|
|
|
43
43
|
function print() { __p += __j.call(arguments, '') }
|
|
44
44
|
`:`;
|
|
45
45
|
`)+C+`return __p
|
|
46
|
-
}`;var H=su(function(){return X(f,F+"return "+C).apply(r,y)});if(H.source=C,qn(H))throw H;return H}function Jm(e){return ee(e).toLowerCase()}function Gm(e){return ee(e).toUpperCase()}function Qm(e,i,n){if(e=ee(e),e&&(n||i===r))return fa(e);if(!e||!(i=Be(i)))return e;var c=ct(e),h=ct(i),f=da(c,h),y=ga(c,h)+1;return Lt(c,f,y).join("")}function Ym(e,i,n){if(e=ee(e),e&&(n||i===r))return e.slice(0,ma(e)+1);if(!e||!(i=Be(i)))return e;var c=ct(e),h=ga(c,ct(i))+1;return Lt(c,0,h).join("")}function Zm(e,i,n){if(e=ee(e),e&&(n||i===r))return e.replace(Fs,"");if(!e||!(i=Be(i)))return e;var c=ct(e),h=da(c,ct(i));return Lt(c,h).join("")}function Xm(e,i){var n=Vh,c=Bh;if(ue(i)){var h="separator"in i?i.separator:h;n="length"in i?L(i.length):n,c="omission"in i?Be(i.omission):c}e=ee(e);var f=e.length;if(lr(e)){var y=ct(e);f=y.length}if(n>=f)return e;var m=n-pr(c);if(m<1)return c;var _=y?Lt(y,0,m).join(""):e.slice(0,m);if(h===r)return _+c;if(y&&(m+=_.length-m),Mn(h)){if(e.slice(m).search(h)){var O,$=_;for(h.global||(h=Xs(h.source,ee(jo.exec(h))+"g")),h.lastIndex=0;O=h.exec($);)var C=O.index;_=_.slice(0,C===r?m:C)}}else if(e.indexOf(Be(h),m)!=m){var A=_.lastIndexOf(h);A>-1&&(_=_.slice(0,A))}return _+c}function ev(e){return e=ee(e),e&&hl.test(e)?e.replace(Ao,$p):e}var tv=wr(function(e,i,n){return e+(n?" ":"")+i.toUpperCase()}),kn=nc("toUpperCase");function iu(e,i,n){return e=ee(e),i=n?r:i,i===r?Ip(e)?Np(e):dp(e):e.match(i)||[]}var su=V(function(e,i){try{return He(e,r,i)}catch(n){return qn(n)?n:new z(n)}}),rv=St(function(e,i){return Ze(i,function(n){n=mt(n),It(e,n,jn(e[n],e))}),e});function iv(e){var i=e==null?0:e.length,n=q();return e=i?ae(e,function(c){if(typeof c[1]!="function")throw new Xe(l);return[n(c[0]),c[1]]}):[],V(function(c){for(var h=-1;++h<i;){var f=e[h];if(He(f[0],this,c))return He(f[1],this,c)}})}function sv(e){return Cf(tt(e,E))}function Ln(e){return function(){return e}}function nv(e,i){return e==null||e!==e?i:e}var ov=ac(),av=ac(!0);function Me(e){return e}function Kn(e){return qa(typeof e=="function"?e:tt(e,E))}function cv(e){return Ua(tt(e,E))}function uv(e,i){return za(e,tt(i,E))}var hv=V(function(e,i){return function(n){return Br(n,e,i)}}),lv=V(function(e,i){return function(n){return Br(e,n,i)}});function Hn(e,i,n){var c=we(i),h=Li(i,c);n==null&&!(ue(i)&&(h.length||!c.length))&&(n=i,i=e,e=this,h=Li(i,we(i)));var f=!(ue(n)&&"chain"in n)||!!n.chain,y=Ot(e);return Ze(h,function(m){var _=i[m];e[m]=_,y&&(e.prototype[m]=function(){var O=this.__chain__;if(f||O){var $=e(this.__wrapped__),C=$.__actions__=je(this.__actions__);return C.push({func:_,args:arguments,thisArg:e}),$.__chain__=O,$}return _.apply(e,Ft([this.value()],arguments))})}),e}function pv(){return Ee._===this&&(Ee._=qp),this}function Vn(){}function fv(e){return e=L(e),V(function(i){return ka(i,e)})}var dv=En(ae),gv=En(ca),yv=En(Bs);function nu(e){return Cn(e)?Ws(mt(e)):Bf(e)}function mv(e){return function(i){return e==null?r:Zt(e,i)}}var vv=uc(),wv=uc(!0);function Bn(){return[]}function Wn(){return!1}function _v(){return{}}function bv(){return""}function Ev(){return!0}function Iv(e,i){if(e=L(e),e<1||e>or)return[];var n=dt,c=Se(e,dt);i=q(i),e-=dt;for(var h=Qs(c,i);++n<e;)i(n);return h}function Pv(e){return k(e)?ae(e,mt):We(e)?[e]:je(Sc(ee(e)))}function Sv(e){var i=++jp;return ee(e)+i}var Rv=Ji(function(e,i){return e+i},0),Ov=In("ceil"),$v=Ji(function(e,i){return e/i},1),Cv=In("floor");function xv(e){return e&&e.length?ki(e,Me,cn):r}function Nv(e,i){return e&&e.length?ki(e,q(i,2),cn):r}function Av(e){return la(e,Me)}function Tv(e,i){return la(e,q(i,2))}function Dv(e){return e&&e.length?ki(e,Me,pn):r}function jv(e,i){return e&&e.length?ki(e,q(i,2),pn):r}var Fv=Ji(function(e,i){return e*i},1),qv=In("round"),Mv=Ji(function(e,i){return e-i},0);function Uv(e){return e&&e.length?Gs(e,Me):0}function zv(e,i){return e&&e.length?Gs(e,q(i,2)):0}return p.after=cy,p.ary=Fc,p.assign=Gy,p.assignIn=Qc,p.assignInWith=as,p.assignWith=Qy,p.at=Yy,p.before=qc,p.bind=jn,p.bindAll=rv,p.bindKey=Mc,p.castArray=_y,p.chain=Tc,p.chunk=Cd,p.compact=xd,p.concat=Nd,p.cond=iv,p.conforms=sv,p.constant=Ln,p.countBy=Ug,p.create=Zy,p.curry=Uc,p.curryRight=zc,p.debounce=kc,p.defaults=Xy,p.defaultsDeep=em,p.defer=uy,p.delay=hy,p.difference=Ad,p.differenceBy=Td,p.differenceWith=Dd,p.drop=jd,p.dropRight=Fd,p.dropRightWhile=qd,p.dropWhile=Md,p.fill=Ud,p.filter=kg,p.flatMap=Hg,p.flatMapDeep=Vg,p.flatMapDepth=Bg,p.flatten=Cc,p.flattenDeep=zd,p.flattenDepth=kd,p.flip=ly,p.flow=ov,p.flowRight=av,p.fromPairs=Ld,p.functions=am,p.functionsIn=cm,p.groupBy=Wg,p.initial=Hd,p.intersection=Vd,p.intersectionBy=Bd,p.intersectionWith=Wd,p.invert=hm,p.invertBy=lm,p.invokeMap=Gg,p.iteratee=Kn,p.keyBy=Qg,p.keys=we,p.keysIn=qe,p.map=ts,p.mapKeys=fm,p.mapValues=dm,p.matches=cv,p.matchesProperty=uv,p.memoize=is,p.merge=gm,p.mergeWith=Yc,p.method=hv,p.methodOf=lv,p.mixin=Hn,p.negate=ss,p.nthArg=fv,p.omit=ym,p.omitBy=mm,p.once=py,p.orderBy=Yg,p.over=dv,p.overArgs=fy,p.overEvery=gv,p.overSome=yv,p.partial=Fn,p.partialRight=Lc,p.partition=Zg,p.pick=vm,p.pickBy=Zc,p.property=nu,p.propertyOf=mv,p.pull=Yd,p.pullAll=Nc,p.pullAllBy=Zd,p.pullAllWith=Xd,p.pullAt=eg,p.range=vv,p.rangeRight=wv,p.rearg=dy,p.reject=ty,p.remove=tg,p.rest=gy,p.reverse=Tn,p.sampleSize=iy,p.set=_m,p.setWith=bm,p.shuffle=sy,p.slice=rg,p.sortBy=ay,p.sortedUniq=ug,p.sortedUniqBy=hg,p.split=Hm,p.spread=yy,p.tail=lg,p.take=pg,p.takeRight=fg,p.takeRightWhile=dg,p.takeWhile=gg,p.tap=xg,p.throttle=my,p.thru=es,p.toArray=Wc,p.toPairs=Xc,p.toPairsIn=eu,p.toPath=Pv,p.toPlainObject=Gc,p.transform=Em,p.unary=vy,p.union=yg,p.unionBy=mg,p.unionWith=vg,p.uniq=wg,p.uniqBy=_g,p.uniqWith=bg,p.unset=Im,p.unzip=Dn,p.unzipWith=Ac,p.update=Pm,p.updateWith=Sm,p.values=Er,p.valuesIn=Rm,p.without=Eg,p.words=iu,p.wrap=wy,p.xor=Ig,p.xorBy=Pg,p.xorWith=Sg,p.zip=Rg,p.zipObject=Og,p.zipObjectDeep=$g,p.zipWith=Cg,p.entries=Xc,p.entriesIn=eu,p.extend=Qc,p.extendWith=as,Hn(p,p),p.add=Rv,p.attempt=su,p.camelCase=xm,p.capitalize=tu,p.ceil=Ov,p.clamp=Om,p.clone=by,p.cloneDeep=Iy,p.cloneDeepWith=Py,p.cloneWith=Ey,p.conformsTo=Sy,p.deburr=ru,p.defaultTo=nv,p.divide=$v,p.endsWith=Nm,p.eq=ht,p.escape=Am,p.escapeRegExp=Tm,p.every=zg,p.find=Lg,p.findIndex=Oc,p.findKey=tm,p.findLast=Kg,p.findLastIndex=$c,p.findLastKey=rm,p.floor=Cv,p.forEach=Dc,p.forEachRight=jc,p.forIn=im,p.forInRight=sm,p.forOwn=nm,p.forOwnRight=om,p.get=Un,p.gt=Ry,p.gte=Oy,p.has=um,p.hasIn=zn,p.head=xc,p.identity=Me,p.includes=Jg,p.indexOf=Kd,p.inRange=$m,p.invoke=pm,p.isArguments=tr,p.isArray=k,p.isArrayBuffer=$y,p.isArrayLike=Fe,p.isArrayLikeObject=fe,p.isBoolean=Cy,p.isBuffer=Kt,p.isDate=xy,p.isElement=Ny,p.isEmpty=Ay,p.isEqual=Ty,p.isEqualWith=Dy,p.isError=qn,p.isFinite=jy,p.isFunction=Ot,p.isInteger=Kc,p.isLength=ns,p.isMap=Hc,p.isMatch=Fy,p.isMatchWith=qy,p.isNaN=My,p.isNative=Uy,p.isNil=ky,p.isNull=zy,p.isNumber=Vc,p.isObject=ue,p.isObjectLike=he,p.isPlainObject=Zr,p.isRegExp=Mn,p.isSafeInteger=Ly,p.isSet=Bc,p.isString=os,p.isSymbol=We,p.isTypedArray=br,p.isUndefined=Ky,p.isWeakMap=Hy,p.isWeakSet=Vy,p.join=Jd,p.kebabCase=Dm,p.last=it,p.lastIndexOf=Gd,p.lowerCase=jm,p.lowerFirst=Fm,p.lt=By,p.lte=Wy,p.max=xv,p.maxBy=Nv,p.mean=Av,p.meanBy=Tv,p.min=Dv,p.minBy=jv,p.stubArray=Bn,p.stubFalse=Wn,p.stubObject=_v,p.stubString=bv,p.stubTrue=Ev,p.multiply=Fv,p.nth=Qd,p.noConflict=pv,p.noop=Vn,p.now=rs,p.pad=qm,p.padEnd=Mm,p.padStart=Um,p.parseInt=zm,p.random=Cm,p.reduce=Xg,p.reduceRight=ey,p.repeat=km,p.replace=Lm,p.result=wm,p.round=qv,p.runInContext=v,p.sample=ry,p.size=ny,p.snakeCase=Km,p.some=oy,p.sortedIndex=ig,p.sortedIndexBy=sg,p.sortedIndexOf=ng,p.sortedLastIndex=og,p.sortedLastIndexBy=ag,p.sortedLastIndexOf=cg,p.startCase=Vm,p.startsWith=Bm,p.subtract=Mv,p.sum=Uv,p.sumBy=zv,p.template=Wm,p.times=Iv,p.toFinite=$t,p.toInteger=L,p.toLength=Jc,p.toLower=Jm,p.toNumber=st,p.toSafeInteger=Jy,p.toString=ee,p.toUpper=Gm,p.trim=Qm,p.trimEnd=Ym,p.trimStart=Zm,p.truncate=Xm,p.unescape=ev,p.uniqueId=Sv,p.upperCase=tv,p.upperFirst=kn,p.each=Dc,p.eachRight=jc,p.first=xc,Hn(p,function(){var e={};return gt(p,function(i,n){re.call(p.prototype,n)||(e[n]=i)}),e}(),{chain:!1}),p.VERSION=s,Ze(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),Ze(["drop","take"],function(e,i){J.prototype[e]=function(n){n=n===r?1:ve(L(n),0);var c=this.__filtered__&&!i?new J(this):this.clone();return c.__filtered__?c.__takeCount__=Se(n,c.__takeCount__):c.__views__.push({size:Se(n,dt),type:e+(c.__dir__<0?"Right":"")}),c},J.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ze(["filter","map","takeWhile"],function(e,i){var n=i+1,c=n==Co||n==Qh;J.prototype[e]=function(h){var f=this.clone();return f.__iteratees__.push({iteratee:q(h,3),type:n}),f.__filtered__=f.__filtered__||c,f}}),Ze(["head","last"],function(e,i){var n="take"+(i?"Right":"");J.prototype[e]=function(){return this[n](1).value()[0]}}),Ze(["initial","tail"],function(e,i){var n="drop"+(i?"":"Right");J.prototype[e]=function(){return this.__filtered__?new J(this):this[n](1)}}),J.prototype.compact=function(){return this.filter(Me)},J.prototype.find=function(e){return this.filter(e).head()},J.prototype.findLast=function(e){return this.reverse().find(e)},J.prototype.invokeMap=V(function(e,i){return typeof e=="function"?new J(this):this.map(function(n){return Br(n,e,i)})}),J.prototype.reject=function(e){return this.filter(ss(q(e)))},J.prototype.slice=function(e,i){e=L(e);var n=this;return n.__filtered__&&(e>0||i<0)?new J(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),i!==r&&(i=L(i),n=i<0?n.dropRight(-i):n.take(i-e)),n)},J.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},J.prototype.toArray=function(){return this.take(dt)},gt(J.prototype,function(e,i){var n=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=p[c?"take"+(i=="last"?"Right":""):i],f=c||/^find/.test(i);h&&(p.prototype[i]=function(){var y=this.__wrapped__,m=c?[1]:arguments,_=y instanceof J,O=m[0],$=_||k(y),C=function(W){var Q=h.apply(p,Ft([W],m));return c&&A?Q[0]:Q};$&&n&&typeof O=="function"&&O.length!=1&&(_=$=!1);var A=this.__chain__,F=!!this.__actions__.length,M=f&&!A,H=_&&!F;if(!f&&$){y=H?y:new J(this);var U=e.apply(y,m);return U.__actions__.push({func:es,args:[C],thisArg:r}),new et(U,A)}return M&&H?e.apply(this,m):(U=this.thru(C),M?c?U.value()[0]:U.value():U)})}),Ze(["pop","push","shift","sort","splice","unshift"],function(e){var i=Ri[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var h=arguments;if(c&&!this.__chain__){var f=this.value();return i.apply(k(f)?f:[],h)}return this[n](function(y){return i.apply(k(y)?y:[],h)})}}),gt(J.prototype,function(e,i){var n=p[i];if(n){var c=n.name+"";re.call(yr,c)||(yr[c]=[]),yr[c].push({name:i,func:n})}}),yr[Wi(r,G).name]=[{name:"wrapper",func:r}],J.prototype.clone=Xp,J.prototype.reverse=ef,J.prototype.value=tf,p.prototype.at=Ng,p.prototype.chain=Ag,p.prototype.commit=Tg,p.prototype.next=Dg,p.prototype.plant=Fg,p.prototype.reverse=qg,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Mg,p.prototype.first=p.prototype.head,Ur&&(p.prototype[Ur]=jg),p},fr=Ap();Wt?((Wt.exports=fr)._=fr,Ls._=fr):Ee._=fr}).call(ni)})(_o,_o.exports);var fE=Object.defineProperty,dE=Object.defineProperties,gE=Object.getOwnPropertyDescriptors,eh=Object.getOwnPropertySymbols,yE=Object.prototype.hasOwnProperty,mE=Object.prototype.propertyIsEnumerable,th=(o,t,r)=>t in o?fE(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,ls=(o,t)=>{for(var r in t||(t={}))yE.call(t,r)&&th(o,r,t[r]);if(eh)for(var r of eh(t))mE.call(t,r)&&th(o,r,t[r]);return o},vE=(o,t)=>dE(o,gE(t));function Bt(o,t,r){var s;const a=Kv(o);return((s=t.rpcMap)==null?void 0:s[a.reference])||`${pE}?chainId=${a.namespace}:${a.reference}&projectId=${r}`}function nr(o){return o.includes(":")?o.split(":")[1]:o}function kh(o){return o.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function wE(o,t){const r=Object.keys(t.namespaces).filter(a=>a.includes(o));if(!r.length)return[];const s=[];return r.forEach(a=>{const u=t.namespaces[a].accounts;s.push(...u)}),s}function _E(o={},t={}){const r=rh(o),s=rh(t);return _o.exports.merge(r,s)}function rh(o){var t,r,s,a;const u={};if(!Rr(o))return u;for(const[l,g]of Object.entries(o)){const w=Po(l)?[l]:g.chains,d=g.methods||[],b=g.events||[],E=g.rpcMap||{},S=oi(l);u[S]=vE(ls(ls({},u[S]),g),{chains:Jn(w,(t=u[S])==null?void 0:t.chains),methods:Jn(d,(r=u[S])==null?void 0:r.methods),events:Jn(b,(s=u[S])==null?void 0:s.events),rpcMap:ls(ls({},E),(a=u[S])==null?void 0:a.rpcMap)})}return u}function bE(o){return o.includes(":")?o.split(":")[2]:o}function EE(o){const t={};for(const[r,s]of Object.entries(o)){const a=s.methods||[],u=s.events||[],l=s.accounts||[],g=Po(r)?[r]:s.chains?s.chains:kh(s.accounts);t[r]={chains:g,methods:a,events:u,accounts:l}}return t}function so(o){return typeof o=="number"?o:o.includes("0x")?parseInt(o,16):o.includes(":")?Number(o.split(":")[1]):Number(o)}const Lh={},ce=o=>Lh[o],no=(o,t)=>{Lh[o]=t};class IE{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class PE{constructor(t){this.name="eip155",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(parseInt(t),r),this.chainId=parseInt(t),this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,r){const s=r||Bt(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=parseInt(nr(r));t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const t=this.chainId,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}async handleSwitchChain(t){var r,s;let a=t.request.params?(r=t.request.params[0])==null?void 0:r.chainId:"0x0";a=a.startsWith("0x")?a:`0x${a}`;const u=parseInt(a,16);if(this.isChainApproved(u))this.setDefaultChain(`${u}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:a}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${u}`);else throw new Error(`Failed to switch to chain 'eip155:${u}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}}class SE{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class RE{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class OE{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{const s=this.getCardanoRPCUrl(r),a=nr(r);t[a]=this.createHttpProvider(a,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}getCardanoRPCUrl(t){const r=this.namespace.rpcMap;if(r)return r[t]}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class $E{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class CE{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class xE{constructor(t){this.name="near",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const s=r||Bt(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace);return typeof s>"u"?void 0:new At(new I.f(s,ce("disableProviderPing")))}}var NE=Object.defineProperty,AE=Object.defineProperties,TE=Object.getOwnPropertyDescriptors,ih=Object.getOwnPropertySymbols,DE=Object.prototype.hasOwnProperty,jE=Object.prototype.propertyIsEnumerable,sh=(o,t,r)=>t in o?NE(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,ps=(o,t)=>{for(var r in t||(t={}))DE.call(t,r)&&sh(o,r,t[r]);if(ih)for(var r of ih(t))jE.call(t,r)&&sh(o,r,t[r]);return o},oo=(o,t)=>AE(o,TE(t));class $o{constructor(t){this.events=new Ke.EventEmitter,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:I.Dg(I.k({level:(t==null?void 0:t.logger)||Zu})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const r=new $o(t);return await r.initialize(),r}async request(t,r){const[s,a]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(s).request({request:ps({},t),chainId:`${s}:${a}`,topic:this.session.topic})}sendAsync(t,r,s){const a=new Date().getTime();this.request(t,s).then(u=>r(null,I.formatJsonRpcResult(a,u))).catch(u=>r(u,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:le("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),await this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}removeListener(t,r){this.events.removeListener(t,r)}off(t,r){this.events.off(t,r)}get isWalletConnect(){return!0}async pair(t){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:a}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await a().then(u=>{this.session=u,this.namespaces||(this.namespaces=EE(u.namespaces),this.persist("namespaces",this.namespaces))}).catch(u=>{if(u.message!==Uh)throw u;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(t,r){try{if(!this.session)return;const[s,a]=this.validateChain(t);this.getProvider(s).setDefaultChain(a,r)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(wt(r)){for(const s of r)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const t=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[t]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await cE.init({logger:this.providerOpts.logger||Zu,relayUrl:this.providerOpts.relayUrl||uE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(r=>oi(r)))];no("client",this.client),no("events",this.events),no("disableProviderPing",this.disableProviderPing),t.forEach(r=>{if(!this.session)return;const s=wE(r,this.session),a=kh(s),u=_E(this.namespaces,this.optionalNamespaces),l=oo(ps({},u[r]),{accounts:s,chains:a});switch(r){case"eip155":this.rpcProviders[r]=new PE({namespace:l});break;case"solana":this.rpcProviders[r]=new SE({namespace:l});break;case"cosmos":this.rpcProviders[r]=new RE({namespace:l});break;case"polkadot":this.rpcProviders[r]=new IE({namespace:l});break;case"cip34":this.rpcProviders[r]=new OE({namespace:l});break;case"elrond":this.rpcProviders[r]=new $E({namespace:l});break;case"multiversx":this.rpcProviders[r]=new CE({namespace:l});break;case"near":this.rpcProviders[r]=new xE({namespace:l});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{const{params:r}=t,{event:s}=r;if(s.name==="accountsChanged"){const a=s.data;a&&wt(a)&&this.events.emit("accountsChanged",a.map(bE))}else if(s.name==="chainChanged"){const a=r.chainId,u=r.event.data,l=oi(a),g=so(a)!==so(u)?`${l}:${so(u)}`:a;this.onChainChanged(g)}else this.events.emit(s.name,s.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:r})=>{var s;const{namespaces:a}=r,u=(s=this.client)==null?void 0:s.session.get(t);this.session=oo(ps({},u),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:r})}),this.client.on("session_delete",async t=>{await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",oo(ps({},le("USER_DISCONNECTED")),{data:t.topic}))}),this.on(Tt.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){if(!this.rpcProviders[t])throw new Error(`Provider not found: ${t}`);return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var r;this.getProvider(t).updateNamespace((r=this.session)==null?void 0:r.namespaces[t])})}setNamespaces(t){const{namespaces:r,optionalNamespaces:s,sessionProperties:a}=t;r&&Object.keys(r).length&&(this.namespaces=r),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=a,this.persist("namespaces",r),this.persist("optionalNamespaces",s)}validateChain(t){const[r,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,s];if(r&&!Object.keys(this.namespaces||{}).map(l=>oi(l)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&s)return[r,s];const a=oi(Object.keys(this.namespaces)[0]),u=this.rpcProviders[a].getDefaultChain();return[a,u]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}onChainChanged(t,r=!1){var s;if(!this.namespaces)return;const[a,u]=this.validateChain(t);r||this.getProvider(a).setDefaultChain(u),((s=this.namespaces[a])!=null?s:this.namespaces[`${a}:${u}`]).defaultChain=u,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",u)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(t,r){this.client.core.storage.setItem(`${Xu}/${t}`,r)}async getFromStore(t){return await this.client.core.storage.getItem(`${Xu}/${t}`)}}const FE=$o,qE="wc",ME="ethereum_provider",UE=`${qE}@2:${ME}:`,zE="https://rpc.walletconnect.com/v1/",ws=["eth_sendTransaction","personal_sign"],Kh=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],_s=["chainChanged","accountsChanged"],Hh=["chainChanged","accountsChanged","message","disconnect","connect"];var kE=Object.defineProperty,LE=Object.defineProperties,KE=Object.getOwnPropertyDescriptors,nh=Object.getOwnPropertySymbols,HE=Object.prototype.hasOwnProperty,VE=Object.prototype.propertyIsEnumerable,oh=(o,t,r)=>t in o?kE(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,ci=(o,t)=>{for(var r in t||(t={}))HE.call(t,r)&&oh(o,r,t[r]);if(nh)for(var r of nh(t))VE.call(t,r)&&oh(o,r,t[r]);return o},ah=(o,t)=>LE(o,KE(t));function bs(o){return Number(o[0].split(":")[1])}function ao(o){return`0x${o.toString(16)}`}function BE(o){const{chains:t,optionalChains:r,methods:s,optionalMethods:a,events:u,optionalEvents:l,rpcMap:g}=o;if(!wt(t))throw new Error("Invalid chains");const w={chains:t,methods:s||ws,events:u||_s,rpcMap:ci({},t.length?{[bs(t)]:g[bs(t)]}:{})},d=u==null?void 0:u.filter(T=>!_s.includes(T)),b=s==null?void 0:s.filter(T=>!ws.includes(T));if(!r&&!l&&!a&&!(d!=null&&d.length)&&!(b!=null&&b.length))return{required:t.length?w:void 0};const E=(d==null?void 0:d.length)&&(b==null?void 0:b.length)||!r,S={chains:[...new Set(E?w.chains.concat(r||[]):r)],methods:[...new Set(w.methods.concat(a!=null&&a.length?a:Kh))],events:[...new Set(w.events.concat(l!=null&&l.length?l:Hh))],rpcMap:g};return{required:t.length?w:void 0,optional:r.length?S:void 0}}class Ss{constructor(){this.events=new Ke.eventsExports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=UE,this.on=(t,r)=>(this.events.on(t,r),this),this.once=(t,r)=>(this.events.once(t,r),this),this.removeListener=(t,r)=>(this.events.removeListener(t,r),this),this.off=(t,r)=>(this.events.off(t,r),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const r=new Ss;return await r.initialize(t),r}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,r){this.signer.sendAsync(t,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:r,optional:s}=BE(this.rpc);try{const a=await new Promise(async(l,g)=>{var w;this.rpc.showQrModal&&((w=this.modal)==null||w.subscribeModal(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),g(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(ah(ci({namespaces:ci({},r&&{[this.namespace]:r})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:t==null?void 0:t.pairingTopic})).then(d=>{l(d)}).catch(d=>{g(new Error(d.message))})});if(!a)return;const u=Hv(a.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:u),this.setAccounts(u),this.events.emit("connect",{chainId:ao(this.chainId)})}catch(a){throw this.signer.logger.error(a),a}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:r}=t,{event:s}=r;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const r=parseInt(t);this.chainId=r,this.events.emit("chainChanged",ao(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",ah(ci({},le("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var r,s;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(s=this.modal)==null||s.openModal({uri:t})),this.events.emit("display_uri",t)})}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const r=t.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",ao(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const r=this.parseChainId(t);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(t){const[r,s,a]=t.split(":");return{chainId:`${r}:${s}`,address:a}}setAccounts(t){this.accounts=t.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var r,s;const a=(r=t==null?void 0:t.chains)!=null?r:[],u=(s=t==null?void 0:t.optionalChains)!=null?s:[],l=a.concat(u);if(!l.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const g=a.length?(t==null?void 0:t.methods)||ws:[],w=a.length?(t==null?void 0:t.events)||_s:[],d=(t==null?void 0:t.optionalMethods)||[],b=(t==null?void 0:t.optionalEvents)||[],E=(t==null?void 0:t.rpcMap)||this.buildRpcMap(l,t.projectId),S=(t==null?void 0:t.qrModalOptions)||void 0;return{chains:a==null?void 0:a.map(T=>this.formatChainId(T)),optionalChains:u.map(T=>this.formatChainId(T)),methods:g,events:w,optionalMethods:d,optionalEvents:b,rpcMap:E,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:S,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,r){const s={};return t.forEach(a=>{s[a]=this.getRpcUrl(a,r)}),s}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?bs(this.rpc.chains):bs(this.rpc.optionalChains),this.signer=await FE.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{const{WalletConnectModal:s}=await Promise.resolve().then(()=>require("./index-uqZQu-qU.js")).then(a=>a.index);r=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(ci({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:r,optionalChains:s,rpcMap:a}=t;r&&wt(r)&&(this.rpc.chains=r.map(u=>this.formatChainId(u)),r.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)})),s&&wt(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(u=>this.formatChainId(u)),s.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)}))}getRpcUrl(t,r){var s;return((s=this.rpc.rpcMap)==null?void 0:s[t])||`${zE}?chainId=eip155:${t}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:r==null?void 0:r.accounts),this.setAccounts(r==null?void 0:r.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(r=>this.parseAccount(r))}}const WE=Ss;exports.EthereumProvider=WE;exports.OPTIONAL_EVENTS=Hh;exports.OPTIONAL_METHODS=Kh;exports.REQUIRED_EVENTS=_s;exports.REQUIRED_METHODS=ws;exports.default=Ss;
|
|
46
|
+
}`;var H=su(function(){return X(f,F+"return "+C).apply(r,y)});if(H.source=C,qn(H))throw H;return H}function Jm(e){return ee(e).toLowerCase()}function Gm(e){return ee(e).toUpperCase()}function Qm(e,i,n){if(e=ee(e),e&&(n||i===r))return fa(e);if(!e||!(i=Be(i)))return e;var c=ct(e),h=ct(i),f=da(c,h),y=ga(c,h)+1;return Lt(c,f,y).join("")}function Ym(e,i,n){if(e=ee(e),e&&(n||i===r))return e.slice(0,ma(e)+1);if(!e||!(i=Be(i)))return e;var c=ct(e),h=ga(c,ct(i))+1;return Lt(c,0,h).join("")}function Zm(e,i,n){if(e=ee(e),e&&(n||i===r))return e.replace(Fs,"");if(!e||!(i=Be(i)))return e;var c=ct(e),h=da(c,ct(i));return Lt(c,h).join("")}function Xm(e,i){var n=Vh,c=Bh;if(ue(i)){var h="separator"in i?i.separator:h;n="length"in i?L(i.length):n,c="omission"in i?Be(i.omission):c}e=ee(e);var f=e.length;if(lr(e)){var y=ct(e);f=y.length}if(n>=f)return e;var m=n-pr(c);if(m<1)return c;var _=y?Lt(y,0,m).join(""):e.slice(0,m);if(h===r)return _+c;if(y&&(m+=_.length-m),Mn(h)){if(e.slice(m).search(h)){var O,$=_;for(h.global||(h=Xs(h.source,ee(jo.exec(h))+"g")),h.lastIndex=0;O=h.exec($);)var C=O.index;_=_.slice(0,C===r?m:C)}}else if(e.indexOf(Be(h),m)!=m){var A=_.lastIndexOf(h);A>-1&&(_=_.slice(0,A))}return _+c}function ev(e){return e=ee(e),e&&hl.test(e)?e.replace(Ao,$p):e}var tv=wr(function(e,i,n){return e+(n?" ":"")+i.toUpperCase()}),kn=nc("toUpperCase");function iu(e,i,n){return e=ee(e),i=n?r:i,i===r?Ip(e)?Np(e):dp(e):e.match(i)||[]}var su=V(function(e,i){try{return He(e,r,i)}catch(n){return qn(n)?n:new z(n)}}),rv=St(function(e,i){return Ze(i,function(n){n=mt(n),It(e,n,jn(e[n],e))}),e});function iv(e){var i=e==null?0:e.length,n=q();return e=i?ae(e,function(c){if(typeof c[1]!="function")throw new Xe(l);return[n(c[0]),c[1]]}):[],V(function(c){for(var h=-1;++h<i;){var f=e[h];if(He(f[0],this,c))return He(f[1],this,c)}})}function sv(e){return Cf(tt(e,E))}function Ln(e){return function(){return e}}function nv(e,i){return e==null||e!==e?i:e}var ov=ac(),av=ac(!0);function Me(e){return e}function Kn(e){return qa(typeof e=="function"?e:tt(e,E))}function cv(e){return Ua(tt(e,E))}function uv(e,i){return za(e,tt(i,E))}var hv=V(function(e,i){return function(n){return Br(n,e,i)}}),lv=V(function(e,i){return function(n){return Br(e,n,i)}});function Hn(e,i,n){var c=we(i),h=Li(i,c);n==null&&!(ue(i)&&(h.length||!c.length))&&(n=i,i=e,e=this,h=Li(i,we(i)));var f=!(ue(n)&&"chain"in n)||!!n.chain,y=Ot(e);return Ze(h,function(m){var _=i[m];e[m]=_,y&&(e.prototype[m]=function(){var O=this.__chain__;if(f||O){var $=e(this.__wrapped__),C=$.__actions__=je(this.__actions__);return C.push({func:_,args:arguments,thisArg:e}),$.__chain__=O,$}return _.apply(e,Ft([this.value()],arguments))})}),e}function pv(){return Ee._===this&&(Ee._=qp),this}function Vn(){}function fv(e){return e=L(e),V(function(i){return ka(i,e)})}var dv=En(ae),gv=En(ca),yv=En(Bs);function nu(e){return Cn(e)?Ws(mt(e)):Bf(e)}function mv(e){return function(i){return e==null?r:Zt(e,i)}}var vv=uc(),wv=uc(!0);function Bn(){return[]}function Wn(){return!1}function _v(){return{}}function bv(){return""}function Ev(){return!0}function Iv(e,i){if(e=L(e),e<1||e>or)return[];var n=dt,c=Se(e,dt);i=q(i),e-=dt;for(var h=Qs(c,i);++n<e;)i(n);return h}function Pv(e){return k(e)?ae(e,mt):We(e)?[e]:je(Sc(ee(e)))}function Sv(e){var i=++jp;return ee(e)+i}var Rv=Ji(function(e,i){return e+i},0),Ov=In("ceil"),$v=Ji(function(e,i){return e/i},1),Cv=In("floor");function xv(e){return e&&e.length?ki(e,Me,cn):r}function Nv(e,i){return e&&e.length?ki(e,q(i,2),cn):r}function Av(e){return la(e,Me)}function Tv(e,i){return la(e,q(i,2))}function Dv(e){return e&&e.length?ki(e,Me,pn):r}function jv(e,i){return e&&e.length?ki(e,q(i,2),pn):r}var Fv=Ji(function(e,i){return e*i},1),qv=In("round"),Mv=Ji(function(e,i){return e-i},0);function Uv(e){return e&&e.length?Gs(e,Me):0}function zv(e,i){return e&&e.length?Gs(e,q(i,2)):0}return p.after=cy,p.ary=Fc,p.assign=Gy,p.assignIn=Qc,p.assignInWith=as,p.assignWith=Qy,p.at=Yy,p.before=qc,p.bind=jn,p.bindAll=rv,p.bindKey=Mc,p.castArray=_y,p.chain=Tc,p.chunk=Cd,p.compact=xd,p.concat=Nd,p.cond=iv,p.conforms=sv,p.constant=Ln,p.countBy=Ug,p.create=Zy,p.curry=Uc,p.curryRight=zc,p.debounce=kc,p.defaults=Xy,p.defaultsDeep=em,p.defer=uy,p.delay=hy,p.difference=Ad,p.differenceBy=Td,p.differenceWith=Dd,p.drop=jd,p.dropRight=Fd,p.dropRightWhile=qd,p.dropWhile=Md,p.fill=Ud,p.filter=kg,p.flatMap=Hg,p.flatMapDeep=Vg,p.flatMapDepth=Bg,p.flatten=Cc,p.flattenDeep=zd,p.flattenDepth=kd,p.flip=ly,p.flow=ov,p.flowRight=av,p.fromPairs=Ld,p.functions=am,p.functionsIn=cm,p.groupBy=Wg,p.initial=Hd,p.intersection=Vd,p.intersectionBy=Bd,p.intersectionWith=Wd,p.invert=hm,p.invertBy=lm,p.invokeMap=Gg,p.iteratee=Kn,p.keyBy=Qg,p.keys=we,p.keysIn=qe,p.map=ts,p.mapKeys=fm,p.mapValues=dm,p.matches=cv,p.matchesProperty=uv,p.memoize=is,p.merge=gm,p.mergeWith=Yc,p.method=hv,p.methodOf=lv,p.mixin=Hn,p.negate=ss,p.nthArg=fv,p.omit=ym,p.omitBy=mm,p.once=py,p.orderBy=Yg,p.over=dv,p.overArgs=fy,p.overEvery=gv,p.overSome=yv,p.partial=Fn,p.partialRight=Lc,p.partition=Zg,p.pick=vm,p.pickBy=Zc,p.property=nu,p.propertyOf=mv,p.pull=Yd,p.pullAll=Nc,p.pullAllBy=Zd,p.pullAllWith=Xd,p.pullAt=eg,p.range=vv,p.rangeRight=wv,p.rearg=dy,p.reject=ty,p.remove=tg,p.rest=gy,p.reverse=Tn,p.sampleSize=iy,p.set=_m,p.setWith=bm,p.shuffle=sy,p.slice=rg,p.sortBy=ay,p.sortedUniq=ug,p.sortedUniqBy=hg,p.split=Hm,p.spread=yy,p.tail=lg,p.take=pg,p.takeRight=fg,p.takeRightWhile=dg,p.takeWhile=gg,p.tap=xg,p.throttle=my,p.thru=es,p.toArray=Wc,p.toPairs=Xc,p.toPairsIn=eu,p.toPath=Pv,p.toPlainObject=Gc,p.transform=Em,p.unary=vy,p.union=yg,p.unionBy=mg,p.unionWith=vg,p.uniq=wg,p.uniqBy=_g,p.uniqWith=bg,p.unset=Im,p.unzip=Dn,p.unzipWith=Ac,p.update=Pm,p.updateWith=Sm,p.values=Er,p.valuesIn=Rm,p.without=Eg,p.words=iu,p.wrap=wy,p.xor=Ig,p.xorBy=Pg,p.xorWith=Sg,p.zip=Rg,p.zipObject=Og,p.zipObjectDeep=$g,p.zipWith=Cg,p.entries=Xc,p.entriesIn=eu,p.extend=Qc,p.extendWith=as,Hn(p,p),p.add=Rv,p.attempt=su,p.camelCase=xm,p.capitalize=tu,p.ceil=Ov,p.clamp=Om,p.clone=by,p.cloneDeep=Iy,p.cloneDeepWith=Py,p.cloneWith=Ey,p.conformsTo=Sy,p.deburr=ru,p.defaultTo=nv,p.divide=$v,p.endsWith=Nm,p.eq=ht,p.escape=Am,p.escapeRegExp=Tm,p.every=zg,p.find=Lg,p.findIndex=Oc,p.findKey=tm,p.findLast=Kg,p.findLastIndex=$c,p.findLastKey=rm,p.floor=Cv,p.forEach=Dc,p.forEachRight=jc,p.forIn=im,p.forInRight=sm,p.forOwn=nm,p.forOwnRight=om,p.get=Un,p.gt=Ry,p.gte=Oy,p.has=um,p.hasIn=zn,p.head=xc,p.identity=Me,p.includes=Jg,p.indexOf=Kd,p.inRange=$m,p.invoke=pm,p.isArguments=tr,p.isArray=k,p.isArrayBuffer=$y,p.isArrayLike=Fe,p.isArrayLikeObject=fe,p.isBoolean=Cy,p.isBuffer=Kt,p.isDate=xy,p.isElement=Ny,p.isEmpty=Ay,p.isEqual=Ty,p.isEqualWith=Dy,p.isError=qn,p.isFinite=jy,p.isFunction=Ot,p.isInteger=Kc,p.isLength=ns,p.isMap=Hc,p.isMatch=Fy,p.isMatchWith=qy,p.isNaN=My,p.isNative=Uy,p.isNil=ky,p.isNull=zy,p.isNumber=Vc,p.isObject=ue,p.isObjectLike=he,p.isPlainObject=Zr,p.isRegExp=Mn,p.isSafeInteger=Ly,p.isSet=Bc,p.isString=os,p.isSymbol=We,p.isTypedArray=br,p.isUndefined=Ky,p.isWeakMap=Hy,p.isWeakSet=Vy,p.join=Jd,p.kebabCase=Dm,p.last=it,p.lastIndexOf=Gd,p.lowerCase=jm,p.lowerFirst=Fm,p.lt=By,p.lte=Wy,p.max=xv,p.maxBy=Nv,p.mean=Av,p.meanBy=Tv,p.min=Dv,p.minBy=jv,p.stubArray=Bn,p.stubFalse=Wn,p.stubObject=_v,p.stubString=bv,p.stubTrue=Ev,p.multiply=Fv,p.nth=Qd,p.noConflict=pv,p.noop=Vn,p.now=rs,p.pad=qm,p.padEnd=Mm,p.padStart=Um,p.parseInt=zm,p.random=Cm,p.reduce=Xg,p.reduceRight=ey,p.repeat=km,p.replace=Lm,p.result=wm,p.round=qv,p.runInContext=v,p.sample=ry,p.size=ny,p.snakeCase=Km,p.some=oy,p.sortedIndex=ig,p.sortedIndexBy=sg,p.sortedIndexOf=ng,p.sortedLastIndex=og,p.sortedLastIndexBy=ag,p.sortedLastIndexOf=cg,p.startCase=Vm,p.startsWith=Bm,p.subtract=Mv,p.sum=Uv,p.sumBy=zv,p.template=Wm,p.times=Iv,p.toFinite=$t,p.toInteger=L,p.toLength=Jc,p.toLower=Jm,p.toNumber=st,p.toSafeInteger=Jy,p.toString=ee,p.toUpper=Gm,p.trim=Qm,p.trimEnd=Ym,p.trimStart=Zm,p.truncate=Xm,p.unescape=ev,p.uniqueId=Sv,p.upperCase=tv,p.upperFirst=kn,p.each=Dc,p.eachRight=jc,p.first=xc,Hn(p,function(){var e={};return gt(p,function(i,n){re.call(p.prototype,n)||(e[n]=i)}),e}(),{chain:!1}),p.VERSION=s,Ze(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),Ze(["drop","take"],function(e,i){J.prototype[e]=function(n){n=n===r?1:ve(L(n),0);var c=this.__filtered__&&!i?new J(this):this.clone();return c.__filtered__?c.__takeCount__=Se(n,c.__takeCount__):c.__views__.push({size:Se(n,dt),type:e+(c.__dir__<0?"Right":"")}),c},J.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Ze(["filter","map","takeWhile"],function(e,i){var n=i+1,c=n==Co||n==Qh;J.prototype[e]=function(h){var f=this.clone();return f.__iteratees__.push({iteratee:q(h,3),type:n}),f.__filtered__=f.__filtered__||c,f}}),Ze(["head","last"],function(e,i){var n="take"+(i?"Right":"");J.prototype[e]=function(){return this[n](1).value()[0]}}),Ze(["initial","tail"],function(e,i){var n="drop"+(i?"":"Right");J.prototype[e]=function(){return this.__filtered__?new J(this):this[n](1)}}),J.prototype.compact=function(){return this.filter(Me)},J.prototype.find=function(e){return this.filter(e).head()},J.prototype.findLast=function(e){return this.reverse().find(e)},J.prototype.invokeMap=V(function(e,i){return typeof e=="function"?new J(this):this.map(function(n){return Br(n,e,i)})}),J.prototype.reject=function(e){return this.filter(ss(q(e)))},J.prototype.slice=function(e,i){e=L(e);var n=this;return n.__filtered__&&(e>0||i<0)?new J(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),i!==r&&(i=L(i),n=i<0?n.dropRight(-i):n.take(i-e)),n)},J.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},J.prototype.toArray=function(){return this.take(dt)},gt(J.prototype,function(e,i){var n=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=p[c?"take"+(i=="last"?"Right":""):i],f=c||/^find/.test(i);h&&(p.prototype[i]=function(){var y=this.__wrapped__,m=c?[1]:arguments,_=y instanceof J,O=m[0],$=_||k(y),C=function(W){var Q=h.apply(p,Ft([W],m));return c&&A?Q[0]:Q};$&&n&&typeof O=="function"&&O.length!=1&&(_=$=!1);var A=this.__chain__,F=!!this.__actions__.length,M=f&&!A,H=_&&!F;if(!f&&$){y=H?y:new J(this);var U=e.apply(y,m);return U.__actions__.push({func:es,args:[C],thisArg:r}),new et(U,A)}return M&&H?e.apply(this,m):(U=this.thru(C),M?c?U.value()[0]:U.value():U)})}),Ze(["pop","push","shift","sort","splice","unshift"],function(e){var i=Ri[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var h=arguments;if(c&&!this.__chain__){var f=this.value();return i.apply(k(f)?f:[],h)}return this[n](function(y){return i.apply(k(y)?y:[],h)})}}),gt(J.prototype,function(e,i){var n=p[i];if(n){var c=n.name+"";re.call(yr,c)||(yr[c]=[]),yr[c].push({name:i,func:n})}}),yr[Wi(r,G).name]=[{name:"wrapper",func:r}],J.prototype.clone=Xp,J.prototype.reverse=ef,J.prototype.value=tf,p.prototype.at=Ng,p.prototype.chain=Ag,p.prototype.commit=Tg,p.prototype.next=Dg,p.prototype.plant=Fg,p.prototype.reverse=qg,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Mg,p.prototype.first=p.prototype.head,Ur&&(p.prototype[Ur]=jg),p},fr=Ap();Wt?((Wt.exports=fr)._=fr,Ls._=fr):Ee._=fr}).call(ni)})(_o,_o.exports);var fE=Object.defineProperty,dE=Object.defineProperties,gE=Object.getOwnPropertyDescriptors,eh=Object.getOwnPropertySymbols,yE=Object.prototype.hasOwnProperty,mE=Object.prototype.propertyIsEnumerable,th=(o,t,r)=>t in o?fE(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,ls=(o,t)=>{for(var r in t||(t={}))yE.call(t,r)&&th(o,r,t[r]);if(eh)for(var r of eh(t))mE.call(t,r)&&th(o,r,t[r]);return o},vE=(o,t)=>dE(o,gE(t));function Bt(o,t,r){var s;const a=Kv(o);return((s=t.rpcMap)==null?void 0:s[a.reference])||`${pE}?chainId=${a.namespace}:${a.reference}&projectId=${r}`}function nr(o){return o.includes(":")?o.split(":")[1]:o}function kh(o){return o.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function wE(o,t){const r=Object.keys(t.namespaces).filter(a=>a.includes(o));if(!r.length)return[];const s=[];return r.forEach(a=>{const u=t.namespaces[a].accounts;s.push(...u)}),s}function _E(o={},t={}){const r=rh(o),s=rh(t);return _o.exports.merge(r,s)}function rh(o){var t,r,s,a;const u={};if(!Rr(o))return u;for(const[l,g]of Object.entries(o)){const w=Po(l)?[l]:g.chains,d=g.methods||[],b=g.events||[],E=g.rpcMap||{},S=oi(l);u[S]=vE(ls(ls({},u[S]),g),{chains:Jn(w,(t=u[S])==null?void 0:t.chains),methods:Jn(d,(r=u[S])==null?void 0:r.methods),events:Jn(b,(s=u[S])==null?void 0:s.events),rpcMap:ls(ls({},E),(a=u[S])==null?void 0:a.rpcMap)})}return u}function bE(o){return o.includes(":")?o.split(":")[2]:o}function EE(o){const t={};for(const[r,s]of Object.entries(o)){const a=s.methods||[],u=s.events||[],l=s.accounts||[],g=Po(r)?[r]:s.chains?s.chains:kh(s.accounts);t[r]={chains:g,methods:a,events:u,accounts:l}}return t}function so(o){return typeof o=="number"?o:o.includes("0x")?parseInt(o,16):o.includes(":")?Number(o.split(":")[1]):Number(o)}const Lh={},ce=o=>Lh[o],no=(o,t)=>{Lh[o]=t};class IE{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class PE{constructor(t){this.name="eip155",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(parseInt(t),r),this.chainId=parseInt(t),this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,r){const s=r||Bt(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=parseInt(nr(r));t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const t=this.chainId,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}async handleSwitchChain(t){var r,s;let a=t.request.params?(r=t.request.params[0])==null?void 0:r.chainId:"0x0";a=a.startsWith("0x")?a:`0x${a}`;const u=parseInt(a,16);if(this.isChainApproved(u))this.setDefaultChain(`${u}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:a}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${u}`);else throw new Error(`Failed to switch to chain 'eip155:${u}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}}class SE{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class RE{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class OE{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{const s=this.getCardanoRPCUrl(r),a=nr(r);t[a]=this.createHttpProvider(a,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}getCardanoRPCUrl(t){const r=this.namespace.rpcMap;if(r)return r[t]}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class $E{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class CE{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const a=nr(r);t[a]=this.createHttpProvider(a,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new I.f(s,ce("disableProviderPing")))}}class xE{constructor(t){this.name="near",this.namespace=t.namespace,this.events=ce("events"),this.client=ce("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const s=r||Bt(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Bt(t,this.namespace);return typeof s>"u"?void 0:new At(new I.f(s,ce("disableProviderPing")))}}var NE=Object.defineProperty,AE=Object.defineProperties,TE=Object.getOwnPropertyDescriptors,ih=Object.getOwnPropertySymbols,DE=Object.prototype.hasOwnProperty,jE=Object.prototype.propertyIsEnumerable,sh=(o,t,r)=>t in o?NE(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,ps=(o,t)=>{for(var r in t||(t={}))DE.call(t,r)&&sh(o,r,t[r]);if(ih)for(var r of ih(t))jE.call(t,r)&&sh(o,r,t[r]);return o},oo=(o,t)=>AE(o,TE(t));class $o{constructor(t){this.events=new Ke.EventEmitter,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:I.Dg(I.k({level:(t==null?void 0:t.logger)||Zu})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const r=new $o(t);return await r.initialize(),r}async request(t,r){const[s,a]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(s).request({request:ps({},t),chainId:`${s}:${a}`,topic:this.session.topic})}sendAsync(t,r,s){const a=new Date().getTime();this.request(t,s).then(u=>r(null,I.formatJsonRpcResult(a,u))).catch(u=>r(u,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:le("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),await this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}removeListener(t,r){this.events.removeListener(t,r)}off(t,r){this.events.off(t,r)}get isWalletConnect(){return!0}async pair(t){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:a}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await a().then(u=>{this.session=u,this.namespaces||(this.namespaces=EE(u.namespaces),this.persist("namespaces",this.namespaces))}).catch(u=>{if(u.message!==Uh)throw u;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(t,r){try{if(!this.session)return;const[s,a]=this.validateChain(t);this.getProvider(s).setDefaultChain(a,r)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(wt(r)){for(const s of r)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const t=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[t]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await cE.init({logger:this.providerOpts.logger||Zu,relayUrl:this.providerOpts.relayUrl||uE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(r=>oi(r)))];no("client",this.client),no("events",this.events),no("disableProviderPing",this.disableProviderPing),t.forEach(r=>{if(!this.session)return;const s=wE(r,this.session),a=kh(s),u=_E(this.namespaces,this.optionalNamespaces),l=oo(ps({},u[r]),{accounts:s,chains:a});switch(r){case"eip155":this.rpcProviders[r]=new PE({namespace:l});break;case"solana":this.rpcProviders[r]=new SE({namespace:l});break;case"cosmos":this.rpcProviders[r]=new RE({namespace:l});break;case"polkadot":this.rpcProviders[r]=new IE({namespace:l});break;case"cip34":this.rpcProviders[r]=new OE({namespace:l});break;case"elrond":this.rpcProviders[r]=new $E({namespace:l});break;case"multiversx":this.rpcProviders[r]=new CE({namespace:l});break;case"near":this.rpcProviders[r]=new xE({namespace:l});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{const{params:r}=t,{event:s}=r;if(s.name==="accountsChanged"){const a=s.data;a&&wt(a)&&this.events.emit("accountsChanged",a.map(bE))}else if(s.name==="chainChanged"){const a=r.chainId,u=r.event.data,l=oi(a),g=so(a)!==so(u)?`${l}:${so(u)}`:a;this.onChainChanged(g)}else this.events.emit(s.name,s.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:r})=>{var s;const{namespaces:a}=r,u=(s=this.client)==null?void 0:s.session.get(t);this.session=oo(ps({},u),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:r})}),this.client.on("session_delete",async t=>{await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",oo(ps({},le("USER_DISCONNECTED")),{data:t.topic}))}),this.on(Tt.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){if(!this.rpcProviders[t])throw new Error(`Provider not found: ${t}`);return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var r;this.getProvider(t).updateNamespace((r=this.session)==null?void 0:r.namespaces[t])})}setNamespaces(t){const{namespaces:r,optionalNamespaces:s,sessionProperties:a}=t;r&&Object.keys(r).length&&(this.namespaces=r),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=a,this.persist("namespaces",r),this.persist("optionalNamespaces",s)}validateChain(t){const[r,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,s];if(r&&!Object.keys(this.namespaces||{}).map(l=>oi(l)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&s)return[r,s];const a=oi(Object.keys(this.namespaces)[0]),u=this.rpcProviders[a].getDefaultChain();return[a,u]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}onChainChanged(t,r=!1){var s;if(!this.namespaces)return;const[a,u]=this.validateChain(t);r||this.getProvider(a).setDefaultChain(u),((s=this.namespaces[a])!=null?s:this.namespaces[`${a}:${u}`]).defaultChain=u,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",u)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(t,r){this.client.core.storage.setItem(`${Xu}/${t}`,r)}async getFromStore(t){return await this.client.core.storage.getItem(`${Xu}/${t}`)}}const FE=$o,qE="wc",ME="ethereum_provider",UE=`${qE}@2:${ME}:`,zE="https://rpc.walletconnect.com/v1/",ws=["eth_sendTransaction","personal_sign"],Kh=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],_s=["chainChanged","accountsChanged"],Hh=["chainChanged","accountsChanged","message","disconnect","connect"];var kE=Object.defineProperty,LE=Object.defineProperties,KE=Object.getOwnPropertyDescriptors,nh=Object.getOwnPropertySymbols,HE=Object.prototype.hasOwnProperty,VE=Object.prototype.propertyIsEnumerable,oh=(o,t,r)=>t in o?kE(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,ci=(o,t)=>{for(var r in t||(t={}))HE.call(t,r)&&oh(o,r,t[r]);if(nh)for(var r of nh(t))VE.call(t,r)&&oh(o,r,t[r]);return o},ah=(o,t)=>LE(o,KE(t));function bs(o){return Number(o[0].split(":")[1])}function ao(o){return`0x${o.toString(16)}`}function BE(o){const{chains:t,optionalChains:r,methods:s,optionalMethods:a,events:u,optionalEvents:l,rpcMap:g}=o;if(!wt(t))throw new Error("Invalid chains");const w={chains:t,methods:s||ws,events:u||_s,rpcMap:ci({},t.length?{[bs(t)]:g[bs(t)]}:{})},d=u==null?void 0:u.filter(T=>!_s.includes(T)),b=s==null?void 0:s.filter(T=>!ws.includes(T));if(!r&&!l&&!a&&!(d!=null&&d.length)&&!(b!=null&&b.length))return{required:t.length?w:void 0};const E=(d==null?void 0:d.length)&&(b==null?void 0:b.length)||!r,S={chains:[...new Set(E?w.chains.concat(r||[]):r)],methods:[...new Set(w.methods.concat(a!=null&&a.length?a:Kh))],events:[...new Set(w.events.concat(l!=null&&l.length?l:Hh))],rpcMap:g};return{required:t.length?w:void 0,optional:r.length?S:void 0}}class Ss{constructor(){this.events=new Ke.eventsExports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=UE,this.on=(t,r)=>(this.events.on(t,r),this),this.once=(t,r)=>(this.events.once(t,r),this),this.removeListener=(t,r)=>(this.events.removeListener(t,r),this),this.off=(t,r)=>(this.events.off(t,r),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const r=new Ss;return await r.initialize(t),r}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,r){this.signer.sendAsync(t,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:r,optional:s}=BE(this.rpc);try{const a=await new Promise(async(l,g)=>{var w;this.rpc.showQrModal&&((w=this.modal)==null||w.subscribeModal(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),g(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(ah(ci({namespaces:ci({},r&&{[this.namespace]:r})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:t==null?void 0:t.pairingTopic})).then(d=>{l(d)}).catch(d=>{g(new Error(d.message))})});if(!a)return;const u=Hv(a.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:u),this.setAccounts(u),this.events.emit("connect",{chainId:ao(this.chainId)})}catch(a){throw this.signer.logger.error(a),a}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:r}=t,{event:s}=r;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const r=parseInt(t);this.chainId=r,this.events.emit("chainChanged",ao(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",ah(ci({},le("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var r,s;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(s=this.modal)==null||s.openModal({uri:t})),this.events.emit("display_uri",t)})}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const r=t.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",ao(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const r=this.parseChainId(t);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(t){const[r,s,a]=t.split(":");return{chainId:`${r}:${s}`,address:a}}setAccounts(t){this.accounts=t.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var r,s;const a=(r=t==null?void 0:t.chains)!=null?r:[],u=(s=t==null?void 0:t.optionalChains)!=null?s:[],l=a.concat(u);if(!l.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const g=a.length?(t==null?void 0:t.methods)||ws:[],w=a.length?(t==null?void 0:t.events)||_s:[],d=(t==null?void 0:t.optionalMethods)||[],b=(t==null?void 0:t.optionalEvents)||[],E=(t==null?void 0:t.rpcMap)||this.buildRpcMap(l,t.projectId),S=(t==null?void 0:t.qrModalOptions)||void 0;return{chains:a==null?void 0:a.map(T=>this.formatChainId(T)),optionalChains:u.map(T=>this.formatChainId(T)),methods:g,events:w,optionalMethods:d,optionalEvents:b,rpcMap:E,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:S,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,r){const s={};return t.forEach(a=>{s[a]=this.getRpcUrl(a,r)}),s}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?bs(this.rpc.chains):bs(this.rpc.optionalChains),this.signer=await FE.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{const{WalletConnectModal:s}=await Promise.resolve().then(()=>require("./index-yI1a3BCl.js")).then(a=>a.index);r=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(ci({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:r,optionalChains:s,rpcMap:a}=t;r&&wt(r)&&(this.rpc.chains=r.map(u=>this.formatChainId(u)),r.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)})),s&&wt(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(u=>this.formatChainId(u)),s.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)}))}getRpcUrl(t,r){var s;return((s=this.rpc.rpcMap)==null?void 0:s[t])||`${zE}?chainId=eip155:${t}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:r==null?void 0:r.accounts),this.setAccounts(r==null?void 0:r.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(r=>this.parseAccount(r))}}const WE=Ss;exports.EthereumProvider=WE;exports.OPTIONAL_EVENTS=Hh;exports.OPTIONAL_METHODS=Kh;exports.REQUIRED_EVENTS=_s;exports.REQUIRED_METHODS=ws;exports.default=Ss;
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("./index-tVbvQzum.js");exports.AutomaticCCTPRoute=R.AutomaticCCTPRoute;exports.AutomaticPorticoRoute=R.AutomaticPorticoRoute;exports.AutomaticTokenBridgeRoute=R.AutomaticTokenBridgeRoute;exports.CCTPRoute=R.CCTPRoute;exports.DEFAULT_ROUTES=R.DEFAULT_ROUTES;exports.ERR_AMOUNT_TOO_LARGE=R.ERR_AMOUNT_TOO_LARGE;exports.ERR_AMOUNT_TOO_SMALL=R.ERR_AMOUNT_TOO_SMALL;exports.ERR_DESTINATION_CONTRACT_PAUSED=R.ERR_DESTINATION_CONTRACT_PAUSED;exports.ERR_INSUFFICIENT_ALLOWANCE=R.ERR_INSUFFICIENT_ALLOWANCE;exports.ERR_INSUFFICIENT_GAS=R.ERR_INSUFFICIENT_GAS;exports.ERR_NOT_ENOUGH_CAPACITY=R.ERR_NOT_ENOUGH_CAPACITY;exports.ERR_RELAY_FAILED=R.ERR_RELAY_FAILED;exports.ERR_SOURCE_CONTRACT_PAUSED=R.ERR_SOURCE_CONTRACT_PAUSED;exports.ERR_TIMEOUT=R.ERR_TIMEOUT;exports.ERR_UNKNOWN=R.ERR_UNKNOWN;exports.ERR_UNSUPPORTED_ABI_VERSION=R.ERR_UNSUPPORTED_ABI_VERSION;exports.ERR_USER_REJECTED=R.ERR_USER_REJECTED;exports.MAINNET=R.MAINNET;exports.TESTNET=R.TESTNET;exports.Token=R.Token;exports.TokenBridgeRoute=R.TokenBridgeRoute;exports.buildConfig=R.buildConfig;exports.config=R.types;exports.default=R.WormholeConnect;exports.getTokenDetails=R.getTokenDetails;exports.getTransferDetails=R.getTransferDetails;
|
package/lib/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as a, H as T, A as _, G as s, D as A, V as N, X as O, Q as e, L as o, U as t, O as C, $ as U, P as I, Z as S, _ as i, R as u, Y as D, M as L, T as P, y as n, z as r, x as F, I as g, w as M, J as c, K as f } from "./index-
|
|
1
|
+
import { F as a, H as T, A as _, G as s, D as A, V as N, X as O, Q as e, L as o, U as t, O as C, $ as U, P as I, Z as S, _ as i, R as u, Y as D, M as L, T as P, y as n, z as r, x as F, I as g, w as M, J as c, K as f } from "./index-Dpefdrdb.mjs";
|
|
2
2
|
export {
|
|
3
3
|
a as AutomaticCCTPRoute,
|
|
4
4
|
T as AutomaticPorticoRoute,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./solana-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./solana-BUWSwHur.js"),o=C.b`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
|
|
3
3
|
</svg>`;exports.infoSvg=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./solana-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./solana-BUWSwHur.js"),l=e.b`<svg fill="none" viewBox="0 0 14 15">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as C } from "./solana-
|
|
1
|
+
import { l as C } from "./solana-C2S4i5Ij.mjs";
|
|
2
2
|
const t = C`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
|
|
4
4
|
</svg>`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as C } from "./solana-
|
|
1
|
+
import { l as C } from "./solana-C2S4i5Ij.mjs";
|
|
2
2
|
const e = C`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
|
|
4
4
|
</svg>`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./solana-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./solana-BUWSwHur.js"),e=C.b`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
|
|
3
3
|
</svg>`;exports.lightbulbSvg=e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./solana-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./solana-BUWSwHur.js"),l=e.b`<svg fill="none" viewBox="0 0 16 16">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|