@dcl/shop 0.1.0-29869835587.commit-e6e6578 → 0.1.0-29905759067.commit-1f1fc48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/assets/{AnimatedBackground-BvysF8a0.js → AnimatedBackground-iuUEWVvX.js} +1 -1
  2. package/assets/{Assets-DoUIRoSX.js → Assets-Boa_vcsA.js} +48 -48
  3. package/assets/{Cart-Cyj_u0xP.js → Cart-DmysAv-C.js} +2 -2
  4. package/assets/{CircularProgress-Bf7cTa84.js → CircularProgress-BbpUGXBC.js} +1 -1
  5. package/assets/{Collection-BFUSn0Z_.js → Collection-CaNHH8rp.js} +1 -1
  6. package/assets/{CollectionCarousel-BaK4BZqg.js → CollectionCarousel-DZRKlb8f.js} +1 -1
  7. package/assets/{Creator-CTfg9WAL.js → Creator-BB_N6Oar.js} +1 -1
  8. package/assets/{CssVarsProvider-DQXUaIP8.js → CssVarsProvider-CD9SUox4.js} +1 -1
  9. package/assets/{ExchangeController-H99cRhIr.js → ExchangeController-BWSsNG4e.js} +1 -1
  10. package/assets/{GetCredits-BqhYAHL0.js → GetCredits-Br21K9mc.js} +1 -1
  11. package/assets/{HelpersUtil-CN9OoRaT.js → HelpersUtil-Dn9aiv4g.js} +1 -1
  12. package/assets/{ImportListings-CCQDdZMF.js → ImportListings-BALL6CWe.js} +1 -1
  13. package/assets/{ItemDetail-C6EEFa3M.js → ItemDetail-B_zPbtC5.js} +2 -2
  14. package/assets/{LoadMore-QYabEF53.js → LoadMore-DUwOaKdq.js} +1 -1
  15. package/assets/{MarketCheckout-B1QbAQBC.js → MarketCheckout-DkLDRrfN.js} +3 -3
  16. package/assets/{MyAssets-gjvqMgx3.js → MyAssets-CTQx_QVe.js} +1 -1
  17. package/assets/{MyFavorites-CCbFgdqL.js → MyFavorites-DWHAFj8B.js} +1 -1
  18. package/assets/{MyPurchases-D04-_M8f.js → MyPurchases-BVQzJeQX.js} +1 -1
  19. package/assets/{NotFound-ViHzr3Nr.js → NotFound-CHQS62la.js} +1 -1
  20. package/assets/{PrimaryListModal-D6DU8-ZC.js → PrimaryListModal-gfgyzr3S.js} +1 -1
  21. package/assets/{StoreSettings-BnHjda9z.js → StoreSettings-CRxzmt3b.js} +5 -5
  22. package/assets/{Success-CbfD54bz.js → Success-cIWboc7p.js} +1 -1
  23. package/assets/{SwapController-Tfj7j5wZ.js → SwapController-DjGJvhyC.js} +1 -1
  24. package/assets/{TradeService-kxdTGO_i.js → TradeService-3mwR2v1C.js} +1 -1
  25. package/assets/{W3MFrameProviderSingleton-BWjqHbac.js → W3MFrameProviderSingleton-CH9k7C8I.js} +3 -3
  26. package/assets/{WebCryptoP256-8HU24K3x.js → WebCryptoP256-Lp5-qWkz.js} +1 -1
  27. package/assets/{basic-DX-B5_bS.js → basic-g_xHs-jl.js} +1 -1
  28. package/assets/{biconomy-DIiiyQwz.js → biconomy-wuZgdDji.js} +1 -1
  29. package/assets/{buy-C5_gzZWJ.js → buy-CgIgEqv9.js} +1 -1
  30. package/assets/{buy-gasless-Cxx1jwuH.js → buy-gasless-pwHqA_mF.js} +1 -1
  31. package/assets/{cart-checkout-C3WNM4cy.js → cart-checkout-vzYBjbSV.js} +1 -1
  32. package/assets/{categories-DQ55lr2p.js → categories-D5VGMfW4.js} +1 -1
  33. package/assets/{ccip-BafcYzQ9.js → ccip-B9Wl4rCZ.js} +1 -1
  34. package/assets/{ccip-CYEnvd4I.js → ccip-DugdnJIL.js} +1 -1
  35. package/assets/collection-7YyqOIsA.js +1 -0
  36. package/assets/{controller-B80HcZCL.js → controller-BIXF8m7m.js} +2 -2
  37. package/assets/{core-BtRDOtev.js → core-CPMlxlfe.js} +4 -4
  38. package/assets/{custom-DiiPEfeO.js → custom-C8eYncem.js} +1 -1
  39. package/assets/{data-capture-BFGedRFL.js → data-capture-BT3tUeZ2.js} +1 -1
  40. package/assets/{decimals-Cdn10TAV.js → decimals-2cHWSu_l.js} +1 -1
  41. package/assets/{decimals-DCazhsdS.js → decimals-C-EZF79s.js} +1 -1
  42. package/assets/{detectExtension-BSAkQ0I6.js → detectExtension-C-xKGK-n.js} +1 -1
  43. package/assets/{email-D8YhsjSC.js → email-DCkZGiuY.js} +1 -1
  44. package/assets/{embedded-wallet-CIVu6rdk.js → embedded-wallet-BwjbVQqZ.js} +1 -1
  45. package/assets/{emotion-styled.browser.esm-ClqtCiJQ.js → emotion-styled.browser.esm-CM5xiqPE.js} +1 -1
  46. package/assets/{engine-DsQHyohE.js → engine-BCIagDLK.js} +1 -1
  47. package/assets/{errors-BLIsDEoc.js → errors-BVwqXLe5.js} +1 -1
  48. package/assets/{estimate-l1-fee-Cna0j8C0.js → estimate-l1-fee-kxkgQ66r.js} +1 -1
  49. package/assets/{eth_estimateGas-A7dV8Dq8.js → eth_estimateGas-rl3D263K.js} +1 -1
  50. package/assets/{eth_getStorageAt-DVqXAuzZ.js → eth_getStorageAt-IB0eULMI.js} +1 -1
  51. package/assets/{eth_getTransactionCount-DLrwUt6V.js → eth_getTransactionCount-CtQzPcnF.js} +1 -1
  52. package/assets/{extractIPFS-Dq1wghef.js → extractIPFS-Cpl91fgz.js} +1 -1
  53. package/assets/{features-CFz8G3yF.js → features-BlHQSMzN.js} +1 -1
  54. package/assets/{fetchTokenMetadata-BTRazXId.js → fetchTokenMetadata-DJ4cCYA_.js} +2 -2
  55. package/assets/{get-ecosystem-wallet-info-B8H2bbhI.js → get-ecosystem-wallet-info-DwdeAhbV.js} +1 -1
  56. package/assets/{getBalance-BewKvJ6T.js → getBalance-DkBROkHj.js} +1 -1
  57. package/assets/{getInstalledModules-ByFUGStC.js → getInstalledModules-BfypScWD.js} +1 -1
  58. package/assets/{getNFT-BuDjU8-b.js → getNFT-Cv97lepQ.js} +2 -2
  59. package/assets/{getNFT-1nUsfQAJ.js → getNFT-DmshVHQV.js} +1 -1
  60. package/assets/{getOverlayAlpha-B_CoLTSj.js → getOverlayAlpha-mkhFONg0.js} +1 -1
  61. package/assets/{hashTypedData-BYNsvxyc.js → hashTypedData-6sx2OuME.js} +1 -1
  62. package/assets/{hashTypedData-DHR5yJit.js → hashTypedData-C9IqLTPk.js} +1 -1
  63. package/assets/{import-CWsWpkUA.js → import-Bsky-xMs.js} +1 -1
  64. package/assets/{in-app-wallet-calls-Fj_OJpWi.js → in-app-wallet-calls-s_cSY41h.js} +1 -1
  65. package/assets/{index-BCGZozX2.js → index-B0YrK5ZH.js} +1 -1
  66. package/assets/{index-C_jKIil3.js → index-BB1no6U7.js} +1 -1
  67. package/assets/{index-CN5ZLDnc.js → index-BDohxhb7.js} +1 -1
  68. package/assets/{index-Y6b_vUQr.js → index-BLPhH8eL.js} +1 -1
  69. package/assets/{index-DkfyzgR8.js → index-BU56N61z.js} +1 -1
  70. package/assets/{index-FUu8bz4c.js → index-BV1TWYA2.js} +1 -1
  71. package/assets/{index-Cuf2In7m.js → index-Bn_065d4.js} +1 -1
  72. package/assets/{index-B4p2eLga.js → index-BoxWf2CA.js} +1 -1
  73. package/assets/{index-DJsdR_Dh.js → index-BwU057Dz.js} +1 -1
  74. package/assets/{index-B04ndUbB.js → index-BwqmHtXi.js} +2 -2
  75. package/assets/{index-BSjx8-a9.js → index-BxhrtCIn.js} +1 -1
  76. package/assets/{index-DfnBxBKK.js → index-C-0iOuYu.js} +1 -1
  77. package/assets/{index-CzDOjIXr.js → index-C-sj52rG.js} +1 -1
  78. package/assets/{index-Da6whmyR.js → index-C1J9hW3D.js} +1 -1
  79. package/assets/{index-Cv6TsksD.js → index-CGUO0Y4Y.js} +1 -1
  80. package/assets/{index-CcJuo_B4.js → index-CG_iwpLC.js} +1 -1
  81. package/assets/{index-BufR0bxC.js → index-CHEQB_Cx.js} +1 -1
  82. package/assets/{index-B4OkjZ5Z.js → index-CPaULSDF.js} +3 -3
  83. package/assets/{index-C7VPGrdO.js → index-CTWPqZAC.js} +1 -1
  84. package/assets/{index-Do7lLz-O.js → index-CTwvZCoF.js} +1 -1
  85. package/assets/{index-mfpj9mGL.js → index-CYcVlGMR.js} +1 -1
  86. package/assets/{index-Cr7q_wI-.js → index-CjzqNOFR.js} +1 -1
  87. package/assets/{index-BQwZ_U1w.js → index-Co5hU_e6.js} +1 -1
  88. package/assets/{index-tKIgdudq.js → index-CrdpO7C8.js} +1 -1
  89. package/assets/{index-PGZV0u8x.js → index-CsD_onu6.js} +1 -1
  90. package/assets/{index-CtzfdSwK.js → index-CxFzTyPL.js} +1 -1
  91. package/assets/{index-BBuZMaWr.js → index-CxiM65Mp.js} +10 -10
  92. package/assets/{index-Cmi7sq59.js → index-DEyKdf7n.js} +1 -1
  93. package/assets/{index-BMFRmVon.js → index-DHmaSZRj.js} +1 -1
  94. package/assets/{index-CXYokVDz.js → index-DVePmEob.js} +1 -1
  95. package/assets/{index--JSSHFMQ.js → index-DaAuLTDJ.js} +1 -1
  96. package/assets/{index-BDfpUFpd.js → index-DcTQA0a2.js} +1 -1
  97. package/assets/{index-fOZ3JG1l.js → index-DcsTTH3Q.js} +1 -1
  98. package/assets/{index-gvpjFbR1.js → index-DdkbGf7r.js} +1 -1
  99. package/assets/{index-CaHcCfyv.js → index-DdxPPzlC.js} +1 -1
  100. package/assets/{index-CTwiT5J0.js → index-DgiZIEtb.js} +1 -1
  101. package/assets/{index-CWuMb79R.js → index-DiC-MoGd.js} +3 -3
  102. package/assets/{index-nRbKhfJe.js → index-DkJQfwjP.js} +2 -2
  103. package/assets/{index-CwWLPHI8.js → index-DmHTXw6k.js} +1 -1
  104. package/assets/{index-B3vzzuVP.js → index-DmTT-8Pb.js} +1 -1
  105. package/assets/{index-BtmcJRGy.js → index-Dv5PeJiX.js} +1 -1
  106. package/assets/{index-BDRB8FDm.js → index-I6QJl4JU.js} +1 -1
  107. package/assets/{index-goSkKmOv.js → index-LP7qradW.js} +1 -1
  108. package/assets/{index-Dhu9IXc1.js → index-S-phlU07.js} +1 -1
  109. package/assets/{index-BmxotHif.js → index-dYKVGrG9.js} +1 -1
  110. package/assets/{index-Cuq6iGY1.js → index-dysXdEH6.js} +1 -1
  111. package/assets/{index-g3sxw2b2.js → index-ntwLOBCc.js} +2 -2
  112. package/assets/{index-CdfmzGmf.js → index-pgEJuCvY.js} +1 -1
  113. package/assets/{index-BuMOiAUw.js → index-t2OgUZgI.js} +1 -1
  114. package/assets/{index-07n_zhYq.js → index-xIavEcfj.js} +1 -1
  115. package/assets/{index-2yTqM9xZ.js → index-yfYb8KLO.js} +1 -1
  116. package/assets/{index.es-Dvmu0NoU.js → index.es-DaC3JFFU.js} +4 -4
  117. package/assets/{index.es-CiHN99GO.js → index.es-KR7fFIjl.js} +1 -1
  118. package/assets/{index.es-BsTkmkjS.js → index.es-_UBQCq8d.js} +1 -1
  119. package/assets/{loader-logo-CK-TcJ-S.js → loader-logo-CmjwjqNs.js} +1 -1
  120. package/assets/{localBatchGatewayRequest-Cej95COc.js → localBatchGatewayRequest-p2Ks9d9x.js} +1 -1
  121. package/assets/{mana-rate-Disk-ReT.js → mana-rate-BSdhcAxH.js} +1 -1
  122. package/assets/{networks-Dapm2cWP.js → networks-DeWfvl_y.js} +1 -1
  123. package/assets/{onramp-DLQLHSLI.js → onramp-DRTE3n_-.js} +1 -1
  124. package/assets/{openzeppelin-B2ua0Itn.js → openzeppelin-CnjCMhne.js} +1 -1
  125. package/assets/{ownerOf-DOppg2jR.js → ownerOf-LGp4E5X6.js} +1 -1
  126. package/assets/{parseNft-D_8M9mfO.js → parseNft-ZibRZ1De.js} +2 -2
  127. package/assets/{parseSignature-O3FZfUUc.js → parseSignature-BVSxuf_G.js} +1 -1
  128. package/assets/{parseSignature-BUx9b-zW.js → parseSignature-qW8HDWC-.js} +3 -3
  129. package/assets/{pay-with-exchange-DaiVhZAg.js → pay-with-exchange-D01MHjgZ.js} +1 -1
  130. package/assets/{qr-overlay-CGmkZvV0.js → qr-overlay-BYvxaKdb.js} +1 -1
  131. package/assets/{receive-DVL3YCyE.js → receive-CqdylKzQ.js} +1 -1
  132. package/assets/{resolveImplementation-06H3horI.js → resolveImplementation-6K4nQmoD.js} +1 -1
  133. package/assets/{rpc-q1fg-PaK.js → rpc-CFw65GwW.js} +1 -1
  134. package/assets/{secp256k1-Dj-unqH_.js → secp256k1-Bn6bifwd.js} +1 -1
  135. package/assets/{secp256k1-DT5nTJQH.js → secp256k1-DHZdqghI.js} +1 -1
  136. package/assets/{secp256k1-D6rN1PGV.js → secp256k1-_DgqGs2V.js} +1 -1
  137. package/assets/{send-CjhoocaG.js → send-XfLoBs9R.js} +1 -1
  138. package/assets/{send-batch-transaction-Bbiva6rb.js → send-batch-transaction-BXPWrXSK.js} +1 -1
  139. package/assets/{send-eip712-transaction-NxK7USDp.js → send-eip712-transaction-4z6WNabr.js} +2 -2
  140. package/assets/{send-gasless-transaction-x5mofsoE.js → send-gasless-transaction-BcnQyjxj.js} +2 -2
  141. package/assets/{sendRawTransaction-CxX-WJOv.js → sendRawTransaction-GKBmcmEE.js} +3 -3
  142. package/assets/{serializeTransaction-KtBgxNjB.js → serializeTransaction-3d8pZ0Iy.js} +1 -1
  143. package/assets/{session-proposal-KoaDAo-a.js → session-proposal-B5ZHcD2T.js} +1 -1
  144. package/assets/{session-request-CSef7ndM.js → session-request-CAaoIKVS.js} +2 -2
  145. package/assets/{sha256-DkPvB4om.js → sha256-Dj7svQcS.js} +1 -1
  146. package/assets/{signing-B9F_g0GG.js → signing-CE_zI5_x.js} +4 -4
  147. package/assets/{socials-BqxUUXtR.js → socials-5v3xVdXT.js} +1 -1
  148. package/assets/{swaps-EDZta6zk.js → swaps-8AiJfIFs.js} +1 -1
  149. package/assets/{thirdweb-D99mQjH-.js → thirdweb-RN8sw7m_.js} +3 -3
  150. package/assets/{totalSupply-BhpAtMjH.js → totalSupply-CokjmPid.js} +1 -1
  151. package/assets/{trade-encoding-CWytSFjw.js → trade-encoding-D-nmkwVz.js} +1 -1
  152. package/assets/{transactionReceipt-OilL7-NS.js → transactionReceipt-CXYiDrev.js} +1 -1
  153. package/assets/{transactions-CGvL3Aj1.js → transactions-DtyT5OjZ.js} +1 -1
  154. package/assets/useInfiniteGrid-DMPijgdc.js +1 -0
  155. package/assets/{useStore-CQIJvFZA.js → useStore-B_g31vF6.js} +1 -1
  156. package/assets/{useTheme-6tr3eE7K.js → useTheme-BNMMOZXE.js} +1 -1
  157. package/assets/useTheme-Dym7bhKm.js +1 -0
  158. package/assets/{verifyHash-2hJaw2xF.js → verifyHash-Bm1x5_X2.js} +1 -1
  159. package/assets/{w3m-modal-DZpfNka8.js → w3m-modal-CvxdzPI1.js} +1 -1
  160. package/assets/{w3m-modal-CXTIrAhw.js → w3m-modal-DASeu1UW.js} +1 -1
  161. package/assets/{wait-for-tx-receipt-Dt-8wYDQ.js → wait-for-tx-receipt-B0NrXGCa.js} +1 -1
  162. package/assets/{wallets-v6YyPYY8.js → wallets-DOy020MN.js} +6 -6
  163. package/assets/{web-connector-DBKfHuJF.js → web-connector-BDLq1v7V.js} +3 -3
  164. package/assets/{writeContract-CJkUo9D7.js → writeContract-CvT6Z86X.js} +1 -1
  165. package/assets/{zoraTestnet-CRD_79WO.js → zoraTestnet-hCARxX58.js} +1 -1
  166. package/index.html +11 -11
  167. package/package.json +2 -2
  168. package/assets/collection-DHOETntw.js +0 -1
  169. package/assets/useInfiniteGrid-CpiD11c4.js +0 -1
  170. package/assets/useTheme-Dpdkvivv.js +0 -1
@@ -1 +1 @@
1
- import{B as M}from"./dcl-schemas-BICTSpB5.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-v6YyPYY8.js";import"./index-Bk6ayCIs.js";import{b as Jt,o as g,c as Et}from"./index-C7VPGrdO.js";import{f as P}from"./index.es-BsTkmkjS.js";import{N as zt}from"./index-nRbKhfJe.js";import"./signing-B9F_g0GG.js";import"./utils-CBfcEx8F.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./index-BBuZMaWr.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";import"./store-CraP4F4Y.js";import"./hashTypedData-DHR5yJit.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-goSkKmOv.js";import"./ethereum-CkPyqOMA.js";import"./browser-ponyfill-Djb5Py6a.js";import"./browser-ponyfill-DMgE6PM5.js";import"./events-DQ172AOg.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 hs=nt;export{hs as UniversalProvider,nt as default};
1
+ import{B as M}from"./dcl-schemas-BICTSpB5.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-DOy020MN.js";import"./index-Bk6ayCIs.js";import{b as Jt,o as g,c as Et}from"./index-CTWPqZAC.js";import{f as P}from"./index.es-_UBQCq8d.js";import{N as zt}from"./index-DkJQfwjP.js";import"./signing-CE_zI5_x.js";import"./utils-CBfcEx8F.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./index-CxiM65Mp.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";import"./store-CraP4F4Y.js";import"./hashTypedData-C9IqLTPk.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-LP7qradW.js";import"./ethereum-CkPyqOMA.js";import"./browser-ponyfill-Djb5Py6a.js";import"./browser-ponyfill-DMgE6PM5.js";import"./events-DQ172AOg.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 hs=nt;export{hs as UniversalProvider,nt as default};
@@ -1 +1 @@
1
- import{e as d}from"./index-nRbKhfJe.js";import{o}from"./browser-ponyfill-Djb5Py6a.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-C7VPGrdO.js";import"./index-Bk6ayCIs.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
+ import{e as d}from"./index-DkJQfwjP.js";import{o}from"./browser-ponyfill-Djb5Py6a.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-CTWPqZAC.js";import"./index-Bk6ayCIs.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{W as u,g as o,as as k,c as m}from"./index-BBuZMaWr.js";function f(){return o.creditsServerUrl}async function g(e,t){const r=await u(`${f()}/credits/checkout`,{method:"POST",identity:t,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:e})});if(!r.ok)throw new Error(`checkout ${r.status}: ${await r.text()}`);const{orderId:n,url:c}=await r.json();return{orderId:n,url:c,mock:!1}}async function v(e,t,r={}){const{intervalMs:n=1500,timeoutMs:c=6e4,signal:i}=r,d=Date.now()+c;for(;;){if(i!=null&&i.aborted)throw new DOMException("Aborted","AbortError");const l=await y(e,t,i);if(l.status!=="processing")return l;if(Date.now()>d)return{status:"pending"};await F(n,i)}}async function y(e,t,r){const n=await u(`${f()}/credits/orders/${e}`,{method:"GET",identity:t,metadata:{},signal:r});if(!n.ok)throw new Error(`order status ${n.status}`);return n.json()}function F(e,t){return new Promise((r,n)=>{const c=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(c),n(new DOMException("Aborted","AbortError"))})})}const _=.1,p=[{id:"pack_5",usd:5,credits:s(5)},{id:"pack_10",usd:10,credits:s(10)},{id:"pack_25",usd:25,credits:s(25),bestValue:!0},{id:"pack_50",usd:50,credits:s(50)}];async function E(){const e=await fetch(`${o.creditsServerUrl}/credits/packs`);if(!e.ok)throw new Error(`credit packs ${e.status}`);const{packs:t}=await e.json();return t.slice().sort((r,n)=>(r.order??0)-(n.order??0)).map(r=>({id:r.id,usd:r.usd,credits:r.credits,...r.recommended?{bestValue:!0}:{}}))}function s(e){return Math.round(e/_)}function w(e){return p.find(t=>t.id===e)}const a="mock_cs_",M=new Set([80002,11155111,1337,31337]);function C(){const e=!o.stripePublishableKey;if(e&&!M.has(o.chainId))throw new Error(`Stripe publishable key is missing on chainId=${o.chainId}, which is not a recognized test network. Refusing to fall back to mock payments in a real-money environment — configure STRIPE_PUBLISHABLE_KEY.`);return e}async function b(e,t){const r=w(e);if(!r)throw new Error("Unknown pack");if(C())return S(r);if(!(t!=null&&t.identity))throw new Error("Sign in to get credits.");return g(e,t.identity)}async function D(e,t={}){const{intervalMs:r,timeoutMs:n,signal:c,identity:i}=t;if(C()||e.startsWith(a))return P(e,t);if(!i)throw new Error("Sign in to get credits.");return v(e,i,{intervalMs:r,timeoutMs:n,signal:c})}function S(e){const t=`${a}${e.id}_${Date.now()}`;return h(400).then(()=>({orderId:t,clientSecret:`${a}${e.id}`,mock:!0}))}async function P(e,t={}){await h(t.intervalMs??900);const r=e.replace(a,"").replace(/_\d+$/,""),n=w(r),c=(n==null?void 0:n.credits)??0;if(t.address&&n)try{const i=await k(t.address,Math.round(n.usd*100));return{status:"credited",creditsGranted:c,newBalance:i.credits}}catch(i){return{status:"failed",error:i.message}}return{status:"credited",creditsGranted:c,newBalance:c}}function h(e,t){return new Promise((r,n)=>{setTimeout(r,e)})}function U(){const{data:e,isLoading:t}=m({queryKey:["credit-packs"],queryFn:E,staleTime:3e5,retry:!1});return{packs:e??p,isLoading:t&&e===void 0}}const x="data:image/svg+xml,%3csvg%20width='61'%20height='61'%20viewBox='0%200%2061%2061'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M30.5%2061C47.3447%2061%2061%2047.3447%2061%2030.5C61%2013.6553%2047.3447%200%2030.5%200C13.6553%200%200%2013.6553%200%2030.5C0%2047.3447%2013.6553%2061%2030.5%2061Z'%20fill='url(%23gc_paint0)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.2001%2054.8997C17.2935%2058.7274%2023.6375%2060.9997%2030.5%2060.9997C37.3625%2060.9997%2043.7065%2058.7274%2048.8%2054.8997H12.2001Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.10013%2048.7997C7.83863%2051.1024%209.89738%2053.1612%2012.2001%2054.8997H48.8001C51.1029%2053.1612%2053.1616%2051.1024%2054.9001%2048.7997H6.10013Z'%20fill='%23FFA25A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2042.6998H2.5468C3.4923%2044.8805%204.69705%2046.924%206.10005%2048.7997H40.9311V42.6998H40.9158Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6094%2019.8247V42.6997H40.6719L21.6094%2019.8247Z'%20fill='url(%23gc_paint1)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.5468%2042.6997H21.6093V19.8248L2.5468%2042.6997Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2032.025V48.8H54.9L40.9158%2032.025Z'%20fill='url(%23gc_paint2)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9467%2048.8H40.9157V32.025L26.9467%2048.8Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2027.4497C45.127%2027.4497%2048.5408%2024.0359%2048.5408%2019.8247C48.5408%2015.6136%2045.127%2012.1998%2040.9158%2012.1998C36.7046%2012.1998%2033.2908%2015.6136%2033.2908%2019.8247C33.2908%2024.0359%2036.7046%2027.4497%2040.9158%2027.4497Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6092%2015.2497C23.7148%2015.2497%2025.4217%2013.5428%2025.4217%2011.4372C25.4217%209.33166%2023.7148%207.62475%2021.6092%207.62475C19.5036%207.62475%2017.7967%209.33166%2017.7967%2011.4372C17.7967%2013.5428%2019.5036%2015.2497%2021.6092%2015.2497Z'%20fill='%23FFC95B'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='gc_paint0'%20x1='30.5'%20y1='-12.6335'%20x2='-12.6335'%20y2='30.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint1'%20x1='21.6029'%20y1='19.8247'%20x2='21.6029'%20y2='42.6997'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint2'%20x1='40.9111'%20y1='32.025'%20x2='40.9111'%20y2='48.8'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";export{b as c,C as i,x as l,D as p,U as u};
1
+ import{W as u,g as o,ap as k,c as m}from"./index-CxiM65Mp.js";function f(){return o.creditsServerUrl}async function g(e,t){const r=await u(`${f()}/credits/checkout`,{method:"POST",identity:t,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:e})});if(!r.ok)throw new Error(`checkout ${r.status}: ${await r.text()}`);const{orderId:n,url:c}=await r.json();return{orderId:n,url:c,mock:!1}}async function v(e,t,r={}){const{intervalMs:n=1500,timeoutMs:c=6e4,signal:i}=r,d=Date.now()+c;for(;;){if(i!=null&&i.aborted)throw new DOMException("Aborted","AbortError");const l=await y(e,t,i);if(l.status!=="processing")return l;if(Date.now()>d)return{status:"pending"};await F(n,i)}}async function y(e,t,r){const n=await u(`${f()}/credits/orders/${e}`,{method:"GET",identity:t,metadata:{},signal:r});if(!n.ok)throw new Error(`order status ${n.status}`);return n.json()}function F(e,t){return new Promise((r,n)=>{const c=setTimeout(r,e);t==null||t.addEventListener("abort",()=>{clearTimeout(c),n(new DOMException("Aborted","AbortError"))})})}const _=.1,p=[{id:"pack_5",usd:5,credits:s(5)},{id:"pack_10",usd:10,credits:s(10)},{id:"pack_25",usd:25,credits:s(25),bestValue:!0},{id:"pack_50",usd:50,credits:s(50)}];async function E(){const e=await fetch(`${o.creditsServerUrl}/credits/packs`);if(!e.ok)throw new Error(`credit packs ${e.status}`);const{packs:t}=await e.json();return t.slice().sort((r,n)=>(r.order??0)-(n.order??0)).map(r=>({id:r.id,usd:r.usd,credits:r.credits,...r.recommended?{bestValue:!0}:{}}))}function s(e){return Math.round(e/_)}function w(e){return p.find(t=>t.id===e)}const a="mock_cs_",M=new Set([80002,11155111,1337,31337]);function C(){const e=!o.stripePublishableKey;if(e&&!M.has(o.chainId))throw new Error(`Stripe publishable key is missing on chainId=${o.chainId}, which is not a recognized test network. Refusing to fall back to mock payments in a real-money environment — configure STRIPE_PUBLISHABLE_KEY.`);return e}async function b(e,t){const r=w(e);if(!r)throw new Error("Unknown pack");if(C())return S(r);if(!(t!=null&&t.identity))throw new Error("Sign in to get credits.");return g(e,t.identity)}async function D(e,t={}){const{intervalMs:r,timeoutMs:n,signal:c,identity:i}=t;if(C()||e.startsWith(a))return P(e,t);if(!i)throw new Error("Sign in to get credits.");return v(e,i,{intervalMs:r,timeoutMs:n,signal:c})}function S(e){const t=`${a}${e.id}_${Date.now()}`;return h(400).then(()=>({orderId:t,clientSecret:`${a}${e.id}`,mock:!0}))}async function P(e,t={}){await h(t.intervalMs??900);const r=e.replace(a,"").replace(/_\d+$/,""),n=w(r),c=(n==null?void 0:n.credits)??0;if(t.address&&n)try{const i=await k(t.address,Math.round(n.usd*100));return{status:"credited",creditsGranted:c,newBalance:i.credits}}catch(i){return{status:"failed",error:i.message}}return{status:"credited",creditsGranted:c,newBalance:c}}function h(e,t){return new Promise((r,n)=>{setTimeout(r,e)})}function U(){const{data:e,isLoading:t}=m({queryKey:["credit-packs"],queryFn:E,staleTime:3e5,retry:!1});return{packs:e??p,isLoading:t&&e===void 0}}const x="data:image/svg+xml,%3csvg%20width='61'%20height='61'%20viewBox='0%200%2061%2061'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M30.5%2061C47.3447%2061%2061%2047.3447%2061%2030.5C61%2013.6553%2047.3447%200%2030.5%200C13.6553%200%200%2013.6553%200%2030.5C0%2047.3447%2013.6553%2061%2030.5%2061Z'%20fill='url(%23gc_paint0)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.2001%2054.8997C17.2935%2058.7274%2023.6375%2060.9997%2030.5%2060.9997C37.3625%2060.9997%2043.7065%2058.7274%2048.8%2054.8997H12.2001Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.10013%2048.7997C7.83863%2051.1024%209.89738%2053.1612%2012.2001%2054.8997H48.8001C51.1029%2053.1612%2053.1616%2051.1024%2054.9001%2048.7997H6.10013Z'%20fill='%23FFA25A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2042.6998H2.5468C3.4923%2044.8805%204.69705%2046.924%206.10005%2048.7997H40.9311V42.6998H40.9158Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6094%2019.8247V42.6997H40.6719L21.6094%2019.8247Z'%20fill='url(%23gc_paint1)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.5468%2042.6997H21.6093V19.8248L2.5468%2042.6997Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2032.025V48.8H54.9L40.9158%2032.025Z'%20fill='url(%23gc_paint2)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9467%2048.8H40.9157V32.025L26.9467%2048.8Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2027.4497C45.127%2027.4497%2048.5408%2024.0359%2048.5408%2019.8247C48.5408%2015.6136%2045.127%2012.1998%2040.9158%2012.1998C36.7046%2012.1998%2033.2908%2015.6136%2033.2908%2019.8247C33.2908%2024.0359%2036.7046%2027.4497%2040.9158%2027.4497Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6092%2015.2497C23.7148%2015.2497%2025.4217%2013.5428%2025.4217%2011.4372C25.4217%209.33166%2023.7148%207.62475%2021.6092%207.62475C19.5036%207.62475%2017.7967%209.33166%2017.7967%2011.4372C17.7967%2013.5428%2019.5036%2015.2497%2021.6092%2015.2497Z'%20fill='%23FFC95B'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='gc_paint0'%20x1='30.5'%20y1='-12.6335'%20x2='-12.6335'%20y2='30.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint1'%20x1='21.6029'%20y1='19.8247'%20x2='21.6029'%20y2='42.6997'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint2'%20x1='40.9111'%20y1='32.025'%20x2='40.9111'%20y2='48.8'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";export{b as c,C as i,x as l,D as p,U as u};
@@ -1 +1 @@
1
- import{av as f}from"./NetworkUtil-Xp0fNa8X.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-CxX-WJOv.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
+ import{av as f}from"./NetworkUtil-Xp0fNa8X.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-GKBmcmEE.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{g as u}from"./index-BBuZMaWr.js";import{g as f,C as S}from"./index-HN6Rk25C.js";import{J as h,C as d}from"./ethers-BeFqf2KO.js";const m=10n**17n,p=9e4;async function N(n=u.chainId){const r=f(S.OffChainMarketplaceV2,n),t=new h(u.rpcUrl),o=await new d(r.address,["function manaUsdAggregator() view returns (address)"],t).manaUsdAggregator(),a=new d(o,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],t),l=await a.decimals(),i=await a.latestRoundData(),c=BigInt(i[1].toString());if(c<=0n)throw new Error("mana rate unavailable");if(BigInt(i[4].toString())<BigInt(i[0].toString()))throw new Error("mana rate incomplete");const s=Number(i[3].toString()),w=Math.floor(Date.now()/1e3)-s;if(!Number.isFinite(s)||s<=0||w>p)throw new Error("mana rate stale");return{rate:c,decimals:Number(l)}}function g(n,{rate:r,decimals:t}){return BigInt(n)*r/10n**BigInt(t)}function W(n,r){let t;try{t=g(n,r)}catch{return null}const e=t/m,o=t%m>0n?e+1n:e,a=Number(o);return a<1?1:a}function U(n,r){let t;try{t=g(n,r)}catch{return 0}const e=10n**16n,o=t/e,a=t%e>0n?o+1n:o;return Number(a)}export{U as a,W as m,N as r};
1
+ import{g as u}from"./index-CxiM65Mp.js";import{g as f,C as S}from"./index-HN6Rk25C.js";import{J as h,C as d}from"./ethers-BeFqf2KO.js";const m=10n**17n,p=9e4;async function N(n=u.chainId){const r=f(S.OffChainMarketplaceV2,n),t=new h(u.rpcUrl),o=await new d(r.address,["function manaUsdAggregator() view returns (address)"],t).manaUsdAggregator(),a=new d(o,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],t),l=await a.decimals(),i=await a.latestRoundData(),c=BigInt(i[1].toString());if(c<=0n)throw new Error("mana rate unavailable");if(BigInt(i[4].toString())<BigInt(i[0].toString()))throw new Error("mana rate incomplete");const s=Number(i[3].toString()),w=Math.floor(Date.now()/1e3)-s;if(!Number.isFinite(s)||s<=0||w>p)throw new Error("mana rate stale");return{rate:c,decimals:Number(l)}}function g(n,{rate:r,decimals:t}){return BigInt(n)*r/10n**BigInt(t)}function W(n,r){let t;try{t=g(n,r)}catch{return null}const e=t/m,o=t%m>0n?e+1n:e,a=Number(o);return a<1?1:a}function U(n,r){let t;try{t=g(n,r)}catch{return 0}const e=10n**16n,o=t/e,a=t%e>0n?o+1n:o;return Number(a)}export{U as a,W as m,N as r};
@@ -1 +1 @@
1
- import{aw as C}from"./NetworkUtil-Xp0fNa8X.js";import{a as z,b as M,c as E,d as q,e as B,f as D,g as L,h as P,i as A,j as U,k as V,l as I,m as O,n as R,o as G,p as H,q as Z,r as K,s as X,t as Y,u as J,v as F,w as W,x as Q,y as _,z as $,A as aa,B as sa,C as ea,D as ta,E as na,F as ia,G as oa,H as ra,I as la,J as ca,K as ha,L as pa,M as da,N as ma,O as Ta,P as ua,Q as ba,R as ka,S as fa,T as ga,U as ya,V as ja,W as va,X as Sa,Y as xa,Z as wa,_ as Ca,$ as Na,a0 as za,a1 as Ma,a2 as Ea,a3 as qa,a4 as Ba,a5 as Da,a6 as La,a7 as Pa,a8 as Aa,a9 as Ua,aa as Va,ab as Ia,ac as Oa,ad as Ra,ae as Ga,af as Ha,ag as Za,ah as Ka,ai as Xa,aj as Ya,ak as Ja,al as Fa,am as Wa,an as Qa,ao as _a,ap as $a,aq as as,ar as ss,as as es,at as ts,au as ns,av as is,aw as os,ax as rs,ay as ls,az as cs,aA as hs,aB as ps,aC as ds,aD as ms,aE as Ts,aF as us,aG as bs,aH as ks,aI as fs,aJ as gs,aK as ys,aL as js,aM as vs,aN as Ss,aO as xs,aP as ws,aQ as Cs,aR as Ns,aS as zs,aT as Ms,aU as Es,aV as qs,aW as Bs,aX as Ds,aY as Ls,aZ as Ps,a_ as As,a$ as Us,b0 as Vs,b1 as Is,b2 as Os,b3 as Rs,b4 as Gs,b5 as Hs,b6 as Zs,b7 as Ks,b8 as Xs,b9 as Ys,ba as Js,bb as Fs,bc as Ws,bd as Qs,be as _s,bf as $s,bg as ae,bh as se,bi as ee,bj as te,bk as ne,bl as ie,bm as oe,bn as re,bo as le,bp as ce,bq as he,br as pe,bs as de,bt as me,bu as Te,bv as ue,bw as be,bx as ke,by as fe,bz as ge,bA as ye,bB as je,bC as ve,bD as Se,bE as xe,bF as we,bG as Ce,bH as Ne,bI as ze,bJ as Me,bK as Ee,bL as qe,bM as Be,bN as De,bO as Le,bP as Pe,bQ as Ae,bR as Ue,bS as Ve,bT as Ie,bU as Oe,bV as Re,bW as Ge,bX as He,bY as Ze,bZ as Ke,b_ as Xe,b$ as Ye,c0 as Je,c1 as Fe,c2 as We,c3 as Qe,c4 as _e,c5 as $e,c6 as at,c7 as st,c8 as et,c9 as tt,ca as nt,cb as it,cc as ot,cd as rt,ce as lt,cf as ct,cg as ht,ch as pt,ci as dt,cj as mt,ck as Tt,cl as ut,cm as bt,cn as kt,co as ft,cp as gt,cq as yt,cr as jt,cs as vt,ct as St,cu as xt,cv as wt,cw as Ct,cx as Nt,cy as zt,cz as Mt,cA as Et,cB as qt,cC as Bt,cD as Dt,cE as Lt,cF as Pt,cG as At,cH as Ut,cI as Vt,cJ as It,cK as Ot,cL as Rt,cM as Gt,cN as Ht,cO as Zt,cP as Kt,cQ as Xt,cR as Yt,cS as Jt,cT as Ft,cU as Wt,cV as Qt,cW as _t,cX as $t,cY as an,cZ as sn,c_ as en,c$ as tn,d0 as nn,d1 as on,d2 as rn,d3 as ln,d4 as cn,d5 as hn,d6 as pn,d7 as dn,d8 as mn,d9 as Tn,da as un,db as bn,dc as kn,dd as fn,de as gn,df as yn,dg as jn,dh as vn,di as Sn,dj as xn,dk as wn,dl as Cn,dm as Nn,dn as zn,dp as Mn,dq as En,dr as qn,ds as Bn,dt as Dn,du as Ln,dv as Pn,dw as An,dx as Un,dy as Vn,dy as In,dz as On,dA as Rn,dB as Gn,dC as Hn,dD as Zn,dE as Kn,dF as Xn,dG as Yn,dH as Jn,dI as Fn,dJ as Wn,dK as Qn,dL as _n,dM as $n,dN as ai,dO as si,dP as ei,dQ as ti,dR as ni,dS as ii,dT as oi,dU as ri,dV as li,dW as ci,dX as hi,dY as pi,dZ as di,d_ as mi,d$ as Ti,e0 as ui,e1 as bi,e2 as ki,e3 as fi,e4 as gi,e5 as yi,e6 as ji,e7 as vi,e8 as Si,e9 as xi,ea as wi,eb as Ci,ec as Ni,ed as zi,ee as Mi,ef as Ei,eg as qi,eh as Bi,ei as Di,ej as Li,ek as Pi,el as Ai,em as Ui,en as Vi,eo as Ii,ep as Oi,eq as Ri,er as Gi,es as Hi,et as Zi,eu as Ki,ev as Xi,ew as Yi,ex as Ji,ey as Fi,ez as Wi,eA as Qi,eB as _i,eC as $i,eD as ao,eE as so,eF as eo,eG as to,eH as no,eI as io,eJ as oo,eK as ro,eL as lo,eM as co,eN as ho,eO as po,eP as mo,eQ as To,eR as uo,eS as bo,eT as ko,eU as fo,eV as go,eW as yo,eX as jo,eY as vo,eZ as So,e_ as xo,e$ as wo,f0 as Co,f1 as No,f2 as zo,f3 as Mo,f4 as Eo,f5 as qo,f6 as Bo,f7 as Do,f8 as Lo,f9 as Po,fa as Ao,fb as Uo,fc as Vo,fd as Io,fe as Oo,ff as Ro,fg as Go,fh as Ho,fi as Zo,fj as Ko,fk as Xo,fl as Yo,fm as Jo,fn as Fo,fo as Wo,fp as Qo,fq as _o,fr as $o,fs as ar,ft as sr,fu as er,fv as tr,fw as nr,fx as ir,fy as or,fz as rr,fA as lr,fB as cr,fC as hr,fD as pr,fE as dr,fF as mr,fG as Tr,fH as ur,fI as br,fJ as kr,fK as fr,fL as gr,fM as yr,fN as jr,fO as vr,fP as Sr,fQ as xr,fR as wr,fS as Cr,fT as Nr,fU as zr,fV as Mr,fW as Er,fX as qr,fY as Br,fZ as Dr,f_ as Lr,f$ as Pr,g0 as Ar,g1 as Ur,g2 as Vr,g3 as Ir,g4 as Or,g5 as Rr,g6 as Gr,g7 as Hr,g8 as Zr,g9 as Kr,ga as Xr,gb as Yr,gc as Jr,gd as Fr,ge as Wr,gf as Qr,gg as _r,gh as $r,gi as al,gj as sl,gk as el,gl as tl,gm as nl,gn as il,go as ol,gp as rl,gq as ll,gr as cl,gs as hl,gt as pl,gu as dl,gv as ml,gw as Tl,gx as ul,gy as bl,gz as kl,gA as fl,gB as gl,gC as yl,gD as jl,gE as vl,gF as Sl,gG as xl,gH as wl,gI as Cl,gJ as Nl,gK as zl,gL as Ml,gM as El,gN as ql,gO as Bl,gP as Dl,gQ as Ll,gR as Pl,gS as Al,gT as Ul,gU as Vl,gV as Il,gW as Ol,gX as Rl,gY as Gl,gZ as Hl,g_ as Zl,g$ as Kl,h0 as Xl,h1 as Yl,h2 as Jl,h3 as Fl,h4 as Wl,h5 as Ql,h6 as _l,h7 as $l,h8 as ac,h9 as sc,ha as ec,hb as tc,hc as nc,hd as ic,he as oc,hf as rc,hg as lc,hh as cc,hi as hc,hj as pc,hk as dc,hl as mc,hm as Tc,hn as uc,ho as bc,hp as kc,hq as fc,hr as gc,hs as yc,ht as jc,hu as vc,hv as Sc,hw as xc,hx as wc,hy as Cc,hz as Nc,hA as zc,hB as Mc,hC as Ec,hD as qc,hE as Bc,hF as Dc,hG as Lc,hH as Pc,hI as Ac,hJ as Uc,hK as Vc,hL as Ic,hM as Oc,hN as Rc,hO as Gc,hP as Hc,hQ as Zc,hR as Kc,hS as Xc,hT as Yc,hU as Jc,hV as Fc,hW as Wc,hX as Qc,hY as _c,hZ as $c,h_ as ah,h$ as sh,i0 as eh,i1 as th,i2 as nh,i3 as ih,i4 as oh,i5 as rh,i6 as lh,i7 as ch,i8 as hh,i9 as ph,ia as dh,ib as mh,ib as Th,ic as uh,id as bh,ie as kh,ig as fh,ih as gh,ii as yh,ij as jh,ik as vh,il as Sh,im as xh,io as wh,ip as Ch,iq as Nh,ir as zh,is as Mh,it as Eh,iu as qh,iv as Bh,iw as Dh,ix as Lh,iy as Ph,iz as Ah,iA as Uh,iB as Vh,iC as Ih,iD as Oh,iE as Rh,iF as Gh,iG as Hh,iH as Zh,iI as Kh,iJ as Xh,iK as Yh,iL as Jh,iM as Fh,iN as Wh,iO as Qh,iM as _h,iP as $h,iP as ap,iQ as sp,iR as ep,iS as tp,iT as np,iU as ip,iV as op,iW as rp,iX as lp,iY as cp,iZ as hp,i_ as pp,i$ as dp,j0 as mp,j1 as Tp,j2 as up,j3 as bp,j4 as kp,j5 as fp,j6 as gp,j7 as yp,j8 as jp,j9 as vp,ja as Sp,jb as xp,jc as wp,jd as Cp,je as Np,jf as zp,jg as Mp,jh as Ep,ji as qp,jj as Bp,jk as Dp,jl as Lp,jm as Pp,jn as Ap,jo as Up,jp as Vp,jq as Ip,jr as Op,js as Rp,jt as Gp,ju as Hp,jv as Zp,jw as Kp,jx as Xp,jy as Yp,jz as Jp,jA as Fp,jB as Wp,jC as Qp,jD as _p,jC as $p,jE as ad,jF as sd,jG as ed,jH as td,jI as nd,jJ as id,jK as od,jL as rd,jM as ld,jN as cd,jO as hd,jP as pd,jQ as dd,jR as md,jS as Td,jT as ud,jU as bd,jV as kd,jW as fd,jX as gd,jY as yd,jZ as jd,j_ as vd,j$ as Sd,k0 as xd,k1 as wd,k2 as Cd,k3 as Nd,k4 as zd,k5 as Md,k6 as Ed,k7 as qd,k8 as Bd,k9 as Dd,ka as Ld,kb as Pd,kc as Ad,kd as Ud,ke as Vd,kf as Id,kg as Od,kb as Rd,kc as Gd,kh as Hd,ki as Zd,kj as Kd,kd as Xd,ke as Yd,kk as Jd,kl as Fd,km as Wd}from"./zoraTestnet-CRD_79WO.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./verifyHash-2hJaw2xF.js";import"./sendRawTransaction-CxX-WJOv.js";import"./index-BBuZMaWr.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";import"./secp256k1-DT5nTJQH.js";import"./serializeTransaction-KtBgxNjB.js";import"./writeContract-CJkUo9D7.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const m=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"}),T=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"}),u=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"}),b=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"]}}}),k=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}),f=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}),g=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"}),y=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"}),j=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"}),v=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"}),S=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{C as AVAILABLE_NAMESPACES,z as abey,M as abstract,E as abstractTestnet,q as acala,B as acria,D as adf,L as adi,P as agungTestnet,A as aioz,U as alephZero,V as alephZeroTestnet,I as alienx,O as alienxHalTestnet,R as alpenTestnet,G as ancient8,H as ancient8Sepolia,Z as anvil,K as apeChain,X as apexTestnet,Y as apollo,J as arbitrum,F as arbitrumGoerli,W as arbitrumNova,Q as arbitrumSepolia,_ as arc,$ as arcTestnet,aa as arenaz,sa as areonNetwork,ea as areonNetworkTestnet,ta as areum,na as artelaTestnet,ia as arthera,oa as artheraTestnet,ra as assetChain,la as assetChainTestnet,ca as astar,ha as astarZkEVM,pa as astarZkyoto,da as atletaOlympia,ma as aurora,Ta as auroraTestnet,ua as auroria,ba as autheoTestnet,ka as avalanche,fa as avalancheFuji,ga as b3,ya as b3Sepolia,ja as bahamut,va as base,Sa as baseGoerli,xa as basePreconf,wa as baseSepolia,Ca as baseSepoliaPreconf,Na as basecampTestnet,za as battlechain,Ma as battlechainTestnet,Ea as beam,qa as beamTestnet,Ba as bearNetworkChainMainnet,Da as bearNetworkChainTestnet,La as berachain,Pa as berachainBepolia,Aa as berachainTestnet,Ua as berachainTestnetbArtio,Va as bevmMainnet,Ia as bifrost,Oa as birdlayer,Ra as bitTorrent,Ga as bitTorrentTestnet,b as bitcoin,f as bitcoinSignet,k as bitcoinTestnet,Ha as bitgert,Za as bitkub,Ka as bitkubTestnet,Xa as bitlayer,Ya as bitlayerTestnet,Ja as bitrock,Fa as blast,Wa as blastSepolia,Qa as bob,_a as bobSepolia,$a as boba,as as bobaSepolia,ss as boolBetaMainnet,es as botanix,ts as botanixTestnet,ns as bounceBit,is as bounceBitTestnet,os as bronos,rs as bronosTestnet,ls as bsc,cs as bscGreenfield,hs as bscTestnet,ps as bsquared,ds as bsquaredTestnet,ms as btr,Ts as btrTestnet,us as bxn,bs as bxnTestnet,ks as cannon,fs as canto,gs as celo,ys as celoAlfajores,js as celoSepolia,vs as chang,Ss as chiliz,xs as chips,ws as citrate,Cs as citrea,Ns as citreaTestnet,zs as classic,Ms as codex,Es as codexTestnet,qs as coinbit,Bs as coinex,Ds as confluxESpace,Ls as confluxESpaceTestnet,Ps as coreDao,As as coreTestnet1,Us as coreTestnet2,Vs as corn,Is as cornTestnet,Os as cpchain,Rs as crab,Gs as creatorTestnet,Hs as creditCoin3Devnet,Zs as creditCoin3Mainnet,Ks as creditCoin3Testnet,Xs as cronos,Ys as cronosTestnet,Js as cronoszkEVM,Fs as cronoszkEVMTestnet,Ws as crossbell,Qs as crossfi,_s as curtis,$s as cyber,ae as cyberTestnet,se as dailyNetwork,ee as dailyNetworkTestnet,te as darwinia,ne as datahavenTestnet,ie as dbkchain,oe as dchain,re as dchainTestnet,le as defichainEvm,ce as defichainEvmTestnet,a as defineChain,he as degen,pe as dfk,de as diode,me as disChain,Te as dodochainTestnet,ue as dogechain,be as domaTestnet,ke as donatuz,fe as dosChain,ge as dosChainTestnet,ye as dreyerxMainnet,je as dreyerxTestnet,ve as dustboyIoT,Se as dymension,xe as eden,we as edexa,Ce as edexaTestnet,Ne as edgeless,ze as edgelessTestnet,Me as edgeware,Ee as edgewareTestnet,qe as eduChain,Be as eduChainTestnet,De as elastos,Le as elastosTestnet,Pe as electroneum,Ae as electroneumTestnet,Ue as elysiumTestnet,Ve as energy,Ie as eni,Oe as eniTestnet,Re as enuls,Ge as eon,He as eos,Ze as eosTestnet,Ke as eteria,Xe as etherlink,Ye as etherlinkShadownetTestnet,Je as etherlinkTestnet,Fe as ethernity,We as etp,Qe as evmos,_e as evmosTestnet,$e as excelonMainnet,at as expanse,st as exsat,et as exsatTestnet,tt as fantom,nt as fantomSonicTestnet,it as fantomTestnet,ot as fibo,rt as filecoin,lt as filecoinCalibration,ct as filecoinHyperspace,ht as fireChain,pt as flame,dt as flare,mt as flareTestnet,Tt as flowMainnet,ut as flowPreviewnet,bt as flowTestnet,kt as fluence,ft as fluenceStage,gt as fluenceTestnet,yt as fluent,jt as fluentDevnet,vt as fluentTestnet,St as form,xt as formTestnet,wt as forma,Ct as formicarium,Nt as forta,zt as foundry,Mt as fraxtal,Et as fraxtalTestnet,qt as funkiMainnet,Bt as funkiSepolia,Dt as fuse,Lt as fuseSparknet,Pt as fusion,At as fusionTestnet,Ut as garnet,Vt as gatechain,It as geist,Ot as genesys,Rt as gensyn,Gt as giwaSepolia,Ht as giwaSepoliaPreconf,Zt as glideL1Protocol,Kt as glideL2Protocol,Xt as gnosis,Yt as gnosisChiado,Jt as goChain,Ft as goat,Wt as gobi,Qt as godwoken,_t as goerli,$t as graphite,an as graphiteTestnet,sn as grav,en as gravity,tn as gunz,nn as guruNetwork,on as guruTestnet,rn as ham,ln as happychainTestnet,cn as haqqMainnet,hn as haqqTestedge2,pn as hardhat,dn as harmonyOne,mn as hashkey,Tn as hashkeyTestnet,un as haustTestnet,bn as hedera,kn as hederaPreviewnet,fn as hederaTestnet,gn as hela,yn as heliosTestnet,jn as hemi,vn as hemiSepolia,Sn as henesys,xn as holesky,wn as hoodi,Cn as horizenTestnet,Nn as hpb,zn as hpp,Mn as hppSepolia,En as huddle01Mainnet,qn as huddle01Testnet,Bn as humanity,Dn as humanityTestnet,Ln as humanode,Pn as humanodeTestnet5,An as hychain,Un as hychainTestnet,Vn as hyperEvm,In as hyperliquid,On as hyperliquidEvmTestnet,Rn as iSunCoin,Gn as icbNetwork,Hn as idchain,Zn as igra,Kn as immutableZkEvm,Xn as immutableZkEvmTestnet,Yn as inEVM,Jn as initVerse,Fn as initVerseGenesis,Wn as injective,Qn as injectiveTestnet,_n as ink,$n as inkSepolia,ai as iota,si as iotaTestnet,ei as iotex,ti as iotexTestnet,ni as jasmyChain,ii as jasmyChainTestnet,oi as jbc,ri as jbcTestnet,li as jocMainnet,ci as jocTestnet,hi as jovay,pi as jovaySepolia,di as juneo,mi as juneoBCH1Chain,Ti as juneoDAI1Chain,ui as juneoDOGE1Chain,bi as juneoEUR1Chain,ki as juneoGLD1Chain,fi as juneoLINK1Chain,gi as juneoLTC1Chain,yi as juneoSGD1Chain,ji as juneoSocotraTestnet,vi as juneoUSD1Chain,Si as juneoUSDT1Chain,xi as juneomBTC1Chain,wi as kaia,Ci as kairos,Ni as kakarotSepolia,zi as kakarotStarknetSepolia,Mi as kardiaChain,Ei as karura,qi as katana,Bi as kava,Di as kavaTestnet,Li as kcc,Pi as kii,Ai as kiiTestnetOro,Ui as kinto,Vi as klaytn,Ii as klaytnBaobab,Oi as koi,Ri as kroma,Gi as kromaSepolia,Hi as krown,Zi as l3x,Ki as l3xTestnet,Xi as ladyChain,Yi as lavita,Ji as lens,Fi as lensTestnet,Wi as lestnet,Qi as lightlinkPegasus,_i as lightlinkPhoenix,$i as linea,ao as lineaGoerli,so as lineaSepolia,eo as lineaTestnet,to as lisk,no as liskSepolia,io as loadAlphanet,oo as localhost,ro as loop,lo as lukso,co as luksoTestnet,ho as lumiaMainnet,po as lumiaTestnet,mo as lumoz,To as lumozTestnet,uo as luxeports,bo as lycan,ko as lyra,fo as mainnet,go as mandala,yo as manta,jo as mantaSepoliaTestnet,vo as mantaTestnet,So as mantle,xo as mantleSepoliaTestnet,wo as mantleTestnet,Co as mantraDuKongEVMTestnet,No as mantraEVM,zo as mapProtocol,Mo as marooTestnet,Eo as matchain,qo as matchainTestnet,Bo as mchVerse,Do as megaeth,Lo as megaethTestnet,Po as mekong,Ao as meld,Uo as memecore,Vo as merlin,Io as merlinErigonTestnet,Oo as metachain,Ro as metachainIstanbul,Go as metadium,Ho as metalL2,Zo as meter,Ko as meterTestnet,Xo as metis,Yo as metisGoerli,Jo as metisSepolia,Fo as mev,Wo as mevTestnet,Qo as mezo,_o as mezoTestnet,$o as mint,ar as mintSepoliaTestnet,sr as mitosisTestnet,er as mizuhikiTestnetAwaji,tr as mode,nr as modeTestnet,ir as monad,or as monadTestnet,rr as moonbaseAlpha,lr as moonbeam,cr as moonbeamDev,hr as moonriver,pr as morph,dr as morphHolesky,mr as morphSepolia,Tr as nahmii,ur as nautilus,br as near,kr as nearTestnet,fr as neonDevnet,gr as neonMainnet,yr as neoxMainnet,jr as neoxT4,vr as newton,Sr as nexi,xr as nexilix,wr as nibiru,Cr as nitrographTestnet,Nr as nomina,zr as oasisTestnet,Mr as oasys,Er as odysseyTestnet,qr as okc,Br as omax,Dr as omni,Lr as omniOmega,Pr as oneWorld,Ar as oortMainnetDev,Ur as opBNB,Vr as opBNBTestnet,Ir as openledger,Or as optimism,Rr as optimismGoerli,Gr as optimismSepolia,Hr as optopia,Zr as optopiaTestnet,Kr as orderly,Xr as orderlySepolia,Yr as otimDevnet,Jr as palm,Fr as palmTestnet,Wr as paseoPassetHub,Qr as peaq,_r as pgn,$r as pgnTestnet,al as phoenix,sl as planq,el as plasma,tl as plasmaDevnet,nl as plasmaTestnet,il as playfiAlbireo,ol as plinga,rl as plume,ll as plumeDevnet,cl as plumeMainnet,hl as plumeSepolia,pl as plumeTestnet,dl as polterTestnet,ml as polygon,Tl as polygonAmoy,ul as polygonMumbai,bl as polygonZkEvm,kl as polygonZkEvmCardona,fl as polygonZkEvmTestnet,gl as polynomial,yl as polynomialSepolia,jl as potos,vl as potosTestnet,Sl as premiumBlockTestnet,xl as pulsechain,wl as pulsechainV4,Cl as pumpfiTestnet,Nl as pyrope,zl as qMainnet,Ml as qTestnet,El as ql1,ql as quai,Bl as quaiTestnet,Dl as radius,Ll as radiusTestnet,Pl as reactiveTestnet,Al as real,Ul as redbellyMainnet,Vl as redbellyTestnet,Il as reddio,Ol as reddioSepolia,Rl as redstone,Gl as rei,Hl as reyaNetwork,Zl as rise,Kl as riseTestnet,Xl as rivalz,Yl as rollux,Jl as rolluxTestnet,Fl as ronin,Wl as root,Ql as rootPorcini,_l as rootstock,$l as rootstockTestnet,ac as rss3,sc as rss3Sepolia,ec as saakuru,tc as saga,nc as saigon,ic as sanko,oc as sapphire,rc as sapphireTestnet,lc as satoshiVM,cc as satoshiVMTestnet,hc as scroll,pc as scrollSepolia,dc as sei,mc as seiTestnet,Tc as seismicDevnet,uc as sentrix,bc as sentrixTestnet,kc as sepolia,fc as shape,gc as shapeSepolia,yc as shardeum,jc as shardeumSphinx,vc as shibarium,Sc as shibariumTestnet,xc as shiden,wc as shimmer,Cc as shimmerTestnet,Nc as sidraChain,zc as silentData,Mc as silicon,Ec as siliconSepolia,qc as sixProtocol,Bc as skaleBase,Dc as skaleBaseSepoliaTestnet,Lc as skaleBlockBrawlers,Pc as skaleCalypso,Ac as skaleCalypsoTestnet,Uc as skaleCryptoBlades,Vc as skaleCryptoColosseum,Ic as skaleEuropa,Oc as skaleEuropaTestnet,Rc as skaleExorde,Gc as skaleHumanProtocol,Hc as skaleNebula,Zc as skaleNebulaTestnet,Kc as skaleRazor,Xc as skaleTitan,Yc as skaleTitanTestnet,Jc as sketchpad,Fc as snax,Wc as snaxTestnet,m as solana,T as solanaDevnet,u as solanaTestnet,Qc as somnia,_c as somniaTestnet,$c as soneium,ah as soneiumMinato,sh as songbird,eh as songbirdTestnet,th as sonic,nh as sonicBlazeTestnet,ih as sonicTestnet,oh as sophon,rh as sophonTestnet,lh as sova,ch as sovaSepolia,hh as spicy,ph as stable,dh as stableTestnet,mh as statusNetworkSepolia,Th as statusSepolia,uh as step,bh as story,kh as storyAeneid,fh as storyOdyssey,gh as storyTestnet,yh as stratis,jh as subtensorEvm,vh as superlumio,Sh as superposition,xh as superseed,wh as superseedSepolia,Ch as surgeTestnet,Nh as swan,zh as swanProximaTestnet,Mh as swanSaturnTestnet,Eh as swellchain,qh as swellchainTestnet,Bh as swissdlt,Dh as syscoin,Lh as syscoinTestnet,Ph as tac,Ah as tacSPB,Uh as taiko,Vh as taikoHekla,Ih as taikoHoodi,Oh as taikoJolnir,Rh as taikoKatla,Gh as taikoTestnetSepolia,Hh as taraxa,Zh as taraxaTestnet,Kh as teaSepolia,Xh as telcoinTestnet,Yh as telos,Jh as telosTestnet,Fh as tempo,Wh as tempoDevnet,Qh as tempoLocalnet,_h as tempoMainnet,$h as tempoModerato,ap as tempoTestnet,sp as tenet,ep as ternoa,tp as thaiChain,np as that,ip as theta,op as thetaTestnet,rp as thunderCore,lp as thunderTestnet,cp as tiktrixTestnet,hp as tomb,g as ton,y as tonTestnet,pp as treasure,dp as treasureTopaz,mp as tron,j as tronMainnet,Tp as tronNile,S as tronNileTestnet,up as tronShasta,v as tronShastaTestnet,bp as ubiq,kp as ultra,fp as ultraTestnet,gp as ultron,yp as ultronTestnet,jp as unichain,vp as unichainSepolia,Sp as unique,xp as uniqueOpal,wp as uniqueQuartz,Cp as unreal,Np as valygoNft,zp as valygoSmartchain,Mp as vana,Ep as vanaMoksha,qp as vanar,Bp as vechain,Dp as velas,Lp as viction,Pp as victionTestnet,Ap as vision,Up as visionTestnet,Vp as wanchain,Ip as wanchainTestnet,Op as weaveVMAlphanet,Rp as wemix,Gp as wemixTestnet,Hp as westendAssetHub,Zp as whitechain,Kp as whitechainSepolia,Xp as whitechainTestnet,Yp as wmcTestnet,Jp as worldLand,Fp as worldchain,Wp as worldchainSepolia,Qp as x1Testnet,_p as xLayer,$p as xLayerTestnet,ad as xai,sd as xaiTestnet,ed as xdc,td as xdcTestnet,nd as xgr,id as xoneMainnet,od as xoneTestnet,rd as xphereMainnet,ld as xphereTestnet,cd as xpla,hd as xrOne,pd as xrSepolia,dd as xrplevm,md as xrplevmDevnet,Td as xrplevmTestnet,ud as yooldoVerse,bd as yooldoVerseTestnet,kd as zenchainTestnet,fd as zeniq,gd as zeroG,yd as zeroGGalileoTestnet,jd as zeroGMainnet,vd as zeroGTestnet,Sd as zeroNetwork,xd as zetachain,wd as zetachainAthensTestnet,Cd as zhejiang,Nd as zilliqa,zd as zilliqaTestnet,Md as zircuit,Ed as zircuitGarfieldTestnet,qd as zkFair,Bd as zkFairTestnet,Dd as zkLinkNova,Ld as zkLinkNovaSepoliaTestnet,Pd as zkSync,Ad as zkSyncInMemoryNode,Ud as zkSyncLocalNode,Vd as zkSyncSepoliaTestnet,Id as zkXPLA,Od as zkXPLATestnet,Rd as zksync,Gd as zksyncInMemoryNode,Hd as zksyncLocalCustomHyperchain,Zd as zksyncLocalHyperchain,Kd as zksyncLocalHyperchainL1,Xd as zksyncLocalNode,Yd as zksyncSepoliaTestnet,Jd as zora,Fd as zoraSepolia,Wd as zoraTestnet};
1
+ import{aw as C}from"./NetworkUtil-Xp0fNa8X.js";import{a as z,b as M,c as E,d as q,e as B,f as D,g as L,h as P,i as A,j as U,k as V,l as I,m as O,n as R,o as G,p as H,q as Z,r as K,s as X,t as Y,u as J,v as F,w as W,x as Q,y as _,z as $,A as aa,B as sa,C as ea,D as ta,E as na,F as ia,G as oa,H as ra,I as la,J as ca,K as ha,L as pa,M as da,N as ma,O as Ta,P as ua,Q as ba,R as ka,S as fa,T as ga,U as ya,V as ja,W as va,X as Sa,Y as xa,Z as wa,_ as Ca,$ as Na,a0 as za,a1 as Ma,a2 as Ea,a3 as qa,a4 as Ba,a5 as Da,a6 as La,a7 as Pa,a8 as Aa,a9 as Ua,aa as Va,ab as Ia,ac as Oa,ad as Ra,ae as Ga,af as Ha,ag as Za,ah as Ka,ai as Xa,aj as Ya,ak as Ja,al as Fa,am as Wa,an as Qa,ao as _a,ap as $a,aq as as,ar as ss,as as es,at as ts,au as ns,av as is,aw as os,ax as rs,ay as ls,az as cs,aA as hs,aB as ps,aC as ds,aD as ms,aE as Ts,aF as us,aG as bs,aH as ks,aI as fs,aJ as gs,aK as ys,aL as js,aM as vs,aN as Ss,aO as xs,aP as ws,aQ as Cs,aR as Ns,aS as zs,aT as Ms,aU as Es,aV as qs,aW as Bs,aX as Ds,aY as Ls,aZ as Ps,a_ as As,a$ as Us,b0 as Vs,b1 as Is,b2 as Os,b3 as Rs,b4 as Gs,b5 as Hs,b6 as Zs,b7 as Ks,b8 as Xs,b9 as Ys,ba as Js,bb as Fs,bc as Ws,bd as Qs,be as _s,bf as $s,bg as ae,bh as se,bi as ee,bj as te,bk as ne,bl as ie,bm as oe,bn as re,bo as le,bp as ce,bq as he,br as pe,bs as de,bt as me,bu as Te,bv as ue,bw as be,bx as ke,by as fe,bz as ge,bA as ye,bB as je,bC as ve,bD as Se,bE as xe,bF as we,bG as Ce,bH as Ne,bI as ze,bJ as Me,bK as Ee,bL as qe,bM as Be,bN as De,bO as Le,bP as Pe,bQ as Ae,bR as Ue,bS as Ve,bT as Ie,bU as Oe,bV as Re,bW as Ge,bX as He,bY as Ze,bZ as Ke,b_ as Xe,b$ as Ye,c0 as Je,c1 as Fe,c2 as We,c3 as Qe,c4 as _e,c5 as $e,c6 as at,c7 as st,c8 as et,c9 as tt,ca as nt,cb as it,cc as ot,cd as rt,ce as lt,cf as ct,cg as ht,ch as pt,ci as dt,cj as mt,ck as Tt,cl as ut,cm as bt,cn as kt,co as ft,cp as gt,cq as yt,cr as jt,cs as vt,ct as St,cu as xt,cv as wt,cw as Ct,cx as Nt,cy as zt,cz as Mt,cA as Et,cB as qt,cC as Bt,cD as Dt,cE as Lt,cF as Pt,cG as At,cH as Ut,cI as Vt,cJ as It,cK as Ot,cL as Rt,cM as Gt,cN as Ht,cO as Zt,cP as Kt,cQ as Xt,cR as Yt,cS as Jt,cT as Ft,cU as Wt,cV as Qt,cW as _t,cX as $t,cY as an,cZ as sn,c_ as en,c$ as tn,d0 as nn,d1 as on,d2 as rn,d3 as ln,d4 as cn,d5 as hn,d6 as pn,d7 as dn,d8 as mn,d9 as Tn,da as un,db as bn,dc as kn,dd as fn,de as gn,df as yn,dg as jn,dh as vn,di as Sn,dj as xn,dk as wn,dl as Cn,dm as Nn,dn as zn,dp as Mn,dq as En,dr as qn,ds as Bn,dt as Dn,du as Ln,dv as Pn,dw as An,dx as Un,dy as Vn,dy as In,dz as On,dA as Rn,dB as Gn,dC as Hn,dD as Zn,dE as Kn,dF as Xn,dG as Yn,dH as Jn,dI as Fn,dJ as Wn,dK as Qn,dL as _n,dM as $n,dN as ai,dO as si,dP as ei,dQ as ti,dR as ni,dS as ii,dT as oi,dU as ri,dV as li,dW as ci,dX as hi,dY as pi,dZ as di,d_ as mi,d$ as Ti,e0 as ui,e1 as bi,e2 as ki,e3 as fi,e4 as gi,e5 as yi,e6 as ji,e7 as vi,e8 as Si,e9 as xi,ea as wi,eb as Ci,ec as Ni,ed as zi,ee as Mi,ef as Ei,eg as qi,eh as Bi,ei as Di,ej as Li,ek as Pi,el as Ai,em as Ui,en as Vi,eo as Ii,ep as Oi,eq as Ri,er as Gi,es as Hi,et as Zi,eu as Ki,ev as Xi,ew as Yi,ex as Ji,ey as Fi,ez as Wi,eA as Qi,eB as _i,eC as $i,eD as ao,eE as so,eF as eo,eG as to,eH as no,eI as io,eJ as oo,eK as ro,eL as lo,eM as co,eN as ho,eO as po,eP as mo,eQ as To,eR as uo,eS as bo,eT as ko,eU as fo,eV as go,eW as yo,eX as jo,eY as vo,eZ as So,e_ as xo,e$ as wo,f0 as Co,f1 as No,f2 as zo,f3 as Mo,f4 as Eo,f5 as qo,f6 as Bo,f7 as Do,f8 as Lo,f9 as Po,fa as Ao,fb as Uo,fc as Vo,fd as Io,fe as Oo,ff as Ro,fg as Go,fh as Ho,fi as Zo,fj as Ko,fk as Xo,fl as Yo,fm as Jo,fn as Fo,fo as Wo,fp as Qo,fq as _o,fr as $o,fs as ar,ft as sr,fu as er,fv as tr,fw as nr,fx as ir,fy as or,fz as rr,fA as lr,fB as cr,fC as hr,fD as pr,fE as dr,fF as mr,fG as Tr,fH as ur,fI as br,fJ as kr,fK as fr,fL as gr,fM as yr,fN as jr,fO as vr,fP as Sr,fQ as xr,fR as wr,fS as Cr,fT as Nr,fU as zr,fV as Mr,fW as Er,fX as qr,fY as Br,fZ as Dr,f_ as Lr,f$ as Pr,g0 as Ar,g1 as Ur,g2 as Vr,g3 as Ir,g4 as Or,g5 as Rr,g6 as Gr,g7 as Hr,g8 as Zr,g9 as Kr,ga as Xr,gb as Yr,gc as Jr,gd as Fr,ge as Wr,gf as Qr,gg as _r,gh as $r,gi as al,gj as sl,gk as el,gl as tl,gm as nl,gn as il,go as ol,gp as rl,gq as ll,gr as cl,gs as hl,gt as pl,gu as dl,gv as ml,gw as Tl,gx as ul,gy as bl,gz as kl,gA as fl,gB as gl,gC as yl,gD as jl,gE as vl,gF as Sl,gG as xl,gH as wl,gI as Cl,gJ as Nl,gK as zl,gL as Ml,gM as El,gN as ql,gO as Bl,gP as Dl,gQ as Ll,gR as Pl,gS as Al,gT as Ul,gU as Vl,gV as Il,gW as Ol,gX as Rl,gY as Gl,gZ as Hl,g_ as Zl,g$ as Kl,h0 as Xl,h1 as Yl,h2 as Jl,h3 as Fl,h4 as Wl,h5 as Ql,h6 as _l,h7 as $l,h8 as ac,h9 as sc,ha as ec,hb as tc,hc as nc,hd as ic,he as oc,hf as rc,hg as lc,hh as cc,hi as hc,hj as pc,hk as dc,hl as mc,hm as Tc,hn as uc,ho as bc,hp as kc,hq as fc,hr as gc,hs as yc,ht as jc,hu as vc,hv as Sc,hw as xc,hx as wc,hy as Cc,hz as Nc,hA as zc,hB as Mc,hC as Ec,hD as qc,hE as Bc,hF as Dc,hG as Lc,hH as Pc,hI as Ac,hJ as Uc,hK as Vc,hL as Ic,hM as Oc,hN as Rc,hO as Gc,hP as Hc,hQ as Zc,hR as Kc,hS as Xc,hT as Yc,hU as Jc,hV as Fc,hW as Wc,hX as Qc,hY as _c,hZ as $c,h_ as ah,h$ as sh,i0 as eh,i1 as th,i2 as nh,i3 as ih,i4 as oh,i5 as rh,i6 as lh,i7 as ch,i8 as hh,i9 as ph,ia as dh,ib as mh,ib as Th,ic as uh,id as bh,ie as kh,ig as fh,ih as gh,ii as yh,ij as jh,ik as vh,il as Sh,im as xh,io as wh,ip as Ch,iq as Nh,ir as zh,is as Mh,it as Eh,iu as qh,iv as Bh,iw as Dh,ix as Lh,iy as Ph,iz as Ah,iA as Uh,iB as Vh,iC as Ih,iD as Oh,iE as Rh,iF as Gh,iG as Hh,iH as Zh,iI as Kh,iJ as Xh,iK as Yh,iL as Jh,iM as Fh,iN as Wh,iO as Qh,iM as _h,iP as $h,iP as ap,iQ as sp,iR as ep,iS as tp,iT as np,iU as ip,iV as op,iW as rp,iX as lp,iY as cp,iZ as hp,i_ as pp,i$ as dp,j0 as mp,j1 as Tp,j2 as up,j3 as bp,j4 as kp,j5 as fp,j6 as gp,j7 as yp,j8 as jp,j9 as vp,ja as Sp,jb as xp,jc as wp,jd as Cp,je as Np,jf as zp,jg as Mp,jh as Ep,ji as qp,jj as Bp,jk as Dp,jl as Lp,jm as Pp,jn as Ap,jo as Up,jp as Vp,jq as Ip,jr as Op,js as Rp,jt as Gp,ju as Hp,jv as Zp,jw as Kp,jx as Xp,jy as Yp,jz as Jp,jA as Fp,jB as Wp,jC as Qp,jD as _p,jC as $p,jE as ad,jF as sd,jG as ed,jH as td,jI as nd,jJ as id,jK as od,jL as rd,jM as ld,jN as cd,jO as hd,jP as pd,jQ as dd,jR as md,jS as Td,jT as ud,jU as bd,jV as kd,jW as fd,jX as gd,jY as yd,jZ as jd,j_ as vd,j$ as Sd,k0 as xd,k1 as wd,k2 as Cd,k3 as Nd,k4 as zd,k5 as Md,k6 as Ed,k7 as qd,k8 as Bd,k9 as Dd,ka as Ld,kb as Pd,kc as Ad,kd as Ud,ke as Vd,kf as Id,kg as Od,kb as Rd,kc as Gd,kh as Hd,ki as Zd,kj as Kd,kd as Xd,ke as Yd,kk as Jd,kl as Fd,km as Wd}from"./zoraTestnet-hCARxX58.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./verifyHash-Bm1x5_X2.js";import"./sendRawTransaction-GKBmcmEE.js";import"./index-CxiM65Mp.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";import"./secp256k1-DHZdqghI.js";import"./serializeTransaction-3d8pZ0Iy.js";import"./writeContract-CvT6Z86X.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const m=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"}),T=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"}),u=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"}),b=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"]}}}),k=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}),f=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}),g=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"}),y=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"}),j=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"}),v=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"}),S=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{C as AVAILABLE_NAMESPACES,z as abey,M as abstract,E as abstractTestnet,q as acala,B as acria,D as adf,L as adi,P as agungTestnet,A as aioz,U as alephZero,V as alephZeroTestnet,I as alienx,O as alienxHalTestnet,R as alpenTestnet,G as ancient8,H as ancient8Sepolia,Z as anvil,K as apeChain,X as apexTestnet,Y as apollo,J as arbitrum,F as arbitrumGoerli,W as arbitrumNova,Q as arbitrumSepolia,_ as arc,$ as arcTestnet,aa as arenaz,sa as areonNetwork,ea as areonNetworkTestnet,ta as areum,na as artelaTestnet,ia as arthera,oa as artheraTestnet,ra as assetChain,la as assetChainTestnet,ca as astar,ha as astarZkEVM,pa as astarZkyoto,da as atletaOlympia,ma as aurora,Ta as auroraTestnet,ua as auroria,ba as autheoTestnet,ka as avalanche,fa as avalancheFuji,ga as b3,ya as b3Sepolia,ja as bahamut,va as base,Sa as baseGoerli,xa as basePreconf,wa as baseSepolia,Ca as baseSepoliaPreconf,Na as basecampTestnet,za as battlechain,Ma as battlechainTestnet,Ea as beam,qa as beamTestnet,Ba as bearNetworkChainMainnet,Da as bearNetworkChainTestnet,La as berachain,Pa as berachainBepolia,Aa as berachainTestnet,Ua as berachainTestnetbArtio,Va as bevmMainnet,Ia as bifrost,Oa as birdlayer,Ra as bitTorrent,Ga as bitTorrentTestnet,b as bitcoin,f as bitcoinSignet,k as bitcoinTestnet,Ha as bitgert,Za as bitkub,Ka as bitkubTestnet,Xa as bitlayer,Ya as bitlayerTestnet,Ja as bitrock,Fa as blast,Wa as blastSepolia,Qa as bob,_a as bobSepolia,$a as boba,as as bobaSepolia,ss as boolBetaMainnet,es as botanix,ts as botanixTestnet,ns as bounceBit,is as bounceBitTestnet,os as bronos,rs as bronosTestnet,ls as bsc,cs as bscGreenfield,hs as bscTestnet,ps as bsquared,ds as bsquaredTestnet,ms as btr,Ts as btrTestnet,us as bxn,bs as bxnTestnet,ks as cannon,fs as canto,gs as celo,ys as celoAlfajores,js as celoSepolia,vs as chang,Ss as chiliz,xs as chips,ws as citrate,Cs as citrea,Ns as citreaTestnet,zs as classic,Ms as codex,Es as codexTestnet,qs as coinbit,Bs as coinex,Ds as confluxESpace,Ls as confluxESpaceTestnet,Ps as coreDao,As as coreTestnet1,Us as coreTestnet2,Vs as corn,Is as cornTestnet,Os as cpchain,Rs as crab,Gs as creatorTestnet,Hs as creditCoin3Devnet,Zs as creditCoin3Mainnet,Ks as creditCoin3Testnet,Xs as cronos,Ys as cronosTestnet,Js as cronoszkEVM,Fs as cronoszkEVMTestnet,Ws as crossbell,Qs as crossfi,_s as curtis,$s as cyber,ae as cyberTestnet,se as dailyNetwork,ee as dailyNetworkTestnet,te as darwinia,ne as datahavenTestnet,ie as dbkchain,oe as dchain,re as dchainTestnet,le as defichainEvm,ce as defichainEvmTestnet,a as defineChain,he as degen,pe as dfk,de as diode,me as disChain,Te as dodochainTestnet,ue as dogechain,be as domaTestnet,ke as donatuz,fe as dosChain,ge as dosChainTestnet,ye as dreyerxMainnet,je as dreyerxTestnet,ve as dustboyIoT,Se as dymension,xe as eden,we as edexa,Ce as edexaTestnet,Ne as edgeless,ze as edgelessTestnet,Me as edgeware,Ee as edgewareTestnet,qe as eduChain,Be as eduChainTestnet,De as elastos,Le as elastosTestnet,Pe as electroneum,Ae as electroneumTestnet,Ue as elysiumTestnet,Ve as energy,Ie as eni,Oe as eniTestnet,Re as enuls,Ge as eon,He as eos,Ze as eosTestnet,Ke as eteria,Xe as etherlink,Ye as etherlinkShadownetTestnet,Je as etherlinkTestnet,Fe as ethernity,We as etp,Qe as evmos,_e as evmosTestnet,$e as excelonMainnet,at as expanse,st as exsat,et as exsatTestnet,tt as fantom,nt as fantomSonicTestnet,it as fantomTestnet,ot as fibo,rt as filecoin,lt as filecoinCalibration,ct as filecoinHyperspace,ht as fireChain,pt as flame,dt as flare,mt as flareTestnet,Tt as flowMainnet,ut as flowPreviewnet,bt as flowTestnet,kt as fluence,ft as fluenceStage,gt as fluenceTestnet,yt as fluent,jt as fluentDevnet,vt as fluentTestnet,St as form,xt as formTestnet,wt as forma,Ct as formicarium,Nt as forta,zt as foundry,Mt as fraxtal,Et as fraxtalTestnet,qt as funkiMainnet,Bt as funkiSepolia,Dt as fuse,Lt as fuseSparknet,Pt as fusion,At as fusionTestnet,Ut as garnet,Vt as gatechain,It as geist,Ot as genesys,Rt as gensyn,Gt as giwaSepolia,Ht as giwaSepoliaPreconf,Zt as glideL1Protocol,Kt as glideL2Protocol,Xt as gnosis,Yt as gnosisChiado,Jt as goChain,Ft as goat,Wt as gobi,Qt as godwoken,_t as goerli,$t as graphite,an as graphiteTestnet,sn as grav,en as gravity,tn as gunz,nn as guruNetwork,on as guruTestnet,rn as ham,ln as happychainTestnet,cn as haqqMainnet,hn as haqqTestedge2,pn as hardhat,dn as harmonyOne,mn as hashkey,Tn as hashkeyTestnet,un as haustTestnet,bn as hedera,kn as hederaPreviewnet,fn as hederaTestnet,gn as hela,yn as heliosTestnet,jn as hemi,vn as hemiSepolia,Sn as henesys,xn as holesky,wn as hoodi,Cn as horizenTestnet,Nn as hpb,zn as hpp,Mn as hppSepolia,En as huddle01Mainnet,qn as huddle01Testnet,Bn as humanity,Dn as humanityTestnet,Ln as humanode,Pn as humanodeTestnet5,An as hychain,Un as hychainTestnet,Vn as hyperEvm,In as hyperliquid,On as hyperliquidEvmTestnet,Rn as iSunCoin,Gn as icbNetwork,Hn as idchain,Zn as igra,Kn as immutableZkEvm,Xn as immutableZkEvmTestnet,Yn as inEVM,Jn as initVerse,Fn as initVerseGenesis,Wn as injective,Qn as injectiveTestnet,_n as ink,$n as inkSepolia,ai as iota,si as iotaTestnet,ei as iotex,ti as iotexTestnet,ni as jasmyChain,ii as jasmyChainTestnet,oi as jbc,ri as jbcTestnet,li as jocMainnet,ci as jocTestnet,hi as jovay,pi as jovaySepolia,di as juneo,mi as juneoBCH1Chain,Ti as juneoDAI1Chain,ui as juneoDOGE1Chain,bi as juneoEUR1Chain,ki as juneoGLD1Chain,fi as juneoLINK1Chain,gi as juneoLTC1Chain,yi as juneoSGD1Chain,ji as juneoSocotraTestnet,vi as juneoUSD1Chain,Si as juneoUSDT1Chain,xi as juneomBTC1Chain,wi as kaia,Ci as kairos,Ni as kakarotSepolia,zi as kakarotStarknetSepolia,Mi as kardiaChain,Ei as karura,qi as katana,Bi as kava,Di as kavaTestnet,Li as kcc,Pi as kii,Ai as kiiTestnetOro,Ui as kinto,Vi as klaytn,Ii as klaytnBaobab,Oi as koi,Ri as kroma,Gi as kromaSepolia,Hi as krown,Zi as l3x,Ki as l3xTestnet,Xi as ladyChain,Yi as lavita,Ji as lens,Fi as lensTestnet,Wi as lestnet,Qi as lightlinkPegasus,_i as lightlinkPhoenix,$i as linea,ao as lineaGoerli,so as lineaSepolia,eo as lineaTestnet,to as lisk,no as liskSepolia,io as loadAlphanet,oo as localhost,ro as loop,lo as lukso,co as luksoTestnet,ho as lumiaMainnet,po as lumiaTestnet,mo as lumoz,To as lumozTestnet,uo as luxeports,bo as lycan,ko as lyra,fo as mainnet,go as mandala,yo as manta,jo as mantaSepoliaTestnet,vo as mantaTestnet,So as mantle,xo as mantleSepoliaTestnet,wo as mantleTestnet,Co as mantraDuKongEVMTestnet,No as mantraEVM,zo as mapProtocol,Mo as marooTestnet,Eo as matchain,qo as matchainTestnet,Bo as mchVerse,Do as megaeth,Lo as megaethTestnet,Po as mekong,Ao as meld,Uo as memecore,Vo as merlin,Io as merlinErigonTestnet,Oo as metachain,Ro as metachainIstanbul,Go as metadium,Ho as metalL2,Zo as meter,Ko as meterTestnet,Xo as metis,Yo as metisGoerli,Jo as metisSepolia,Fo as mev,Wo as mevTestnet,Qo as mezo,_o as mezoTestnet,$o as mint,ar as mintSepoliaTestnet,sr as mitosisTestnet,er as mizuhikiTestnetAwaji,tr as mode,nr as modeTestnet,ir as monad,or as monadTestnet,rr as moonbaseAlpha,lr as moonbeam,cr as moonbeamDev,hr as moonriver,pr as morph,dr as morphHolesky,mr as morphSepolia,Tr as nahmii,ur as nautilus,br as near,kr as nearTestnet,fr as neonDevnet,gr as neonMainnet,yr as neoxMainnet,jr as neoxT4,vr as newton,Sr as nexi,xr as nexilix,wr as nibiru,Cr as nitrographTestnet,Nr as nomina,zr as oasisTestnet,Mr as oasys,Er as odysseyTestnet,qr as okc,Br as omax,Dr as omni,Lr as omniOmega,Pr as oneWorld,Ar as oortMainnetDev,Ur as opBNB,Vr as opBNBTestnet,Ir as openledger,Or as optimism,Rr as optimismGoerli,Gr as optimismSepolia,Hr as optopia,Zr as optopiaTestnet,Kr as orderly,Xr as orderlySepolia,Yr as otimDevnet,Jr as palm,Fr as palmTestnet,Wr as paseoPassetHub,Qr as peaq,_r as pgn,$r as pgnTestnet,al as phoenix,sl as planq,el as plasma,tl as plasmaDevnet,nl as plasmaTestnet,il as playfiAlbireo,ol as plinga,rl as plume,ll as plumeDevnet,cl as plumeMainnet,hl as plumeSepolia,pl as plumeTestnet,dl as polterTestnet,ml as polygon,Tl as polygonAmoy,ul as polygonMumbai,bl as polygonZkEvm,kl as polygonZkEvmCardona,fl as polygonZkEvmTestnet,gl as polynomial,yl as polynomialSepolia,jl as potos,vl as potosTestnet,Sl as premiumBlockTestnet,xl as pulsechain,wl as pulsechainV4,Cl as pumpfiTestnet,Nl as pyrope,zl as qMainnet,Ml as qTestnet,El as ql1,ql as quai,Bl as quaiTestnet,Dl as radius,Ll as radiusTestnet,Pl as reactiveTestnet,Al as real,Ul as redbellyMainnet,Vl as redbellyTestnet,Il as reddio,Ol as reddioSepolia,Rl as redstone,Gl as rei,Hl as reyaNetwork,Zl as rise,Kl as riseTestnet,Xl as rivalz,Yl as rollux,Jl as rolluxTestnet,Fl as ronin,Wl as root,Ql as rootPorcini,_l as rootstock,$l as rootstockTestnet,ac as rss3,sc as rss3Sepolia,ec as saakuru,tc as saga,nc as saigon,ic as sanko,oc as sapphire,rc as sapphireTestnet,lc as satoshiVM,cc as satoshiVMTestnet,hc as scroll,pc as scrollSepolia,dc as sei,mc as seiTestnet,Tc as seismicDevnet,uc as sentrix,bc as sentrixTestnet,kc as sepolia,fc as shape,gc as shapeSepolia,yc as shardeum,jc as shardeumSphinx,vc as shibarium,Sc as shibariumTestnet,xc as shiden,wc as shimmer,Cc as shimmerTestnet,Nc as sidraChain,zc as silentData,Mc as silicon,Ec as siliconSepolia,qc as sixProtocol,Bc as skaleBase,Dc as skaleBaseSepoliaTestnet,Lc as skaleBlockBrawlers,Pc as skaleCalypso,Ac as skaleCalypsoTestnet,Uc as skaleCryptoBlades,Vc as skaleCryptoColosseum,Ic as skaleEuropa,Oc as skaleEuropaTestnet,Rc as skaleExorde,Gc as skaleHumanProtocol,Hc as skaleNebula,Zc as skaleNebulaTestnet,Kc as skaleRazor,Xc as skaleTitan,Yc as skaleTitanTestnet,Jc as sketchpad,Fc as snax,Wc as snaxTestnet,m as solana,T as solanaDevnet,u as solanaTestnet,Qc as somnia,_c as somniaTestnet,$c as soneium,ah as soneiumMinato,sh as songbird,eh as songbirdTestnet,th as sonic,nh as sonicBlazeTestnet,ih as sonicTestnet,oh as sophon,rh as sophonTestnet,lh as sova,ch as sovaSepolia,hh as spicy,ph as stable,dh as stableTestnet,mh as statusNetworkSepolia,Th as statusSepolia,uh as step,bh as story,kh as storyAeneid,fh as storyOdyssey,gh as storyTestnet,yh as stratis,jh as subtensorEvm,vh as superlumio,Sh as superposition,xh as superseed,wh as superseedSepolia,Ch as surgeTestnet,Nh as swan,zh as swanProximaTestnet,Mh as swanSaturnTestnet,Eh as swellchain,qh as swellchainTestnet,Bh as swissdlt,Dh as syscoin,Lh as syscoinTestnet,Ph as tac,Ah as tacSPB,Uh as taiko,Vh as taikoHekla,Ih as taikoHoodi,Oh as taikoJolnir,Rh as taikoKatla,Gh as taikoTestnetSepolia,Hh as taraxa,Zh as taraxaTestnet,Kh as teaSepolia,Xh as telcoinTestnet,Yh as telos,Jh as telosTestnet,Fh as tempo,Wh as tempoDevnet,Qh as tempoLocalnet,_h as tempoMainnet,$h as tempoModerato,ap as tempoTestnet,sp as tenet,ep as ternoa,tp as thaiChain,np as that,ip as theta,op as thetaTestnet,rp as thunderCore,lp as thunderTestnet,cp as tiktrixTestnet,hp as tomb,g as ton,y as tonTestnet,pp as treasure,dp as treasureTopaz,mp as tron,j as tronMainnet,Tp as tronNile,S as tronNileTestnet,up as tronShasta,v as tronShastaTestnet,bp as ubiq,kp as ultra,fp as ultraTestnet,gp as ultron,yp as ultronTestnet,jp as unichain,vp as unichainSepolia,Sp as unique,xp as uniqueOpal,wp as uniqueQuartz,Cp as unreal,Np as valygoNft,zp as valygoSmartchain,Mp as vana,Ep as vanaMoksha,qp as vanar,Bp as vechain,Dp as velas,Lp as viction,Pp as victionTestnet,Ap as vision,Up as visionTestnet,Vp as wanchain,Ip as wanchainTestnet,Op as weaveVMAlphanet,Rp as wemix,Gp as wemixTestnet,Hp as westendAssetHub,Zp as whitechain,Kp as whitechainSepolia,Xp as whitechainTestnet,Yp as wmcTestnet,Jp as worldLand,Fp as worldchain,Wp as worldchainSepolia,Qp as x1Testnet,_p as xLayer,$p as xLayerTestnet,ad as xai,sd as xaiTestnet,ed as xdc,td as xdcTestnet,nd as xgr,id as xoneMainnet,od as xoneTestnet,rd as xphereMainnet,ld as xphereTestnet,cd as xpla,hd as xrOne,pd as xrSepolia,dd as xrplevm,md as xrplevmDevnet,Td as xrplevmTestnet,ud as yooldoVerse,bd as yooldoVerseTestnet,kd as zenchainTestnet,fd as zeniq,gd as zeroG,yd as zeroGGalileoTestnet,jd as zeroGMainnet,vd as zeroGTestnet,Sd as zeroNetwork,xd as zetachain,wd as zetachainAthensTestnet,Cd as zhejiang,Nd as zilliqa,zd as zilliqaTestnet,Md as zircuit,Ed as zircuitGarfieldTestnet,qd as zkFair,Bd as zkFairTestnet,Dd as zkLinkNova,Ld as zkLinkNovaSepoliaTestnet,Pd as zkSync,Ad as zkSyncInMemoryNode,Ud as zkSyncLocalNode,Vd as zkSyncSepoliaTestnet,Id as zkXPLA,Od as zkXPLATestnet,Rd as zksync,Gd as zksyncInMemoryNode,Hd as zksyncLocalCustomHyperchain,Zd as zksyncLocalHyperchain,Kd as zksyncLocalHyperchainL1,Xd as zksyncLocalNode,Yd as zksyncSepoliaTestnet,Jd as zora,Fd as zoraSepolia,Wd 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-B4OkjZ5Z.js";import{c as g}from"./index-BQwZ_U1w.js";import"./index-PGZV0u8x.js";import{O as T}from"./index-B3vzzuVP.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-BWjqHbac.js";import"./index-Do7lLz-O.js";import"./index--JSSHFMQ.js";import"./index-DJsdR_Dh.js";import"./index-CTwiT5J0.js";import"./index-Cr7q_wI-.js";import"./index-B4p2eLga.js";import"./index-2yTqM9xZ.js";import"./index-C_jKIil3.js";import"./index-BBuZMaWr.js";import"./react-C51i12iP.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";import"./index-nRbKhfJe.js";import"./events-DQ172AOg.js";import"./index-C7VPGrdO.js";import"./index-Bk6ayCIs.js";import"./index-nibyPLVP.js";import"./index-goSkKmOv.js";import"./index.es-BsTkmkjS.js";import"./browser-ponyfill-Djb5Py6a.js";import"./browser-ponyfill-DMgE6PM5.js";import"./NetworkUtil-Xp0fNa8X.js";import"./ref-BsAZ42-h.js";import"./async-directive-BRxn_Py3.js";const F=O`
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-CPaULSDF.js";import{c as g}from"./index-Co5hU_e6.js";import"./index-CsD_onu6.js";import{O as T}from"./index-DmTT-8Pb.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-CH9k7C8I.js";import"./index-CTwvZCoF.js";import"./index-DaAuLTDJ.js";import"./index-BwU057Dz.js";import"./index-DgiZIEtb.js";import"./index-CjzqNOFR.js";import"./index-BoxWf2CA.js";import"./index-yfYb8KLO.js";import"./index-BB1no6U7.js";import"./index-CxiM65Mp.js";import"./react-C51i12iP.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";import"./index-DkJQfwjP.js";import"./events-DQ172AOg.js";import"./index-CTWPqZAC.js";import"./index-Bk6ayCIs.js";import"./index-nibyPLVP.js";import"./index-LP7qradW.js";import"./index.es-_UBQCq8d.js";import"./browser-ponyfill-Djb5Py6a.js";import"./browser-ponyfill-DMgE6PM5.js";import"./NetworkUtil-Xp0fNa8X.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-B9F_g0GG.js";import"./utils-CBfcEx8F.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./index-BBuZMaWr.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.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 x(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,x as relayOpenZeppelinTransaction};
1
+ import{j as p,o as y,b as c,r as w}from"./signing-CE_zI5_x.js";import"./utils-CBfcEx8F.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./index-CxiM65Mp.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.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 x(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,x as relayOpenZeppelinTransaction};
@@ -1 +1 @@
1
- import{d as o,e as c,r as d}from"./signing-B9F_g0GG.js";import{d as a}from"./detectExtension-BSAkQ0I6.js";import"./utils-CBfcEx8F.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./index-BBuZMaWr.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";const t="0x6352211e",r=[{name:"tokenId",type:"uint256"}],n=[{type:"address"}];function N(e){return a({availableSelectors:e,method:[t,r,n]})}function i(e){return c(r,[e.tokenId])}function S(e){return t+i(e).slice(2)}function T(e){return o(n,e)[0]}async function h(e){return d({contract:e.contract,method:[t,r,n],params:[e.tokenId]})}export{t as FN_SELECTOR,T as decodeOwnerOfResult,S as encodeOwnerOf,i as encodeOwnerOfParams,N as isOwnerOfSupported,h as ownerOf};
1
+ import{d as o,e as c,r as d}from"./signing-CE_zI5_x.js";import{d as a}from"./detectExtension-C-xKGK-n.js";import"./utils-CBfcEx8F.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./index-CxiM65Mp.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";const t="0x6352211e",r=[{name:"tokenId",type:"uint256"}],n=[{type:"address"}];function N(e){return a({availableSelectors:e,method:[t,r,n]})}function i(e){return c(r,[e.tokenId])}function S(e){return t+i(e).slice(2)}function T(e){return o(n,e)[0]}async function h(e){return d({contract:e.contract,method:[t,r,n],params:[e.tokenId]})}export{t as FN_SELECTOR,T as decodeOwnerOfResult,S as encodeOwnerOf,i as encodeOwnerOfParams,N as isOwnerOfSupported,h as ownerOf};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/getNFT-BuDjU8-b.js","assets/index-BBuZMaWr.js","assets/react-C51i12iP.js","assets/dcl-schemas-BICTSpB5.js","assets/sentry-DKBoGDXH.js","assets/ethers-BeFqf2KO.js","assets/intl-CBcMB1D2.js","assets/index-PISx9bvm.css","assets/fetchTokenMetadata-BTRazXId.js","assets/uint8-array-CjVHUazS.js","assets/signing-B9F_g0GG.js","assets/utils-CBfcEx8F.js","assets/thirdweb-D99mQjH-.js","assets/wait-for-tx-receipt-Dt-8wYDQ.js","assets/transactionReceipt-OilL7-NS.js","assets/sleep-mAKpSMLY.js","assets/eth_estimateGas-A7dV8Dq8.js","assets/eth_getStorageAt-DVqXAuzZ.js","assets/eth_getTransactionCount-DLrwUt6V.js","assets/decimals-DCazhsdS.js","assets/decimals-Cdn10TAV.js","assets/zora-sepolia-CKT05Lph.js","assets/send-batch-transaction-Bbiva6rb.js","assets/getNFT-1nUsfQAJ.js","assets/totalSupply-BhpAtMjH.js","assets/detectExtension-BSAkQ0I6.js"])))=>i.map(i=>d[i]);
2
- import{_ as m}from"./index-BBuZMaWr.js";import{a as I}from"./utils-CBfcEx8F.js";import{i as h,b as E}from"./signing-B9F_g0GG.js";import"./react-C51i12iP.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";function A(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 N(t){let e=t.uri;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[w="",l="",r=""]=e.split("/"),[a,i]=w.split(":"),[s,n]=l.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 u=I(Number(i)),o=E({address:n,chain:u,client:t.client});switch(s){case"erc721":{const{getNFT:c}=await m(async()=>{const{getNFT:d}=await import("./getNFT-BuDjU8-b.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,20,21,22]));return(await c({contract:o,tokenId:BigInt(r)})).metadata.image??null}case"erc1155":{const{getNFT:c}=await m(async()=>{const{getNFT:d}=await import("./getNFT-1nUsfQAJ.js");return{getNFT:d}},__vite__mapDeps([23,12,11,4,2,10,1,3,5,6,7,13,14,15,16,17,18,19,20,21,22,8,9,24,25]));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{A as parseNFT,N as parseNftUri};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/getNFT-Cv97lepQ.js","assets/index-CxiM65Mp.js","assets/react-C51i12iP.js","assets/dcl-schemas-BICTSpB5.js","assets/sentry-DKBoGDXH.js","assets/ethers-BeFqf2KO.js","assets/intl-CBcMB1D2.js","assets/index-PISx9bvm.css","assets/fetchTokenMetadata-DJ4cCYA_.js","assets/uint8-array-CjVHUazS.js","assets/signing-CE_zI5_x.js","assets/utils-CBfcEx8F.js","assets/thirdweb-RN8sw7m_.js","assets/wait-for-tx-receipt-B0NrXGCa.js","assets/transactionReceipt-CXYiDrev.js","assets/sleep-mAKpSMLY.js","assets/eth_estimateGas-rl3D263K.js","assets/eth_getStorageAt-IB0eULMI.js","assets/eth_getTransactionCount-CtQzPcnF.js","assets/decimals-C-EZF79s.js","assets/decimals-2cHWSu_l.js","assets/zora-sepolia-CKT05Lph.js","assets/send-batch-transaction-BXPWrXSK.js","assets/getNFT-DmshVHQV.js","assets/totalSupply-CokjmPid.js","assets/detectExtension-C-xKGK-n.js"])))=>i.map(i=>d[i]);
2
+ import{_ as m}from"./index-CxiM65Mp.js";import{a as I}from"./utils-CBfcEx8F.js";import{i as h,b as E}from"./signing-CE_zI5_x.js";import"./react-C51i12iP.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-BeFqf2KO.js";import"./intl-CBcMB1D2.js";function A(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 N(t){let e=t.uri;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[w="",l="",r=""]=e.split("/"),[a,i]=w.split(":"),[s,n]=l.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 u=I(Number(i)),o=E({address:n,chain:u,client:t.client});switch(s){case"erc721":{const{getNFT:c}=await m(async()=>{const{getNFT:d}=await import("./getNFT-Cv97lepQ.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,20,21,22]));return(await c({contract:o,tokenId:BigInt(r)})).metadata.image??null}case"erc1155":{const{getNFT:c}=await m(async()=>{const{getNFT:d}=await import("./getNFT-DmshVHQV.js");return{getNFT:d}},__vite__mapDeps([23,12,11,4,2,10,1,3,5,6,7,13,14,15,16,17,18,19,20,21,22,8,9,24,25]));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{A as parseNFT,N as parseNftUri};