@dcl/shop 0.1.0-29111888971.commit-e1b927a → 0.1.0-29111917255.commit-e6715c3
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/assets/{AnimatedBackground-XZF9g9Bk.js → AnimatedBackground-BYKnsBtz.js} +3 -3
- package/assets/{Assets-CZPTo1jO.js → Assets-ClVmauZ2.js} +1 -1
- package/assets/{Button-B2TDtyup.js → Button-CgZSqnGW.js} +1 -1
- package/assets/{Cart-DhU4_S6H.js → Cart-Up06p7ew.js} +1 -1
- package/assets/{CircularProgress-Cf__730y.js → CircularProgress-BbGH0RSH.js} +1 -1
- package/assets/{Collection-CRBxkkqX.js → Collection-DvK8DQsK.js} +1 -1
- package/assets/{ConstantsUtil-DrWe0yob.js → ConstantsUtil-CiDezLbv.js} +1 -1
- package/assets/{Creator-DO__19RD.js → Creator-ClUMhdS6.js} +1 -1
- package/assets/{ExchangeController-txwSQL2Z.js → ExchangeController-DdSsjFTm.js} +1 -1
- package/assets/{GetCredits-DS1z5pyp.js → GetCredits-7W0xZLwI.js} +2 -2
- package/assets/{HelpersUtil-CMysbO5y.js → HelpersUtil-CbFvbY-T.js} +1 -1
- package/assets/{ImportListings-ChNZ2UwM.js → ImportListings-tpyUcfqZ.js} +1 -1
- package/assets/ItemDetail-CZQ3QPE1.js +2 -0
- package/assets/{Market-Z4jp-uLb.js → Market-CRtp3AGM.js} +1 -1
- package/assets/{MenuItem-B4U0TYKf.js → MenuItem-BLQsL8Vh.js} +1 -1
- package/assets/{MyAssets-C7QdtDYF.js → MyAssets-Cp2z98Lz.js} +1 -1
- package/assets/{MyFavorites-Bu2IDcdJ.js → MyFavorites-_R79W8pO.js} +1 -1
- package/assets/{MyPurchases-CDUC3XzQ.js → MyPurchases-DJYHRbWz.js} +1 -1
- package/assets/{NetworkUtil-Ddexw9-U.js → NetworkUtil-DDES604E.js} +1 -1
- package/assets/{NotFound-D5sXjRPf.js → NotFound-6FTGg4R1.js} +1 -1
- package/assets/{RealCheckout-DBL3uxEj.js → RealCheckout-BemiXyZF.js} +1 -1
- package/assets/{ShopFooterInner-BHh4OUAv.js → ShopFooterInner-KJ2oezRg.js} +2 -2
- package/assets/{Success-BrvAPmP4.js → Success-CXjLiyYm.js} +1 -1
- package/assets/{SvgIcon-Cg5l4LDh.js → SvgIcon-DtxoFXOd.js} +1 -1
- package/assets/{SwapController-BDZMxnNb.js → SwapController-C07T-0ls.js} +1 -1
- package/assets/{TradeService-CkLYTYcJ.js → TradeService-D4PrM9vt.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-D4DCXtQm.js → W3MFrameProviderSingleton-DXEpVsCm.js} +3 -3
- package/assets/{WebCryptoP256-OE37a6hF.js → WebCryptoP256-B1xyhPdr.js} +1 -1
- package/assets/{basic-SUHSB6nZ.js → basic-Dq4Wpic2.js} +1 -1
- package/assets/{biconomy-C6flCXA4.js → biconomy-BQtB5Ab0.js} +1 -1
- package/assets/{buy-YkuLG1h7.js → buy-6ORWjZW_.js} +1 -1
- package/assets/{buy-gasless-gRmZHjsE.js → buy-gasless-DL6o_Lwi.js} +1 -1
- package/assets/{ccip-7fqLW_t2.js → ccip-DgHj7djR.js} +1 -1
- package/assets/{ccip-ByQiZ_aq.js → ccip-Zo_y8Ko9.js} +1 -1
- package/assets/{chains-CMJ6lVMG.js → chains-Bk629xE3.js} +1 -1
- package/assets/{collection-2CKCNH2O.js → collection-B8w_ujSk.js} +1 -1
- package/assets/{common-GsSQn_vD.js → common-CEkVtB9E.js} +1 -1
- package/assets/{controller-BO0zre2A.js → controller-CNZZBumM.js} +2 -2
- package/assets/{core-D-mQUZ3X.js → core-C_RCjMc6.js} +4 -4
- package/assets/{custom-C6VO1Je_.js → custom-BM-_NC1p.js} +1 -1
- package/assets/{data-capture-DdxbO7dd.js → data-capture-Clu_u_4e.js} +1 -1
- package/assets/decimals-C7k-JLnD.js +1 -0
- package/assets/{decimals-Di7mGY-D.js → decimals-DYUDFeSV.js} +1 -1
- package/assets/{detectExtension-DsE82Ej6.js → detectExtension-b3FK4NnW.js} +1 -1
- package/assets/{email-BTEyDEk6.js → email-C0z3A7sK.js} +1 -1
- package/assets/{embedded-wallet-QGoIGdCB.js → embedded-wallet-COvvX2Qp.js} +1 -1
- package/assets/{engine-Bjifrd8K.js → engine-Cs_nlYqC.js} +1 -1
- package/assets/{estimate-l1-fee-Bqou6JLl.js → estimate-l1-fee-oTYMvZsv.js} +1 -1
- package/assets/eth_estimateGas-D2h2NKDU.js +1 -0
- package/assets/{eth_getStorageAt-B-cqm2CG.js → eth_getStorageAt-nxicedso.js} +1 -1
- package/assets/eth_getTransactionCount-CYYgSGiU.js +1 -0
- package/assets/{ethereum-CjiWK1L5.js → ethereum-CdeRZR9J.js} +1 -1
- package/assets/{ethers-DHDSyreX.js → ethers-JeCAM1sd.js} +1 -1
- package/assets/{extractIPFS-C5EI4cZz.js → extractIPFS-DzIizex4.js} +1 -1
- package/assets/{features-U-ULFF0v.js → features-Ck7HAsYI.js} +1 -1
- package/assets/{fetchTokenMetadata-DHc2WWGs.js → fetchTokenMetadata-CvdEl9__.js} +2 -2
- package/assets/{generateUtilityClasses-BAjjhm6X.js → generateUtilityClasses-C3jgMIyn.js} +1 -1
- package/assets/get-ecosystem-wallet-info-B4ca6uUn.js +1 -0
- package/assets/{getBalance-C8i1-K0c.js → getBalance-BS9M_tBF.js} +2 -2
- package/assets/{getInstalledModules-BXhbS0To.js → getInstalledModules-TJvbccgJ.js} +1 -1
- package/assets/{getNFT-CzHwZ4FU.js → getNFT-BlQFGY94.js} +2 -2
- package/assets/{getNFT-D3XSi6wm.js → getNFT-Xlc7XB2G.js} +1 -1
- package/assets/{hashTypedData-DX5YrpbP.js → hashTypedData-B7sBgfoL.js} +1 -1
- package/assets/{hashTypedData-BOc0w62Q.js → hashTypedData-CEYoWftx.js} +1 -1
- package/assets/{import-BulayqYM.js → import-J8FWHnju.js} +1 -1
- package/assets/{in-app-wallet-calls-BI0pU06-.js → in-app-wallet-calls-GDlqBGpw.js} +1 -1
- package/assets/{index-GAmNssSM.js → index-2dkhZZEZ.js} +1 -1
- package/assets/{index-BZ5hUBd_.js → index-6YdbHDXd.js} +1 -1
- package/assets/{index-CzfG6alx.js → index-B0PvzweT.js} +1 -1
- package/assets/{index-DQx-sY_c.js → index-B11b--Yh.js} +1 -1
- package/assets/{index-BKSTjS_b.js → index-B5Oqojt4.js} +1 -1
- package/assets/{index-D4VlTBkw.js → index-B5nwKjyJ.js} +1 -1
- package/assets/{index-n-cFV5ht.js → index-B6-wCRdo.js} +1 -1
- package/assets/{index-DIMSfymy.js → index-BA1ToKo5.js} +3 -3
- package/assets/{index-D3hzhbb8.js → index-BBTg_Taa.js} +1 -1
- package/assets/{index-CkHNiFzW.js → index-BLF3lLRE.js} +1 -1
- package/assets/{index--_rHc9Od.js → index-BNjQhTuO.js} +1 -1
- package/assets/{index-Qzch3HJ1.js → index-BNsmSCur.js} +1 -1
- package/assets/{index-BOQwd6ZB.js → index-BRAKTMPG.js} +1 -1
- package/assets/{index-BOwZsNrV.js → index-B_xrDWUL.js} +1 -1
- package/assets/{index-DhBdPYnK.js → index-BcvgfIV4.js} +1 -1
- package/assets/{index-CdfeQ7YK.js → index-BcyJUD4U.js} +1 -1
- package/assets/{index-ULMMROQ0.js → index-BeymNI6W.js} +1 -1
- package/assets/{index-DjPU0-Js.js → index-BgtBi25O.js} +1 -1
- package/assets/{index-CIPKmOlZ.js → index-Bj-x5N2U.js} +1 -1
- package/assets/{index-Pp2oEhTr.js → index-Blc7OGRU.js} +1 -1
- package/assets/{index-LSZxonl2.js → index-BnrCQ-kr.js} +1 -1
- package/assets/{index-jYazATJj.js → index-Bu2DcNS5.js} +1 -1
- package/assets/{index-C6FQ8I_Q.js → index-C9P6N44e.js} +2 -2
- package/assets/{index-C7-iTfFV.js → index-CI_HQD35.js} +25 -25
- package/assets/{index-C2U9pe20.js → index-CMib98th.js} +1 -1
- package/assets/{index-DacKA042.js → index-CPc95Sx-.js} +1 -1
- package/assets/{index-DShBCYos.js → index-CS7PjWbj.js} +3 -3
- package/assets/{index-BuKyqX4w.js → index-CSh-BHOv.js} +1 -1
- package/assets/{index-DV4p99KA.js → index-CZ8lEqAg.js} +2 -2
- package/assets/{index-CxyR8sie.js → index-ChHYiWiR.js} +1 -1
- package/assets/{index-CDMAFM2h.js → index-CkCZBr-g.js} +1 -1
- package/assets/{index-CMavzzI_.js → index-Cl4u62mB.js} +1 -1
- package/assets/{index-CbJmVQBN.js → index-CoACJ04N.js} +1 -1
- package/assets/{index-C2OMQVG4.js → index-CptRe6qL.js} +2 -2
- package/assets/{index-YfJF6hV4.js → index-CxQiq4b6.js} +1 -1
- package/assets/{index-CcQfGUgB.js → index-Cye62OPB.js} +1 -1
- package/assets/{index-BLQJ40Mi.js → index-D-lax9BR.js} +1 -1
- package/assets/{index-BlEd83Li.js → index-DA60UT_n.js} +1 -1
- package/assets/{index-CzFnbzvY.js → index-DFJdN6PH.js} +1 -1
- package/assets/{index-D5qOQwpy.js → index-DGSeBOvG.js} +1 -1
- package/assets/{index-DtrBN21c.js → index-DSUWwVug.js} +1 -1
- package/assets/{index-Eb-Zd0F2.js → index-DUnXGO0a.js} +1 -1
- package/assets/{index-CiIXwK1P.js → index-DWEAO5Zp.js} +1 -1
- package/assets/{index-BF6unOoT.js → index-DWk4e-hQ.js} +1 -1
- package/assets/{index-DJyoXp5I.js → index-DZ8SABwK.js} +1 -1
- package/assets/{index-2NUAW7ds.js → index-D_vsPbWD.js} +1 -1
- package/assets/{index-DlllSUoB.js → index-DjbM69kL.js} +1 -1
- package/assets/{index-CkVoCPEe.js → index-DnPCa8RK.js} +1 -1
- package/assets/{index-BNH6Xzon.js → index-DoS7CfZ4.js} +2 -2
- package/assets/{index-DOTYPGXa.js → index-Dv6YT5k2.js} +1 -1
- package/assets/{index-DIw62AgP.js → index-S-U9uSud.js} +1 -1
- package/assets/{index-IfYZnKCO.js → index-_AHcKVpB.js} +1 -1
- package/assets/{index-Bo6hVxzu.js → index-dE2OwwEn.js} +1 -1
- package/assets/{index-BaSqmd6J.js → index-pJLySSiV.js} +1 -1
- package/assets/{index-CENZ1Xjd.js → index-t3MAsdpb.js} +1 -1
- package/assets/{index-kxu93Of2.js → index-ulcskxUh.js} +1 -1
- package/assets/{index-DS8DYtub.js → index-yq7Vx7EH.js} +1 -1
- package/assets/{index.es-DnMpNe4m.js → index.es-BQrA1NgE.js} +4 -4
- package/assets/{index.es-IGCEipYb.js → index.es-CbOKB2xh.js} +1 -1
- package/assets/{index.es-Dk6KC5kj.js → index.es-Cz73nZm3.js} +1 -1
- package/assets/{localBatchGatewayRequest-BLJAP4fw.js → localBatchGatewayRequest-DVz1EzYT.js} +1 -1
- package/assets/{mana-rate-DkxpKYLQ.js → mana-rate-PT3JDtK4.js} +1 -1
- package/assets/{native-7uSYstXA.js → native-C_y7cRlS.js} +1 -1
- package/assets/network-Bdkbzo_l.js +1 -0
- package/assets/{networks-Bc_Uf_7y.js → networks-DVx7-Y5v.js} +1 -1
- package/assets/{onramp-DnhEoZl6.js → onramp-DWqw8mwD.js} +1 -1
- package/assets/{openzeppelin-DwFpqgXP.js → openzeppelin-B2NGugOR.js} +1 -1
- package/assets/{ownerOf-Qq7Or7yc.js → ownerOf-BoMFaGBI.js} +1 -1
- package/assets/{parseNft-B-POJxiL.js → parseNft-DdgcBV60.js} +2 -2
- package/assets/{parseSignature-ClLI6O4f.js → parseSignature-BMBhmj1o.js} +3 -3
- package/assets/{parseSignature-kOoafZEo.js → parseSignature-Cu4M83H5.js} +1 -1
- package/assets/{pay-with-exchange-BZR4RMBZ.js → pay-with-exchange-B3xXFySH.js} +1 -1
- package/assets/{qr-overlay-9WMDd_PO.js → qr-overlay-DXC6ldlf.js} +1 -1
- package/assets/{receive-CtJWuhGM.js → receive-C-M9SmxL.js} +1 -1
- package/assets/{resolveImplementation-BJatMhHh.js → resolveImplementation-D1Bqtnhr.js} +1 -1
- package/assets/{rpc-BA0W82l4.js → rpc-DE1f6rs1.js} +1 -1
- package/assets/{secp256k1-B82Rx-TY.js → secp256k1-B39Q-Q6x.js} +1 -1
- package/assets/{secp256k1-DFslM7tB.js → secp256k1-CrKymG_Q.js} +1 -1
- package/assets/{secp256k1-DHqlJ8nk.js → secp256k1-D1Tuv2c6.js} +1 -1
- package/assets/{send-DXVwWcB5.js → send-C1EU45CZ.js} +1 -1
- package/assets/{send-batch-transaction-D1j9aZww.js → send-batch-transaction-BTFORkZH.js} +1 -1
- package/assets/{send-eip712-transaction-CrryJAyV.js → send-eip712-transaction-CJ_pjExq.js} +2 -2
- package/assets/{send-gasless-transaction-B7YcLCGg.js → send-gasless-transaction-CHYN-ATV.js} +2 -2
- package/assets/{sendRawTransaction-DT-ObNx8.js → sendRawTransaction-YUhe5FDd.js} +3 -3
- package/assets/{serializeTransaction-DawhfTu0.js → serializeTransaction-xu35AVgP.js} +1 -1
- package/assets/{session-proposal-lgMupzDT.js → session-proposal-BZLBnV_x.js} +1 -1
- package/assets/{session-request-DacijEHD.js → session-request-mA9oQfs4.js} +2 -2
- package/assets/{sha256-BxR-wXll.js → sha256-De0VIEFf.js} +1 -1
- package/assets/{signing-CoPa7cSW.js → signing-DqVkCMNZ.js} +5 -5
- package/assets/{socials-CMh8u0Ej.js → socials-BImUXGbF.js} +1 -1
- package/assets/{swaps-B0Q00kKq.js → swaps-B8Tuo6Pt.js} +1 -1
- package/assets/{thirdweb-9c12J_EF.js → thirdweb-BPuxSwTj.js} +3 -3
- package/assets/{totalSupply-BCZn9Djj.js → totalSupply-Bbiy7170.js} +1 -1
- package/assets/{transactionReceipt-C2iQ3ozz.js → transactionReceipt-BcAWHNof.js} +1 -1
- package/assets/{transactions-Dqx74UWQ.js → transactions-N8K1pD5P.js} +1 -1
- package/assets/{useInfiniteGrid-DgSsqvQS.js → useInfiniteGrid-CVs5pP6I.js} +1 -1
- package/assets/{utils-nbkSUjEy.js → utils-BmX8TqzP.js} +1 -1
- package/assets/{verifyHash-BVbpPoSf.js → verifyHash-CnnSGyZz.js} +1 -1
- package/assets/{w3m-modal-DvCL5Oh_.js → w3m-modal-DJII43ig.js} +1 -1
- package/assets/{w3m-modal-CGHylzdj.js → w3m-modal-DWJdJGvu.js} +1 -1
- package/assets/{wait-for-tx-receipt-Dm2aAIs1.js → wait-for-tx-receipt-D0UsY_wi.js} +1 -1
- package/assets/{wallet-kind-vciDs8sO.js → wallet-kind-C-lIAMBM.js} +1 -1
- package/assets/{wallets-D8labJv_.js → wallets-KGduOTOw.js} +6 -6
- package/assets/{web-connector-C9MeCxtf.js → web-connector-Ca9PblTL.js} +3 -3
- package/assets/{writeContract-C3IzBPhR.js → writeContract-dj4TlIky.js} +1 -1
- package/assets/{zora-sepolia-BQEmh41Y.js → zora-sepolia-kNKNf7Kl.js} +1 -1
- package/assets/{zoraTestnet-CduWQC79.js → zoraTestnet-BhynxBH0.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/ItemDetail-Do5cjFW8.js +0 -2
- package/assets/decimals-ByIlBo-2.js +0 -1
- package/assets/eth_estimateGas-CarYiSgL.js +0 -1
- package/assets/eth_getTransactionCount-Dfx3JW2Q.js +0 -1
- package/assets/get-ecosystem-wallet-info-CWcGnKL4.js +0 -1
- package/assets/network-DsCGVBhE.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d}from"./index-
|
|
1
|
+
import{e as d}from"./index-C9P6N44e.js";import{o}from"./browser-ponyfill-rND5WOqr.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-Blc7OGRU.js";import"./index-BcyJUD4U.js";var b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?b(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,p=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(l)for(var t of l(e))O.call(e,t)&&c(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",f={headers:L,method:j},g=10;class M{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new d.EventEmitter,this.isAvailable=!1,this.registering=!1,!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=h(e),r=await(await o(this.url,v(p({},f),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((r,i)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),i(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));r()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=h({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,v(p({},f),{body:t}))}this.onOpen()}catch(t){const r=this.parseError(t);throw this.events.emit("register_error",r),this.onClose(),r}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?u(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=m(e,i);this.events.emit("payload",n)}parseError(e,t=this.url){return y(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{M as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as M}from"./index-C7-iTfFV.js";import{B as Tt,q as Mt,K as ot,t as J,u as Bt,Y as F,P as $t,F as B,V as R,v as z,w as At,x as Lt}from"./wallets-D8labJv_.js";import"./index-CdfeQ7YK.js";import{b as Jt,o as g,c as Et}from"./index-Pp2oEhTr.js";import{f as P}from"./index.es-IGCEipYb.js";import{N as zt}from"./index-C6FQ8I_Q.js";import"./react-Vu6nbGi5.js";import"./ethers-DHDSyreX.js";import"./signing-CoPa7cSW.js";import"./utils-nbkSUjEy.js";import"./store-CraP4F4Y.js";import"./hashTypedData-DX5YrpbP.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-jYazATJj.js";import"./ethereum-CjiWK1L5.js";import"./browser-ponyfill-rND5WOqr.js";const ct="error",Gt="wss://relay.walletconnect.org",Vt="wc",Kt="universal_provider",x=`${Vt}@2:${Kt}:`,St="https://rpc.walletconnect.org/v1/",qt="generic",Wt=`${St}bundler`,_="call_status",Yt=86400,v={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function it(i){return i==null||typeof i!="object"&&typeof i!="function"}function Nt(i){return Object.getOwnPropertySymbols(i).filter(t=>Object.prototype.propertyIsEnumerable.call(i,t))}function Dt(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Qt="[object RegExp]",_t="[object String]",Ft="[object Number]",Rt="[object Boolean]",xt="[object Arguments]",Xt="[object Symbol]",Zt="[object Date]",te="[object Map]",ee="[object Set]",ie="[object Array]",se="[object ArrayBuffer]",re="[object Object]",ne="[object DataView]",ae="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",he="[object Uint32Array]",pe="[object Int8Array]",ue="[object Int16Array]",le="[object Int32Array]",de="[object Float32Array]",fe="[object Float64Array]";function st(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function me(i,t){return D(i,void 0,i,new Map,t)}function D(i,t,e,s=new Map,n=void 0){const a=n==null?void 0:n(i,t,e,s);if(a!=null)return a;if(it(i))return i;if(s.has(i))return s.get(i);if(Array.isArray(i)){const r=new Array(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return Object.hasOwn(i,"index")&&(r.index=i.index),Object.hasOwn(i,"input")&&(r.input=i.input),r}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const r=new RegExp(i.source,i.flags);return r.lastIndex=i.lastIndex,r}if(i instanceof Map){const r=new Map;s.set(i,r);for(const[o,c]of i)r.set(o,D(c,o,e,s,n));return r}if(i instanceof Set){const r=new Set;s.set(i,r);for(const o of i)r.add(D(o,void 0,e,s,n));return r}if(typeof M<"u"&&M.isBuffer(i))return i.subarray();if(st(i)){const r=new(Object.getPrototypeOf(i)).constructor(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return r}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const r=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return s.set(i,r),y(r,i,e,s,n),r}if(typeof File<"u"&&i instanceof File){const r=new File([i],i.name,{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Blob){const r=new Blob([i],{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Error){const r=new i.constructor;return s.set(i,r),r.message=i.message,r.name=i.name,r.stack=i.stack,r.cause=i.cause,y(r,i,e,s,n),r}if(typeof i=="object"&&ve(i)){const r=Object.create(Object.getPrototypeOf(i));return s.set(i,r),y(r,i,e,s,n),r}return i}function y(i,t,e=i,s,n){const a=[...Object.keys(t),...Nt(t)];for(let r=0;r<a.length;r++){const o=a[r],c=Object.getOwnPropertyDescriptor(i,o);(c==null||c.writable)&&(i[o]=D(t[o],o,e,s,n))}}function ve(i){switch(Dt(i)){case xt:case ie:case se:case ne:case Rt:case Zt:case de:case fe:case pe:case ue:case le:case te:case Ft:case re:case Qt:case ee:case _t:case Xt:case ae:case oe:case ce:case he:return!0;default:return!1}}function ge(i,t){return me(i,(e,s,n,a)=>{if(typeof i=="object")switch(Object.prototype.toString.call(i)){case Ft:case _t:case Rt:{const r=new i.constructor(i==null?void 0:i.valueOf());return y(r,i),r}case xt:{const r={};return y(r,i),r.length=i.length,r[Symbol.iterator]=i[Symbol.iterator],r}default:return}})}function ht(i){return ge(i)}function pt(i){return i!==null&&typeof i=="object"&&Dt(i)==="[object Arguments]"}function ut(i){return typeof i=="object"&&i!==null}function Pe(){}function we(i){return st(i)}function be(i){var e;if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const s=i[Symbol.toStringTag];return s==null||!((e=Object.getOwnPropertyDescriptor(i,Symbol.toStringTag))!=null&&e.writable)?!1:i.toString()===`[object ${s}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ce(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let n=i;for(let a=0;a<e.length;a++){const r=e[a];n=Z(n,r,s,new Map)}return n}function Z(i,t,e,s){if(it(i)&&(i=Object(i)),t==null||typeof t!="object")return i;if(s.has(t))return ye(s.get(t));if(s.set(t,i),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const n=[...Object.keys(t),...Nt(t)];for(let a=0;a<n.length;a++){const r=n[a];let o=t[r],c=i[r];if(pt(o)&&(o={...o}),pt(c)&&(c={...c}),typeof M<"u"&&M.isBuffer(o)&&(o=ht(o)),Array.isArray(o))if(typeof c=="object"&&c!=null){const l=[],h=Reflect.ownKeys(c);for(let w=0;w<h.length;w++){const d=h[w];l[d]=c[d]}c=l}else c=[];const u=e(c,o,r,i,t,s);u!=null?i[r]=u:Array.isArray(o)||ut(c)&&ut(o)?i[r]=Z(c,o,e,s):c==null&&be(o)?i[r]=Z({},o,e,s):c==null&&we(o)?i[r]=ht(o):(c===void 0||o!==void 0)&&(i[r]=o)}return i}function Ie(i,...t){return Ce(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,dt=(i,t,e)=>t in i?Oe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t)=>{for(var e in t||(t={}))$e.call(t,e)&&dt(i,e,t[e]);if(lt)for(var e of lt(t))Ae.call(t,e)&&dt(i,e,t[e]);return i},Ee=(i,t)=>je(i,He(t));function f(i,t,e){var s;const n=B(i);return((s=t.rpcMap)==null?void 0:s[n.reference])||`${St}?chainId=${n.namespace}:${n.reference}&projectId=${e}`}function C(i){return i.includes(":")?i.split(":")[1]:i}function Ut(i){return i.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Se(i,t){const e=Object.keys(t.namespaces).filter(n=>n.includes(i));if(!e.length)return[];const s=[];return e.forEach(n=>{const a=t.namespaces[n].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,n;return((s=e==null?void 0:e.chains)==null?void 0:s.length)&&((n=e==null?void 0:e.chains)==null?void 0:n.length)>0}))}function k(i={},t={}){const e=ft(mt(i)),s=ft(mt(t));return Ie(e,s)}function mt(i){var t,e,s,n,a;const r={};if(!R(i))return r;for(const[o,c]of Object.entries(i)){const u=$t(o)?[o]:c.chains,l=c.methods||[],h=c.events||[],w=c.rpcMap||{},d=F(o);r[d]=Ee(U(U({},r[d]),c),{chains:z(u,(t=r[d])==null?void 0:t.chains),methods:z(l,(e=r[d])==null?void 0:e.methods),events:z(h,(s=r[d])==null?void 0:s.events)}),(R(w)||R(((n=r[d])==null?void 0:n.rpcMap)||{}))&&(r[d].rpcMap=U(U({},w),(a=r[d])==null?void 0:a.rpcMap))}return r}function vt(i){return i.includes(":")?i.split(":")[2]:i}function gt(i){const t={};for(const[e,s]of Object.entries(i)){const n=s.methods||[],a=s.events||[],r=s.accounts||[],o=$t(e)?[e]:s.chains?s.chains:Ut(s.accounts);t[e]={chains:o,methods:n,events:a,accounts:r}}return t}function G(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}function qe(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}}const kt={},p=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,Ct=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:n={}}=i,a={};if(!R(n)&&!R(s))return;const r=Ct(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=r;const u=n==null?void 0:n[`${yt}:${c}`];if(u){const l=u==null?void 0:u[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),Ct(l||u))}}for(const[o,c]of Object.entries(a))Object.keys(c).length===0&&delete a[o];return Object.keys(a).length>0?a:void 0};var ke=Object.defineProperty,Te=(i,t,e)=>t in i?ke(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Me=(i,t,e)=>Te(i,t+"",e);let W;class rt{constructor(t){Me(this,"storage"),this.storage=t}async getItem(t){return await this.storage.getItem(t)}async setItem(t,e){return await this.storage.setItem(t,e)}async removeItem(t){return await this.storage.removeItem(t)}static getStorage(t){return W||(W=new rt(t)),W}}var Be=Object.defineProperty,Le=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ot=(i,t,e)=>t in i?Be(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ve=(i,t)=>{for(var e in t||(t={}))ze.call(t,e)&&Ot(i,e,t[e]);if(It)for(var e of It(t))Ge.call(t,e)&&Ot(i,e,t[e]);return i},Ke=(i,t)=>Le(i,Je(t));async function We(i,t){const e=B(i.result.capabilities.caip345.caip2),s=i.result.capabilities.caip345.transactionHashes,n=await Promise.allSettled(s.map(h=>Ye(e.reference,h,t))),a=n.filter(h=>h.status==="fulfilled").map(h=>h.value).filter(h=>h);n.filter(h=>h.status==="rejected").forEach(h=>console.warn("Failed to fetch transaction receipt:",h.reason));const r=!a.length||a.some(h=>!h),o=a.every(h=>(h==null?void 0:h.status)==="0x1"),c=a.every(h=>(h==null?void 0:h.status)==="0x0"),u=a.some(h=>(h==null?void 0:h.status)==="0x0");let l;return r?l=100:o?l=200:c?l=500:u&&(l=600),{id:i.result.id,version:i.request.version,atomic:i.request.atomicRequired,chainId:i.request.chainId,capabilities:i.result.capabilities,receipts:a,status:l}}async function Ye(i,t,e){return await e(parseInt(i)).request(Et("eth_getTransactionReceipt",[t]))}async function Qe({sendCalls:i,storage:t}){const e=await t.getItem(_);await t.setItem(_,Ke(Ve({},e),{[i.result.id]:{request:i.request,result:i.result,expiry:Lt(Yt)}}))}async function Xe({resultId:i,storage:t}){const e=await t.getItem(_);if(e){delete e[i],await t.setItem(_,e);for(const s in e)At(e[s].expiry)&&delete e[s];await t.setItem(_,e)}}async function Ze({resultId:i,storage:t}){const e=await t.getItem(_),s=e==null?void 0:e[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,I=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){I(this,"name","polkadot"),I(this,"client"),I(this,"httpProviders"),I(this,"events"),I(this,"namespace"),I(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var si=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,tt=(i,t,e)=>t in i?si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Y=(i,t)=>{for(var e in t||(t={}))ai.call(t,e)&&tt(i,e,t[e]);if(jt)for(var e of jt(t))oi.call(t,e)&&tt(i,e,t[e]);return i},Q=(i,t)=>ri(i,ni(t)),b=(i,t,e)=>tt(i,typeof t!="symbol"?t+"":t,e);class ci{constructor(t){b(this,"name","eip155"),b(this,"client"),b(this,"chainId"),b(this,"namespace"),b(this,"httpProviders"),b(this,"events"),b(this,"storage"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=rt.getStorage(this.client.core.storage)}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());case"wallet_getCapabilities":return await this.getCapabilities(t);case"wallet_getCallsStatus":return await this.getCallStatus(t);case"wallet_sendCalls":return await this.sendCalls(t)}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,e){this.httpProviders[t]||this.setHttpProvider(parseInt(t),e),this.chainId=parseInt(t),this.events.emit(v.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,e){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=parseInt(C(e));t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(t){const e=t||this.chainId;return this.httpProviders[e]||(this.httpProviders=Q(Y({},this.httpProviders),{[e]:this.createHttpProvider(e)}),this.httpProviders[e])}async handleSwitchChain(t){var e,s;let n=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. 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}`)}async getCapabilities(t){var e,s,n,a,r;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(n=t.request)==null?void 0:n.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(t.topic),l=((r=u==null?void 0:u.sessionProperties)==null?void 0:r.capabilities)||{},h=`${o}${c.join(",")}`,w=l==null?void 0:l[h];if(w)return w;let d;try{d=Ue(u,o,c)}catch(L){console.warn("Failed to extract capabilities from session",L)}if(d)return d;const at=await this.client.request(t);try{await this.client.session.update(t.topic,{sessionProperties:Q(Y({},u.sessionProperties||{}),{capabilities:Q(Y({},l||{}),{[h]:at})})})}catch(L){console.warn("Failed to update session with capabilities",L)}return at}async getCallStatus(t){var e,s,n;const a=this.client.session.get(t.topic),r=(e=a.sessionProperties)==null?void 0:e.bundler_name;if(r){const u=this.getBundlerUrl(t.chainId,r);try{return await this.getUserOperationReceipt(u,t)}catch(l){console.warn("Failed to fetch call status from bundler",l,u)}}const o=(s=a.sessionProperties)==null?void 0:s.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,t)}catch(u){console.warn("Failed to fetch call status from custom bundler",u,o)}const c=await Ze({resultId:(n=t.request.params)==null?void 0:n[0],storage:this.storage});if(c)try{return await We(c,this.getHttpProvider.bind(this))}catch(u){console.warn("Failed to fetch call status from stored send calls",u,c)}if(this.namespace.methods.includes(t.request.method))return await this.client.request(t);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(t,e){var s;const n=new URL(t),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Et("eth_getUserOperationReceipt",[(s=e.request.params)==null?void 0:s[0]]))});if(!a.ok)throw new Error(`Failed to fetch user operation receipt - ${a.status}`);return await a.json()}getBundlerUrl(t,e){return`${Wt}?projectId=${this.client.core.projectId}&chainId=${t}&bundler=${e}`}async sendCalls(t){var e,s,n;const a=await this.client.request(t),r=(e=t.request.params)==null?void 0:e[0],o=a==null?void 0:a.id,c=(a==null?void 0:a.capabilities)||{},u=(s=c==null?void 0:c.caip345)==null?void 0:s.caip2,l=(n=c==null?void 0:c.caip345)==null?void 0:n.transactionHashes;return!o||!u||!(l!=null&&l.length)||await Qe({sendCalls:{request:r,result:a},storage:this.storage}),a}}var hi=Object.defineProperty,pi=(i,t,e)=>t in i?hi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t,e)=>pi(i,typeof t!="symbol"?t+"":t,e);class ui{constructor(t){O(this,"name","solana"),O(this,"client"),O(this,"httpProviders"),O(this,"events"),O(this,"namespace"),O(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.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(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var li=Object.defineProperty,di=(i,t,e)=>t in i?li(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,j=(i,t,e)=>di(i,typeof t!="symbol"?t+"":t,e);class fi{constructor(t){j(this,"name","cosmos"),j(this,"client"),j(this,"httpProviders"),j(this,"events"),j(this,"namespace"),j(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var mi=Object.defineProperty,vi=(i,t,e)=>t in i?mi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,H=(i,t,e)=>vi(i,typeof t!="symbol"?t+"":t,e);class gi{constructor(t){H(this,"name","algorand"),H(this,"client"),H(this,"httpProviders"),H(this,"events"),H(this,"namespace"),H(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){if(!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}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(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Pi=Object.defineProperty,wi=(i,t,e)=>t in i?Pi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,$=(i,t,e)=>wi(i,typeof t!="symbol"?t+"":t,e);class bi{constructor(t){$(this,"name","cip34"),$(this,"client"),$(this,"httpProviders"),$(this,"events"),$(this,"namespace"),$(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),n=C(e);t[n]=this.createHttpProvider(n,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var yi=Object.defineProperty,Ci=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ci(i,typeof t!="symbol"?t+"":t,e);class Ii{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.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(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Oi=Object.defineProperty,ji=(i,t,e)=>t in i?Oi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,E=(i,t,e)=>ji(i,typeof t!="symbol"?t+"":t,e);class Hi{constructor(t){E(this,"name","multiversx"),E(this,"client"),E(this,"httpProviders"),E(this,"events"),E(this,"namespace"),E(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.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(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var $i=Object.defineProperty,Ai=(i,t,e)=>t in i?$i(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,S=(i,t,e)=>Ai(i,typeof t!="symbol"?t+"":t,e);class Ei{constructor(t){S(this,"name","near"),S(this,"client"),S(this,"httpProviders"),S(this,"events"),S(this,"namespace"),S(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Si=Object.defineProperty,qi=(i,t,e)=>t in i?Si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,q=(i,t,e)=>qi(i,typeof t!="symbol"?t+"":t,e);class Ni{constructor(t){q(this,"name","tezos"),q(this,"client"),q(this,"httpProviders"),q(this,"events"),q(this,"namespace"),q(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{t[e]=this.createHttpProvider(e)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s))}}var Di=Object.defineProperty,_i=(i,t,e)=>t in i?Di(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t,e)=>_i(i,typeof t!="symbol"?t+"":t,e);class Fi{constructor(t){N(this,"name",qt),N(this,"client"),N(this,"httpProviders"),N(this,"events"),N(this,"namespace"),N(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(t.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(t.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(t.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(t.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider(t.chainId).request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.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]}getNamespaceName(){const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return B(t).namespace}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var t,e;const s={};return(e=(t=this.namespace)==null?void 0:t.accounts)==null||e.forEach(n=>{const a=B(n);s[a.reference]=this.createHttpProvider(n)}),s}getHttpProvider(t){const e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Ri=Object.defineProperty,xi=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,et=(i,t,e)=>t in i?Ri(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,T=(i,t)=>{for(var e in t||(t={}))ki.call(t,e)&&et(i,e,t[e]);if(Ht)for(var e of Ht(t))Ti.call(t,e)&&et(i,e,t[e]);return i},X=(i,t)=>xi(i,Ui(t)),m=(i,t,e)=>et(i,typeof t!="symbol"?t+"":t,e);class nt{constructor(t){m(this,"client"),m(this,"namespaces"),m(this,"optionalNamespaces"),m(this,"sessionProperties"),m(this,"scopedProperties"),m(this,"events",new zt),m(this,"rpcProviders",{}),m(this,"session"),m(this,"providerOpts"),m(this,"logger"),m(this,"uri"),m(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:Tt(Mt({level:(t==null?void 0:t.logger)||ct})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const e=new nt(t);return await e.initialize(),e}async request(t,e,s){const[n,a]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:T({},t),chainId:`${n}:${a}`,topic:this.session.topic,expiry:s})}sendAsync(t,e,s,n){const a=new Date().getTime();this.request(t,s,n).then(r=>e(null,Jt(a,r))).catch(r=>e(r,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,scopedProperties:this.scopedProperties}),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:ot("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}async authenticate(t,e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(t),await this.cleanupPendingPairings();const{uri:s,response:n}=await this.client.authenticate(t,e);s&&(this.uri=s,this.events.emit("display_uri",s));const a=await n();if(this.session=a.session,this.session){const r=gt(this.session.namespaces);this.namespaces=k(this.namespaces,r),await this.persist("namespaces",this.namespaces),this.onConnect()}return a}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}removeListener(t,e){this.events.removeListener(t,e)}off(t,e){this.events.off(t,e)}get isWalletConnect(){return!0}async pair(t){const{uri:e,approval:s}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});e&&(this.uri=e,this.events.emit("display_uri",e));const n=await s();this.session=n;const a=gt(n.namespaces);return this.namespaces=k(this.namespaces,a),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(t,e){try{if(!this.session)return;const[s,n]=this.validateChain(t);this.getProvider(s).setDefaultChain(n,e)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){try{this.logger.info("Cleaning up inactive pairings...");const e=this.client.pairing.getAll();if(!J(e))return;for(const s of e)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: ${e.length}`)}catch(e){this.logger.warn("Failed to cleanup pending pairings",e)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var t,e;if(this.client=this.providerOpts.client||await Bt.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ct,relayUrl:this.providerOpts.relayUrl||Gt,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(s){throw this.logger.error("Failed to get session",s),new Error(`The provided session: ${(e=(t=this.providerOpts)==null?void 0:t.session)==null?void 0:e.topic} doesn't exist in the Sign client`)}else{const s=this.client.session.getAll();this.session=s[0]}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(e=>F(e)))];V("client",this.client),V("events",this.events),V("disableProviderPing",this.disableProviderPing),t.forEach(e=>{if(!this.session)return;const s=Se(e,this.session);if((s==null?void 0:s.length)===0)return;const n=Ut(s),a=k(this.namespaces,this.optionalNamespaces),r=X(T({},a[e]),{accounts:s,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:r});break;case"algorand":this.rpcProviders[e]=new gi({namespace:r});break;case"solana":this.rpcProviders[e]=new ui({namespace:r});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:r});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:r});break;case"cip34":this.rpcProviders[e]=new bi({namespace:r});break;case"elrond":this.rpcProviders[e]=new Ii({namespace:r});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:r});break;case"near":this.rpcProviders[e]=new Ei({namespace:r});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:r});break;default:this.rpcProviders[e]=new Fi({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{var e;const{topic:s}=t;s===((e=this.session)==null?void 0:e.topic)&&this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{var e;const{params:s,topic:n}=t;if(n!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const r=a.data;r&&J(r)&&this.events.emit("accountsChanged",r.map(vt))}else if(a.name==="chainChanged"){const r=s.chainId,o=s.event.data,c=F(r),u=G(r)!==G(o)?`${c}:${G(o)}`:r;this.onChainChanged(u)}else this.events.emit(a.name,a.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:e})=>{var s,n;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,r=(n=this.client)==null?void 0:n.session.get(t);this.session=X(T({},r),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:e})}),this.client.on("session_delete",async t=>{var e;t.topic===((e=this.session)==null?void 0:e.topic)&&(await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",X(T({},ot("USER_DISCONNECTED")),{data:t.topic})))}),this.on(v.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){return this.rpcProviders[t]||this.rpcProviders[qt]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var e;this.getProvider(t).updateNamespace((e=this.session)==null?void 0:e.namespaces[t])})}setNamespaces(t){const{namespaces:e={},optionalNamespaces:s={},sessionProperties:n,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=n,this.scopedProperties=a}validateChain(t){const[e,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,s];if(e&&!Object.keys(this.namespaces||{}).map(r=>F(r)).includes(e))throw new Error(`Namespace '${e}' is not configured. Please call connect() first with namespace config.`);if(e&&s)return[e,s];const n=F(Object.keys(this.namespaces)[0]),a=this.rpcProviders[n].getDefaultChain();return[n,a]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}async onChainChanged(t,e=!1){if(!this.namespaces)return;const[s,n]=this.validateChain(t);if(!n)return;this.updateNamespaceChain(s,n);const a=this.getProvider(s).getDefaultChain();e?(this.events.emit("chainChanged",n),this.emitAccountsChangedOnChainChange({namespace:s,previousChainId:a,newChainId:t})):this.getProvider(s).setDefaultChain(n),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:t,previousChainId:e,newChainId:s}){var n,a;try{if(e===s)return;const r=(a=(n=this.session)==null?void 0:n.namespaces[t])==null?void 0:a.accounts;if(!r)return;const o=r.filter(c=>c.includes(`${s}:`)).map(vt);if(!J(o))return;this.events.emit("accountsChanged",o)}catch(r){this.logger.warn("Failed to emit accountsChanged on chain change",r)}}updateNamespaceChain(t,e){if(!this.namespaces)return;const s=this.namespaces[t]?t:`${t}:${e}`,n={chains:[],methods:[],events:[],defaultChain:e};this.namespaces[s]?this.namespaces[s]&&(this.namespaces[s].defaultChain=e):this.namespaces[s]=n}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(t,e){var s;const n=((s=this.session)==null?void 0:s.topic)||"";await this.client.core.storage.setItem(`${x}/${t}${n}`,e)}async getFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";return await this.client.core.storage.getItem(`${x}/${t}${s}`)}async deleteFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";await this.client.core.storage.removeItem(`${x}/${t}${s}`)}async cleanupStorage(){var t;try{if(((t=this.client)==null?void 0:t.session.length)>0)return;const e=await this.client.core.storage.getKeys();for(const s of e)s.startsWith(x)&&await this.client.core.storage.removeItem(s)}catch(e){this.logger.warn("Failed to cleanup storage",e)}}}const rs=nt;export{rs as UniversalProvider,nt as default};
|
|
1
|
+
import{F as M}from"./index-CI_HQD35.js";import{B as Tt,q as Mt,K as ot,t as J,u as Bt,Y as F,P as $t,F as B,V as R,v as z,w as At,x as Lt}from"./wallets-KGduOTOw.js";import"./index-BcyJUD4U.js";import{b as Jt,o as g,c as Et}from"./index-Blc7OGRU.js";import{f as P}from"./index.es-CbOKB2xh.js";import{N as zt}from"./index-C9P6N44e.js";import"./react-Vu6nbGi5.js";import"./ethers-JeCAM1sd.js";import"./signing-DqVkCMNZ.js";import"./utils-BmX8TqzP.js";import"./store-CraP4F4Y.js";import"./hashTypedData-B7sBgfoL.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-Bu2DcNS5.js";import"./ethereum-CdeRZR9J.js";import"./browser-ponyfill-rND5WOqr.js";const ct="error",Gt="wss://relay.walletconnect.org",Vt="wc",Kt="universal_provider",x=`${Vt}@2:${Kt}:`,St="https://rpc.walletconnect.org/v1/",qt="generic",Wt=`${St}bundler`,_="call_status",Yt=86400,v={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function it(i){return i==null||typeof i!="object"&&typeof i!="function"}function Nt(i){return Object.getOwnPropertySymbols(i).filter(t=>Object.prototype.propertyIsEnumerable.call(i,t))}function Dt(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Qt="[object RegExp]",_t="[object String]",Ft="[object Number]",Rt="[object Boolean]",xt="[object Arguments]",Xt="[object Symbol]",Zt="[object Date]",te="[object Map]",ee="[object Set]",ie="[object Array]",se="[object ArrayBuffer]",re="[object Object]",ne="[object DataView]",ae="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",he="[object Uint32Array]",pe="[object Int8Array]",ue="[object Int16Array]",le="[object Int32Array]",de="[object Float32Array]",fe="[object Float64Array]";function st(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function me(i,t){return D(i,void 0,i,new Map,t)}function D(i,t,e,s=new Map,n=void 0){const a=n==null?void 0:n(i,t,e,s);if(a!=null)return a;if(it(i))return i;if(s.has(i))return s.get(i);if(Array.isArray(i)){const r=new Array(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return Object.hasOwn(i,"index")&&(r.index=i.index),Object.hasOwn(i,"input")&&(r.input=i.input),r}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const r=new RegExp(i.source,i.flags);return r.lastIndex=i.lastIndex,r}if(i instanceof Map){const r=new Map;s.set(i,r);for(const[o,c]of i)r.set(o,D(c,o,e,s,n));return r}if(i instanceof Set){const r=new Set;s.set(i,r);for(const o of i)r.add(D(o,void 0,e,s,n));return r}if(typeof M<"u"&&M.isBuffer(i))return i.subarray();if(st(i)){const r=new(Object.getPrototypeOf(i)).constructor(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return r}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const r=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return s.set(i,r),y(r,i,e,s,n),r}if(typeof File<"u"&&i instanceof File){const r=new File([i],i.name,{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Blob){const r=new Blob([i],{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Error){const r=new i.constructor;return s.set(i,r),r.message=i.message,r.name=i.name,r.stack=i.stack,r.cause=i.cause,y(r,i,e,s,n),r}if(typeof i=="object"&&ve(i)){const r=Object.create(Object.getPrototypeOf(i));return s.set(i,r),y(r,i,e,s,n),r}return i}function y(i,t,e=i,s,n){const a=[...Object.keys(t),...Nt(t)];for(let r=0;r<a.length;r++){const o=a[r],c=Object.getOwnPropertyDescriptor(i,o);(c==null||c.writable)&&(i[o]=D(t[o],o,e,s,n))}}function ve(i){switch(Dt(i)){case xt:case ie:case se:case ne:case Rt:case Zt:case de:case fe:case pe:case ue:case le:case te:case Ft:case re:case Qt:case ee:case _t:case Xt:case ae:case oe:case ce:case he:return!0;default:return!1}}function ge(i,t){return me(i,(e,s,n,a)=>{if(typeof i=="object")switch(Object.prototype.toString.call(i)){case Ft:case _t:case Rt:{const r=new i.constructor(i==null?void 0:i.valueOf());return y(r,i),r}case xt:{const r={};return y(r,i),r.length=i.length,r[Symbol.iterator]=i[Symbol.iterator],r}default:return}})}function ht(i){return ge(i)}function pt(i){return i!==null&&typeof i=="object"&&Dt(i)==="[object Arguments]"}function ut(i){return typeof i=="object"&&i!==null}function Pe(){}function we(i){return st(i)}function be(i){var e;if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const s=i[Symbol.toStringTag];return s==null||!((e=Object.getOwnPropertyDescriptor(i,Symbol.toStringTag))!=null&&e.writable)?!1:i.toString()===`[object ${s}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ce(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let n=i;for(let a=0;a<e.length;a++){const r=e[a];n=Z(n,r,s,new Map)}return n}function Z(i,t,e,s){if(it(i)&&(i=Object(i)),t==null||typeof t!="object")return i;if(s.has(t))return ye(s.get(t));if(s.set(t,i),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const n=[...Object.keys(t),...Nt(t)];for(let a=0;a<n.length;a++){const r=n[a];let o=t[r],c=i[r];if(pt(o)&&(o={...o}),pt(c)&&(c={...c}),typeof M<"u"&&M.isBuffer(o)&&(o=ht(o)),Array.isArray(o))if(typeof c=="object"&&c!=null){const l=[],h=Reflect.ownKeys(c);for(let w=0;w<h.length;w++){const d=h[w];l[d]=c[d]}c=l}else c=[];const u=e(c,o,r,i,t,s);u!=null?i[r]=u:Array.isArray(o)||ut(c)&&ut(o)?i[r]=Z(c,o,e,s):c==null&&be(o)?i[r]=Z({},o,e,s):c==null&&we(o)?i[r]=ht(o):(c===void 0||o!==void 0)&&(i[r]=o)}return i}function Ie(i,...t){return Ce(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,dt=(i,t,e)=>t in i?Oe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t)=>{for(var e in t||(t={}))$e.call(t,e)&&dt(i,e,t[e]);if(lt)for(var e of lt(t))Ae.call(t,e)&&dt(i,e,t[e]);return i},Ee=(i,t)=>je(i,He(t));function f(i,t,e){var s;const n=B(i);return((s=t.rpcMap)==null?void 0:s[n.reference])||`${St}?chainId=${n.namespace}:${n.reference}&projectId=${e}`}function C(i){return i.includes(":")?i.split(":")[1]:i}function Ut(i){return i.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Se(i,t){const e=Object.keys(t.namespaces).filter(n=>n.includes(i));if(!e.length)return[];const s=[];return e.forEach(n=>{const a=t.namespaces[n].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,n;return((s=e==null?void 0:e.chains)==null?void 0:s.length)&&((n=e==null?void 0:e.chains)==null?void 0:n.length)>0}))}function k(i={},t={}){const e=ft(mt(i)),s=ft(mt(t));return Ie(e,s)}function mt(i){var t,e,s,n,a;const r={};if(!R(i))return r;for(const[o,c]of Object.entries(i)){const u=$t(o)?[o]:c.chains,l=c.methods||[],h=c.events||[],w=c.rpcMap||{},d=F(o);r[d]=Ee(U(U({},r[d]),c),{chains:z(u,(t=r[d])==null?void 0:t.chains),methods:z(l,(e=r[d])==null?void 0:e.methods),events:z(h,(s=r[d])==null?void 0:s.events)}),(R(w)||R(((n=r[d])==null?void 0:n.rpcMap)||{}))&&(r[d].rpcMap=U(U({},w),(a=r[d])==null?void 0:a.rpcMap))}return r}function vt(i){return i.includes(":")?i.split(":")[2]:i}function gt(i){const t={};for(const[e,s]of Object.entries(i)){const n=s.methods||[],a=s.events||[],r=s.accounts||[],o=$t(e)?[e]:s.chains?s.chains:Ut(s.accounts);t[e]={chains:o,methods:n,events:a,accounts:r}}return t}function G(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}function qe(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}}const kt={},p=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,Ct=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:n={}}=i,a={};if(!R(n)&&!R(s))return;const r=Ct(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=r;const u=n==null?void 0:n[`${yt}:${c}`];if(u){const l=u==null?void 0:u[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),Ct(l||u))}}for(const[o,c]of Object.entries(a))Object.keys(c).length===0&&delete a[o];return Object.keys(a).length>0?a:void 0};var ke=Object.defineProperty,Te=(i,t,e)=>t in i?ke(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Me=(i,t,e)=>Te(i,t+"",e);let W;class rt{constructor(t){Me(this,"storage"),this.storage=t}async getItem(t){return await this.storage.getItem(t)}async setItem(t,e){return await this.storage.setItem(t,e)}async removeItem(t){return await this.storage.removeItem(t)}static getStorage(t){return W||(W=new rt(t)),W}}var Be=Object.defineProperty,Le=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ot=(i,t,e)=>t in i?Be(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ve=(i,t)=>{for(var e in t||(t={}))ze.call(t,e)&&Ot(i,e,t[e]);if(It)for(var e of It(t))Ge.call(t,e)&&Ot(i,e,t[e]);return i},Ke=(i,t)=>Le(i,Je(t));async function We(i,t){const e=B(i.result.capabilities.caip345.caip2),s=i.result.capabilities.caip345.transactionHashes,n=await Promise.allSettled(s.map(h=>Ye(e.reference,h,t))),a=n.filter(h=>h.status==="fulfilled").map(h=>h.value).filter(h=>h);n.filter(h=>h.status==="rejected").forEach(h=>console.warn("Failed to fetch transaction receipt:",h.reason));const r=!a.length||a.some(h=>!h),o=a.every(h=>(h==null?void 0:h.status)==="0x1"),c=a.every(h=>(h==null?void 0:h.status)==="0x0"),u=a.some(h=>(h==null?void 0:h.status)==="0x0");let l;return r?l=100:o?l=200:c?l=500:u&&(l=600),{id:i.result.id,version:i.request.version,atomic:i.request.atomicRequired,chainId:i.request.chainId,capabilities:i.result.capabilities,receipts:a,status:l}}async function Ye(i,t,e){return await e(parseInt(i)).request(Et("eth_getTransactionReceipt",[t]))}async function Qe({sendCalls:i,storage:t}){const e=await t.getItem(_);await t.setItem(_,Ke(Ve({},e),{[i.result.id]:{request:i.request,result:i.result,expiry:Lt(Yt)}}))}async function Xe({resultId:i,storage:t}){const e=await t.getItem(_);if(e){delete e[i],await t.setItem(_,e);for(const s in e)At(e[s].expiry)&&delete e[s];await t.setItem(_,e)}}async function Ze({resultId:i,storage:t}){const e=await t.getItem(_),s=e==null?void 0:e[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,I=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){I(this,"name","polkadot"),I(this,"client"),I(this,"httpProviders"),I(this,"events"),I(this,"namespace"),I(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var si=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,tt=(i,t,e)=>t in i?si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Y=(i,t)=>{for(var e in t||(t={}))ai.call(t,e)&&tt(i,e,t[e]);if(jt)for(var e of jt(t))oi.call(t,e)&&tt(i,e,t[e]);return i},Q=(i,t)=>ri(i,ni(t)),b=(i,t,e)=>tt(i,typeof t!="symbol"?t+"":t,e);class ci{constructor(t){b(this,"name","eip155"),b(this,"client"),b(this,"chainId"),b(this,"namespace"),b(this,"httpProviders"),b(this,"events"),b(this,"storage"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=rt.getStorage(this.client.core.storage)}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());case"wallet_getCapabilities":return await this.getCapabilities(t);case"wallet_getCallsStatus":return await this.getCallStatus(t);case"wallet_sendCalls":return await this.sendCalls(t)}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,e){this.httpProviders[t]||this.setHttpProvider(parseInt(t),e),this.chainId=parseInt(t),this.events.emit(v.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,e){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=parseInt(C(e));t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(t){const e=t||this.chainId;return this.httpProviders[e]||(this.httpProviders=Q(Y({},this.httpProviders),{[e]:this.createHttpProvider(e)}),this.httpProviders[e])}async handleSwitchChain(t){var e,s;let n=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. 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}`)}async getCapabilities(t){var e,s,n,a,r;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(n=t.request)==null?void 0:n.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(t.topic),l=((r=u==null?void 0:u.sessionProperties)==null?void 0:r.capabilities)||{},h=`${o}${c.join(",")}`,w=l==null?void 0:l[h];if(w)return w;let d;try{d=Ue(u,o,c)}catch(L){console.warn("Failed to extract capabilities from session",L)}if(d)return d;const at=await this.client.request(t);try{await this.client.session.update(t.topic,{sessionProperties:Q(Y({},u.sessionProperties||{}),{capabilities:Q(Y({},l||{}),{[h]:at})})})}catch(L){console.warn("Failed to update session with capabilities",L)}return at}async getCallStatus(t){var e,s,n;const a=this.client.session.get(t.topic),r=(e=a.sessionProperties)==null?void 0:e.bundler_name;if(r){const u=this.getBundlerUrl(t.chainId,r);try{return await this.getUserOperationReceipt(u,t)}catch(l){console.warn("Failed to fetch call status from bundler",l,u)}}const o=(s=a.sessionProperties)==null?void 0:s.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,t)}catch(u){console.warn("Failed to fetch call status from custom bundler",u,o)}const c=await Ze({resultId:(n=t.request.params)==null?void 0:n[0],storage:this.storage});if(c)try{return await We(c,this.getHttpProvider.bind(this))}catch(u){console.warn("Failed to fetch call status from stored send calls",u,c)}if(this.namespace.methods.includes(t.request.method))return await this.client.request(t);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(t,e){var s;const n=new URL(t),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Et("eth_getUserOperationReceipt",[(s=e.request.params)==null?void 0:s[0]]))});if(!a.ok)throw new Error(`Failed to fetch user operation receipt - ${a.status}`);return await a.json()}getBundlerUrl(t,e){return`${Wt}?projectId=${this.client.core.projectId}&chainId=${t}&bundler=${e}`}async sendCalls(t){var e,s,n;const a=await this.client.request(t),r=(e=t.request.params)==null?void 0:e[0],o=a==null?void 0:a.id,c=(a==null?void 0:a.capabilities)||{},u=(s=c==null?void 0:c.caip345)==null?void 0:s.caip2,l=(n=c==null?void 0:c.caip345)==null?void 0:n.transactionHashes;return!o||!u||!(l!=null&&l.length)||await Qe({sendCalls:{request:r,result:a},storage:this.storage}),a}}var hi=Object.defineProperty,pi=(i,t,e)=>t in i?hi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t,e)=>pi(i,typeof t!="symbol"?t+"":t,e);class ui{constructor(t){O(this,"name","solana"),O(this,"client"),O(this,"httpProviders"),O(this,"events"),O(this,"namespace"),O(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.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(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var li=Object.defineProperty,di=(i,t,e)=>t in i?li(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,j=(i,t,e)=>di(i,typeof t!="symbol"?t+"":t,e);class fi{constructor(t){j(this,"name","cosmos"),j(this,"client"),j(this,"httpProviders"),j(this,"events"),j(this,"namespace"),j(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var mi=Object.defineProperty,vi=(i,t,e)=>t in i?mi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,H=(i,t,e)=>vi(i,typeof t!="symbol"?t+"":t,e);class gi{constructor(t){H(this,"name","algorand"),H(this,"client"),H(this,"httpProviders"),H(this,"events"),H(this,"namespace"),H(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){if(!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}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(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Pi=Object.defineProperty,wi=(i,t,e)=>t in i?Pi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,$=(i,t,e)=>wi(i,typeof t!="symbol"?t+"":t,e);class bi{constructor(t){$(this,"name","cip34"),$(this,"client"),$(this,"httpProviders"),$(this,"events"),$(this,"namespace"),$(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),n=C(e);t[n]=this.createHttpProvider(n,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var yi=Object.defineProperty,Ci=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ci(i,typeof t!="symbol"?t+"":t,e);class Ii{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.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(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Oi=Object.defineProperty,ji=(i,t,e)=>t in i?Oi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,E=(i,t,e)=>ji(i,typeof t!="symbol"?t+"":t,e);class Hi{constructor(t){E(this,"name","multiversx"),E(this,"client"),E(this,"httpProviders"),E(this,"events"),E(this,"namespace"),E(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.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(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var $i=Object.defineProperty,Ai=(i,t,e)=>t in i?$i(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,S=(i,t,e)=>Ai(i,typeof t!="symbol"?t+"":t,e);class Ei{constructor(t){S(this,"name","near"),S(this,"client"),S(this,"httpProviders"),S(this,"events"),S(this,"namespace"),S(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Si=Object.defineProperty,qi=(i,t,e)=>t in i?Si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,q=(i,t,e)=>qi(i,typeof t!="symbol"?t+"":t,e);class Ni{constructor(t){q(this,"name","tezos"),q(this,"client"),q(this,"httpProviders"),q(this,"events"),q(this,"namespace"),q(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("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,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{t[e]=this.createHttpProvider(e)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s))}}var Di=Object.defineProperty,_i=(i,t,e)=>t in i?Di(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t,e)=>_i(i,typeof t!="symbol"?t+"":t,e);class Fi{constructor(t){N(this,"name",qt),N(this,"client"),N(this,"httpProviders"),N(this,"events"),N(this,"namespace"),N(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(t.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(t.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(t.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(t.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider(t.chainId).request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.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]}getNamespaceName(){const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return B(t).namespace}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var t,e;const s={};return(e=(t=this.namespace)==null?void 0:t.accounts)==null||e.forEach(n=>{const a=B(n);s[a.reference]=this.createHttpProvider(n)}),s}getHttpProvider(t){const e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Ri=Object.defineProperty,xi=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,et=(i,t,e)=>t in i?Ri(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,T=(i,t)=>{for(var e in t||(t={}))ki.call(t,e)&&et(i,e,t[e]);if(Ht)for(var e of Ht(t))Ti.call(t,e)&&et(i,e,t[e]);return i},X=(i,t)=>xi(i,Ui(t)),m=(i,t,e)=>et(i,typeof t!="symbol"?t+"":t,e);class nt{constructor(t){m(this,"client"),m(this,"namespaces"),m(this,"optionalNamespaces"),m(this,"sessionProperties"),m(this,"scopedProperties"),m(this,"events",new zt),m(this,"rpcProviders",{}),m(this,"session"),m(this,"providerOpts"),m(this,"logger"),m(this,"uri"),m(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:Tt(Mt({level:(t==null?void 0:t.logger)||ct})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const e=new nt(t);return await e.initialize(),e}async request(t,e,s){const[n,a]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:T({},t),chainId:`${n}:${a}`,topic:this.session.topic,expiry:s})}sendAsync(t,e,s,n){const a=new Date().getTime();this.request(t,s,n).then(r=>e(null,Jt(a,r))).catch(r=>e(r,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,scopedProperties:this.scopedProperties}),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:ot("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}async authenticate(t,e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(t),await this.cleanupPendingPairings();const{uri:s,response:n}=await this.client.authenticate(t,e);s&&(this.uri=s,this.events.emit("display_uri",s));const a=await n();if(this.session=a.session,this.session){const r=gt(this.session.namespaces);this.namespaces=k(this.namespaces,r),await this.persist("namespaces",this.namespaces),this.onConnect()}return a}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}removeListener(t,e){this.events.removeListener(t,e)}off(t,e){this.events.off(t,e)}get isWalletConnect(){return!0}async pair(t){const{uri:e,approval:s}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});e&&(this.uri=e,this.events.emit("display_uri",e));const n=await s();this.session=n;const a=gt(n.namespaces);return this.namespaces=k(this.namespaces,a),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(t,e){try{if(!this.session)return;const[s,n]=this.validateChain(t);this.getProvider(s).setDefaultChain(n,e)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){try{this.logger.info("Cleaning up inactive pairings...");const e=this.client.pairing.getAll();if(!J(e))return;for(const s of e)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: ${e.length}`)}catch(e){this.logger.warn("Failed to cleanup pending pairings",e)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var t,e;if(this.client=this.providerOpts.client||await Bt.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ct,relayUrl:this.providerOpts.relayUrl||Gt,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(s){throw this.logger.error("Failed to get session",s),new Error(`The provided session: ${(e=(t=this.providerOpts)==null?void 0:t.session)==null?void 0:e.topic} doesn't exist in the Sign client`)}else{const s=this.client.session.getAll();this.session=s[0]}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(e=>F(e)))];V("client",this.client),V("events",this.events),V("disableProviderPing",this.disableProviderPing),t.forEach(e=>{if(!this.session)return;const s=Se(e,this.session);if((s==null?void 0:s.length)===0)return;const n=Ut(s),a=k(this.namespaces,this.optionalNamespaces),r=X(T({},a[e]),{accounts:s,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:r});break;case"algorand":this.rpcProviders[e]=new gi({namespace:r});break;case"solana":this.rpcProviders[e]=new ui({namespace:r});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:r});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:r});break;case"cip34":this.rpcProviders[e]=new bi({namespace:r});break;case"elrond":this.rpcProviders[e]=new Ii({namespace:r});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:r});break;case"near":this.rpcProviders[e]=new Ei({namespace:r});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:r});break;default:this.rpcProviders[e]=new Fi({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{var e;const{topic:s}=t;s===((e=this.session)==null?void 0:e.topic)&&this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{var e;const{params:s,topic:n}=t;if(n!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const r=a.data;r&&J(r)&&this.events.emit("accountsChanged",r.map(vt))}else if(a.name==="chainChanged"){const r=s.chainId,o=s.event.data,c=F(r),u=G(r)!==G(o)?`${c}:${G(o)}`:r;this.onChainChanged(u)}else this.events.emit(a.name,a.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:e})=>{var s,n;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,r=(n=this.client)==null?void 0:n.session.get(t);this.session=X(T({},r),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:e})}),this.client.on("session_delete",async t=>{var e;t.topic===((e=this.session)==null?void 0:e.topic)&&(await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",X(T({},ot("USER_DISCONNECTED")),{data:t.topic})))}),this.on(v.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){return this.rpcProviders[t]||this.rpcProviders[qt]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var e;this.getProvider(t).updateNamespace((e=this.session)==null?void 0:e.namespaces[t])})}setNamespaces(t){const{namespaces:e={},optionalNamespaces:s={},sessionProperties:n,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=n,this.scopedProperties=a}validateChain(t){const[e,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,s];if(e&&!Object.keys(this.namespaces||{}).map(r=>F(r)).includes(e))throw new Error(`Namespace '${e}' is not configured. Please call connect() first with namespace config.`);if(e&&s)return[e,s];const n=F(Object.keys(this.namespaces)[0]),a=this.rpcProviders[n].getDefaultChain();return[n,a]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}async onChainChanged(t,e=!1){if(!this.namespaces)return;const[s,n]=this.validateChain(t);if(!n)return;this.updateNamespaceChain(s,n);const a=this.getProvider(s).getDefaultChain();e?(this.events.emit("chainChanged",n),this.emitAccountsChangedOnChainChange({namespace:s,previousChainId:a,newChainId:t})):this.getProvider(s).setDefaultChain(n),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:t,previousChainId:e,newChainId:s}){var n,a;try{if(e===s)return;const r=(a=(n=this.session)==null?void 0:n.namespaces[t])==null?void 0:a.accounts;if(!r)return;const o=r.filter(c=>c.includes(`${s}:`)).map(vt);if(!J(o))return;this.events.emit("accountsChanged",o)}catch(r){this.logger.warn("Failed to emit accountsChanged on chain change",r)}}updateNamespaceChain(t,e){if(!this.namespaces)return;const s=this.namespaces[t]?t:`${t}:${e}`,n={chains:[],methods:[],events:[],defaultChain:e};this.namespaces[s]?this.namespaces[s]&&(this.namespaces[s].defaultChain=e):this.namespaces[s]=n}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(t,e){var s;const n=((s=this.session)==null?void 0:s.topic)||"";await this.client.core.storage.setItem(`${x}/${t}${n}`,e)}async getFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";return await this.client.core.storage.getItem(`${x}/${t}${s}`)}async deleteFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";await this.client.core.storage.removeItem(`${x}/${t}${s}`)}async cleanupStorage(){var t;try{if(((t=this.client)==null?void 0:t.session.length)>0)return;const e=await this.client.core.storage.getKeys();for(const s of e)s.startsWith(x)&&await this.client.core.storage.removeItem(s)}catch(e){this.logger.warn("Failed to cleanup storage",e)}}}const rs=nt;export{rs as UniversalProvider,nt as default};
|
package/assets/{localBatchGatewayRequest-BLJAP4fw.js → localBatchGatewayRequest-DVz1EzYT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{av as f}from"./NetworkUtil-
|
|
1
|
+
import{av as f}from"./NetworkUtil-DDES604E.js";import{a$ as l,aN as p,bn as w,o as y,an as A,aH as g,h as m,g as F,ax as E,am as N,m as h,n as P,O as R,bo as I}from"./sendRawTransaction-YUhe5FDd.js";function x(n){const{abi:r,data:e}=n,a=l(e,0,4),t=r.find(o=>o.type==="function"&&a===p(w(o)));if(!t)throw new y(a,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?A(t.inputs,l(e,4)):void 0}}const u="/docs/contract/encodeErrorResult";function b(n){const{abi:r,errorName:e,args:a}=n;let t=r[0];if(e){const c=g({abi:r,args:a,name:e});if(!c)throw new m(e,{docsPath:u});t=c}if(t.type!=="error")throw new m(void 0,{docsPath:u});const o=w(t),s=p(o);let i="0x";if(a&&a.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=E(t.inputs,a)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function H(n){const{abi:r,functionName:e,result:a}=n;let t=r[0];if(e){const s=g({abi:r,name:e});if(!s)throw new h(e,{docsPath:d});t=s}if(t.type!=="function")throw new h(void 0,{docsPath:d});if(!t.outputs)throw new P(t.name,{docsPath:d});const o=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[a];if(Array.isArray(a))return a;throw new R(a)})();return E(t.outputs,o)}const q="x-batch-gateway:true";async function v(n){const{data:r,ccipRequest:e}=n,{args:[a]}=x({abi:f,data:r}),t=[],o=[];return await Promise.all(a.map(async(s,i)=>{try{o[i]=s.urls.includes(q)?await v({data:s.data,ccipRequest:e}):await e(s),t[i]=!1}catch(c){t[i]=!0,o[i]=G(c)}})),H({abi:f,functionName:"query",result:[t,o]})}function G(n){return n.name==="HttpRequestError"&&n.status?b({abi:f,errorName:"HttpError",args:[n.status,n.shortMessage]}):b({abi:[I],errorName:"Error",args:["shortMessage"in n?n.shortMessage:n.message]})}export{H as a,v as b,x as d,b as e,q as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as i}from"./index-
|
|
1
|
+
import{h as i}from"./index-CI_HQD35.js";import{g as l,C as f}from"./index-DA60UT_n.js";import{J as w,C as c}from"./ethers-JeCAM1sd.js";const u=10n**17n;async function W(t=i.chainId){const a=l(f.OffChainMarketplaceV2,t),n=new w(i.rpcUrl),s=await new c(a.address,["function manaUsdAggregator() view returns (address)"],n).manaUsdAggregator(),r=new c(s,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],n),m=await r.decimals(),g=await r.latestRoundData(),o=BigInt(g[1].toString());if(o<=0n)throw new Error("mana rate unavailable");return{rate:o,decimals:Number(m)}}function d(t,{rate:a,decimals:n}){return BigInt(t)*a/10n**BigInt(n)}function U(t,a){let n;try{n=d(t,a)}catch{return null}const e=n/u,s=n%u>0n?e+1n:e,r=Number(s);return r<1?1:r}function v(t,a){let n;try{n=d(t,a)}catch{return 0}const e=10n**16n,s=n/e,r=n%e>0n?s+1n:s;return Number(r)}export{v as a,U as m,W as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./ethers-
|
|
1
|
+
import{g as e}from"./ethers-JeCAM1sd.js";function t(){if(typeof WebSocket<"u")return WebSocket;if(typeof e.WebSocket<"u")return e.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const o=t(),r=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:o},Symbol.toStringTag,{value:"Module"}));export{r as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as r}from"./index-CI_HQD35.js";var e=r();export{e as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aw as S}from"./NetworkUtil-Ddexw9-U.js";import{a as w,b as C,c as N,d as z,e as M,f as E,g as q,h as B,i as D,j as L,k as P,l as A,m as U,n as V,o as I,p as O,q as R,r as G,s as H,t as Z,u as K,v as X,w as Y,x as J,y as F,z as W,A as Q,B as _,C as $,D as aa,E as sa,F as ea,G as ta,H as na,I as ia,J as oa,K as ra,L as la,M as ca,N as ha,O as pa,P as da,Q as ma,R as Ta,S as ua,T as ba,U as ka,V as fa,W as ga,X as ya,Y as ja,Z as va,_ as Sa,$ as xa,a0 as wa,a1 as Ca,a2 as Na,a3 as za,a4 as Ma,a5 as Ea,a6 as qa,a7 as Ba,a8 as Da,a9 as La,aa as Pa,ab as Aa,ac as Ua,ad as Va,ae as Ia,af as Oa,ag as Ra,ah as Ga,ai as Ha,aj as Za,ak as Ka,al as Xa,am as Ya,an as Ja,ao as Fa,ap as Wa,aq as Qa,ar as _a,as as $a,at as as,au as ss,av as es,aw as ts,ax as ns,ay as is,az as os,aA as rs,aB as ls,aC as cs,aD as hs,aE as ps,aF as ds,aG as ms,aH as Ts,aI as us,aJ as bs,aK as ks,aL as fs,aM as gs,aN as ys,aO as js,aP as vs,aQ as Ss,aR as xs,aS as ws,aT as Cs,aU as Ns,aV as zs,aW as Ms,aX as Es,aY as qs,aZ as Bs,a_ as Ds,a$ as Ls,b0 as Ps,b1 as As,b2 as Us,b3 as Vs,b4 as Is,b5 as Os,b6 as Rs,b7 as Gs,b8 as Hs,b9 as Zs,ba as Ks,bb as Xs,bc as Ys,bd as Js,be as Fs,bf as Ws,bg as Qs,bh as _s,bi as $s,bj as ae,bk as se,bl as ee,bm as te,bn as ne,bo as ie,bp as oe,bq as re,br as le,bs as ce,bt as he,bu as pe,bv as de,bw as me,bx as Te,by as ue,bz as be,bA as ke,bB as fe,bC as ge,bD as ye,bE as je,bF as ve,bG as Se,bH as xe,bI as we,bJ as Ce,bK as Ne,bL as ze,bM as Me,bN as Ee,bO as qe,bP as Be,bQ as De,bR as Le,bS as Pe,bT as Ae,bU as Ue,bV as Ve,bW as Ie,bX as Oe,bY as Re,bZ as Ge,b_ as He,b$ as Ze,c0 as Ke,c1 as Xe,c2 as Ye,c3 as Je,c4 as Fe,c5 as We,c6 as Qe,c7 as _e,c8 as $e,c9 as at,ca as st,cb as et,cc as tt,cd as nt,ce as it,cf as ot,cg as rt,ch as lt,ci as ct,cj as ht,ck as pt,cl as dt,cm as mt,cn as Tt,co as ut,cp as bt,cq as kt,cr as ft,cs as gt,ct as yt,cu as jt,cv as vt,cw as St,cx as xt,cy as wt,cz as Ct,cA as Nt,cB as zt,cC as Mt,cD as Et,cE as qt,cF as Bt,cG as Dt,cH as Lt,cI as Pt,cJ as At,cK as Ut,cL as Vt,cM as It,cN as Ot,cO as Rt,cP as Gt,cQ as Ht,cR as Zt,cS as Kt,cT as Xt,cU as Yt,cV as Jt,cW as Ft,cX as Wt,cY as Qt,cZ as _t,c_ as $t,c$ as an,d0 as sn,d1 as en,d2 as tn,d3 as nn,d4 as on,d5 as rn,d6 as ln,d7 as cn,d8 as hn,d9 as pn,da as dn,db as mn,dc as Tn,dd as un,de as bn,df as kn,dg as fn,dh as gn,di as yn,dj as jn,dk as vn,dl as Sn,dm as xn,dn as wn,dp as Cn,dq as Nn,dr as zn,ds as Mn,dt as En,du as qn,dv as Bn,dw as Dn,dx as Ln,dy as Pn,dy as An,dz as Un,dA as Vn,dB as In,dC as On,dD as Rn,dE as Gn,dF as Hn,dG as Zn,dH as Kn,dI as Xn,dJ as Yn,dK as Jn,dL as Fn,dM as Wn,dN as Qn,dO as _n,dP as $n,dQ as ai,dR as si,dS as ei,dT as ti,dU as ni,dV as ii,dW as oi,dX as ri,dY as li,dZ as ci,d_ as hi,d$ as pi,e0 as di,e1 as mi,e2 as Ti,e3 as ui,e4 as bi,e5 as ki,e6 as fi,e7 as gi,e8 as yi,e9 as ji,ea as vi,eb as Si,ec as xi,ed as wi,ee as Ci,ef as Ni,eg as zi,eh as Mi,ei as Ei,ej as qi,ek as Bi,el as Di,em as Li,en as Pi,eo as Ai,ep as Ui,eq as Vi,er as Ii,es as Oi,et as Ri,eu as Gi,ev as Hi,ew as Zi,ex as Ki,ey as Xi,ez as Yi,eA as Ji,eB as Fi,eC as Wi,eD as Qi,eE as _i,eF as $i,eG as ao,eH as so,eI as eo,eJ as to,eK as no,eL as io,eM as oo,eN as ro,eO as lo,eP as co,eQ as ho,eR as po,eS as mo,eT as To,eU as uo,eV as bo,eW as ko,eX as fo,eY as go,eZ as yo,e_ as jo,e$ as vo,f0 as So,f1 as xo,f2 as wo,f3 as Co,f4 as No,f5 as zo,f6 as Mo,f7 as Eo,f8 as qo,f9 as Bo,fa as Do,fb as Lo,fc as Po,fd as Ao,fe as Uo,ff as Vo,fg as Io,fh as Oo,fi as Ro,fj as Go,fk as Ho,fl as Zo,fm as Ko,fn as Xo,fo as Yo,fp as Jo,fq as Fo,fr as Wo,fs as Qo,ft as _o,fu as $o,fv as ar,fw as sr,fx as er,fy as tr,fz as nr,fA as ir,fB as or,fC as rr,fD as lr,fE as cr,fF as hr,fG as pr,fH as dr,fI as mr,fJ as Tr,fK as ur,fL as br,fM as kr,fN as fr,fO as gr,fP as yr,fQ as jr,fR as vr,fS as Sr,fT as xr,fU as wr,fV as Cr,fW as Nr,fX as zr,fY as Mr,fZ as Er,f_ as qr,f$ as Br,g0 as Dr,g1 as Lr,g2 as Pr,g3 as Ar,g4 as Ur,g5 as Vr,g6 as Ir,g7 as Or,g8 as Rr,g9 as Gr,ga as Hr,gb as Zr,gc as Kr,gd as Xr,ge as Yr,gf as Jr,gg as Fr,gh as Wr,gi as Qr,gj as _r,gk as $r,gl as al,gm as sl,gn as el,go as tl,gp as nl,gq as il,gr as ol,gs as rl,gt as ll,gu as cl,gv as hl,gw as pl,gx as dl,gy as ml,gz as Tl,gA as ul,gB as bl,gC as kl,gD as fl,gE as gl,gF as yl,gG as jl,gH as vl,gI as Sl,gJ as xl,gK as wl,gL as Cl,gM as Nl,gN as zl,gO as Ml,gP as El,gQ as ql,gR as Bl,gS as Dl,gT as Ll,gU as Pl,gV as Al,gW as Ul,gX as Vl,gY as Il,gZ as Ol,g_ as Rl,g$ as Gl,h0 as Hl,h1 as Zl,h2 as Kl,h3 as Xl,h4 as Yl,h5 as Jl,h6 as Fl,h7 as Wl,h8 as Ql,h9 as _l,ha as $l,hb as ac,hc as sc,hd as ec,he as tc,hf as nc,hg as ic,hh as oc,hi as rc,hj as lc,hk as cc,hl as hc,hm as pc,hn as dc,ho as mc,hp as Tc,hq as uc,hr as bc,hs as kc,ht as fc,hu as gc,hv as yc,hw as jc,hx as vc,hy as Sc,hz as xc,hA as wc,hB as Cc,hC as Nc,hD as zc,hE as Mc,hF as Ec,hG as qc,hH as Bc,hI as Dc,hJ as Lc,hK as Pc,hL as Ac,hM as Uc,hN as Vc,hO as Ic,hP as Oc,hQ as Rc,hR as Gc,hS as Hc,hT as Zc,hU as Kc,hV as Xc,hW as Yc,hX as Jc,hY as Fc,hZ as Wc,h_ as Qc,h$ as _c,i0 as $c,i1 as ah,i2 as sh,i3 as eh,i4 as th,i5 as nh,i6 as ih,i7 as oh,i8 as rh,i9 as lh,ia as ch,ib as hh,ib as ph,ic as dh,id as mh,ie as Th,ig as uh,ih as bh,ii as kh,ij as fh,ik as gh,il as yh,im as jh,io as vh,ip as Sh,iq as xh,ir as wh,is as Ch,it as Nh,iu as zh,iv as Mh,iw as Eh,ix as qh,iy as Bh,iz as Dh,iA as Lh,iB as Ph,iC as Ah,iD as Uh,iE as Vh,iF as Ih,iG as Oh,iH as Rh,iI as Gh,iJ as Hh,iK as Zh,iL as Kh,iM as Xh,iN as Yh,iO as Jh,iM as Fh,iP as Wh,iP as Qh,iQ as _h,iR as $h,iS as ap,iT as sp,iU as ep,iV as tp,iW as np,iX as ip,iY as op,iZ as rp,i_ as lp,i$ as cp,j0 as hp,j1 as pp,j2 as dp,j3 as mp,j4 as Tp,j5 as up,j6 as bp,j7 as kp,j8 as fp,j9 as gp,ja as yp,jb as jp,jc as vp,jd as Sp,je as xp,jf as wp,jg as Cp,jh as Np,ji as zp,jj as Mp,jk as Ep,jl as qp,jm as Bp,jn as Dp,jo as Lp,jp as Pp,jq as Ap,jr as Up,js as Vp,jt as Ip,ju as Op,jv as Rp,jw as Gp,jx as Hp,jy as Zp,jz as Kp,jA as Xp,jB as Yp,jC as Jp,jD as Fp,jC as Wp,jE as Qp,jF as _p,jG as $p,jH as ad,jI as sd,jJ as ed,jK as td,jL as nd,jM as id,jN as od,jO as rd,jP as ld,jQ as cd,jR as hd,jS as pd,jT as dd,jU as md,jV as Td,jW as ud,jX as bd,jY as kd,jZ as fd,j_ as gd,j$ as yd,k0 as jd,k1 as vd,k2 as Sd,k3 as xd,k4 as wd,k5 as Cd,k6 as Nd,k7 as zd,k8 as Md,k9 as Ed,ka as qd,kb as Bd,kc as Dd,kd as Ld,ke as Pd,kf as Ad,kg as Ud,kb as Vd,kc as Id,kh as Od,ki as Rd,kj as Gd,kd as Hd,ke as Zd,kk as Kd,kl as Xd,km as Yd}from"./zoraTestnet-CduWQC79.js";import"./ethers-DHDSyreX.js";import"./react-Vu6nbGi5.js";import"./verifyHash-BVbpPoSf.js";import"./sendRawTransaction-DT-ObNx8.js";import"./index-C7-iTfFV.js";import"./secp256k1-DFslM7tB.js";import"./serializeTransaction-DawhfTu0.js";import"./writeContract-C3IzBPhR.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const h=a({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}),p=a({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"}),d=a({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"}),m=a({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}}),T=a({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),u=a({id:"00000008819873e925422c1ff0f99f7c",caipNetworkId:"bip122:00000008819873e925422c1ff0f99f7c",chainNamespace:"bip122",name:"Bitcoin Signet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),b=a({id:"-239",name:"TON",network:"ton-mainnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://tonscan.org"}},testnet:!1,chainNamespace:"ton",caipNetworkId:"ton:-239"}),k=a({id:"-3",name:"TON Testnet",network:"ton-testnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://testnet.tonscan.org"}},testnet:!0,chainNamespace:"ton",caipNetworkId:"ton:-3"}),f=a({id:"0x2b6653dc",name:"TRON",network:"tron-mainnet",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org"}},testnet:!1,chainNamespace:"tron",caipNetworkId:"tron:0x2b6653dc"}),g=a({id:"0x94a9059e",name:"TRON Shasta",network:"tron-shasta",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.shasta.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0x94a9059e"}),y=a({id:"0xcd8690dc",name:"TRON Nile",network:"tron-nile",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://nile.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0xcd8690dc"});export{S as AVAILABLE_NAMESPACES,w as abey,C as abstract,N as abstractTestnet,z as acala,M as acria,E as adf,q as adi,B as agungTestnet,D as aioz,L as alephZero,P as alephZeroTestnet,A as alienx,U as alienxHalTestnet,V as alpenTestnet,I as ancient8,O as ancient8Sepolia,R as anvil,G as apeChain,H as apexTestnet,Z as apollo,K as arbitrum,X as arbitrumGoerli,Y as arbitrumNova,J as arbitrumSepolia,F as arc,W as arcTestnet,Q as arenaz,_ as areonNetwork,$ as areonNetworkTestnet,aa as areum,sa as artelaTestnet,ea as arthera,ta as artheraTestnet,na as assetChain,ia as assetChainTestnet,oa as astar,ra as astarZkEVM,la as astarZkyoto,ca as atletaOlympia,ha as aurora,pa as auroraTestnet,da as auroria,ma as autheoTestnet,Ta as avalanche,ua as avalancheFuji,ba as b3,ka as b3Sepolia,fa as bahamut,ga as base,ya as baseGoerli,ja as basePreconf,va as baseSepolia,Sa as baseSepoliaPreconf,xa as basecampTestnet,wa as battlechain,Ca as battlechainTestnet,Na as beam,za as beamTestnet,Ma as bearNetworkChainMainnet,Ea as bearNetworkChainTestnet,qa as berachain,Ba as berachainBepolia,Da as berachainTestnet,La as berachainTestnetbArtio,Pa as bevmMainnet,Aa as bifrost,Ua as birdlayer,Va as bitTorrent,Ia as bitTorrentTestnet,m as bitcoin,u as bitcoinSignet,T as bitcoinTestnet,Oa as bitgert,Ra as bitkub,Ga as bitkubTestnet,Ha as bitlayer,Za as bitlayerTestnet,Ka as bitrock,Xa as blast,Ya as blastSepolia,Ja as bob,Fa as bobSepolia,Wa as boba,Qa as bobaSepolia,_a as boolBetaMainnet,$a as botanix,as as botanixTestnet,ss as bounceBit,es as bounceBitTestnet,ts as bronos,ns as bronosTestnet,is as bsc,os as bscGreenfield,rs as bscTestnet,ls as bsquared,cs as bsquaredTestnet,hs as btr,ps as btrTestnet,ds as bxn,ms as bxnTestnet,Ts as cannon,us as canto,bs as celo,ks as celoAlfajores,fs as celoSepolia,gs as chang,ys as chiliz,js as chips,vs as citrate,Ss as citrea,xs as citreaTestnet,ws as classic,Cs as codex,Ns as codexTestnet,zs as coinbit,Ms as coinex,Es as confluxESpace,qs as confluxESpaceTestnet,Bs as coreDao,Ds as coreTestnet1,Ls as coreTestnet2,Ps as corn,As as cornTestnet,Us as cpchain,Vs as crab,Is as creatorTestnet,Os as creditCoin3Devnet,Rs as creditCoin3Mainnet,Gs as creditCoin3Testnet,Hs as cronos,Zs as cronosTestnet,Ks as cronoszkEVM,Xs as cronoszkEVMTestnet,Ys as crossbell,Js as crossfi,Fs as curtis,Ws as cyber,Qs as cyberTestnet,_s as dailyNetwork,$s as dailyNetworkTestnet,ae as darwinia,se as datahavenTestnet,ee as dbkchain,te as dchain,ne as dchainTestnet,ie as defichainEvm,oe as defichainEvmTestnet,a as defineChain,re as degen,le as dfk,ce as diode,he as disChain,pe as dodochainTestnet,de as dogechain,me as domaTestnet,Te as donatuz,ue as dosChain,be as dosChainTestnet,ke as dreyerxMainnet,fe as dreyerxTestnet,ge as dustboyIoT,ye as dymension,je as eden,ve as edexa,Se as edexaTestnet,xe as edgeless,we as edgelessTestnet,Ce as edgeware,Ne as edgewareTestnet,ze as eduChain,Me as eduChainTestnet,Ee as elastos,qe as elastosTestnet,Be as electroneum,De as electroneumTestnet,Le as elysiumTestnet,Pe as energy,Ae as eni,Ue as eniTestnet,Ve as enuls,Ie as eon,Oe as eos,Re as eosTestnet,Ge as eteria,He as etherlink,Ze as etherlinkShadownetTestnet,Ke as etherlinkTestnet,Xe as ethernity,Ye as etp,Je as evmos,Fe as evmosTestnet,We as excelonMainnet,Qe as expanse,_e as exsat,$e as exsatTestnet,at as fantom,st as fantomSonicTestnet,et as fantomTestnet,tt as fibo,nt as filecoin,it as filecoinCalibration,ot as filecoinHyperspace,rt as fireChain,lt as flame,ct as flare,ht as flareTestnet,pt as flowMainnet,dt as flowPreviewnet,mt as flowTestnet,Tt as fluence,ut as fluenceStage,bt as fluenceTestnet,kt as fluent,ft as fluentDevnet,gt as fluentTestnet,yt as form,jt as formTestnet,vt as forma,St as formicarium,xt as forta,wt as foundry,Ct as fraxtal,Nt as fraxtalTestnet,zt as funkiMainnet,Mt as funkiSepolia,Et as fuse,qt as fuseSparknet,Bt as fusion,Dt as fusionTestnet,Lt as garnet,Pt as gatechain,At as geist,Ut as genesys,Vt as gensyn,It as giwaSepolia,Ot as giwaSepoliaPreconf,Rt as glideL1Protocol,Gt as glideL2Protocol,Ht as gnosis,Zt as gnosisChiado,Kt as goChain,Xt as goat,Yt as gobi,Jt as godwoken,Ft as goerli,Wt as graphite,Qt as graphiteTestnet,_t as grav,$t as gravity,an as gunz,sn as guruNetwork,en as guruTestnet,tn as ham,nn as happychainTestnet,on as haqqMainnet,rn as haqqTestedge2,ln as hardhat,cn as harmonyOne,hn as hashkey,pn as hashkeyTestnet,dn as haustTestnet,mn as hedera,Tn as hederaPreviewnet,un as hederaTestnet,bn as hela,kn as heliosTestnet,fn as hemi,gn as hemiSepolia,yn as henesys,jn as holesky,vn as hoodi,Sn as horizenTestnet,xn as hpb,wn as hpp,Cn as hppSepolia,Nn as huddle01Mainnet,zn as huddle01Testnet,Mn as humanity,En as humanityTestnet,qn as humanode,Bn as humanodeTestnet5,Dn as hychain,Ln as hychainTestnet,Pn as hyperEvm,An as hyperliquid,Un as hyperliquidEvmTestnet,Vn as iSunCoin,In as icbNetwork,On as idchain,Rn as igra,Gn as immutableZkEvm,Hn as immutableZkEvmTestnet,Zn as inEVM,Kn as initVerse,Xn as initVerseGenesis,Yn as injective,Jn as injectiveTestnet,Fn as ink,Wn as inkSepolia,Qn as iota,_n as iotaTestnet,$n as iotex,ai as iotexTestnet,si as jasmyChain,ei as jasmyChainTestnet,ti as jbc,ni as jbcTestnet,ii as jocMainnet,oi as jocTestnet,ri as jovay,li as jovaySepolia,ci as juneo,hi as juneoBCH1Chain,pi as juneoDAI1Chain,di as juneoDOGE1Chain,mi as juneoEUR1Chain,Ti as juneoGLD1Chain,ui as juneoLINK1Chain,bi as juneoLTC1Chain,ki as juneoSGD1Chain,fi as juneoSocotraTestnet,gi as juneoUSD1Chain,yi as juneoUSDT1Chain,ji as juneomBTC1Chain,vi as kaia,Si as kairos,xi as kakarotSepolia,wi as kakarotStarknetSepolia,Ci as kardiaChain,Ni as karura,zi as katana,Mi as kava,Ei as kavaTestnet,qi as kcc,Bi as kii,Di as kiiTestnetOro,Li as kinto,Pi as klaytn,Ai as klaytnBaobab,Ui as koi,Vi as kroma,Ii as kromaSepolia,Oi as krown,Ri as l3x,Gi as l3xTestnet,Hi as ladyChain,Zi as lavita,Ki as lens,Xi as lensTestnet,Yi as lestnet,Ji as lightlinkPegasus,Fi as lightlinkPhoenix,Wi as linea,Qi as lineaGoerli,_i as lineaSepolia,$i as lineaTestnet,ao as lisk,so as liskSepolia,eo as loadAlphanet,to as localhost,no as loop,io as lukso,oo as luksoTestnet,ro as lumiaMainnet,lo as lumiaTestnet,co as lumoz,ho as lumozTestnet,po as luxeports,mo as lycan,To as lyra,uo as mainnet,bo as mandala,ko as manta,fo as mantaSepoliaTestnet,go as mantaTestnet,yo as mantle,jo as mantleSepoliaTestnet,vo as mantleTestnet,So as mantraDuKongEVMTestnet,xo as mantraEVM,wo as mapProtocol,Co as marooTestnet,No as matchain,zo as matchainTestnet,Mo as mchVerse,Eo as megaeth,qo as megaethTestnet,Bo as mekong,Do as meld,Lo as memecore,Po as merlin,Ao as merlinErigonTestnet,Uo as metachain,Vo as metachainIstanbul,Io as metadium,Oo as metalL2,Ro as meter,Go as meterTestnet,Ho as metis,Zo as metisGoerli,Ko as metisSepolia,Xo as mev,Yo as mevTestnet,Jo as mezo,Fo as mezoTestnet,Wo as mint,Qo as mintSepoliaTestnet,_o as mitosisTestnet,$o as mizuhikiTestnetAwaji,ar as mode,sr as modeTestnet,er as monad,tr as monadTestnet,nr as moonbaseAlpha,ir as moonbeam,or as moonbeamDev,rr as moonriver,lr as morph,cr as morphHolesky,hr as morphSepolia,pr as nahmii,dr as nautilus,mr as near,Tr as nearTestnet,ur as neonDevnet,br as neonMainnet,kr as neoxMainnet,fr as neoxT4,gr as newton,yr as nexi,jr as nexilix,vr as nibiru,Sr as nitrographTestnet,xr as nomina,wr as oasisTestnet,Cr as oasys,Nr as odysseyTestnet,zr as okc,Mr as omax,Er as omni,qr as omniOmega,Br as oneWorld,Dr as oortMainnetDev,Lr as opBNB,Pr as opBNBTestnet,Ar as openledger,Ur as optimism,Vr as optimismGoerli,Ir as optimismSepolia,Or as optopia,Rr as optopiaTestnet,Gr as orderly,Hr as orderlySepolia,Zr as otimDevnet,Kr as palm,Xr as palmTestnet,Yr as paseoPassetHub,Jr as peaq,Fr as pgn,Wr as pgnTestnet,Qr as phoenix,_r as planq,$r as plasma,al as plasmaDevnet,sl as plasmaTestnet,el as playfiAlbireo,tl as plinga,nl as plume,il as plumeDevnet,ol as plumeMainnet,rl as plumeSepolia,ll as plumeTestnet,cl as polterTestnet,hl as polygon,pl as polygonAmoy,dl as polygonMumbai,ml as polygonZkEvm,Tl as polygonZkEvmCardona,ul as polygonZkEvmTestnet,bl as polynomial,kl as polynomialSepolia,fl as potos,gl as potosTestnet,yl as premiumBlockTestnet,jl as pulsechain,vl as pulsechainV4,Sl as pumpfiTestnet,xl as pyrope,wl as qMainnet,Cl as qTestnet,Nl as ql1,zl as quai,Ml as quaiTestnet,El as radius,ql as radiusTestnet,Bl as reactiveTestnet,Dl as real,Ll as redbellyMainnet,Pl as redbellyTestnet,Al as reddio,Ul as reddioSepolia,Vl as redstone,Il as rei,Ol as reyaNetwork,Rl as rise,Gl as riseTestnet,Hl as rivalz,Zl as rollux,Kl as rolluxTestnet,Xl as ronin,Yl as root,Jl as rootPorcini,Fl as rootstock,Wl as rootstockTestnet,Ql as rss3,_l as rss3Sepolia,$l as saakuru,ac as saga,sc as saigon,ec as sanko,tc as sapphire,nc as sapphireTestnet,ic as satoshiVM,oc as satoshiVMTestnet,rc as scroll,lc as scrollSepolia,cc as sei,hc as seiTestnet,pc as seismicDevnet,dc as sentrix,mc as sentrixTestnet,Tc as sepolia,uc as shape,bc as shapeSepolia,kc as shardeum,fc as shardeumSphinx,gc as shibarium,yc as shibariumTestnet,jc as shiden,vc as shimmer,Sc as shimmerTestnet,xc as sidraChain,wc as silentData,Cc as silicon,Nc as siliconSepolia,zc as sixProtocol,Mc as skaleBase,Ec as skaleBaseSepoliaTestnet,qc as skaleBlockBrawlers,Bc as skaleCalypso,Dc as skaleCalypsoTestnet,Lc as skaleCryptoBlades,Pc as skaleCryptoColosseum,Ac as skaleEuropa,Uc as skaleEuropaTestnet,Vc as skaleExorde,Ic as skaleHumanProtocol,Oc as skaleNebula,Rc as skaleNebulaTestnet,Gc as skaleRazor,Hc as skaleTitan,Zc as skaleTitanTestnet,Kc as sketchpad,Xc as snax,Yc as snaxTestnet,h as solana,p as solanaDevnet,d as solanaTestnet,Jc as somnia,Fc as somniaTestnet,Wc as soneium,Qc as soneiumMinato,_c as songbird,$c as songbirdTestnet,ah as sonic,sh as sonicBlazeTestnet,eh as sonicTestnet,th as sophon,nh as sophonTestnet,ih as sova,oh as sovaSepolia,rh as spicy,lh as stable,ch as stableTestnet,hh as statusNetworkSepolia,ph as statusSepolia,dh as step,mh as story,Th as storyAeneid,uh as storyOdyssey,bh as storyTestnet,kh as stratis,fh as subtensorEvm,gh as superlumio,yh as superposition,jh as superseed,vh as superseedSepolia,Sh as surgeTestnet,xh as swan,wh as swanProximaTestnet,Ch as swanSaturnTestnet,Nh as swellchain,zh as swellchainTestnet,Mh as swissdlt,Eh as syscoin,qh as syscoinTestnet,Bh as tac,Dh as tacSPB,Lh as taiko,Ph as taikoHekla,Ah as taikoHoodi,Uh as taikoJolnir,Vh as taikoKatla,Ih as taikoTestnetSepolia,Oh as taraxa,Rh as taraxaTestnet,Gh as teaSepolia,Hh as telcoinTestnet,Zh as telos,Kh as telosTestnet,Xh as tempo,Yh as tempoDevnet,Jh as tempoLocalnet,Fh as tempoMainnet,Wh as tempoModerato,Qh as tempoTestnet,_h as tenet,$h as ternoa,ap as thaiChain,sp as that,ep as theta,tp as thetaTestnet,np as thunderCore,ip as thunderTestnet,op as tiktrixTestnet,rp as tomb,b as ton,k as tonTestnet,lp as treasure,cp as treasureTopaz,hp as tron,f as tronMainnet,pp as tronNile,y as tronNileTestnet,dp as tronShasta,g as tronShastaTestnet,mp as ubiq,Tp as ultra,up as ultraTestnet,bp as ultron,kp as ultronTestnet,fp as unichain,gp as unichainSepolia,yp as unique,jp as uniqueOpal,vp as uniqueQuartz,Sp as unreal,xp as valygoNft,wp as valygoSmartchain,Cp as vana,Np as vanaMoksha,zp as vanar,Mp as vechain,Ep as velas,qp as viction,Bp as victionTestnet,Dp as vision,Lp as visionTestnet,Pp as wanchain,Ap as wanchainTestnet,Up as weaveVMAlphanet,Vp as wemix,Ip as wemixTestnet,Op as westendAssetHub,Rp as whitechain,Gp as whitechainSepolia,Hp as whitechainTestnet,Zp as wmcTestnet,Kp as worldLand,Xp as worldchain,Yp as worldchainSepolia,Jp as x1Testnet,Fp as xLayer,Wp as xLayerTestnet,Qp as xai,_p as xaiTestnet,$p as xdc,ad as xdcTestnet,sd as xgr,ed as xoneMainnet,td as xoneTestnet,nd as xphereMainnet,id as xphereTestnet,od as xpla,rd as xrOne,ld as xrSepolia,cd as xrplevm,hd as xrplevmDevnet,pd as xrplevmTestnet,dd as yooldoVerse,md as yooldoVerseTestnet,Td as zenchainTestnet,ud as zeniq,bd as zeroG,kd as zeroGGalileoTestnet,fd as zeroGMainnet,gd as zeroGTestnet,yd as zeroNetwork,jd as zetachain,vd as zetachainAthensTestnet,Sd as zhejiang,xd as zilliqa,wd as zilliqaTestnet,Cd as zircuit,Nd as zircuitGarfieldTestnet,zd as zkFair,Md as zkFairTestnet,Ed as zkLinkNova,qd as zkLinkNovaSepoliaTestnet,Bd as zkSync,Dd as zkSyncInMemoryNode,Ld as zkSyncLocalNode,Pd as zkSyncSepoliaTestnet,Ad as zkXPLA,Ud as zkXPLATestnet,Vd as zksync,Id as zksyncInMemoryNode,Od as zksyncLocalCustomHyperchain,Rd as zksyncLocalHyperchain,Gd as zksyncLocalHyperchainL1,Hd as zksyncLocalNode,Zd as zksyncSepoliaTestnet,Kd as zora,Xd as zoraSepolia,Yd as zoraTestnet};
|
|
1
|
+
import{aw as S}from"./NetworkUtil-DDES604E.js";import{a as w,b as C,c as N,d as z,e as M,f as E,g as q,h as B,i as D,j as L,k as P,l as A,m as U,n as V,o as I,p as O,q as R,r as G,s as H,t as Z,u as K,v as X,w as Y,x as J,y as F,z as W,A as Q,B as _,C as $,D as aa,E as sa,F as ea,G as ta,H as na,I as ia,J as oa,K as ra,L as la,M as ca,N as ha,O as pa,P as da,Q as ma,R as Ta,S as ua,T as ba,U as ka,V as fa,W as ga,X as ya,Y as ja,Z as va,_ as Sa,$ as xa,a0 as wa,a1 as Ca,a2 as Na,a3 as za,a4 as Ma,a5 as Ea,a6 as qa,a7 as Ba,a8 as Da,a9 as La,aa as Pa,ab as Aa,ac as Ua,ad as Va,ae as Ia,af as Oa,ag as Ra,ah as Ga,ai as Ha,aj as Za,ak as Ka,al as Xa,am as Ya,an as Ja,ao as Fa,ap as Wa,aq as Qa,ar as _a,as as $a,at as as,au as ss,av as es,aw as ts,ax as ns,ay as is,az as os,aA as rs,aB as ls,aC as cs,aD as hs,aE as ps,aF as ds,aG as ms,aH as Ts,aI as us,aJ as bs,aK as ks,aL as fs,aM as gs,aN as ys,aO as js,aP as vs,aQ as Ss,aR as xs,aS as ws,aT as Cs,aU as Ns,aV as zs,aW as Ms,aX as Es,aY as qs,aZ as Bs,a_ as Ds,a$ as Ls,b0 as Ps,b1 as As,b2 as Us,b3 as Vs,b4 as Is,b5 as Os,b6 as Rs,b7 as Gs,b8 as Hs,b9 as Zs,ba as Ks,bb as Xs,bc as Ys,bd as Js,be as Fs,bf as Ws,bg as Qs,bh as _s,bi as $s,bj as ae,bk as se,bl as ee,bm as te,bn as ne,bo as ie,bp as oe,bq as re,br as le,bs as ce,bt as he,bu as pe,bv as de,bw as me,bx as Te,by as ue,bz as be,bA as ke,bB as fe,bC as ge,bD as ye,bE as je,bF as ve,bG as Se,bH as xe,bI as we,bJ as Ce,bK as Ne,bL as ze,bM as Me,bN as Ee,bO as qe,bP as Be,bQ as De,bR as Le,bS as Pe,bT as Ae,bU as Ue,bV as Ve,bW as Ie,bX as Oe,bY as Re,bZ as Ge,b_ as He,b$ as Ze,c0 as Ke,c1 as Xe,c2 as Ye,c3 as Je,c4 as Fe,c5 as We,c6 as Qe,c7 as _e,c8 as $e,c9 as at,ca as st,cb as et,cc as tt,cd as nt,ce as it,cf as ot,cg as rt,ch as lt,ci as ct,cj as ht,ck as pt,cl as dt,cm as mt,cn as Tt,co as ut,cp as bt,cq as kt,cr as ft,cs as gt,ct as yt,cu as jt,cv as vt,cw as St,cx as xt,cy as wt,cz as Ct,cA as Nt,cB as zt,cC as Mt,cD as Et,cE as qt,cF as Bt,cG as Dt,cH as Lt,cI as Pt,cJ as At,cK as Ut,cL as Vt,cM as It,cN as Ot,cO as Rt,cP as Gt,cQ as Ht,cR as Zt,cS as Kt,cT as Xt,cU as Yt,cV as Jt,cW as Ft,cX as Wt,cY as Qt,cZ as _t,c_ as $t,c$ as an,d0 as sn,d1 as en,d2 as tn,d3 as nn,d4 as on,d5 as rn,d6 as ln,d7 as cn,d8 as hn,d9 as pn,da as dn,db as mn,dc as Tn,dd as un,de as bn,df as kn,dg as fn,dh as gn,di as yn,dj as jn,dk as vn,dl as Sn,dm as xn,dn as wn,dp as Cn,dq as Nn,dr as zn,ds as Mn,dt as En,du as qn,dv as Bn,dw as Dn,dx as Ln,dy as Pn,dy as An,dz as Un,dA as Vn,dB as In,dC as On,dD as Rn,dE as Gn,dF as Hn,dG as Zn,dH as Kn,dI as Xn,dJ as Yn,dK as Jn,dL as Fn,dM as Wn,dN as Qn,dO as _n,dP as $n,dQ as ai,dR as si,dS as ei,dT as ti,dU as ni,dV as ii,dW as oi,dX as ri,dY as li,dZ as ci,d_ as hi,d$ as pi,e0 as di,e1 as mi,e2 as Ti,e3 as ui,e4 as bi,e5 as ki,e6 as fi,e7 as gi,e8 as yi,e9 as ji,ea as vi,eb as Si,ec as xi,ed as wi,ee as Ci,ef as Ni,eg as zi,eh as Mi,ei as Ei,ej as qi,ek as Bi,el as Di,em as Li,en as Pi,eo as Ai,ep as Ui,eq as Vi,er as Ii,es as Oi,et as Ri,eu as Gi,ev as Hi,ew as Zi,ex as Ki,ey as Xi,ez as Yi,eA as Ji,eB as Fi,eC as Wi,eD as Qi,eE as _i,eF as $i,eG as ao,eH as so,eI as eo,eJ as to,eK as no,eL as io,eM as oo,eN as ro,eO as lo,eP as co,eQ as ho,eR as po,eS as mo,eT as To,eU as uo,eV as bo,eW as ko,eX as fo,eY as go,eZ as yo,e_ as jo,e$ as vo,f0 as So,f1 as xo,f2 as wo,f3 as Co,f4 as No,f5 as zo,f6 as Mo,f7 as Eo,f8 as qo,f9 as Bo,fa as Do,fb as Lo,fc as Po,fd as Ao,fe as Uo,ff as Vo,fg as Io,fh as Oo,fi as Ro,fj as Go,fk as Ho,fl as Zo,fm as Ko,fn as Xo,fo as Yo,fp as Jo,fq as Fo,fr as Wo,fs as Qo,ft as _o,fu as $o,fv as ar,fw as sr,fx as er,fy as tr,fz as nr,fA as ir,fB as or,fC as rr,fD as lr,fE as cr,fF as hr,fG as pr,fH as dr,fI as mr,fJ as Tr,fK as ur,fL as br,fM as kr,fN as fr,fO as gr,fP as yr,fQ as jr,fR as vr,fS as Sr,fT as xr,fU as wr,fV as Cr,fW as Nr,fX as zr,fY as Mr,fZ as Er,f_ as qr,f$ as Br,g0 as Dr,g1 as Lr,g2 as Pr,g3 as Ar,g4 as Ur,g5 as Vr,g6 as Ir,g7 as Or,g8 as Rr,g9 as Gr,ga as Hr,gb as Zr,gc as Kr,gd as Xr,ge as Yr,gf as Jr,gg as Fr,gh as Wr,gi as Qr,gj as _r,gk as $r,gl as al,gm as sl,gn as el,go as tl,gp as nl,gq as il,gr as ol,gs as rl,gt as ll,gu as cl,gv as hl,gw as pl,gx as dl,gy as ml,gz as Tl,gA as ul,gB as bl,gC as kl,gD as fl,gE as gl,gF as yl,gG as jl,gH as vl,gI as Sl,gJ as xl,gK as wl,gL as Cl,gM as Nl,gN as zl,gO as Ml,gP as El,gQ as ql,gR as Bl,gS as Dl,gT as Ll,gU as Pl,gV as Al,gW as Ul,gX as Vl,gY as Il,gZ as Ol,g_ as Rl,g$ as Gl,h0 as Hl,h1 as Zl,h2 as Kl,h3 as Xl,h4 as Yl,h5 as Jl,h6 as Fl,h7 as Wl,h8 as Ql,h9 as _l,ha as $l,hb as ac,hc as sc,hd as ec,he as tc,hf as nc,hg as ic,hh as oc,hi as rc,hj as lc,hk as cc,hl as hc,hm as pc,hn as dc,ho as mc,hp as Tc,hq as uc,hr as bc,hs as kc,ht as fc,hu as gc,hv as yc,hw as jc,hx as vc,hy as Sc,hz as xc,hA as wc,hB as Cc,hC as Nc,hD as zc,hE as Mc,hF as Ec,hG as qc,hH as Bc,hI as Dc,hJ as Lc,hK as Pc,hL as Ac,hM as Uc,hN as Vc,hO as Ic,hP as Oc,hQ as Rc,hR as Gc,hS as Hc,hT as Zc,hU as Kc,hV as Xc,hW as Yc,hX as Jc,hY as Fc,hZ as Wc,h_ as Qc,h$ as _c,i0 as $c,i1 as ah,i2 as sh,i3 as eh,i4 as th,i5 as nh,i6 as ih,i7 as oh,i8 as rh,i9 as lh,ia as ch,ib as hh,ib as ph,ic as dh,id as mh,ie as Th,ig as uh,ih as bh,ii as kh,ij as fh,ik as gh,il as yh,im as jh,io as vh,ip as Sh,iq as xh,ir as wh,is as Ch,it as Nh,iu as zh,iv as Mh,iw as Eh,ix as qh,iy as Bh,iz as Dh,iA as Lh,iB as Ph,iC as Ah,iD as Uh,iE as Vh,iF as Ih,iG as Oh,iH as Rh,iI as Gh,iJ as Hh,iK as Zh,iL as Kh,iM as Xh,iN as Yh,iO as Jh,iM as Fh,iP as Wh,iP as Qh,iQ as _h,iR as $h,iS as ap,iT as sp,iU as ep,iV as tp,iW as np,iX as ip,iY as op,iZ as rp,i_ as lp,i$ as cp,j0 as hp,j1 as pp,j2 as dp,j3 as mp,j4 as Tp,j5 as up,j6 as bp,j7 as kp,j8 as fp,j9 as gp,ja as yp,jb as jp,jc as vp,jd as Sp,je as xp,jf as wp,jg as Cp,jh as Np,ji as zp,jj as Mp,jk as Ep,jl as qp,jm as Bp,jn as Dp,jo as Lp,jp as Pp,jq as Ap,jr as Up,js as Vp,jt as Ip,ju as Op,jv as Rp,jw as Gp,jx as Hp,jy as Zp,jz as Kp,jA as Xp,jB as Yp,jC as Jp,jD as Fp,jC as Wp,jE as Qp,jF as _p,jG as $p,jH as ad,jI as sd,jJ as ed,jK as td,jL as nd,jM as id,jN as od,jO as rd,jP as ld,jQ as cd,jR as hd,jS as pd,jT as dd,jU as md,jV as Td,jW as ud,jX as bd,jY as kd,jZ as fd,j_ as gd,j$ as yd,k0 as jd,k1 as vd,k2 as Sd,k3 as xd,k4 as wd,k5 as Cd,k6 as Nd,k7 as zd,k8 as Md,k9 as Ed,ka as qd,kb as Bd,kc as Dd,kd as Ld,ke as Pd,kf as Ad,kg as Ud,kb as Vd,kc as Id,kh as Od,ki as Rd,kj as Gd,kd as Hd,ke as Zd,kk as Kd,kl as Xd,km as Yd}from"./zoraTestnet-BhynxBH0.js";import"./ethers-JeCAM1sd.js";import"./react-Vu6nbGi5.js";import"./verifyHash-CnnSGyZz.js";import"./sendRawTransaction-YUhe5FDd.js";import"./index-CI_HQD35.js";import"./secp256k1-CrKymG_Q.js";import"./serializeTransaction-xu35AVgP.js";import"./writeContract-dj4TlIky.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const h=a({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}),p=a({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"}),d=a({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"}),m=a({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}}),T=a({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),u=a({id:"00000008819873e925422c1ff0f99f7c",caipNetworkId:"bip122:00000008819873e925422c1ff0f99f7c",chainNamespace:"bip122",name:"Bitcoin Signet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),b=a({id:"-239",name:"TON",network:"ton-mainnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://tonscan.org"}},testnet:!1,chainNamespace:"ton",caipNetworkId:"ton:-239"}),k=a({id:"-3",name:"TON Testnet",network:"ton-testnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://testnet.tonscan.org"}},testnet:!0,chainNamespace:"ton",caipNetworkId:"ton:-3"}),f=a({id:"0x2b6653dc",name:"TRON",network:"tron-mainnet",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org"}},testnet:!1,chainNamespace:"tron",caipNetworkId:"tron:0x2b6653dc"}),g=a({id:"0x94a9059e",name:"TRON Shasta",network:"tron-shasta",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.shasta.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0x94a9059e"}),y=a({id:"0xcd8690dc",name:"TRON Nile",network:"tron-nile",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://nile.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0xcd8690dc"});export{S as AVAILABLE_NAMESPACES,w as abey,C as abstract,N as abstractTestnet,z as acala,M as acria,E as adf,q as adi,B as agungTestnet,D as aioz,L as alephZero,P as alephZeroTestnet,A as alienx,U as alienxHalTestnet,V as alpenTestnet,I as ancient8,O as ancient8Sepolia,R as anvil,G as apeChain,H as apexTestnet,Z as apollo,K as arbitrum,X as arbitrumGoerli,Y as arbitrumNova,J as arbitrumSepolia,F as arc,W as arcTestnet,Q as arenaz,_ as areonNetwork,$ as areonNetworkTestnet,aa as areum,sa as artelaTestnet,ea as arthera,ta as artheraTestnet,na as assetChain,ia as assetChainTestnet,oa as astar,ra as astarZkEVM,la as astarZkyoto,ca as atletaOlympia,ha as aurora,pa as auroraTestnet,da as auroria,ma as autheoTestnet,Ta as avalanche,ua as avalancheFuji,ba as b3,ka as b3Sepolia,fa as bahamut,ga as base,ya as baseGoerli,ja as basePreconf,va as baseSepolia,Sa as baseSepoliaPreconf,xa as basecampTestnet,wa as battlechain,Ca as battlechainTestnet,Na as beam,za as beamTestnet,Ma as bearNetworkChainMainnet,Ea as bearNetworkChainTestnet,qa as berachain,Ba as berachainBepolia,Da as berachainTestnet,La as berachainTestnetbArtio,Pa as bevmMainnet,Aa as bifrost,Ua as birdlayer,Va as bitTorrent,Ia as bitTorrentTestnet,m as bitcoin,u as bitcoinSignet,T as bitcoinTestnet,Oa as bitgert,Ra as bitkub,Ga as bitkubTestnet,Ha as bitlayer,Za as bitlayerTestnet,Ka as bitrock,Xa as blast,Ya as blastSepolia,Ja as bob,Fa as bobSepolia,Wa as boba,Qa as bobaSepolia,_a as boolBetaMainnet,$a as botanix,as as botanixTestnet,ss as bounceBit,es as bounceBitTestnet,ts as bronos,ns as bronosTestnet,is as bsc,os as bscGreenfield,rs as bscTestnet,ls as bsquared,cs as bsquaredTestnet,hs as btr,ps as btrTestnet,ds as bxn,ms as bxnTestnet,Ts as cannon,us as canto,bs as celo,ks as celoAlfajores,fs as celoSepolia,gs as chang,ys as chiliz,js as chips,vs as citrate,Ss as citrea,xs as citreaTestnet,ws as classic,Cs as codex,Ns as codexTestnet,zs as coinbit,Ms as coinex,Es as confluxESpace,qs as confluxESpaceTestnet,Bs as coreDao,Ds as coreTestnet1,Ls as coreTestnet2,Ps as corn,As as cornTestnet,Us as cpchain,Vs as crab,Is as creatorTestnet,Os as creditCoin3Devnet,Rs as creditCoin3Mainnet,Gs as creditCoin3Testnet,Hs as cronos,Zs as cronosTestnet,Ks as cronoszkEVM,Xs as cronoszkEVMTestnet,Ys as crossbell,Js as crossfi,Fs as curtis,Ws as cyber,Qs as cyberTestnet,_s as dailyNetwork,$s as dailyNetworkTestnet,ae as darwinia,se as datahavenTestnet,ee as dbkchain,te as dchain,ne as dchainTestnet,ie as defichainEvm,oe as defichainEvmTestnet,a as defineChain,re as degen,le as dfk,ce as diode,he as disChain,pe as dodochainTestnet,de as dogechain,me as domaTestnet,Te as donatuz,ue as dosChain,be as dosChainTestnet,ke as dreyerxMainnet,fe as dreyerxTestnet,ge as dustboyIoT,ye as dymension,je as eden,ve as edexa,Se as edexaTestnet,xe as edgeless,we as edgelessTestnet,Ce as edgeware,Ne as edgewareTestnet,ze as eduChain,Me as eduChainTestnet,Ee as elastos,qe as elastosTestnet,Be as electroneum,De as electroneumTestnet,Le as elysiumTestnet,Pe as energy,Ae as eni,Ue as eniTestnet,Ve as enuls,Ie as eon,Oe as eos,Re as eosTestnet,Ge as eteria,He as etherlink,Ze as etherlinkShadownetTestnet,Ke as etherlinkTestnet,Xe as ethernity,Ye as etp,Je as evmos,Fe as evmosTestnet,We as excelonMainnet,Qe as expanse,_e as exsat,$e as exsatTestnet,at as fantom,st as fantomSonicTestnet,et as fantomTestnet,tt as fibo,nt as filecoin,it as filecoinCalibration,ot as filecoinHyperspace,rt as fireChain,lt as flame,ct as flare,ht as flareTestnet,pt as flowMainnet,dt as flowPreviewnet,mt as flowTestnet,Tt as fluence,ut as fluenceStage,bt as fluenceTestnet,kt as fluent,ft as fluentDevnet,gt as fluentTestnet,yt as form,jt as formTestnet,vt as forma,St as formicarium,xt as forta,wt as foundry,Ct as fraxtal,Nt as fraxtalTestnet,zt as funkiMainnet,Mt as funkiSepolia,Et as fuse,qt as fuseSparknet,Bt as fusion,Dt as fusionTestnet,Lt as garnet,Pt as gatechain,At as geist,Ut as genesys,Vt as gensyn,It as giwaSepolia,Ot as giwaSepoliaPreconf,Rt as glideL1Protocol,Gt as glideL2Protocol,Ht as gnosis,Zt as gnosisChiado,Kt as goChain,Xt as goat,Yt as gobi,Jt as godwoken,Ft as goerli,Wt as graphite,Qt as graphiteTestnet,_t as grav,$t as gravity,an as gunz,sn as guruNetwork,en as guruTestnet,tn as ham,nn as happychainTestnet,on as haqqMainnet,rn as haqqTestedge2,ln as hardhat,cn as harmonyOne,hn as hashkey,pn as hashkeyTestnet,dn as haustTestnet,mn as hedera,Tn as hederaPreviewnet,un as hederaTestnet,bn as hela,kn as heliosTestnet,fn as hemi,gn as hemiSepolia,yn as henesys,jn as holesky,vn as hoodi,Sn as horizenTestnet,xn as hpb,wn as hpp,Cn as hppSepolia,Nn as huddle01Mainnet,zn as huddle01Testnet,Mn as humanity,En as humanityTestnet,qn as humanode,Bn as humanodeTestnet5,Dn as hychain,Ln as hychainTestnet,Pn as hyperEvm,An as hyperliquid,Un as hyperliquidEvmTestnet,Vn as iSunCoin,In as icbNetwork,On as idchain,Rn as igra,Gn as immutableZkEvm,Hn as immutableZkEvmTestnet,Zn as inEVM,Kn as initVerse,Xn as initVerseGenesis,Yn as injective,Jn as injectiveTestnet,Fn as ink,Wn as inkSepolia,Qn as iota,_n as iotaTestnet,$n as iotex,ai as iotexTestnet,si as jasmyChain,ei as jasmyChainTestnet,ti as jbc,ni as jbcTestnet,ii as jocMainnet,oi as jocTestnet,ri as jovay,li as jovaySepolia,ci as juneo,hi as juneoBCH1Chain,pi as juneoDAI1Chain,di as juneoDOGE1Chain,mi as juneoEUR1Chain,Ti as juneoGLD1Chain,ui as juneoLINK1Chain,bi as juneoLTC1Chain,ki as juneoSGD1Chain,fi as juneoSocotraTestnet,gi as juneoUSD1Chain,yi as juneoUSDT1Chain,ji as juneomBTC1Chain,vi as kaia,Si as kairos,xi as kakarotSepolia,wi as kakarotStarknetSepolia,Ci as kardiaChain,Ni as karura,zi as katana,Mi as kava,Ei as kavaTestnet,qi as kcc,Bi as kii,Di as kiiTestnetOro,Li as kinto,Pi as klaytn,Ai as klaytnBaobab,Ui as koi,Vi as kroma,Ii as kromaSepolia,Oi as krown,Ri as l3x,Gi as l3xTestnet,Hi as ladyChain,Zi as lavita,Ki as lens,Xi as lensTestnet,Yi as lestnet,Ji as lightlinkPegasus,Fi as lightlinkPhoenix,Wi as linea,Qi as lineaGoerli,_i as lineaSepolia,$i as lineaTestnet,ao as lisk,so as liskSepolia,eo as loadAlphanet,to as localhost,no as loop,io as lukso,oo as luksoTestnet,ro as lumiaMainnet,lo as lumiaTestnet,co as lumoz,ho as lumozTestnet,po as luxeports,mo as lycan,To as lyra,uo as mainnet,bo as mandala,ko as manta,fo as mantaSepoliaTestnet,go as mantaTestnet,yo as mantle,jo as mantleSepoliaTestnet,vo as mantleTestnet,So as mantraDuKongEVMTestnet,xo as mantraEVM,wo as mapProtocol,Co as marooTestnet,No as matchain,zo as matchainTestnet,Mo as mchVerse,Eo as megaeth,qo as megaethTestnet,Bo as mekong,Do as meld,Lo as memecore,Po as merlin,Ao as merlinErigonTestnet,Uo as metachain,Vo as metachainIstanbul,Io as metadium,Oo as metalL2,Ro as meter,Go as meterTestnet,Ho as metis,Zo as metisGoerli,Ko as metisSepolia,Xo as mev,Yo as mevTestnet,Jo as mezo,Fo as mezoTestnet,Wo as mint,Qo as mintSepoliaTestnet,_o as mitosisTestnet,$o as mizuhikiTestnetAwaji,ar as mode,sr as modeTestnet,er as monad,tr as monadTestnet,nr as moonbaseAlpha,ir as moonbeam,or as moonbeamDev,rr as moonriver,lr as morph,cr as morphHolesky,hr as morphSepolia,pr as nahmii,dr as nautilus,mr as near,Tr as nearTestnet,ur as neonDevnet,br as neonMainnet,kr as neoxMainnet,fr as neoxT4,gr as newton,yr as nexi,jr as nexilix,vr as nibiru,Sr as nitrographTestnet,xr as nomina,wr as oasisTestnet,Cr as oasys,Nr as odysseyTestnet,zr as okc,Mr as omax,Er as omni,qr as omniOmega,Br as oneWorld,Dr as oortMainnetDev,Lr as opBNB,Pr as opBNBTestnet,Ar as openledger,Ur as optimism,Vr as optimismGoerli,Ir as optimismSepolia,Or as optopia,Rr as optopiaTestnet,Gr as orderly,Hr as orderlySepolia,Zr as otimDevnet,Kr as palm,Xr as palmTestnet,Yr as paseoPassetHub,Jr as peaq,Fr as pgn,Wr as pgnTestnet,Qr as phoenix,_r as planq,$r as plasma,al as plasmaDevnet,sl as plasmaTestnet,el as playfiAlbireo,tl as plinga,nl as plume,il as plumeDevnet,ol as plumeMainnet,rl as plumeSepolia,ll as plumeTestnet,cl as polterTestnet,hl as polygon,pl as polygonAmoy,dl as polygonMumbai,ml as polygonZkEvm,Tl as polygonZkEvmCardona,ul as polygonZkEvmTestnet,bl as polynomial,kl as polynomialSepolia,fl as potos,gl as potosTestnet,yl as premiumBlockTestnet,jl as pulsechain,vl as pulsechainV4,Sl as pumpfiTestnet,xl as pyrope,wl as qMainnet,Cl as qTestnet,Nl as ql1,zl as quai,Ml as quaiTestnet,El as radius,ql as radiusTestnet,Bl as reactiveTestnet,Dl as real,Ll as redbellyMainnet,Pl as redbellyTestnet,Al as reddio,Ul as reddioSepolia,Vl as redstone,Il as rei,Ol as reyaNetwork,Rl as rise,Gl as riseTestnet,Hl as rivalz,Zl as rollux,Kl as rolluxTestnet,Xl as ronin,Yl as root,Jl as rootPorcini,Fl as rootstock,Wl as rootstockTestnet,Ql as rss3,_l as rss3Sepolia,$l as saakuru,ac as saga,sc as saigon,ec as sanko,tc as sapphire,nc as sapphireTestnet,ic as satoshiVM,oc as satoshiVMTestnet,rc as scroll,lc as scrollSepolia,cc as sei,hc as seiTestnet,pc as seismicDevnet,dc as sentrix,mc as sentrixTestnet,Tc as sepolia,uc as shape,bc as shapeSepolia,kc as shardeum,fc as shardeumSphinx,gc as shibarium,yc as shibariumTestnet,jc as shiden,vc as shimmer,Sc as shimmerTestnet,xc as sidraChain,wc as silentData,Cc as silicon,Nc as siliconSepolia,zc as sixProtocol,Mc as skaleBase,Ec as skaleBaseSepoliaTestnet,qc as skaleBlockBrawlers,Bc as skaleCalypso,Dc as skaleCalypsoTestnet,Lc as skaleCryptoBlades,Pc as skaleCryptoColosseum,Ac as skaleEuropa,Uc as skaleEuropaTestnet,Vc as skaleExorde,Ic as skaleHumanProtocol,Oc as skaleNebula,Rc as skaleNebulaTestnet,Gc as skaleRazor,Hc as skaleTitan,Zc as skaleTitanTestnet,Kc as sketchpad,Xc as snax,Yc as snaxTestnet,h as solana,p as solanaDevnet,d as solanaTestnet,Jc as somnia,Fc as somniaTestnet,Wc as soneium,Qc as soneiumMinato,_c as songbird,$c as songbirdTestnet,ah as sonic,sh as sonicBlazeTestnet,eh as sonicTestnet,th as sophon,nh as sophonTestnet,ih as sova,oh as sovaSepolia,rh as spicy,lh as stable,ch as stableTestnet,hh as statusNetworkSepolia,ph as statusSepolia,dh as step,mh as story,Th as storyAeneid,uh as storyOdyssey,bh as storyTestnet,kh as stratis,fh as subtensorEvm,gh as superlumio,yh as superposition,jh as superseed,vh as superseedSepolia,Sh as surgeTestnet,xh as swan,wh as swanProximaTestnet,Ch as swanSaturnTestnet,Nh as swellchain,zh as swellchainTestnet,Mh as swissdlt,Eh as syscoin,qh as syscoinTestnet,Bh as tac,Dh as tacSPB,Lh as taiko,Ph as taikoHekla,Ah as taikoHoodi,Uh as taikoJolnir,Vh as taikoKatla,Ih as taikoTestnetSepolia,Oh as taraxa,Rh as taraxaTestnet,Gh as teaSepolia,Hh as telcoinTestnet,Zh as telos,Kh as telosTestnet,Xh as tempo,Yh as tempoDevnet,Jh as tempoLocalnet,Fh as tempoMainnet,Wh as tempoModerato,Qh as tempoTestnet,_h as tenet,$h as ternoa,ap as thaiChain,sp as that,ep as theta,tp as thetaTestnet,np as thunderCore,ip as thunderTestnet,op as tiktrixTestnet,rp as tomb,b as ton,k as tonTestnet,lp as treasure,cp as treasureTopaz,hp as tron,f as tronMainnet,pp as tronNile,y as tronNileTestnet,dp as tronShasta,g as tronShastaTestnet,mp as ubiq,Tp as ultra,up as ultraTestnet,bp as ultron,kp as ultronTestnet,fp as unichain,gp as unichainSepolia,yp as unique,jp as uniqueOpal,vp as uniqueQuartz,Sp as unreal,xp as valygoNft,wp as valygoSmartchain,Cp as vana,Np as vanaMoksha,zp as vanar,Mp as vechain,Ep as velas,qp as viction,Bp as victionTestnet,Dp as vision,Lp as visionTestnet,Pp as wanchain,Ap as wanchainTestnet,Up as weaveVMAlphanet,Vp as wemix,Ip as wemixTestnet,Op as westendAssetHub,Rp as whitechain,Gp as whitechainSepolia,Hp as whitechainTestnet,Zp as wmcTestnet,Kp as worldLand,Xp as worldchain,Yp as worldchainSepolia,Jp as x1Testnet,Fp as xLayer,Wp as xLayerTestnet,Qp as xai,_p as xaiTestnet,$p as xdc,ad as xdcTestnet,sd as xgr,ed as xoneMainnet,td as xoneTestnet,nd as xphereMainnet,id as xphereTestnet,od as xpla,rd as xrOne,ld as xrSepolia,cd as xrplevm,hd as xrplevmDevnet,pd as xrplevmTestnet,dd as yooldoVerse,md as yooldoVerseTestnet,Td as zenchainTestnet,ud as zeniq,bd as zeroG,kd as zeroGGalileoTestnet,fd as zeroGMainnet,gd as zeroGTestnet,yd as zeroNetwork,jd as zetachain,vd as zetachainAthensTestnet,Sd as zhejiang,xd as zilliqa,wd as zilliqaTestnet,Cd as zircuit,Nd as zircuitGarfieldTestnet,zd as zkFair,Md as zkFairTestnet,Ed as zkLinkNova,qd as zkLinkNovaSepoliaTestnet,Bd as zkSync,Dd as zkSyncInMemoryNode,Ld as zkSyncLocalNode,Pd as zkSyncSepoliaTestnet,Ad as zkXPLA,Ud as zkXPLATestnet,Vd as zksync,Id as zksyncInMemoryNode,Od as zksyncLocalCustomHyperchain,Rd as zksyncLocalHyperchain,Gd as zksyncLocalHyperchainL1,Hd as zksyncLocalNode,Zd as zksyncSepoliaTestnet,Kd as zora,Xd as zoraSepolia,Yd as zoraTestnet};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as b,b as u}from"./lit-element-B3y9oplH.js";import{o as m,r as l,n as p}from"./class-map-CxwNmq0D.js";import{d as O,O as c}from"./index-
|
|
1
|
+
import{i as b,b as u}from"./lit-element-B3y9oplH.js";import{o as m,r as l,n as p}from"./class-map-CxwNmq0D.js";import{d as O,O as c}from"./index-BA1ToKo5.js";import{c as g}from"./index-BRAKTMPG.js";import"./index-D-lax9BR.js";import{O as T}from"./index-ulcskxUh.js";import{L as C,O as j,M as $,C as I,q as E,R as L,b as B,E as z,l as V,W as M,k as K,T as q,S as W}from"./W3MFrameProviderSingleton-DXEpVsCm.js";import"./index-BNjQhTuO.js";import"./index-CoACJ04N.js";import"./index-DnPCa8RK.js";import"./index-DSUWwVug.js";import"./index-6YdbHDXd.js";import"./index-BBTg_Taa.js";import"./index-CkCZBr-g.js";import"./index-BnrCQ-kr.js";import"./index-CI_HQD35.js";import"./react-Vu6nbGi5.js";import"./ethers-JeCAM1sd.js";import"./index-C9P6N44e.js";import"./index-Blc7OGRU.js";import"./index-BcyJUD4U.js";import"./index-nibyPLVP.js";import"./index-Bu2DcNS5.js";import"./index.es-CbOKB2xh.js";import"./browser-ponyfill-rND5WOqr.js";import"./NetworkUtil-DDES604E.js";import"./ref-BsAZ42-h.js";import"./async-directive-BRxn_Py3.js";const F=O`
|
|
2
2
|
:host > wui-grid {
|
|
3
3
|
max-height: 360px;
|
|
4
4
|
overflow: auto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p,o as y,b as c,r as w}from"./signing-
|
|
1
|
+
import{j as p,o as y,b as c,r as w}from"./signing-DqVkCMNZ.js";import"./utils-BmX8TqzP.js";import"./ethers-JeCAM1sd.js";import"./react-Vu6nbGi5.js";import"./index-CI_HQD35.js";async function u({account:e,serializableTransaction:a,transaction:n,gasless:s}){const t=c({address:s.relayerForwarderAddress,chain:n.chain,client:n.client}),r=await w({contract:t,method:"function getNonce(address) view returns (uint256)",params:[e.address]}),[o,m]=await(async()=>{if(!a.to)throw new Error("OpenZeppelin transactions must have a 'to' address");if(!a.gas)throw new Error("OpenZeppelin transactions must have a 'gas' value");if(!a.data)throw new Error("OpenZeppelin transactions must have a 'data' value");if(s.experimentalChainlessSupport){const i={chainid:BigInt(n.chain.id),data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{name:"GSNv2 Forwarder",verifyingContract:t.address,version:"0.0.1"},message:i,primaryType:"ForwardRequest",types:{ForwardRequest:h}}),i]}const d={data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{chainId:n.chain.id,name:s.domainName??"GSNv2 Forwarder",verifyingContract:t.address,version:s.domainVersion??"0.0.1"},message:d,primaryType:"ForwardRequest",types:{ForwardRequest:g}}),d]})();return{message:m,messageType:"forward",signature:o}}const g=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"}],h=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"},{name:"chainid",type:"uint256"}];async function q(e){const{message:a,messageType:n,signature:s}=await u(e),t=await fetch(e.gasless.relayerUrl,{body:p({forwarderAddress:e.gasless.relayerForwarderAddress,request:a,signature:s,type:n}),method:"POST"});if(!t.ok)throw new Error(`Failed to send transaction: ${await t.text()}`);const r=await t.json();if(!r.result)throw new Error(`Relay transaction failed: ${r.message}`);const o=JSON.parse(r.result).txHash;if(y(o))return{chain:e.transaction.chain,client:e.transaction.client,transactionHash:o};throw new Error(`Failed to send transaction: ${p(r)}`)}export{u as prepareOpenZeppelinTransaction,q as relayOpenZeppelinTransaction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o,e as c,r as d}from"./signing-
|
|
1
|
+
import{d as o,e as c,r as d}from"./signing-DqVkCMNZ.js";import{d as a}from"./detectExtension-b3FK4NnW.js";import"./utils-BmX8TqzP.js";import"./ethers-JeCAM1sd.js";import"./react-Vu6nbGi5.js";import"./index-CI_HQD35.js";const t="0x6352211e",r=[{name:"tokenId",type:"uint256"}],n=[{type:"address"}];function w(e){return a({availableSelectors:e,method:[t,r,n]})}function s(e){return c(r,[e.tokenId])}function P(e){return t+s(e).slice(2)}function I(e){return o(n,e)[0]}async function N(e){return d({contract:e.contract,method:[t,r,n],params:[e.tokenId]})}export{t as FN_SELECTOR,I as decodeOwnerOfResult,P as encodeOwnerOf,s as encodeOwnerOfParams,w as isOwnerOfSupported,N as ownerOf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/getNFT-
|
|
2
|
-
import{_ as w}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/getNFT-BlQFGY94.js","assets/index-CI_HQD35.js","assets/react-Vu6nbGi5.js","assets/ethers-JeCAM1sd.js","assets/index-DCrqkiFN.css","assets/fetchTokenMetadata-CvdEl9__.js","assets/uint8-array-CjVHUazS.js","assets/signing-DqVkCMNZ.js","assets/utils-BmX8TqzP.js","assets/thirdweb-BPuxSwTj.js","assets/wait-for-tx-receipt-D0UsY_wi.js","assets/transactionReceipt-BcAWHNof.js","assets/sleep-mAKpSMLY.js","assets/eth_estimateGas-D2h2NKDU.js","assets/eth_getStorageAt-nxicedso.js","assets/eth_getTransactionCount-CYYgSGiU.js","assets/decimals-C7k-JLnD.js","assets/decimals-DYUDFeSV.js","assets/zora-sepolia-kNKNf7Kl.js","assets/send-batch-transaction-BTFORkZH.js","assets/getNFT-Xlc7XB2G.js","assets/totalSupply-Bbiy7170.js","assets/detectExtension-b3FK4NnW.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as w}from"./index-CI_HQD35.js";import{a as m}from"./utils-BmX8TqzP.js";import{i as h,b as E}from"./signing-DqVkCMNZ.js";import"./react-Vu6nbGi5.js";import"./ethers-JeCAM1sd.js";function C(t,e){switch(e.type){case"ERC721":return{chainId:e.chainId,id:e.tokenId,metadata:t,owner:(e==null?void 0:e.owner)??null,tokenAddress:e.tokenAddress,tokenURI:e.tokenUri,type:e.type};case"ERC1155":return{chainId:e.chainId,id:e.tokenId,metadata:t,owner:(e==null?void 0:e.owner)??null,supply:e.supply,tokenAddress:e.tokenAddress,tokenURI:e.tokenUri,type:e.type};default:throw new Error("Invalid NFT type")}}async function R(t){let e=t.uri;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[l="",u="",r=""]=e.split("/"),[a,i]=l.split(":"),[s,n]=u.split(":");if(!a||a.toLowerCase()!=="eip155")throw new Error(`Invalid EIP namespace, expected EIP155, got: "${a}"`);if(!i)throw new Error("Chain ID not found");if(!n||!h(n))throw new Error("Contract address not found");if(!r)throw new Error("Token ID not found");const f=m(Number(i)),o=E({address:n,chain:f,client:t.client});switch(s){case"erc721":{const{getNFT:c}=await w(async()=>{const{getNFT:d}=await import("./getNFT-BlQFGY94.js");return{getNFT:d}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));return(await c({contract:o,tokenId:BigInt(r)})).metadata.image??null}case"erc1155":{const{getNFT:c}=await w(async()=>{const{getNFT:d}=await import("./getNFT-Xlc7XB2G.js");return{getNFT:d}},__vite__mapDeps([20,9,8,3,2,7,1,4,10,11,12,13,14,15,16,17,18,19,5,6,21,22]));return(await c({contract:o,tokenId:BigInt(r)})).metadata.image??null}default:throw new Error(`Invalid ERC namespace, expected ERC721 or ERC1155, got: "${s}"`)}}export{C as parseNFT,R as parseNftUri};
|