@dcl/shop 1.17.1 → 1.17.2-36157867735.commit-7431f7b

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 (251) hide show
  1. package/_assets/{Activity-BNjXw97e.js → Activity-CE6Jeo_T.js} +9 -9
  2. package/_assets/{AnimatedBackground-kFDegzCM.js → AnimatedBackground-D5MFl62Y.js} +3 -3
  3. package/_assets/{Assets-D_dCmUv0.js → Assets-COp5lo1c.js} +7 -7
  4. package/_assets/{Cart-BPv_4JHc.js → Cart-CXTYKHB4.js} +5 -5
  5. package/_assets/{Collection-2qp7F46n.js → Collection-D6GAA887.js} +7 -7
  6. package/_assets/{CollectionCarousel-CXiZiW-S.js → CollectionCarousel-C_r2HthR.js} +7 -7
  7. package/_assets/{Confetti-Bsu2ytMi.js → Confetti-DPZN6qJi.js} +4 -4
  8. package/_assets/{ConstantsUtil-czCTnHYO.js → ConstantsUtil-C6ody29O.js} +2 -2
  9. package/_assets/{ContentClient-CIV5rrAt.js → ContentClient-C03rRrUz.js} +2 -2
  10. package/_assets/{Creator-CIH3WU3e.js → Creator-Chq_3FKW.js} +7 -7
  11. package/_assets/{CreditPackPicker-Cf2WXrfD.js → CreditPackPicker-yPm96IIv.js} +2 -2
  12. package/_assets/{CreditRate-DjCL9hVD.js → CreditRate-BxqKLfaA.js} +6 -6
  13. package/_assets/{DeploymentBuilder-C3NqEfXH.js → DeploymentBuilder-B2QubYgD.js} +2 -2
  14. package/_assets/{EmotePlaybackBar-Bq7TckV0.js → EmotePlaybackBar-Cp9UGu_L.js} +3 -3
  15. package/_assets/{ErrorNotice-DSZ4YOzl.js → ErrorNotice-D_6j8-7f.js} +2 -2
  16. package/_assets/{Event-D__OUwpc.js → Event-v8GnBTyC.js} +2 -2
  17. package/_assets/{ExchangeController-BlkQV8ix.js → ExchangeController-CE3cQOVu.js} +2 -2
  18. package/_assets/{Faq-Daw98w_f.js → Faq-Dfduj2eM.js} +2 -2
  19. package/_assets/{Filters-COsCKlQM.js → Filters-CdMOVmbU.js} +2 -2
  20. package/_assets/{GetCredits-uaIm_-xy.js → GetCredits-BS--XoK-.js} +2 -2
  21. package/_assets/{Grow-nApzPG32.js → Grow-CPeuefrF.js} +2 -2
  22. package/_assets/{HelpersUtil-Dhc8srsx.js → HelpersUtil-B_SruwGa.js} +2 -2
  23. package/_assets/IssueModal-D_PS_2Xk.js +323 -0
  24. package/_assets/ItemDetail-DBAHPIQO.js +3090 -0
  25. package/_assets/{LoadMore-D8gtSgyc.js → LoadMore-CM5ykem-.js} +2 -2
  26. package/_assets/{ManaPricingBanner-CiV8R5vd.js → ManaPricingBanner-CZzRxND3.js} +2 -2
  27. package/_assets/{ManaPricingBanner.styles-BNQ_wLgO.js → ManaPricingBanner.styles-B10EKkra.js} +2 -2
  28. package/_assets/{MyAssets-XbkBS3DE.js → MyAssets-Fhl2lazZ.js} +2 -2
  29. package/_assets/{MyFavorites-lktPT4tc.js → MyFavorites-DqyQ-SFM.js} +10 -10
  30. package/_assets/MyStore-B5e7oQJa.js +1691 -0
  31. package/_assets/{NetworkUtil-BwvINT8v.js → NetworkUtil-iL8rkdmy.js} +2 -2
  32. package/_assets/{NotFound-CIueRHHs.js → NotFound-sBVYlhk3.js} +2 -2
  33. package/_assets/NotificationsBell-TdDjFO5P.js +142 -0
  34. package/_assets/{OutfitDetail-MDYbLLf8.js → OutfitDetail-BBsCNaaP.js} +3 -3
  35. package/_assets/{OutfitPreview-C52GjMv6.js → OutfitPreview-BTJ-IIEH.js} +3 -3
  36. package/_assets/{OutfitStudio-uomtfIa1.js → OutfitStudio-DXHZfbf9.js} +10 -10
  37. package/_assets/{PaymentMethodStep-aQUg-E9d.js → PaymentMethodStep-Ob8YI_SL.js} +5 -5
  38. package/_assets/{SaleCountdown-BC6cklIs.js → SaleCountdown-KX9dNqTp.js} +2 -2
  39. package/_assets/{Spinner-NI6IZA5A.js → Spinner-DKskpIEZ.js} +2 -2
  40. package/_assets/{StoreSettings-BrdRpaVU.js → StoreSettings-Bia_W-8Q.js} +8 -8
  41. package/_assets/{Success-Bsg9-DNo.js → Success-2dVHPO-2.js} +2 -2
  42. package/_assets/{SwapController-DVbKfkaS.js → SwapController-CbFqSpFg.js} +2 -2
  43. package/_assets/{Tooltip-DIRWGOxl.js → Tooltip-DFrRznAp.js} +2 -2
  44. package/_assets/{TradeService-CK7xu_Fq.js → TradeService-CDS_PfTn.js} +2 -2
  45. package/_assets/{W3MFrameProviderSingleton-BWvDpNTL.js → W3MFrameProviderSingleton-C4KtItmg.js} +4 -4
  46. package/_assets/{WebCryptoP256-pa_zJ5z4.js → WebCryptoP256-CbiRbOjq.js} +2 -2
  47. package/_assets/{basic-Mlwb1YPe.js → basic-BufXGp2F.js} +2 -2
  48. package/_assets/{biconomy-CIvkhhfY.js → biconomy-BR1CMfhe.js} +2 -2
  49. package/_assets/{browseLayout.styles-D3u_lxUV.js → browseLayout.styles-DF9DTUfO.js} +2 -2
  50. package/_assets/{browser-BnRQXFFw.js → browser-DqwPlfZs.js} +2 -2
  51. package/_assets/{browser-ponyfill-Dmn_2mUU.js → browser-ponyfill-DqHLL_k5.js} +2 -2
  52. package/_assets/{browser-lYIugjhZ.js → browser-qc2dUFk5.js} +2 -2
  53. package/_assets/{buy-MeE-N2le.js → buy-BiTHthT9.js} +2 -2
  54. package/_assets/{buy-gasless-ZiYiDzb-.js → buy-gasless-CTp90Dvn.js} +2 -2
  55. package/_assets/{ccip-D2v4Tmss.js → ccip-DZfLdErH.js} +2 -2
  56. package/_assets/{ccip-D9Kr5HJY.js → ccip-rfpBm5bL.js} +2 -2
  57. package/_assets/{chains-CfHTI0IT.js → chains-BWqZ-nYk.js} +2 -2
  58. package/_assets/{collectionPage.styles-Drt5ivqQ.js → collectionPage.styles-Db2PBFNG.js} +4 -4
  59. package/_assets/{common-BkGfzbjV.js → common-BfXnUVAM.js} +2 -2
  60. package/_assets/{controller-B1XkQ-8T.js → controller-ZXDDsCxP.js} +3 -3
  61. package/_assets/{core-8MNjsO3A.js → core-DfE8LCjh.js} +5 -5
  62. package/_assets/{createSvgIcon-BKu0ThNd.js → createSvgIcon-BUkltLfu.js} +2 -2
  63. package/_assets/{crumbs.styles-IWrGqGTW.js → crumbs.styles-R8odPxFR.js} +2 -2
  64. package/_assets/{custom-RQn4QL1O.js → custom-DKOD0xYg.js} +2 -2
  65. package/_assets/{data-capture-BCz6ZuJe.js → data-capture-C3eH7C_s.js} +2 -2
  66. package/_assets/{dcl-schemas-BgQanFex.js → dcl-schemas-BW3BbT5l.js} +2 -2
  67. package/_assets/{decimals-DQ6egFLl.js → decimals-BI0yoEux.js} +2 -2
  68. package/_assets/{decimals-Yu9nfiap.js → decimals-DQJMb7J9.js} +2 -2
  69. package/_assets/{detectExtension-mxrpMjPD.js → detectExtension-C_GbFz5_.js} +2 -2
  70. package/_assets/{disposePreview-DPlzBDEC.js → disposePreview-5Jddp9do.js} +2 -2
  71. package/_assets/{email-C9hzZFfn.js → email-D4HLC7wh.js} +7 -7
  72. package/_assets/{embedded-wallet-sNZ139r3.js → embedded-wallet-CMbzkthX.js} +2 -2
  73. package/_assets/{emotion-styled.browser.esm-CFDaRZFq.js → emotion-styled.browser.esm-B6eszsio.js} +2 -2
  74. package/_assets/{engine-t2WwPyT-.js → engine-BA9Hr8Az.js} +2 -2
  75. package/_assets/{errors-TvhLJhmP.js → errors-DnOSpKoV.js} +2 -2
  76. package/_assets/{estimate-l1-fee-V6V7FI1H.js → estimate-l1-fee-BZt36dEW.js} +2 -2
  77. package/_assets/{eth_estimateGas-vmn477Rl.js → eth_estimateGas-mNInGC82.js} +2 -2
  78. package/_assets/{eth_getStorageAt-BJsh0E1g.js → eth_getStorageAt-CW3VLsR7.js} +2 -2
  79. package/_assets/{eth_getTransactionCount-DjYi-3h-.js → eth_getTransactionCount-DGbTHobL.js} +2 -2
  80. package/_assets/{ethereum-CtosgwHU.js → ethereum-Cez4WhJf.js} +2 -2
  81. package/_assets/{ethers-RdXTApYJ.js → ethers-DGYWmyb1.js} +2 -2
  82. package/_assets/{events-DcSLjVuU.js → events-YMZCt1yV.js} +2 -2
  83. package/_assets/{execute-Da7DgAmR.js → execute-CVxgGRa9.js} +3 -3
  84. package/_assets/{extractIPFS-Cczu9meN.js → extractIPFS-BdalrjY7.js} +2 -2
  85. package/_assets/{features-C_bdmaJE.js → features-BPD34bt1.js} +2 -2
  86. package/_assets/{fetchTokenMetadata-7Kgsjbv4.js → fetchTokenMetadata-DOlcjXZI.js} +3 -3
  87. package/_assets/{field.styles-DDXjryam.js → field.styles-CIXh24AQ.js} +2 -2
  88. package/_assets/{fortmatic-BPBqqvfl.js → fortmatic-DGrmZpu1.js} +2 -2
  89. package/_assets/{get-bytecode-Bbw_Evod.js → get-bytecode-N2OV9nFo.js} +2 -2
  90. package/_assets/{get-ecosystem-wallet-info-81lpLPU_.js → get-ecosystem-wallet-info-CVK-PjWL.js} +2 -2
  91. package/_assets/{getBalance-BgqMuvIf.js → getBalance-BEz0Zoiv.js} +3 -3
  92. package/_assets/{getInstalledModules-W4RDd7ik.js → getInstalledModules-AznSDC44.js} +2 -2
  93. package/_assets/{getNFT-anMIImQh.js → getNFT-VxK16uv_.js} +2 -2
  94. package/_assets/{getNFT-BDhkq7kr.js → getNFT-aR5kSoWa.js} +3 -3
  95. package/_assets/{grid.styles-D--qOwVq.js → grid.styles-CVQcD_5t.js} +2 -2
  96. package/_assets/{hashTypedData-CiWRFQn6.js → hashTypedData-ByCdES4z.js} +2 -2
  97. package/_assets/{hashTypedData-CUDRpwju.js → hashTypedData-ywahqODz.js} +2 -2
  98. package/_assets/{import-CIZWEISk.js → import-CPlDKdWo.js} +2 -2
  99. package/_assets/{in-app-BbIysh8c.js → in-app-D43FjnXM.js} +2 -2
  100. package/_assets/{in-app-wallet-calls-BgxC18Ff.js → in-app-wallet-calls-DmZ4pxIH.js} +2 -2
  101. package/_assets/{index-DQS3Dydb.js → index-0FaDHGAZ.js} +2 -2
  102. package/_assets/{index-BKGo_9wu.js → index-7s_cYB0r.js} +2 -2
  103. package/_assets/{index-DFQS58XE.js → index-B67Ropoe.js} +3 -3
  104. package/_assets/{index-CM4FAtZl.js → index-B7aqs-FR.js} +2 -2
  105. package/_assets/{index-BhhO1oEp.js → index-B8kJyL6G.js} +2 -2
  106. package/_assets/{index-qrz6WiaK.js → index-BAAoctqn.js} +2 -2
  107. package/_assets/{index-C0EB4Nb3.js → index-BBS-v8LD.js} +17 -17
  108. package/_assets/{index-8wQks0w8.js → index-BFVKoQeh.js} +2 -2
  109. package/_assets/{index-B1OJuolS.js → index-BIDkjxTy.js} +2 -2
  110. package/_assets/{index-hLoLHUKV.js → index-BMak5rZb.js} +2 -2
  111. package/_assets/{index-BlG9tYXl.js → index-BOyogbet.js} +2 -2
  112. package/_assets/{index-CjuTKXut.js → index-BUZUNt7Z.js} +2 -2
  113. package/_assets/{index-BNn-tbAt.js → index-BUnaJjPH.js} +2 -2
  114. package/_assets/{index-B49OLLy1.js → index-Bf74R1qS.js} +2 -2
  115. package/_assets/{index-BhGdGiCs.js → index-BfZKaxHs.js} +3 -3
  116. package/_assets/{index--yUfiOex.js → index-Bf_iGaP5.js} +2 -2
  117. package/_assets/{index-DTWx6T1S.js → index-BkdjGh-W.js} +2 -2
  118. package/_assets/{index-BwKvHJ-v.js → index-C2S4XG0R.js} +2 -2
  119. package/_assets/{index-OhRAcbHT.js → index-C7Le7sHG.js} +2 -2
  120. package/_assets/{index-DzyghasH.js → index-CA4CUNiy.js} +2 -2
  121. package/_assets/{index-CeM8omfX.js → index-CHBzdW6M.js} +2 -2
  122. package/_assets/{index-Dxfnkqq4.js → index-CLpLBvH2.js} +2 -2
  123. package/_assets/{index-DO6ydGXX.js → index-CNjrqKOs.js} +2 -2
  124. package/_assets/{index-lQ2m7yUy.js → index-CSuaHD6u.js} +2 -2
  125. package/_assets/{index-BJvtfv1M.js → index-CT7NzvvO.js} +2 -2
  126. package/_assets/{index-Zum9uUGy.js → index-CU2OselF.js} +2 -2
  127. package/_assets/{index-D1S8t2fe.js → index-CY4_MrXH.js} +2 -2
  128. package/_assets/{index-Cw_s9pOw.js → index-C_2eXgm7.js} +2 -2
  129. package/_assets/{index-D22FRuvW.js → index-CeLw5QQ-.js} +3 -3
  130. package/_assets/{index-CtSgRzsY.js → index-CepaElib.js} +2 -2
  131. package/_assets/{index-ClIQf3ng.js → index-CgfbItO2.js} +2 -2
  132. package/_assets/{index-BIAEBlSw.js → index-ChIjTbh5.js} +2 -2
  133. package/_assets/{index-Bc7EMqAf.js → index-Ci4_h86U.js} +2 -2
  134. package/_assets/{index-BGZlLdrL.js → index-CnfBCYQg.js} +2 -2
  135. package/_assets/{index-cGB6nHYf.js → index-CtoH5DSl.js} +6 -6
  136. package/_assets/{index-wOPFghKT.js → index-Cx1doNkB.js} +2 -2
  137. package/_assets/{index-DfOPi5vf.js → index-CxOeCVBB.js} +3 -3
  138. package/_assets/{index-BDdcoEFU.js → index-CzV7sMdy.js} +4 -4
  139. package/_assets/{index-DZEeeDQr.js → index-DCSutgdw.js} +2 -2
  140. package/_assets/{index-DCdW2yi4.js → index-DIYb1IGB.js} +4 -4
  141. package/_assets/{index-CvR8He0C.js → index-DR9_Mkt6.js} +2 -2
  142. package/_assets/{index-B-gdbRSW.js → index-DSwxHrMr.js} +2 -2
  143. package/_assets/{index-BeH18kmv.js → index-DZ3S9SRN.js} +2 -2
  144. package/_assets/{index-Bs_f3yhf.js → index-DZ53HgoK.js} +2 -2
  145. package/_assets/{index-CFBOIeXE.js → index-DZaHlbE_.js} +2 -2
  146. package/_assets/{index-Cf6ERmsZ.js → index-D_2nYoM8.js} +2 -2
  147. package/_assets/{index-CZEYeX3l.js → index-DauMTBWE.js} +2 -2
  148. package/_assets/{index-BmsamR4M.js → index-DhWCbjGh.js} +2 -2
  149. package/_assets/{index-Dz8UCy0P.js → index-DtS7bQfE.js} +2 -2
  150. package/_assets/{index-DU6vOlyL.js → index-DyhsaJtc.js} +2 -2
  151. package/_assets/{index-Dkohypnm.js → index-LRrTgDY0.js} +4 -4
  152. package/_assets/{index-BRWjazWI.js → index-LxRrm7nL.js} +2 -2
  153. package/_assets/{index-DOn0iodU.js → index-PFt3YITh.js} +2 -2
  154. package/_assets/{index-DAysx568.js → index-T6hDl-2V.js} +2 -2
  155. package/_assets/{index-C5s2ci0r.js → index-Tz82vi2e.js} +2 -2
  156. package/_assets/{index-CSZAw8dC.js → index-W7W-N49f.js} +2 -2
  157. package/_assets/{index-Bsw53nId.js → index-ZDiu1J1j.js} +2 -2
  158. package/_assets/{index-BMjX5Tw6.js → index-bz3DaQP5.js} +2 -2
  159. package/_assets/{index-M4vJyniz.js → index-cCjjJ8Zd.js} +2 -2
  160. package/_assets/{index-Cq62ZdRW.js → index-feJ6CP8x.js} +3 -3
  161. package/_assets/{index-B6895neV.js → index-gfZnCNa6.js} +2 -2
  162. package/_assets/{index-FfTM_1mz.js → index-guDRvZQ4.js} +2 -2
  163. package/_assets/{index-CwCEh7Ea.js → index-mzIsCjWs.js} +2 -2
  164. package/_assets/{index-962zUKU_.js → index-ox01jvxx.js} +2 -2
  165. package/_assets/index-qTkXqLEk.css +1 -0
  166. package/_assets/{index-DTVY5scD.js → index-tske-Qm0.js} +2 -2
  167. package/_assets/index-v6-0TPZX.js +3 -0
  168. package/_assets/{index-_bcedLK5.js → index-y50hP8_O.js} +2 -2
  169. package/_assets/{index.es-C1YwoJJN.js → index.es-D61fhzOk.js} +2 -2
  170. package/_assets/{index.es-YMSgumSf.js → index.es-DUQRyY8V.js} +2 -2
  171. package/_assets/{index.es-BirWIv1k.js → index.es-DrJv9QY8.js} +2 -2
  172. package/_assets/{index.es-O8xfjyk3.js → index.es-_SlY0diQ.js} +5 -5
  173. package/_assets/items-empty-Dtl-YwtZ.js +2 -0
  174. package/_assets/{jump-DddgnPSC.js → jump-JCYO-k8J.js} +2 -2
  175. package/_assets/{linkAccount-CHDe6wUT.js → linkAccount-D_xpNX67.js} +2 -2
  176. package/_assets/{loader-logo-ChNoWI1Z.js → loader-logo-k6aOBN-R.js} +2 -2
  177. package/_assets/{localBatchGatewayRequest-tSt38JDm.js → localBatchGatewayRequest-T0sFQZ26.js} +2 -2
  178. package/_assets/{modal.styles-BPDABQCr.js → modal.styles-BAz9vPux.js} +2 -2
  179. package/_assets/{native-Cxh3QIKd.js → native-Fndcg4e5.js} +2 -2
  180. package/_assets/{networks-rNqzEIu1.js → networks-BkPPSIG9.js} +2 -2
  181. package/_assets/{onramp-Cjb0y_EX.js → onramp-DCjZy1Yr.js} +2 -2
  182. package/_assets/{openzeppelin-Dbgk07uO.js → openzeppelin-DWeyp33R.js} +2 -2
  183. package/_assets/{ownerOf-ifwSx1wQ.js → ownerOf-D0cjIIIs.js} +2 -2
  184. package/_assets/{parseNft-BgX116P8.js → parseNft-DCt8GvNK.js} +3 -3
  185. package/_assets/{parseSignature-B3jn_FVR.js → parseSignature-BbjgUCSK.js} +4 -4
  186. package/_assets/{parseSignature-Cjx-94kV.js → parseSignature-CtMzBmLG.js} +2 -2
  187. package/_assets/{passkeys-C14r7a1U.js → passkeys-DUrjX8Ro.js} +2 -2
  188. package/_assets/{pay-with-exchange-BoqePTss.js → pay-with-exchange-vAQgw-nO.js} +2 -2
  189. package/_assets/{prepare-contract-call-CVD1LMqZ.js → prepare-contract-call-BitMGE96.js} +2 -2
  190. package/_assets/{qr-overlay-BaF8O6L7.js → qr-overlay-3Ogvmodj.js} +4 -4
  191. package/_assets/{react-57wE9FMW.js → react-Ddn-9d83.js} +2 -2
  192. package/_assets/{receive-_KdL5WbJ.js → receive-UBqFYKku.js} +9 -9
  193. package/_assets/{resolveImplementation-BIVOA86N.js → resolveImplementation-CoCWI1LK.js} +2 -2
  194. package/_assets/{resume-buy-RWKNCH2I.js → resume-buy-DqlXnoQq.js} +2 -2
  195. package/_assets/{resume-name-CVkpKZkm.js → resume-name-B5w3HYnd.js} +2 -2
  196. package/_assets/{rpc-BuxGvW8N.js → rpc-C-RDZHVf.js} +2 -2
  197. package/_assets/{sales-empty-BrdJIpZF.js → sales-empty-DFvbsd1W.js} +2 -2
  198. package/_assets/{search-empty-B9EfPE1P.js → search-empty-D1Tausth.js} +2 -2
  199. package/_assets/{secp256k1-D98PKoK-.js → secp256k1-By6IQ83k.js} +2 -2
  200. package/_assets/{secp256k1-DtCcUzXl.js → secp256k1-CAqSDg9Y.js} +2 -2
  201. package/_assets/{secp256k1-C3mpZkpr.js → secp256k1-CxMxDBug.js} +2 -2
  202. package/_assets/{send-CPee34BT.js → send-Dg3aA-cT.js} +2 -2
  203. package/_assets/{send-batch-transaction-CRYeO2Ew.js → send-batch-transaction-CcGULLl4.js} +2 -2
  204. package/_assets/{send-eip712-transaction-DmUbX1xf.js → send-eip712-transaction-eRcl-w9x.js} +3 -3
  205. package/_assets/{send-gasless-transaction-Cl9L9F1A.js → send-gasless-transaction-BVE00Z8q.js} +3 -3
  206. package/_assets/send-transaction-bNnxjmkm.js +3 -0
  207. package/_assets/{sendMetaTransaction-B7N-qRfh.js → sendMetaTransaction-DaTro9ph.js} +2 -2
  208. package/_assets/{sendRawTransaction-DAT5LyNo.js → sendRawTransaction-Crv4h2Fe.js} +4 -4
  209. package/_assets/{sentry-C6Mao8WI.js → sentry-D_8KijKQ.js} +3 -3
  210. package/_assets/{serializeTransaction-CjRJ0psk.js → serializeTransaction-CPg2ul-G.js} +2 -2
  211. package/_assets/{session-proposal-ueoRTwfB.js → session-proposal-Di1f8LHY.js} +2 -2
  212. package/_assets/{session-request-BD9TXTaA.js → session-request-R2yVi8HQ.js} +3 -3
  213. package/_assets/{sha256-DbvztKVh.js → sha256-BhCi5WIJ.js} +2 -2
  214. package/_assets/{sha3-5JMjwcQn.js → sha3-CLQFMym7.js} +2 -2
  215. package/_assets/signin-empty-PXLDIsQk.js +2 -0
  216. package/_assets/{signing-D8djUTSU.js → signing-BCODmgNV.js} +4 -4
  217. package/_assets/{skeleton.styles-Bvaum8jS.js → skeleton.styles-anODpKJf.js} +2 -2
  218. package/_assets/{socials-NQn6q4he.js → socials-DShz1WgZ.js} +2 -2
  219. package/_assets/{styled-CCNK0K71.js → styled-CbzE9JXd.js} +2 -2
  220. package/_assets/{swaps-CgWjr3x_.js → swaps-BXF_khPF.js} +2 -2
  221. package/_assets/{thirdweb-C1alV0QS.js → thirdweb-Cnc0UXDQ.js} +4 -4
  222. package/_assets/{to-serializable-transaction-BKQS5d49.js → to-serializable-transaction-DzZsdRzk.js} +3 -3
  223. package/_assets/{totalSupply-CF5FI8lQ.js → totalSupply-D4EQMS5T.js} +2 -2
  224. package/_assets/{trade-encoding-BV1_7YxJ.js → trade-encoding-BdtZmg5A.js} +2 -2
  225. package/_assets/{transaction-BVLpkah4.js → transaction-Cbet3IZc.js} +2 -2
  226. package/_assets/{transactionReceipt-DwjBLtBg.js → transactionReceipt-DSeG56jV.js} +2 -2
  227. package/_assets/{transactions-DW_nxFG-.js → transactions-B5gQmUHm.js} +2 -2
  228. package/_assets/useInfiniteGrid-C5wDaoVd.js +2 -0
  229. package/_assets/{useStore-CJ2zzclt.js → useStore-wU9qkXc9.js} +3 -3
  230. package/_assets/{useTheme-D3lC36b8.js → useTheme-y50PSrCO.js} +2 -2
  231. package/_assets/{utils-DyoF2n1_.js → utils-BGzZ7mCg.js} +2 -2
  232. package/_assets/{verifyHash-D_k8MOkd.js → verifyHash-I86XFFeN.js} +2 -2
  233. package/_assets/{w3m-modal-BwPY12eH.js → w3m-modal-COSR0Fsr.js} +2 -2
  234. package/_assets/{w3m-modal-CIfTlIpr.js → w3m-modal-Dz0XFS0k.js} +2 -2
  235. package/_assets/{wait-for-tx-receipt-BQf97Yv5.js → wait-for-tx-receipt-C3zFGaKb.js} +2 -2
  236. package/_assets/{wallets-Cor67NYq.js → wallets-BM2FKp9V.js} +6 -6
  237. package/_assets/{web-connector-AUtPfxac.js → web-connector-DXaUpGnD.js} +4 -4
  238. package/_assets/{writeContract-_6z0Fw9c.js → writeContract-Bja8jWrS.js} +2 -2
  239. package/_assets/{zora-sepolia-DFxo1Oif.js → zora-sepolia-B6FH_u_V.js} +2 -2
  240. package/_assets/{zoraTestnet-B4Lgrc00.js → zoraTestnet-CDn6xrjW.js} +2 -2
  241. package/index.html +12 -12
  242. package/package.json +2 -2
  243. package/_assets/ItemDetail-big_cmBY.js +0 -3411
  244. package/_assets/MyStore-SSChApNZ.js +0 -1630
  245. package/_assets/NotificationsBell-BiwzCIb4.js +0 -142
  246. package/_assets/index-DoXX6TgS.css +0 -1
  247. package/_assets/index-GCKJ9yxg.js +0 -3
  248. package/_assets/items-empty-BciJH2B_.js +0 -2
  249. package/_assets/send-transaction-CydyNIuj.js +0 -3
  250. package/_assets/signin-empty-Duq453f-.js +0 -2
  251. package/_assets/useInfiniteGrid-CbPWAhDP.js +0 -2
@@ -1,2 +1,2 @@
1
- import{b3 as a,b4 as n}from"./index-C0EB4Nb3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="fbd943ed-70d4-411f-a4aa-f1927ac59d00",t._sentryDebugIdIdentifier="sentry-dbid-fbd943ed-70d4-411f-a4aa-f1927ac59d00")}catch{}})();const o="https://wearable-preview.decentraland.zone",_="https://decentraland.zone/account",d="https://decentraland.zone/profile",c="https://decentraland.zone/marketplace",R="https://decentraland.zone/shop",s="https://decentraland.zone/builder",L="https://decentraland.zone/dao",r="https://decentraland.zone/governance",U="https://decentraland.zone/events",E="https://decentraland.zone/places",l="https://decentraland.org/create/",O="https://docs.decentraland.org/player/",A="https://decentraland.zone/download/creator-hub/",T="https://decentraland.zone/download/",p="https://decentraland.zone/download_success/",N="ea2ybdmmn1kv",S="master",C="18g1DzIyBxvu0steSwKyQr",h="https://cms-api.decentraland.org",I="https://decentraland.zone/marketplace/names/claim",D="https://decentraland.zone/marketplace/lands",g="https://decentraland.zone/marketplace/account",$="https://decentraland.zone/create/",i="https://studios.decentraland.zone/",P="https://decentraland.zone/builder/collections",m="https://decentraland.zone/builder/names",B="https://decentraland.zone/builder/worlds?tab=dcl",y="https://decentraland.zone/builder/land",M="https://decentraland.zone/events/me/",V="https://decentraland.zone/places/favorites/",b="https://docs.decentraland.org/player/",u="https://docs.decentraland.org/creator/",G="https://decentraland.zone/blog/",F="https://docs.decentraland.org/contributor/",f="https://decentraland.zone/governance/transparency/",K="https://decentraland.zone/governance/proposals/",v="https://decentraland.zone/dao/grants/",Y="https://decentraland.zone/governance/projects/",z="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",w="https://decentraland.zone/marketplace/settings",H="https://dcl.gg/discord",W="https://reddit.com/r/decentraland",k="https://github.com/decentraland",x="https://x.com/decentraland",j="https://instagram.com/decentraland_foundation/",Q="https://youtube.com/@decentraland_foundation",J="https://tiktok.com/@decentraland_fdn",X="https://linkedin.com/company/decentralandorg",q="https://decentraland.zone/privacy",Z="https://decentraland.zone/terms",tt="https://decentraland.zone/content",nt="https://decentraland.zone/ethics",et="https://decentraland.org/help",at="mailto:hello@decentraland.org",ot="https://docs.decentraland.org/faqs/decentraland-101",_t="https://docs.decentraland.org",dt="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",ct="https://download-gateway.decentraland.zone",Rt="https://decentraland.zone/top-scenes",st="https://testflight.apple.com/join/KF4r3jlU",Lt="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",rt={WEARABLE_PREVIEW_URL:o,ACCOUNT_URL:_,PROFILE_URL:d,MARKETPLACE_URL:c,SHOP_URL:R,BUILDER_URL:s,DAO_URL:L,GOVERNANCE_URL:r,EVENTS_URL:U,PLACES_URL:E,CREATE_URL:l,LEARN_URL:O,CREATOR_HUB_URL:A,DOWNLOAD_URL:T,DOWNLOAD_SUCCESS_URL:p,CONTENTFUL_SPACE_ID:N,CONTENTFUL_ENV:S,CONTENTFUL_NAVBAR_ENTRY_ID:C,CONTENTFUL_CONTENTFUL_CDN_URL:h,MARKETPLACE_NAMES_URL:I,MARKETPLACE_LANDS_URL:D,MARKETPLACE_MY_ASSETS_URL:g,LANDING_CREATORS_URL:$,STUDIOS_URL:i,BUILDER_WEARABLE_EMOTES_URL:P,BUILDER_NAMES_URL:m,BUILDER_WORLDS_URL:B,BUILDER_LAND_URL:y,EVENTS_MY_EVENTS:M,PLACES_MY_FAVORITE_URL:V,DOCS_ABOUT_URL:b,DOCS_CREATORS_URL:u,BLOG_URL:G,DOCS_CONTRIBUTOR_URL:F,GOVERNANCE_TRANSPARENCY_URL:f,GOVERNANCE_PROPOSALS_URL:K,DAO_GRANTS_URL:v,GOVERNANCE_PROJECTS_URL:Y,DOCS_DAO_URL:z,MARKETPLACE_SETTINGS_URL:w,DISCORD_URL:H,REDDIT_URL:W,GITHUB_URL:k,X_URL:x,INSTAGRAM_URL:j,YOUTUBE_URL:Q,TIKTOK_URL:J,LINKEDIN_URL:X,PRIVACY_POLICY_URL:q,TERMS_OF_USE_URL:Z,CONTENT_POLICY_URL:tt,CODE_OF_ETHICS_URL:nt,SUPPORT_URL:et,EMAIL_HELLO_URL:at,FAQ_URL:ot,DOCS_URL:_t,BEEHIV_SUBSCRIPTION_URL:dt,AUTO_SIGNING_BASE_URL:ct,TOP_SCENES_URL:Rt,IOS_STORE_URL:st,ANDROID_STORE_URL:Lt},Ut="https://wearable-preview.decentraland.org",Et="https://decentraland.org/account",lt="https://decentraland.org/profile",Ot="https://decentraland.org/marketplace",At="https://decentraland.org/shop",Tt="https://decentraland.org/builder",pt="https://decentraland.org/dao",Nt="https://decentraland.org/governance",St="https://decentraland.org/events",Ct="https://decentraland.org/places",ht="https://decentraland.org/create/",It="https://docs.decentraland.org/player/",Dt="https://decentraland.org/download/creator-hub/",gt="https://decentraland.org/download/",$t="https://decentraland.org/download_success/",it="ea2ybdmmn1kv",Pt="master",mt="18g1DzIyBxvu0steSwKyQr",Bt="https://cms-api.decentraland.org",yt="https://decentraland.org/marketplace/names/claim",Mt="https://decentraland.org/marketplace/lands",Vt="https://decentraland.org/marketplace/account",bt="https://decentraland.org/create/",ut="https://studios.decentraland.org/",Gt="https://decentraland.org/builder/collections",Ft="https://decentraland.org/builder/names",ft="https://decentraland.org/builder/worlds?tab=dcl",Kt="https://decentraland.org/builder/land",vt="https://decentraland.org/events/me/",Yt="https://decentraland.org/places/favorites/",zt="https://docs.decentraland.org/player/",wt="https://docs.decentraland.org/creator/",Ht="https://decentraland.org/blog/",Wt="https://docs.decentraland.org/contributor/",kt="https://decentraland.org/governance/transparency/",xt="https://decentraland.org/governance/proposals/",jt="https://decentraland.org/dao/grants/",Qt="https://decentraland.org/governance/projects/",Jt="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Xt="https://decentraland.org/marketplace/settings",qt="https://dcl.gg/discord",Zt="https://reddit.com/r/decentraland",tn="https://github.com/decentraland",nn="https://x.com/decentraland",en="https://instagram.com/decentraland_foundation/",an="https://youtube.com/@decentraland_foundation",on="https://tiktok.com/@decentraland_fdn",_n="https://linkedin.com/company/decentralandorg",dn="https://decentraland.org/privacy",cn="https://decentraland.org/terms",Rn="https://decentraland.org/content",sn="https://decentraland.org/ethics",Ln="https://decentraland.org/help",rn="mailto:hello@decentraland.org",Un="https://docs.decentraland.org/faqs/decentraland-101",En="https://docs.decentraland.org",ln="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",On="https://download-gateway.decentraland.org",An="https://decentraland.org/top-scenes",Tn="https://testflight.apple.com/join/KF4r3jlU",pn="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",Nn={WEARABLE_PREVIEW_URL:Ut,ACCOUNT_URL:Et,PROFILE_URL:lt,MARKETPLACE_URL:Ot,SHOP_URL:At,BUILDER_URL:Tt,DAO_URL:pt,GOVERNANCE_URL:Nt,EVENTS_URL:St,PLACES_URL:Ct,CREATE_URL:ht,LEARN_URL:It,CREATOR_HUB_URL:Dt,DOWNLOAD_URL:gt,DOWNLOAD_SUCCESS_URL:$t,CONTENTFUL_SPACE_ID:it,CONTENTFUL_ENV:Pt,CONTENTFUL_NAVBAR_ENTRY_ID:mt,CONTENTFUL_CONTENTFUL_CDN_URL:Bt,MARKETPLACE_NAMES_URL:yt,MARKETPLACE_LANDS_URL:Mt,MARKETPLACE_MY_ASSETS_URL:Vt,LANDING_CREATORS_URL:bt,STUDIOS_URL:ut,BUILDER_WEARABLE_EMOTES_URL:Gt,BUILDER_NAMES_URL:Ft,BUILDER_WORLDS_URL:ft,BUILDER_LAND_URL:Kt,EVENTS_MY_EVENTS:vt,PLACES_MY_FAVORITE_URL:Yt,DOCS_ABOUT_URL:zt,DOCS_CREATORS_URL:wt,BLOG_URL:Ht,DOCS_CONTRIBUTOR_URL:Wt,GOVERNANCE_TRANSPARENCY_URL:kt,GOVERNANCE_PROPOSALS_URL:xt,DAO_GRANTS_URL:jt,GOVERNANCE_PROJECTS_URL:Qt,DOCS_DAO_URL:Jt,MARKETPLACE_SETTINGS_URL:Xt,DISCORD_URL:qt,REDDIT_URL:Zt,GITHUB_URL:tn,X_URL:nn,INSTAGRAM_URL:en,YOUTUBE_URL:an,TIKTOK_URL:on,LINKEDIN_URL:_n,PRIVACY_POLICY_URL:dn,TERMS_OF_USE_URL:cn,CONTENT_POLICY_URL:Rn,CODE_OF_ETHICS_URL:sn,SUPPORT_URL:Ln,EMAIL_HELLO_URL:rn,FAQ_URL:Un,DOCS_URL:En,BEEHIV_SUBSCRIPTION_URL:ln,AUTO_SIGNING_BASE_URL:On,TOP_SCENES_URL:An,IOS_STORE_URL:Tn,ANDROID_STORE_URL:pn},Sn="https://wearable-preview.decentraland.today",Cn="https://decentraland.today/account",hn="https://decentraland.today/profile",In="https://decentraland.today/marketplace",Dn="https://decentraland.today/shop",gn="https://decentraland.today/builder",$n="https://decentraland.today/dao",Pn="https://decentraland.today/governance",mn="https://decentraland.today/events",Bn="https://decentraland.today/places",yn="https://decentraland.today/create/",Mn="https://docs.decentraland.org/player/",Vn="https://decentraland.today/download/creator-hub/",bn="https://decentraland.today/download/",un="https://decentraland.today/download_success/",Gn="ea2ybdmmn1kv",Fn="master",fn="18g1DzIyBxvu0steSwKyQr",Kn="https://cms-api.decentraland.org",vn="https://decentraland.today/marketplace/names/claim",Yn="https://decentraland.today/marketplace/lands",zn="https://decentraland.today/marketplace/account",wn="https://decentraland.today/create/",Hn="https://studios.decentraland.today/",Wn="https://decentraland.today/builder/collections",kn="https://decentraland.today/builder/names",xn="https://decentraland.today/builder/worlds?tab=dcl",jn="https://decentraland.today/builder/land",Qn="https://decentraland.today/events/me/",Jn="https://decentraland.today/places/favorites/",Xn="https://docs.decentraland.org/player/",qn="https://docs.decentraland.org/creator/",Zn="https://decentraland.today/blog/",te="https://docs.decentraland.org/contributor/",ne="https://decentraland.today/governance/transparency/",ee="https://decentraland.today/governance/proposals/",ae="https://decentraland.today/dao/grants/",oe="https://decentraland.today/governance/projects/",_e="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",de="https://decentraland.today/marketplace/settings",ce="https://dcl.gg/discord",Re="https://reddit.com/r/decentraland",se="https://github.com/decentraland",Le="https://x.com/decentraland",re="https://instagram.com/decentraland_foundation/",Ue="https://youtube.com/@decentraland_foundation",Ee="https://tiktok.com/@decentraland_fdn",le="https://linkedin.com/company/decentralandorg",Oe="https://decentraland.org/privacy",Ae="https://decentraland.org/terms",Te="https://decentraland.org/content",pe="https://decentraland.org/ethics",Ne="https://decentraland.org/help",Se="mailto:hello@decentraland.org",Ce="https://docs.decentraland.org/faqs/decentraland-101",he="https://docs.decentraland.org",Ie="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",De="https://download-gateway.decentraland.zone",ge="https://decentraland.zone/top-scenes",$e="https://testflight.apple.com/join/KF4r3jlU",ie="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",Pe={WEARABLE_PREVIEW_URL:Sn,ACCOUNT_URL:Cn,PROFILE_URL:hn,MARKETPLACE_URL:In,SHOP_URL:Dn,BUILDER_URL:gn,DAO_URL:$n,GOVERNANCE_URL:Pn,EVENTS_URL:mn,PLACES_URL:Bn,CREATE_URL:yn,LEARN_URL:Mn,CREATOR_HUB_URL:Vn,DOWNLOAD_URL:bn,DOWNLOAD_SUCCESS_URL:un,CONTENTFUL_SPACE_ID:Gn,CONTENTFUL_ENV:Fn,CONTENTFUL_NAVBAR_ENTRY_ID:fn,CONTENTFUL_CONTENTFUL_CDN_URL:Kn,MARKETPLACE_NAMES_URL:vn,MARKETPLACE_LANDS_URL:Yn,MARKETPLACE_MY_ASSETS_URL:zn,LANDING_CREATORS_URL:wn,STUDIOS_URL:Hn,BUILDER_WEARABLE_EMOTES_URL:Wn,BUILDER_NAMES_URL:kn,BUILDER_WORLDS_URL:xn,BUILDER_LAND_URL:jn,EVENTS_MY_EVENTS:Qn,PLACES_MY_FAVORITE_URL:Jn,DOCS_ABOUT_URL:Xn,DOCS_CREATORS_URL:qn,BLOG_URL:Zn,DOCS_CONTRIBUTOR_URL:te,GOVERNANCE_TRANSPARENCY_URL:ne,GOVERNANCE_PROPOSALS_URL:ee,DAO_GRANTS_URL:ae,GOVERNANCE_PROJECTS_URL:oe,DOCS_DAO_URL:_e,MARKETPLACE_SETTINGS_URL:de,DISCORD_URL:ce,REDDIT_URL:Re,GITHUB_URL:se,X_URL:Le,INSTAGRAM_URL:re,YOUTUBE_URL:Ue,TIKTOK_URL:Ee,LINKEDIN_URL:le,PRIVACY_POLICY_URL:Oe,TERMS_OF_USE_URL:Ae,CONTENT_POLICY_URL:Te,CODE_OF_ETHICS_URL:pe,SUPPORT_URL:Ne,EMAIL_HELLO_URL:Se,FAQ_URL:Ce,DOCS_URL:he,BEEHIV_SUBSCRIPTION_URL:Ie,AUTO_SIGNING_BASE_URL:De,TOP_SCENES_URL:ge,IOS_STORE_URL:$e,ANDROID_STORE_URL:ie},ye=a({[n.DEVELOPMENT]:rt,[n.STAGING]:Pe,[n.PRODUCTION]:Nn});export{ye as c};
2
- //# sourceMappingURL=index-CwCEh7Ea.js.map
1
+ import{b4 as a,b5 as n}from"./index-BBS-v8LD.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="d8723ddf-dd07-4972-8b16-da3f1c18d4e7",t._sentryDebugIdIdentifier="sentry-dbid-d8723ddf-dd07-4972-8b16-da3f1c18d4e7")}catch{}})();const o="https://wearable-preview.decentraland.zone",_="https://decentraland.zone/account",d="https://decentraland.zone/profile",c="https://decentraland.zone/marketplace",R="https://decentraland.zone/shop",s="https://decentraland.zone/builder",L="https://decentraland.zone/dao",r="https://decentraland.zone/governance",U="https://decentraland.zone/events",E="https://decentraland.zone/places",l="https://decentraland.org/create/",O="https://docs.decentraland.org/player/",A="https://decentraland.zone/download/creator-hub/",T="https://decentraland.zone/download/",p="https://decentraland.zone/download_success/",N="ea2ybdmmn1kv",S="master",C="18g1DzIyBxvu0steSwKyQr",h="https://cms-api.decentraland.org",I="https://decentraland.zone/marketplace/names/claim",D="https://decentraland.zone/marketplace/lands",g="https://decentraland.zone/marketplace/account",$="https://decentraland.zone/create/",i="https://studios.decentraland.zone/",P="https://decentraland.zone/builder/collections",m="https://decentraland.zone/builder/names",B="https://decentraland.zone/builder/worlds?tab=dcl",y="https://decentraland.zone/builder/land",M="https://decentraland.zone/events/me/",V="https://decentraland.zone/places/favorites/",b="https://docs.decentraland.org/player/",u="https://docs.decentraland.org/creator/",G="https://decentraland.zone/blog/",F="https://docs.decentraland.org/contributor/",f="https://decentraland.zone/governance/transparency/",K="https://decentraland.zone/governance/proposals/",v="https://decentraland.zone/dao/grants/",Y="https://decentraland.zone/governance/projects/",z="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",w="https://decentraland.zone/marketplace/settings",H="https://dcl.gg/discord",W="https://reddit.com/r/decentraland",k="https://github.com/decentraland",x="https://x.com/decentraland",j="https://instagram.com/decentraland_foundation/",Q="https://youtube.com/@decentraland_foundation",J="https://tiktok.com/@decentraland_fdn",X="https://linkedin.com/company/decentralandorg",q="https://decentraland.zone/privacy",Z="https://decentraland.zone/terms",tt="https://decentraland.zone/content",nt="https://decentraland.zone/ethics",et="https://decentraland.org/help",at="mailto:hello@decentraland.org",ot="https://docs.decentraland.org/faqs/decentraland-101",_t="https://docs.decentraland.org",dt="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",ct="https://download-gateway.decentraland.zone",Rt="https://decentraland.zone/top-scenes",st="https://testflight.apple.com/join/KF4r3jlU",Lt="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",rt={WEARABLE_PREVIEW_URL:o,ACCOUNT_URL:_,PROFILE_URL:d,MARKETPLACE_URL:c,SHOP_URL:R,BUILDER_URL:s,DAO_URL:L,GOVERNANCE_URL:r,EVENTS_URL:U,PLACES_URL:E,CREATE_URL:l,LEARN_URL:O,CREATOR_HUB_URL:A,DOWNLOAD_URL:T,DOWNLOAD_SUCCESS_URL:p,CONTENTFUL_SPACE_ID:N,CONTENTFUL_ENV:S,CONTENTFUL_NAVBAR_ENTRY_ID:C,CONTENTFUL_CONTENTFUL_CDN_URL:h,MARKETPLACE_NAMES_URL:I,MARKETPLACE_LANDS_URL:D,MARKETPLACE_MY_ASSETS_URL:g,LANDING_CREATORS_URL:$,STUDIOS_URL:i,BUILDER_WEARABLE_EMOTES_URL:P,BUILDER_NAMES_URL:m,BUILDER_WORLDS_URL:B,BUILDER_LAND_URL:y,EVENTS_MY_EVENTS:M,PLACES_MY_FAVORITE_URL:V,DOCS_ABOUT_URL:b,DOCS_CREATORS_URL:u,BLOG_URL:G,DOCS_CONTRIBUTOR_URL:F,GOVERNANCE_TRANSPARENCY_URL:f,GOVERNANCE_PROPOSALS_URL:K,DAO_GRANTS_URL:v,GOVERNANCE_PROJECTS_URL:Y,DOCS_DAO_URL:z,MARKETPLACE_SETTINGS_URL:w,DISCORD_URL:H,REDDIT_URL:W,GITHUB_URL:k,X_URL:x,INSTAGRAM_URL:j,YOUTUBE_URL:Q,TIKTOK_URL:J,LINKEDIN_URL:X,PRIVACY_POLICY_URL:q,TERMS_OF_USE_URL:Z,CONTENT_POLICY_URL:tt,CODE_OF_ETHICS_URL:nt,SUPPORT_URL:et,EMAIL_HELLO_URL:at,FAQ_URL:ot,DOCS_URL:_t,BEEHIV_SUBSCRIPTION_URL:dt,AUTO_SIGNING_BASE_URL:ct,TOP_SCENES_URL:Rt,IOS_STORE_URL:st,ANDROID_STORE_URL:Lt},Ut="https://wearable-preview.decentraland.org",Et="https://decentraland.org/account",lt="https://decentraland.org/profile",Ot="https://decentraland.org/marketplace",At="https://decentraland.org/shop",Tt="https://decentraland.org/builder",pt="https://decentraland.org/dao",Nt="https://decentraland.org/governance",St="https://decentraland.org/events",Ct="https://decentraland.org/places",ht="https://decentraland.org/create/",It="https://docs.decentraland.org/player/",Dt="https://decentraland.org/download/creator-hub/",gt="https://decentraland.org/download/",$t="https://decentraland.org/download_success/",it="ea2ybdmmn1kv",Pt="master",mt="18g1DzIyBxvu0steSwKyQr",Bt="https://cms-api.decentraland.org",yt="https://decentraland.org/marketplace/names/claim",Mt="https://decentraland.org/marketplace/lands",Vt="https://decentraland.org/marketplace/account",bt="https://decentraland.org/create/",ut="https://studios.decentraland.org/",Gt="https://decentraland.org/builder/collections",Ft="https://decentraland.org/builder/names",ft="https://decentraland.org/builder/worlds?tab=dcl",Kt="https://decentraland.org/builder/land",vt="https://decentraland.org/events/me/",Yt="https://decentraland.org/places/favorites/",zt="https://docs.decentraland.org/player/",wt="https://docs.decentraland.org/creator/",Ht="https://decentraland.org/blog/",Wt="https://docs.decentraland.org/contributor/",kt="https://decentraland.org/governance/transparency/",xt="https://decentraland.org/governance/proposals/",jt="https://decentraland.org/dao/grants/",Qt="https://decentraland.org/governance/projects/",Jt="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Xt="https://decentraland.org/marketplace/settings",qt="https://dcl.gg/discord",Zt="https://reddit.com/r/decentraland",tn="https://github.com/decentraland",nn="https://x.com/decentraland",en="https://instagram.com/decentraland_foundation/",an="https://youtube.com/@decentraland_foundation",on="https://tiktok.com/@decentraland_fdn",_n="https://linkedin.com/company/decentralandorg",dn="https://decentraland.org/privacy",cn="https://decentraland.org/terms",Rn="https://decentraland.org/content",sn="https://decentraland.org/ethics",Ln="https://decentraland.org/help",rn="mailto:hello@decentraland.org",Un="https://docs.decentraland.org/faqs/decentraland-101",En="https://docs.decentraland.org",ln="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",On="https://download-gateway.decentraland.org",An="https://decentraland.org/top-scenes",Tn="https://testflight.apple.com/join/KF4r3jlU",pn="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",Nn={WEARABLE_PREVIEW_URL:Ut,ACCOUNT_URL:Et,PROFILE_URL:lt,MARKETPLACE_URL:Ot,SHOP_URL:At,BUILDER_URL:Tt,DAO_URL:pt,GOVERNANCE_URL:Nt,EVENTS_URL:St,PLACES_URL:Ct,CREATE_URL:ht,LEARN_URL:It,CREATOR_HUB_URL:Dt,DOWNLOAD_URL:gt,DOWNLOAD_SUCCESS_URL:$t,CONTENTFUL_SPACE_ID:it,CONTENTFUL_ENV:Pt,CONTENTFUL_NAVBAR_ENTRY_ID:mt,CONTENTFUL_CONTENTFUL_CDN_URL:Bt,MARKETPLACE_NAMES_URL:yt,MARKETPLACE_LANDS_URL:Mt,MARKETPLACE_MY_ASSETS_URL:Vt,LANDING_CREATORS_URL:bt,STUDIOS_URL:ut,BUILDER_WEARABLE_EMOTES_URL:Gt,BUILDER_NAMES_URL:Ft,BUILDER_WORLDS_URL:ft,BUILDER_LAND_URL:Kt,EVENTS_MY_EVENTS:vt,PLACES_MY_FAVORITE_URL:Yt,DOCS_ABOUT_URL:zt,DOCS_CREATORS_URL:wt,BLOG_URL:Ht,DOCS_CONTRIBUTOR_URL:Wt,GOVERNANCE_TRANSPARENCY_URL:kt,GOVERNANCE_PROPOSALS_URL:xt,DAO_GRANTS_URL:jt,GOVERNANCE_PROJECTS_URL:Qt,DOCS_DAO_URL:Jt,MARKETPLACE_SETTINGS_URL:Xt,DISCORD_URL:qt,REDDIT_URL:Zt,GITHUB_URL:tn,X_URL:nn,INSTAGRAM_URL:en,YOUTUBE_URL:an,TIKTOK_URL:on,LINKEDIN_URL:_n,PRIVACY_POLICY_URL:dn,TERMS_OF_USE_URL:cn,CONTENT_POLICY_URL:Rn,CODE_OF_ETHICS_URL:sn,SUPPORT_URL:Ln,EMAIL_HELLO_URL:rn,FAQ_URL:Un,DOCS_URL:En,BEEHIV_SUBSCRIPTION_URL:ln,AUTO_SIGNING_BASE_URL:On,TOP_SCENES_URL:An,IOS_STORE_URL:Tn,ANDROID_STORE_URL:pn},Sn="https://wearable-preview.decentraland.today",Cn="https://decentraland.today/account",hn="https://decentraland.today/profile",In="https://decentraland.today/marketplace",Dn="https://decentraland.today/shop",gn="https://decentraland.today/builder",$n="https://decentraland.today/dao",Pn="https://decentraland.today/governance",mn="https://decentraland.today/events",Bn="https://decentraland.today/places",yn="https://decentraland.today/create/",Mn="https://docs.decentraland.org/player/",Vn="https://decentraland.today/download/creator-hub/",bn="https://decentraland.today/download/",un="https://decentraland.today/download_success/",Gn="ea2ybdmmn1kv",Fn="master",fn="18g1DzIyBxvu0steSwKyQr",Kn="https://cms-api.decentraland.org",vn="https://decentraland.today/marketplace/names/claim",Yn="https://decentraland.today/marketplace/lands",zn="https://decentraland.today/marketplace/account",wn="https://decentraland.today/create/",Hn="https://studios.decentraland.today/",Wn="https://decentraland.today/builder/collections",kn="https://decentraland.today/builder/names",xn="https://decentraland.today/builder/worlds?tab=dcl",jn="https://decentraland.today/builder/land",Qn="https://decentraland.today/events/me/",Jn="https://decentraland.today/places/favorites/",Xn="https://docs.decentraland.org/player/",qn="https://docs.decentraland.org/creator/",Zn="https://decentraland.today/blog/",te="https://docs.decentraland.org/contributor/",ne="https://decentraland.today/governance/transparency/",ee="https://decentraland.today/governance/proposals/",ae="https://decentraland.today/dao/grants/",oe="https://decentraland.today/governance/projects/",_e="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",de="https://decentraland.today/marketplace/settings",ce="https://dcl.gg/discord",Re="https://reddit.com/r/decentraland",se="https://github.com/decentraland",Le="https://x.com/decentraland",re="https://instagram.com/decentraland_foundation/",Ue="https://youtube.com/@decentraland_foundation",Ee="https://tiktok.com/@decentraland_fdn",le="https://linkedin.com/company/decentralandorg",Oe="https://decentraland.org/privacy",Ae="https://decentraland.org/terms",Te="https://decentraland.org/content",pe="https://decentraland.org/ethics",Ne="https://decentraland.org/help",Se="mailto:hello@decentraland.org",Ce="https://docs.decentraland.org/faqs/decentraland-101",he="https://docs.decentraland.org",Ie="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",De="https://download-gateway.decentraland.zone",ge="https://decentraland.zone/top-scenes",$e="https://testflight.apple.com/join/KF4r3jlU",ie="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",Pe={WEARABLE_PREVIEW_URL:Sn,ACCOUNT_URL:Cn,PROFILE_URL:hn,MARKETPLACE_URL:In,SHOP_URL:Dn,BUILDER_URL:gn,DAO_URL:$n,GOVERNANCE_URL:Pn,EVENTS_URL:mn,PLACES_URL:Bn,CREATE_URL:yn,LEARN_URL:Mn,CREATOR_HUB_URL:Vn,DOWNLOAD_URL:bn,DOWNLOAD_SUCCESS_URL:un,CONTENTFUL_SPACE_ID:Gn,CONTENTFUL_ENV:Fn,CONTENTFUL_NAVBAR_ENTRY_ID:fn,CONTENTFUL_CONTENTFUL_CDN_URL:Kn,MARKETPLACE_NAMES_URL:vn,MARKETPLACE_LANDS_URL:Yn,MARKETPLACE_MY_ASSETS_URL:zn,LANDING_CREATORS_URL:wn,STUDIOS_URL:Hn,BUILDER_WEARABLE_EMOTES_URL:Wn,BUILDER_NAMES_URL:kn,BUILDER_WORLDS_URL:xn,BUILDER_LAND_URL:jn,EVENTS_MY_EVENTS:Qn,PLACES_MY_FAVORITE_URL:Jn,DOCS_ABOUT_URL:Xn,DOCS_CREATORS_URL:qn,BLOG_URL:Zn,DOCS_CONTRIBUTOR_URL:te,GOVERNANCE_TRANSPARENCY_URL:ne,GOVERNANCE_PROPOSALS_URL:ee,DAO_GRANTS_URL:ae,GOVERNANCE_PROJECTS_URL:oe,DOCS_DAO_URL:_e,MARKETPLACE_SETTINGS_URL:de,DISCORD_URL:ce,REDDIT_URL:Re,GITHUB_URL:se,X_URL:Le,INSTAGRAM_URL:re,YOUTUBE_URL:Ue,TIKTOK_URL:Ee,LINKEDIN_URL:le,PRIVACY_POLICY_URL:Oe,TERMS_OF_USE_URL:Ae,CONTENT_POLICY_URL:Te,CODE_OF_ETHICS_URL:pe,SUPPORT_URL:Ne,EMAIL_HELLO_URL:Se,FAQ_URL:Ce,DOCS_URL:he,BEEHIV_SUBSCRIPTION_URL:Ie,AUTO_SIGNING_BASE_URL:De,TOP_SCENES_URL:ge,IOS_STORE_URL:$e,ANDROID_STORE_URL:ie},ye=a({[n.DEVELOPMENT]:rt,[n.STAGING]:Pe,[n.PRODUCTION]:Nn});export{ye as c};
2
+ //# sourceMappingURL=index-mzIsCjWs.js.map
@@ -1,2 +1,2 @@
1
- import"./react-57wE9FMW.js";import{r as d}from"./index-BhhO1oEp.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="f5b6f687-1da7-483f-936c-dd8748655f87",e._sentryDebugIdIdentifier="sentry-dbid-f5b6f687-1da7-483f-936c-dd8748655f87")}catch{}})();function i(e,r){for(var o=0;o<r.length;o++){const t=r[o];if(typeof t!="string"&&!Array.isArray(t)){for(const n in t)if(n!=="default"&&!(n in e)){const f=Object.getOwnPropertyDescriptor(t,n);f&&Object.defineProperty(e,n,f.get?f:{enumerable:!0,get:()=>t[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var s=d();const u=i({__proto__:null},[s]);export{u as i};
2
- //# sourceMappingURL=index-962zUKU_.js.map
1
+ import"./react-Ddn-9d83.js";import{r as d}from"./index-B8kJyL6G.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="f5b6f687-1da7-483f-936c-dd8748655f87",e._sentryDebugIdIdentifier="sentry-dbid-f5b6f687-1da7-483f-936c-dd8748655f87")}catch{}})();function i(e,r){for(var o=0;o<r.length;o++){const t=r[o];if(typeof t!="string"&&!Array.isArray(t)){for(const n in t)if(n!=="default"&&!(n in e)){const f=Object.getOwnPropertyDescriptor(t,n);f&&Object.defineProperty(e,n,f.get?f:{enumerable:!0,get:()=>t[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var s=d();const u=i({__proto__:null},[s]);export{u as i};
2
+ //# sourceMappingURL=index-ox01jvxx.js.map
@@ -0,0 +1 @@
1
+ .ico{display:inline-block;width:20px;height:20px;flex:none;background-color:currentColor;-webkit-mask-image:var(--icon-url);mask-image:var(--icon-url);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}.ccy-mark{width:1em;height:1em;vertical-align:-.125em}.ccy-mark,.ccy{color:var(--text)}:root{--nav-h: 92px;--bg: #ffffff;--text: #161518;--text-2: #242129;--muted: #716b7c;--muted-1: #5e5b67;--muted-2: #a09ba8;--line: #e6e4ea;--line-strong: #a09ba8;--media: #ecebed;--panel: #f5f5f5;--chip: #ecebed;--gray-0: #43404a;--accent: #691fa9;--brand-violet: #a524b3;--rarity: #a14bf3;--rarity-bg: rgba(161, 75, 243, .3);--black-btn: #242129;--soft-white: #fcfcfc;--dcl-red: #ff2d55;--sale-tag: #ffc9d5;--sale-tag-ink: #ec303a;--ok: #1ea672;--err: #d33;--amethyst: linear-gradient(180deg, #c640cd 0%, #691fa9 100%);--cerise: linear-gradient(135deg, #ff2d55 0%, #c640cd 100%);--buy-btn: linear-gradient(180.93deg, #ff7439 2.82%, #ff2d55 97.47%);--radius-card: 12px;--radius-chip: 4px;--radius-btn: 8px;--radius-pill: 50px;--radius-banner: 24px;--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--z-overlay: 10000;--z-tooltip: 10010;--skeleton-lo: rgba(255, 255, 255, .07);--skeleton-hi: rgba(255, 255, 255, .16)}@media(max-width:991px){:root{--nav-h: 64px}}*{box-sizing:border-box}html{overflow-x:clip}body{margin:0;padding-top:var(--nav-h);background:radial-gradient(61.64% 109.58% at 50% 54.49%,#952dc6,#7c27a8,#642089,#4b1a6b,#32134c) fixed;color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased}@keyframes symbol-drift{0%{background-position:0 0}to{background-position:-610px -610px}}body:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;z-index:-1;pointer-events:none;background:url(https://cdn.decentraland.org/@dcl/shop/1.17.2-36157867735.commit-7431f7b/_assets/DCL_LogoPattern-BryBPc3d.png) 0 0 repeat;background-size:610px 610px;opacity:.03;animation:symbol-drift 150s linear infinite;-webkit-mask-image:radial-gradient(75% 70% at 50% 45%,transparent 25%,#000 85%);mask-image:radial-gradient(75% 70% at 50% 45%,transparent 25%,#000 85%)}@media(prefers-reduced-motion:reduce){body:before{animation:none}}#root{display:flex;flex-direction:column;min-height:calc(100vh - var(--nav-h))}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer}h1,h2{margin:0}.muted{color:var(--muted)}.small{font-size:13px}.error{color:var(--err)}.error-notice{display:flex;align-items:center;gap:8px;margin:0;padding:10px 12px;border:1px solid rgba(221,51,51,.25);border-radius:var(--radius-btn);background:#dd333314;color:var(--err);font-size:14px;line-height:1.4;text-align:left}.error-notice__ico{flex:none;width:18px;height:18px}.error-notice__msg{color:var(--text-2)}.link{background:none;border:0;color:var(--accent);cursor:pointer;padding:0;font:inherit;font-weight:600}.page{padding:28px 54px 80px;max-width:1760px;margin:0 auto;width:100%;flex:1 0 auto;min-height:calc(100vh - var(--nav-h))}.page[data-route="/credits"]{min-height:0}.page:has([data-fill=true]){min-height:0}.page[data-route="/overview"]{padding-top:0}.page[data-route="/cart"],.page[data-route="/success"]{display:flex;flex-direction:column}@media(max-width:768px){.page{padding:16px 16px 56px}.page[data-route="/credits"]{min-height:0}}.placeholder{color:var(--muted);font-size:18px;padding:40px 0}.page-loading{display:grid;place-items:center;min-height:60vh}@keyframes shimmer{to{background-position:-200% 0}}.spinner{width:30px;height:30px;margin-top:14px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.skeleton{border-radius:6px;background:linear-gradient(100deg,var(--skeleton-lo) 30%,var(--skeleton-hi) 50%,var(--skeleton-lo) 70%);background-size:200% 100%;animation:shimmer 1.4s infinite linear}@media(prefers-reduced-motion:reduce){.skeleton{animation:none}}@keyframes cart-pop-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@@ -1,4 +1,4 @@
1
- import{i as f,b as l,a as ee}from"./lit-element-wjYUA6aF.js";import{n as c,o as w,r as u,a as Ii}from"./class-map-BxMzgOIb.js";import{d as v,r as _,e as W}from"./index-BDdcoEFU.js";import{c as p,U as F}from"./index--yUfiOex.js";import"./index-lQ2m7yUy.js";import"./index-Bsw53nId.js";import"./index-qrz6WiaK.js";import{O as m,C as d,L as Ee,q as E,b as y,M as P,E as C,t as me,o as b,R as h,d as D,S as A,k as x,l as ze,W as Fe,ak as Xt,aj as he,a3 as J,a1 as qi,z as I,am as tt,A as _i,F as Ki,D as Gi,y as Xi,T as ft,V as Yt,X as Qt,a9 as Yi,ao as Qi,Z as Bt,ap as Ji}from"./W3MFrameProviderSingleton-BWvDpNTL.js";import"./index-DZEeeDQr.js";import{W as zs,a as Fs}from"./index-DO6ydGXX.js";import"./index-M4vJyniz.js";import"./index-_bcedLK5.js";import"./index-DOn0iodU.js";import{au as S}from"./NetworkUtil-BwvINT8v.js";import{H as Jt}from"./HelpersUtil-Dhc8srsx.js";import{n as Zi}from"./index-Zum9uUGy.js";import{E as Q}from"./ExchangeController-BlkQV8ix.js";import"./index-BwKvHJ-v.js";import"./index-Dz8UCy0P.js";import"./index-B6895neV.js";import{M as mt}from"./MathUtil-BvP0JcjY.js";import"./index-BeH18kmv.js";import{e as Zt,n as ei}from"./ref-D90CCjlU.js";import"./index-BlG9tYXl.js";import"./index-CZEYeX3l.js";import"./index-hLoLHUKV.js";import"./index-B-gdbRSW.js";import{O as bt}from"./index-BmsamR4M.js";import{e as en}from"./index-DTWx6T1S.js";import"./index-BKGo_9wu.js";import"./index-B49OLLy1.js";import{N as tn}from"./NavigationUtil-BgJKGvPt.js";import"./index-DAysx568.js";import"./index-C0EB4Nb3.js";import"./react-57wE9FMW.js";import"./dcl-schemas-BgQanFex.js";import"./sentry-C6Mao8WI.js";import"./ethers-RdXTApYJ.js";import"./intl-AKLEHPeO.js";import"./index-DFQS58XE.js";import"./events-DcSLjVuU.js";import"./index-Cf6ERmsZ.js";import"./index-ClIQf3ng.js";import"./index-OpYIGLSa.js";import"./index-DU6vOlyL.js";import"./index.es-C1YwoJJN.js";import"./browser-ponyfill-Dmn_2mUU.js";import"./ConstantsUtil-czCTnHYO.js";import"./async-directive-CeCQAQEH.js";import"./browser-lYIugjhZ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="6eec661c-dcdf-4387-b8e8-4c075a1e770f",t._sentryDebugIdIdentifier="sentry-dbid-6eec661c-dcdf-4387-b8e8-4c075a1e770f")}catch{}})();const nn=v`
1
+ import{i as f,b as l,a as ee}from"./lit-element-wjYUA6aF.js";import{n as c,o as w,r as u,a as Ii}from"./class-map-BxMzgOIb.js";import{d as v,r as _,e as W}from"./index-CzV7sMdy.js";import{c as p,U as F}from"./index-Bf_iGaP5.js";import"./index-CSuaHD6u.js";import"./index-ZDiu1J1j.js";import"./index-BAAoctqn.js";import{O as m,C as d,L as Ee,q as E,b as y,M as P,E as C,t as me,o as b,R as h,d as D,S as A,k as x,l as ze,W as Fe,ak as Xt,aj as he,a3 as J,a1 as qi,z as I,am as tt,A as _i,F as Ki,D as Gi,y as Xi,T as ft,V as Yt,X as Qt,a9 as Yi,ao as Qi,Z as Bt,ap as Ji}from"./W3MFrameProviderSingleton-C4KtItmg.js";import"./index-DCSutgdw.js";import{W as zs,a as Fs}from"./index-CNjrqKOs.js";import"./index-cCjjJ8Zd.js";import"./index-y50hP8_O.js";import"./index-PFt3YITh.js";import{au as S}from"./NetworkUtil-iL8rkdmy.js";import{H as Jt}from"./HelpersUtil-B_SruwGa.js";import{n as Zi}from"./index-CU2OselF.js";import{E as Q}from"./ExchangeController-CE3cQOVu.js";import"./index-C2S4XG0R.js";import"./index-DtS7bQfE.js";import"./index-gfZnCNa6.js";import{M as mt}from"./MathUtil-BvP0JcjY.js";import"./index-DZ3S9SRN.js";import{e as Zt,n as ei}from"./ref-D90CCjlU.js";import"./index-BOyogbet.js";import"./index-DauMTBWE.js";import"./index-BMak5rZb.js";import"./index-DSwxHrMr.js";import{O as bt}from"./index-DhWCbjGh.js";import{e as en}from"./index-BkdjGh-W.js";import"./index-7s_cYB0r.js";import"./index-Bf74R1qS.js";import{N as tn}from"./NavigationUtil-BgJKGvPt.js";import"./index-T6hDl-2V.js";import"./index-BBS-v8LD.js";import"./react-Ddn-9d83.js";import"./dcl-schemas-BW3BbT5l.js";import"./sentry-D_8KijKQ.js";import"./ethers-DGYWmyb1.js";import"./intl-AKLEHPeO.js";import"./index-B67Ropoe.js";import"./events-YMZCt1yV.js";import"./index-D_2nYoM8.js";import"./index-CgfbItO2.js";import"./index-OpYIGLSa.js";import"./index-DyhsaJtc.js";import"./index.es-D61fhzOk.js";import"./browser-ponyfill-DqHLL_k5.js";import"./ConstantsUtil-C6ody29O.js";import"./async-directive-CeCQAQEH.js";import"./browser-qc2dUFk5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="3783c2d5-36d0-47f8-9ac6-948d63092f6d",t._sentryDebugIdIdentifier="sentry-dbid-3783c2d5-36d0-47f8-9ac6-948d63092f6d")}catch{}})();const nn=v`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -3424,4 +3424,4 @@ import{i as f,b as l,a as ee}from"./lit-element-wjYUA6aF.js";import{n as c,o as
3424
3424
  </wui-button>
3425
3425
  </wui-flex>
3426
3426
  `}async onSign(){this.isSigning=!0;try{await Bt.requestSignMessage()}catch(e){if(e instanceof Error&&e.message.includes("OTP is required")){A.showError({message:"Something went wrong. We need to verify your account again."}),h.replace("DataCapture");return}throw e}finally{this.isSigning=!1}}async onCancel(){this.isCancelling=!0,await Bt.cancelSignMessage().finally(()=>this.isCancelling=!1)}};li([u()],Tt.prototype,"isCancelling",void 0);li([u()],Tt.prototype,"isSigning",void 0);Tt=li([p("w3m-siwx-sign-message-view")],Tt);export{di as AppKitAccountButton,hi as AppKitButton,wi as AppKitConnectButton,mi as AppKitNetworkButton,ci as W3mAccountButton,be as W3mAccountSettingsView,Ft as W3mAccountView,vt as W3mAllWalletsView,ui as W3mButton,At as W3mChooseAccountNameView,pi as W3mConnectButton,H as W3mConnectView,It as W3mConnectWalletsView,xi as W3mConnectingExternalView,Ct as W3mConnectingMultiChainView,kt as W3mConnectingWcBasicView,we as W3mConnectingWcView,Si as W3mDownloadsView,zs as W3mFooter,Re as W3mFundWalletView,Ei as W3mGetWalletView,fi as W3mNetworkButton,ot as W3mNetworkSwitchView,Le as W3mNetworksView,B as W3mProfileWalletsView,Fs as W3mRouter,Tt as W3mSIWXSignMessageView,_t as W3mSwitchActiveChainView,rt as W3mUnsupportedChainView,Kt as W3mWalletCompatibleNetworksView,Ai as W3mWhatIsANetworkView,ki as W3mWhatIsAWalletView};
3427
- //# sourceMappingURL=index-DTVY5scD.js.map
3427
+ //# sourceMappingURL=index-tske-Qm0.js.map
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/decimals-DQJMb7J9.js","_assets/utils-BGzZ7mCg.js","_assets/sentry-D_8KijKQ.js","_assets/react-Ddn-9d83.js","_assets/decimals-BI0yoEux.js","_assets/prepare-contract-call-BitMGE96.js","_assets/signing-BCODmgNV.js","_assets/index-BBS-v8LD.js","_assets/dcl-schemas-BW3BbT5l.js","_assets/ethers-DGYWmyb1.js","_assets/intl-AKLEHPeO.js","_assets/index-qTkXqLEk.css","_assets/to-serializable-transaction-DzZsdRzk.js","_assets/transaction-Cbet3IZc.js","_assets/get-bytecode-N2OV9nFo.js","_assets/in-app-wallet-calls-DmZ4pxIH.js","_assets/wait-for-tx-receipt-C3zFGaKb.js","_assets/transactionReceipt-DSeG56jV.js","_assets/sleep-fBr8OToA.js","_assets/send-batch-transaction-CcGULLl4.js","_assets/send-transaction-bNnxjmkm.js","_assets/execute-CVxgGRa9.js","_assets/detectExtension-C_GbFz5_.js"])))=>i.map(i=>d[i]);
2
+ import{_ as T}from"./index-BBS-v8LD.js";import{t as V,i as ct,a as ot}from"./transaction-Cbet3IZc.js";import{e as dt,i as pt,a as F}from"./utils-BGzZ7mCg.js";import{f as mt,h as q,e as $,i as ut,g as L,j as yt,t as lt}from"./to-serializable-transaction-DzZsdRzk.js";import{r as C,a5 as B,w as E,S as O,G as x,s as z,h as _,l as D,H as ft,k as wt,e as At,T as gt,g as K}from"./prepare-contract-call-BitMGE96.js";import{o as j,r as Gt}from"./execute-CVxgGRa9.js";import{Z,a as Y,p as Q,m as ht,b as Tt,d as J,e as Pt}from"./signing-BCODmgNV.js";import{t as vt,p as Lt,s as Dt}from"./send-eip712-transaction-eRcl-w9x.js";import{s as Ot}from"./send-transaction-bNnxjmkm.js";import{p as xt}from"./linkAccount-D_xpNX67.js";import{g as X,E as S,h as St,a as k,b as Ct,c as _t,d as Et,e as b,D as tt,f as et,i as Ft,j as Vt,k as bt,l as It}from"./index-DIYb1IGB.js";import{M as Aa}from"./wallets-BM2FKp9V.js";import"./react-Ddn-9d83.js";import"./dcl-schemas-BW3BbT5l.js";import"./sentry-D_8KijKQ.js";import"./ethers-DGYWmyb1.js";import"./intl-AKLEHPeO.js";import"./detectExtension-C_GbFz5_.js";import"./get-bytecode-N2OV9nFo.js";import"./eth_sendRawTransaction-DYAsy3sS.js";import"./sha256-BhCi5WIJ.js";import"./ethereum-Cez4WhJf.js";import"./types-BeDU9GfL.js";import"./store-80QKZ2rN.js";import"./hashTypedData-ywahqODz.js";import"./index-B67Ropoe.js";import"./events-YMZCt1yV.js";import"./index-D_2nYoM8.js";import"./index-CgfbItO2.js";import"./index-OpYIGLSa.js";import"./index-ChIjTbh5.js";import"./index-DyhsaJtc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f499c303-34c8-409e-9727-8ccbdcf0c3e9",t._sentryDebugIdIdentifier="sentry-dbid-f499c303-34c8-409e-9727-8ccbdcf0c3e9")}catch{}})();const Ut="0xdd62ed3e",Rt=[{name:"owner",type:"address"},{name:"spender",type:"address"}],Nt=[{type:"uint256"}];async function $t(t){return C({contract:t.contract,method:[Ut,Rt,Nt],params:[t.owner,t.spender]})}const kt="0x095ea7b3",Ht=[{name:"spender",type:"address"},{name:"value",type:"uint256"}],Mt=[{type:"bool"}];function Wt(t){const a=j(async()=>"asyncParams"in t?await t.asyncParams():t);return B({accessList:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.accessList},authorizationList:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.authorizationList},contract:t.contract,erc20Value:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.erc20Value},extraGas:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.extraGas},gas:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.gas},gasPrice:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.gasPrice},maxFeePerGas:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.maxFeePerGas},maxPriorityFeePerGas:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.maxPriorityFeePerGas},method:[kt,Ht,Mt],nonce:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.nonce},params:async()=>{const e=await a();return[e.spender,e.value]},value:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.value}})}function qt(t){return Wt({asyncParams:async()=>{let a;if("amount"in t){const{decimals:e}=await T(async()=>{const{decimals:r}=await import("./decimals-DQJMb7J9.js");return{decimals:r}},__vite__mapDeps([0,1,2,3,4,5])),i=await e(t).catch(()=>18);a=mt(t.amount.toString(),i)}else a=t.amountWei;return{overrides:{erc20Value:{amountWei:a,tokenAddress:t.contract.address},...t.overrides},spender:t.spender,value:a}},contract:t.contract})}const Bt="0xf15d424e",zt=[{name:"signer",type:"address"}],Kt=[{components:[{name:"signer",type:"address"},{name:"approvedTargets",type:"address[]"},{name:"nativeTokenLimitPerTransaction",type:"uint256"},{name:"startTimestamp",type:"uint128"},{name:"endTimestamp",type:"uint128"}],name:"permissions",type:"tuple"}];async function jt(t){return C({contract:t.contract,method:[Bt,zt,Kt],params:[t.signer]})}const Zt="0x5892e236",Yt=[{components:[{name:"signer",type:"address"},{name:"isAdmin",type:"uint8"},{name:"approvedTargets",type:"address[]"},{name:"nativeTokenLimitPerTransaction",type:"uint256"},{name:"permissionStartTimestamp",type:"uint128"},{name:"permissionEndTimestamp",type:"uint128"},{name:"reqValidityStartTimestamp",type:"uint128"},{name:"reqValidityEndTimestamp",type:"uint128"},{name:"uid",type:"bytes32"}],name:"req",type:"tuple"},{name:"signature",type:"bytes"}],Qt=[];function Jt(t){const a=j(async()=>"asyncParams"in t?await t.asyncParams():t);return B({accessList:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.accessList},authorizationList:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.authorizationList},contract:t.contract,erc20Value:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.erc20Value},extraGas:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.extraGas},gas:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.gas},gasPrice:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.gasPrice},maxFeePerGas:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.maxFeePerGas},maxPriorityFeePerGas:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.maxPriorityFeePerGas},method:[Zt,Yt,Qt],nonce:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.nonce},params:async()=>{const e=await a();return[e.req,e.signature]},value:async()=>{var e;return(e=(await a()).overrides)==null?void 0:e.value}})}function W(){return new Date(Date.now()+1e3*60*60*24*365*10)}function U(t){return vt(Math.floor(t.getTime()/1e3))}const Xt=[{name:"signer",type:"address"},{name:"isAdmin",type:"uint8"},{name:"approvedTargets",type:"address[]"},{name:"nativeTokenLimitPerTransaction",type:"uint256"},{name:"permissionStartTimestamp",type:"uint128"},{name:"permissionEndTimestamp",type:"uint128"},{name:"reqValidityStartTimestamp",type:"uint128"},{name:"reqValidityEndTimestamp",type:"uint128"},{name:"uid",type:"bytes32"}];async function te(t){const{account:a,contract:e,req:i}=t,r=await a.signTypedData({domain:{chainId:e.chain.id,name:"Account",verifyingContract:e.address,version:"1"},message:i,primaryType:"SignerPermissionRequest",types:{SignerPermissionRequest:Xt}});return{req:i,signature:r}}async function ee(t){var i;const{target:a,permissions:e}=t;return{approvedTargets:e.approvedTargets==="*"?[Z]:e.approvedTargets,isAdmin:0,nativeTokenLimitPerTransaction:q(((i=e.nativeTokenLimitPerTransaction)==null?void 0:i.toString())||"0"),permissionEndTimestamp:U(e.permissionEndTimestamp||W()),permissionStartTimestamp:U(e.permissionStartTimestamp||new Date(0)),reqValidityEndTimestamp:U(W()),reqValidityStartTimestamp:0n,signer:a,uid:await Gt()}}function ae(t){const{contract:a,sessionKeyAddress:e,account:i,permissions:r}=t;return Jt({async asyncParams(){const{req:n,signature:c}=await te({account:i,contract:a,req:await ee({permissions:r,target:e})});return{req:n,signature:c}},contract:a})}async function se(t){var c;const{accountContract:a,sessionKeyAddress:e,newPermissions:i}=t;if(!await Y(a))return!0;const n=await jt({contract:a,signer:e});return!!(n.endTimestamp&&n.endTimestamp<Math.floor(Date.now()/1e3)||!ne(n.approvedTargets,i.approvedTargets)||q(((c=i.nativeTokenLimitPerTransaction)==null?void 0:c.toString())??"0")>n.nativeTokenLimitPerTransaction)}function ne(t,a){return a==="*"&&t.length===1&&t[0]===Z?!0:a!=="*"?a.map(e=>e.toLowerCase()).every(e=>t.map(i=>i.toLowerCase()).includes(e)):!1}const re=2n**96n-1n,ie="0x35567e1a",ce=[{name:"sender",type:"address"},{name:"key",type:"uint192"}],oe=[{name:"nonce",type:"uint256"}];async function de(t){return C({contract:t.contract,method:[ie,ce,oe],params:[t.sender,t.key]})}const pe="0xa6193531",me=[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],ue=[{type:"bytes32"}];async function ye(t){return C({contract:t.contract,method:[pe,me,ue],params:[t.userOp]})}const le="0x22cdde4c",fe=[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"accountGasLimits",type:"bytes32"},{name:"preVerificationGas",type:"uint256"},{name:"gasFees",type:"bytes32"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],we=[{type:"bytes32"}];async function Ae(t){return C({contract:t.contract,method:[le,fe,we],params:[t.userOp]})}function ge(t){return t.factory?E([t.factory,t.factoryData||"0x"]):"0x"}function Ge(t){return E([O(x(BigInt(t.verificationGasLimit)),{size:16}),O(x(BigInt(t.callGasLimit)),{size:16})])}function he(t){return E([O(x(BigInt(t.maxPriorityFeePerGas)),{size:16}),O(x(BigInt(t.maxFeePerGas)),{size:16})])}function Te(t){return t.paymaster?E([t.paymaster,O(x(BigInt(t.paymasterVerificationGasLimit||0)),{size:16}),O(x(BigInt(t.paymasterPostOpGasLimit||0)),{size:16}),t.paymasterData||"0x"]):"0x"}const Pe=t=>({accountGasLimits:Ge(t),callData:t.callData,gasFees:he(t),initCode:ge(t),nonce:BigInt(t.nonce),paymasterAndData:Te(t),preVerificationGas:BigInt(t.preVerificationGas),sender:t.sender,signature:t.signature});async function I(t){var A;const{userOp:a,paymasterOverride:e,client:i,chain:r,entrypointAddress:n}=t;if(e)return e(a);const c={"Content-Type":"application/json"},s=n??S,o=X(r),d={id:1,jsonrpc:"2.0",method:"pm_sponsorUserOperation",params:[St(a),s]},l=await dt(i)(o,{body:z(d),headers:c,method:"POST"});if(!l.ok){const g=await l.text()||l.statusText;throw new Error(`Paymaster error: ${l.status} - ${g}`)}const m=await l.json();if(m.result)return typeof m.result=="string"?{paymasterAndData:m.result}:(m.result.reason&&console.warn(`Paymaster policy rejected this transaction with reason: ${m.result.reason} ${m.result.policyId?`(policyId: ${m.result.policyId})`:""}`),{callGasLimit:m.result.callGasLimit?_(m.result.callGasLimit):void 0,paymaster:m.result.paymaster,paymasterAndData:m.result.paymasterAndData,paymasterData:m.result.paymasterData,paymasterPostOpGasLimit:m.result.paymasterPostOpGasLimit?_(m.result.paymasterPostOpGasLimit):void 0,paymasterVerificationGasLimit:m.result.paymasterVerificationGasLimit?_(m.result.paymasterVerificationGasLimit):void 0,preVerificationGas:m.result.preVerificationGas?_(m.result.preVerificationGas):void 0,verificationGasLimit:m.result.verificationGasLimit?_(m.result.verificationGasLimit):void 0});const w=((A=m.error)==null?void 0:A.message)||m.error||l.statusText||"unknown error";throw new Error(`Paymaster error from ${o}: ${w}`)}const H=new Set,M=t=>`${t.chain.id}:${t.address}`,at=t=>{H.add(M(t))},st=t=>{H.delete(M(t))},nt=t=>H.has(M(t));async function ve(t){const a=t.timeoutMs||12e4,e=t.intervalMs||1e3,i=Date.now()+a;for(;Date.now()<i;){const r=await Ct(t);if(r)return r;await new Promise(n=>setTimeout(n,e))}throw new Error(`Timeout waiting for userOp to be mined on chain ${t.chain.id} with UserOp hash: ${t.userOpHash}`)}async function Le(t){var P;const{transaction:a,accountContract:e,factoryContract:i,adminAddress:r,overrides:n,sponsorGas:c,waitForDeployment:s=!0,isDeployedOverride:o}=t,d=a.chain,y=a.client,l={bundlerUrl:n==null?void 0:n.bundlerUrl,chain:d,client:y,entrypointAddress:n==null?void 0:n.entrypointAddress},m=k(((P=t.overrides)==null?void 0:P.entrypointAddress)||S),[w,A,g,G,f]=await Promise.all([typeof o=="boolean"?o:Y(e).then(h=>h||nt(e)),$(a),D(a.gas),De({bundlerOptions:l,chain:d,client:y,executeTx:a}),Ee({accountContract:e,chain:d,client:y,entrypointAddress:n==null?void 0:n.entrypointAddress,getNonceOverride:n==null?void 0:n.getAccountNonce})]),{maxFeePerGas:p,maxPriorityFeePerGas:u}=G;return m==="v0.7"?Oe({accountContract:e,adminAddress:r,bundlerOptions:l,callData:A,callGasLimit:g,factoryContract:i,isDeployed:w,maxFeePerGas:p,maxPriorityFeePerGas:u,nonce:f,overrides:n,sponsorGas:c,waitForDeployment:s}):xe({accountContract:e,adminAddress:r,bundlerOptions:l,callData:A,callGasLimit:g,factoryContract:i,isDeployed:w,maxFeePerGas:p,maxPriorityFeePerGas:u,nonce:f,overrides:n,sponsorGas:c,waitForDeployment:s})}async function De(t){const{executeTx:a,bundlerOptions:e,chain:i,client:r}=t;let{maxFeePerGas:n,maxPriorityFeePerGas:c}=a;const s=(e==null?void 0:e.bundlerUrl)??X(i);if(pt(s)){const o=await _t({options:e});n=o.maxFeePerGas,c=o.maxPriorityFeePerGas}else{const[o,d]=await Promise.all([D(n),D(c)]);if(o&&d)n=o,c=d;else{const y=await ut(r,i);c=d??y.maxPriorityFeePerGas??0n,n=o??y.maxFeePerGas??0n}}return{maxFeePerGas:n,maxPriorityFeePerGas:c}}async function Oe(t){const{bundlerOptions:a,isDeployed:e,factoryContract:i,accountContract:r,adminAddress:n,sponsorGas:c,overrides:s,nonce:o,callData:d,callGasLimit:y,maxFeePerGas:l,maxPriorityFeePerGas:m,waitForDeployment:w}=t,{chain:A,client:g}=a;let G,f;e?(f="0x",w&&await rt(r)):(G=i.address,f=await $(Q({accountSalt:s==null?void 0:s.accountSalt,adminAddress:n,createAccountOverride:s==null?void 0:s.createAccount,factoryContract:i})),w&&at(r));const p={callData:d,callGasLimit:y??0n,factory:G,factoryData:f,maxFeePerGas:l,maxPriorityFeePerGas:m,nonce:o,paymaster:void 0,paymasterData:"0x",paymasterPostOpGasLimit:0n,paymasterVerificationGasLimit:0n,preVerificationGas:0n,sender:r.address,signature:tt,verificationGasLimit:0n};if(c){const u=await I({chain:A,client:g,entrypointAddress:s==null?void 0:s.entrypointAddress,paymasterOverride:s==null?void 0:s.paymaster,userOp:p});if(u.paymaster&&u.paymasterData&&(p.paymaster=u.paymaster,p.paymasterData=u.paymasterData),u.callGasLimit&&u.verificationGasLimit&&u.preVerificationGas&&u.paymasterPostOpGasLimit&&u.paymasterVerificationGasLimit)p.callGasLimit=u.callGasLimit,p.verificationGasLimit=u.verificationGasLimit,p.preVerificationGas=u.preVerificationGas,p.paymasterPostOpGasLimit=u.paymasterPostOpGasLimit,p.paymasterVerificationGasLimit=u.paymasterVerificationGasLimit;else{const P=s!=null&&s.tokenPaymaster?{[s.tokenPaymaster.tokenAddress]:{stateDiff:{[wt(At([{type:"address"},{type:"uint256"}],[r.address,s.tokenPaymaster.balanceStorageSlot]))]:gt(ht,{size:32})}}}:void 0,h=await b({options:a,userOp:p},P);p.callGasLimit=h.callGasLimit,p.verificationGasLimit=h.verificationGasLimit,p.preVerificationGas=h.preVerificationGas,p.paymasterPostOpGasLimit=s!=null&&s.tokenPaymaster?500000n:h.paymasterPostOpGasLimit||0n,p.paymasterVerificationGasLimit=h.paymasterVerificationGasLimit||0n;const v=await I({chain:A,client:g,entrypointAddress:s==null?void 0:s.entrypointAddress,paymasterOverride:s==null?void 0:s.paymaster,userOp:p});v.paymaster&&v.paymasterData&&(p.paymaster=v.paymaster,p.paymasterData=v.paymasterData)}}else{const u=await b({options:a,userOp:p});p.callGasLimit=u.callGasLimit,p.verificationGasLimit=u.verificationGasLimit,p.preVerificationGas=u.preVerificationGas,p.paymasterPostOpGasLimit=u.paymasterPostOpGasLimit||0n,p.paymasterVerificationGasLimit=u.paymasterVerificationGasLimit||0n}return{...p,signature:"0x"}}async function xe(t){const{bundlerOptions:a,isDeployed:e,factoryContract:i,accountContract:r,adminAddress:n,sponsorGas:c,overrides:s,nonce:o,callData:d,callGasLimit:y,maxFeePerGas:l,maxPriorityFeePerGas:m,waitForDeployment:w}=t,{chain:A,client:g}=a;let G;e?(G="0x",w&&await rt(r)):(G=await _e({accountSalt:s==null?void 0:s.accountSalt,adminAddress:n,createAccountOverride:s==null?void 0:s.createAccount,factoryContract:i}),w&&at(r));const f={callData:d,callGasLimit:y??0n,initCode:G,maxFeePerGas:l,maxPriorityFeePerGas:m,nonce:o,paymasterAndData:"0x",preVerificationGas:0n,sender:r.address,signature:tt,verificationGasLimit:0n};if(c){const p=await I({chain:A,client:g,entrypointAddress:s==null?void 0:s.entrypointAddress,paymasterOverride:s==null?void 0:s.paymaster,userOp:f}),u="paymasterAndData"in p?p.paymasterAndData:"0x";if(u&&u!=="0x"&&(f.paymasterAndData=u),p.callGasLimit&&p.verificationGasLimit&&p.preVerificationGas)f.callGasLimit=p.callGasLimit,f.verificationGasLimit=p.verificationGasLimit,f.preVerificationGas=p.preVerificationGas;else{const P=await b({options:a,userOp:f});if(f.callGasLimit=P.callGasLimit,f.verificationGasLimit=P.verificationGasLimit,f.preVerificationGas=P.preVerificationGas,u&&u!=="0x"){const h=await I({chain:A,client:g,entrypointAddress:s==null?void 0:s.entrypointAddress,paymasterOverride:s==null?void 0:s.paymaster,userOp:f}),v="paymasterAndData"in h?h.paymasterAndData:"0x";v&&v!=="0x"&&(f.paymasterAndData=v)}}}else{const p=await b({options:a,userOp:f});f.callGasLimit=p.callGasLimit,f.verificationGasLimit=p.verificationGasLimit,f.preVerificationGas=p.preVerificationGas}return{...f,signature:"0x"}}async function Se(t){const{userOp:a,chain:e,entrypointAddress:i,adminAccount:r}=t,n=await Ce({chain:e,client:t.client,entrypointAddress:i,userOp:a});if(r.signMessage){const c=await r.signMessage({chainId:e.id,message:{raw:ft(n)},originalMessage:z(a)});return{...a,signature:c}}throw new Error("signMessage not implemented in signingAccount")}async function Ce(t){const{userOp:a,chain:e,entrypointAddress:i}=t,r=k(i||S);let n;if(r==="v0.7"){const c=Pe(a);n=await Ae({contract:L({address:i||et,chain:e,client:t.client}),userOp:c})}else n=await ye({contract:L({address:i||S,chain:e,client:t.client}),userOp:a});return n}async function _e(t){const{factoryContract:a,adminAddress:e,accountSalt:i,createAccountOverride:r}=t,n=Q({accountSalt:i,adminAddress:e,createAccountOverride:r,factoryContract:a});return E([a.address,await $(n)])}async function Ee(t){const{accountContract:a,chain:e,client:i,entrypointAddress:r,getNonceOverride:n}=t;return n?n(a):await de({contract:L({address:r||S,chain:e,client:i}),key:Et(),sender:a.address})}async function rt(t){const a=Date.now();for(;nt(t);){if(Date.now()-a>6e4)throw st(t),new Error("Account deployment is taking too long (over 1 minute). Please try again.");await new Promise(e=>setTimeout(e,500))}}const it=new WeakMap,R=new WeakMap;async function ya(t,a){var m,w,A,g,G,f,p;const{personalAccount:e,client:i}=t;if(!e)throw new Error("No personal account provided for smart account connection");const r=a,n=a.chain,c="gasless"in r?r.gasless:r.sponsorGas;if(await yt(n))return[be({chain:n,connectionOptions:t,creationOptions:a,sponsorGas:c}),n];if(r.factoryAddress&&!((m=r.overrides)!=null&&m.entrypointAddress)){const u=await Ie(r.factoryAddress,i,n);u&&(r.overrides={...r.overrides,entrypointAddress:u})}(w=r.overrides)!=null&&w.tokenPaymaster&&!((A=r.overrides)!=null&&A.entrypointAddress)&&(r.overrides={...r.overrides,entrypointAddress:et});const s=r.factoryAddress??Ft((g=r.overrides)==null?void 0:g.entrypointAddress),o=L({address:s,chain:n,client:i}),d=await Tt({accountAddress:(G=r.overrides)==null?void 0:G.accountAddress,accountSalt:(f=r.overrides)==null?void 0:f.accountSalt,adminAddress:e.address,factoryContract:o,predictAddressOverride:(p=r.overrides)==null?void 0:p.predictAddress}).then(u=>u).catch(u=>{throw new Error(`Failed to get account address with factory contract ${o.address} on chain ID ${n.id}: ${(u==null?void 0:u.message)||"unknown error"}`,{cause:u})}),y=L({address:d,chain:n,client:i}),l=await Fe({...r,accountContract:y,chain:n,client:i,factoryContract:o,personalAccount:e,sponsorGas:c});if(it.set(e,l),R.set(l,e),r.sessionKey&&await se({accountContract:y,newPermissions:r.sessionKey.permissions,sessionKeyAddress:r.sessionKey.address})){const u=ae({account:e,contract:y,permissions:r.sessionKey.permissions,sessionKeyAddress:r.sessionKey.address});await Ot({account:l,transaction:u})}return[l,n]}async function la(t){const a=R.get(t);a&&(it.delete(a),R.delete(t))}async function Fe(t){var n,c;const a=(n=t.overrides)==null?void 0:n.tokenPaymaster;if(a&&k(((c=t.overrides)==null?void 0:c.entrypointAddress)||S)!=="v0.7")throw new Error("Token paymaster is only supported for entrypoint version v0.7");const e=t.sponsorGas;let i=t.accountContract;const r={address:K(i.address),async onTransactionRequested(s){var o,d;return(d=(o=t.personalAccount).onTransactionRequested)==null?void 0:d.call(o,s)},async sendBatchTransaction(s){var m,w;const o=Pt({accountContract:i,executeBatchOverride:(m=t.overrides)==null?void 0:m.executeBatch,transactions:s});if(s.length===0)throw new Error("No transactions to send");const d=s[0];if(!d)throw new Error("No transactions to send");const y=F(d.chainId),l=await N({executeTx:o,options:{...t,accountContract:i,chain:y}});return V({chainId:y.id,client:t.client,contractAddress:((w=s[0])==null?void 0:w.to)??void 0,transactionHash:l.transactionHash,walletAddress:t.accountContract.address,walletType:"smart"}),l},async sendTransaction(s){var m,w,A;let o;if(a){await Ve({accountContract:i,erc20Paymaster:a,options:t});const g=async()=>({paymaster:a.paymasterAddress,paymasterData:"0x"});o=((m=t.overrides)==null?void 0:m.paymaster)||g}else o=(w=t.overrides)==null?void 0:w.paymaster;s.chainId!==i.chain.id&&(i=L({address:r.address,chain:F(s.chainId),client:t.client}));const d=J({accountContract:i,executeOverride:(A=t.overrides)==null?void 0:A.execute,transaction:s}),y=F(s.chainId),l=await N({executeTx:d,options:{...t,accountContract:i,chain:y,overrides:{...t.overrides,paymaster:o}}});return V({chainId:y.id,client:t.client,contractAddress:s.to??void 0,transactionHash:l.transactionHash,walletAddress:t.accountContract.address,walletType:"smart"}),l},async signMessage({message:s}){var d;if((d=t.overrides)!=null&&d.signMessage)return t.overrides.signMessage({accountContract:i,adminAccount:t.personalAccount,factoryContract:t.factoryContract,message:s});const{smartAccountSignMessage:o}=await T(async()=>{const{smartAccountSignMessage:y}=await import("./signing-BCODmgNV.js").then(l=>l.Q);return{smartAccountSignMessage:y}},__vite__mapDeps([6,5,1,2,3,7,8,9,10,11,12,13,14]));return o({accountContract:i,factoryContract:t.factoryContract,message:s,options:t})},async signTypedData(s){var d;if((d=t.overrides)!=null&&d.signTypedData)return t.overrides.signTypedData({accountContract:i,adminAccount:t.personalAccount,factoryContract:t.factoryContract,typedData:s});const{smartAccountSignTypedData:o}=await T(async()=>{const{smartAccountSignTypedData:y}=await import("./signing-BCODmgNV.js").then(l=>l.Q);return{smartAccountSignTypedData:y}},__vite__mapDeps([6,5,1,2,3,7,8,9,10,11,12,13,14]));return o({accountContract:i,factoryContract:t.factoryContract,options:t,typedData:s})},sendCalls:async s=>{const{inAppWalletSendCalls:o}=await T(async()=>{const{inAppWalletSendCalls:w}=await import("./in-app-wallet-calls-DmZ4pxIH.js");return{inAppWalletSendCalls:w}},__vite__mapDeps([15,16,17,5,1,2,3,12,7,8,9,10,11,13,18,19,20,21,22])),d=s.calls[0];if(!d)throw new Error("No calls to send");const y=d.client,l=d.chain||s.chain,m=await o({account:r,calls:s.calls,chain:l});return{chain:l,client:y,id:m}},getCallsStatus:async s=>{const{inAppWalletGetCallsStatus:o}=await T(async()=>{const{inAppWalletGetCallsStatus:d}=await import("./in-app-wallet-calls-DmZ4pxIH.js");return{inAppWalletGetCallsStatus:d}},__vite__mapDeps([15,16,17,5,1,2,3,12,7,8,9,10,11,13,18,19,20,21,22]));return o(s)},getCallsStatusRaw:async s=>{const{inAppWalletGetCallsStatusRaw:o}=await T(async()=>{const{inAppWalletGetCallsStatusRaw:d}=await import("./in-app-wallet-calls-DmZ4pxIH.js");return{inAppWalletGetCallsStatusRaw:d}},__vite__mapDeps([15,16,17,5,1,2,3,12,7,8,9,10,11,13,18,19,20,21,22]));return o(s)},getCapabilities:async s=>({[s.chainId??1]:{atomic:{status:"supported"},paymasterService:{supported:e??!1}}})};return r}async function Ve(t){var y;const{accountContract:a,erc20Paymaster:e,options:i}=t,r=e.tokenAddress,n=L({address:r,chain:a.chain,client:a.client});if(await $t({contract:n,owner:a.address,spender:e.paymasterAddress})>0n)return;const s=qt({amountWei:re-1n,contract:n,spender:e.paymasterAddress}),o=await lt({from:a.address,transaction:s}),d=J({accountContract:a,executeOverride:(y=i.overrides)==null?void 0:y.execute,transaction:o});await N({executeTx:d,options:{...i,overrides:{...i.overrides,tokenPaymaster:void 0}}})}function be(t){const{creationOptions:a,connectionOptions:e,chain:i}=t,r={address:K(e.personalAccount.address),async onTransactionRequested(n){var c,s;return(s=(c=e.personalAccount).onTransactionRequested)==null?void 0:s.call(c,n)},async sendTransaction(n){var y,l,m,w;const c={chain:F(n.chainId),client:e.client,data:n.data,eip712:n.eip712,to:n.to??void 0,value:n.value??0n};let s=await Lt({account:r,transaction:c});if(t.sponsorGas&&!s.paymaster){const A=await Vt({options:{bundlerUrl:(y=a.overrides)==null?void 0:y.bundlerUrl,chain:i,client:e.client,entrypointAddress:(l=a.overrides)==null?void 0:l.entrypointAddress},transaction:s});s={...s,...A}}const o=await Dt({account:r,chainId:i.id,eip712Transaction:s}),d=await bt({options:{bundlerUrl:(m=a.overrides)==null?void 0:m.bundlerUrl,chain:i,client:e.client,entrypointAddress:(w=a.overrides)==null?void 0:w.entrypointAddress},signedTransaction:o,transaction:s});return V({chainId:i.id,client:e.client,contractAddress:n.to??void 0,transactionHash:d.transactionHash,walletAddress:r.address,walletType:"smart"}),{chain:i,client:e.client,transactionHash:d.transactionHash}},async signMessage({message:n}){return e.personalAccount.signMessage({message:n})},async signTypedData(n){const c=xt(n);return e.personalAccount.signTypedData(c)},sendCalls:async n=>{const{inAppWalletSendCalls:c}=await T(async()=>{const{inAppWalletSendCalls:l}=await import("./in-app-wallet-calls-DmZ4pxIH.js");return{inAppWalletSendCalls:l}},__vite__mapDeps([15,16,17,5,1,2,3,12,7,8,9,10,11,13,18,19,20,21,22])),s=n.calls[0];if(!s)throw new Error("No calls to send");const o=s.client,d=s.chain||n.chain,y=await c({account:r,calls:n.calls,chain:d});return{chain:d,client:o,id:y}},getCallsStatus:async n=>{const{inAppWalletGetCallsStatus:c}=await T(async()=>{const{inAppWalletGetCallsStatus:s}=await import("./in-app-wallet-calls-DmZ4pxIH.js");return{inAppWalletGetCallsStatus:s}},__vite__mapDeps([15,16,17,5,1,2,3,12,7,8,9,10,11,13,18,19,20,21,22]));return c(n)},getCallsStatusRaw:async n=>{const{inAppWalletGetCallsStatusRaw:c}=await T(async()=>{const{inAppWalletGetCallsStatusRaw:s}=await import("./in-app-wallet-calls-DmZ4pxIH.js");return{inAppWalletGetCallsStatusRaw:s}},__vite__mapDeps([15,16,17,5,1,2,3,12,7,8,9,10,11,13,18,19,20,21,22]));return c(n)},getCapabilities:async n=>({[n.chainId??1]:{atomic:{status:"unsupported"},paymasterService:{supported:t.sponsorGas??!1}}})};return r}async function N(t){var i,r,n;const{executeTx:a,options:e}=t;try{const c=await Le({accountContract:e.accountContract,adminAddress:e.personalAccount.address,factoryContract:e.factoryContract,overrides:e.overrides,sponsorGas:e.sponsorGas,transaction:a}),s=await Se({adminAccount:e.personalAccount,chain:e.chain,client:e.client,entrypointAddress:(i=e.overrides)==null?void 0:i.entrypointAddress,userOp:c}),o={bundlerUrl:(r=e.overrides)==null?void 0:r.bundlerUrl,chain:e.chain,client:e.client,entrypointAddress:(n=e.overrides)==null?void 0:n.entrypointAddress},d=await It({options:o,userOp:s}),y=await ve({...o,userOpHash:d});return V({chainId:e.chain.id,client:e.client,contractAddress:await D(a.to??void 0),transactionHash:y.transactionHash,walletAddress:e.accountContract.address,walletType:"smart"}),{chain:e.chain,client:e.client,transactionHash:y.transactionHash}}catch(c){throw ct(c)&&ot({chainId:e.chain.id,client:e.client,contractAddress:await D(a.to??void 0),error:c,transactionValue:await D(a.value),walletAddress:e.accountContract.address}),c}finally{st(e.accountContract)}}async function Ie(t,a,e){const i=L({address:t,chain:e,client:a});try{return await C({contract:i,method:"function entrypoint() public view returns (address)"})}catch{return}}export{ya as connectSmartAccount,la as disconnectSmartAccount,Ie as getEntrypointFromFactory,Aa as isSmartWallet};
3
+ //# sourceMappingURL=index-v6-0TPZX.js.map
@@ -1,4 +1,4 @@
1
- import{i as h,b as a}from"./lit-element-wjYUA6aF.js";import{n as i,o as p}from"./class-map-BxMzgOIb.js";import"./index-Bsw53nId.js";import{c as b}from"./index--yUfiOex.js";import{d as f,r as y,e as g}from"./index-BDdcoEFU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7126f597-c464-4ca9-80eb-3ba155ddbe1d",e._sentryDebugIdIdentifier="sentry-dbid-7126f597-c464-4ca9-80eb-3ba155ddbe1d")}catch{}})();const m=f`
1
+ import{i as h,b as a}from"./lit-element-wjYUA6aF.js";import{n as i,o as p}from"./class-map-BxMzgOIb.js";import"./index-ZDiu1J1j.js";import{c as b}from"./index-Bf_iGaP5.js";import{d as f,r as y,e as g}from"./index-CzV7sMdy.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7126f597-c464-4ca9-80eb-3ba155ddbe1d",e._sentryDebugIdIdentifier="sentry-dbid-7126f597-c464-4ca9-80eb-3ba155ddbe1d")}catch{}})();const m=f`
2
2
  :host {
3
3
  width: 100%;
4
4
  }
@@ -75,4 +75,4 @@ import{i as h,b as a}from"./lit-element-wjYUA6aF.js";import{n as i,o as p}from".
75
75
  src=${this.imageSrc}
76
76
  boxColor=${this.boxColor}
77
77
  ></wui-image>`}templateRightIcon(){return this.rightIcon?this.loading?a`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:a`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`:null}};o.styles=[y,g,m];t([i()],o.prototype,"type",void 0);t([i()],o.prototype,"imageSrc",void 0);t([i()],o.prototype,"imageSize",void 0);t([i()],o.prototype,"icon",void 0);t([i()],o.prototype,"iconColor",void 0);t([i({type:Boolean})],o.prototype,"loading",void 0);t([i()],o.prototype,"tabIdx",void 0);t([i()],o.prototype,"boxColor",void 0);t([i({type:Boolean})],o.prototype,"disabled",void 0);t([i({type:Boolean})],o.prototype,"rightIcon",void 0);t([i({type:Boolean})],o.prototype,"boxed",void 0);t([i({type:Boolean})],o.prototype,"rounded",void 0);t([i({type:Boolean})],o.prototype,"fullSize",void 0);o=t([b("wui-list-item")],o);
78
- //# sourceMappingURL=index-_bcedLK5.js.map
78
+ //# sourceMappingURL=index-y50hP8_O.js.map
@@ -1,2 +1,2 @@
1
- import{e as v}from"./index-DFQS58XE.js";import{o}from"./browser-ponyfill-Dmn_2mUU.js";import{i as a,s as l,a as b,f as u,p as y}from"./index-Cf6ERmsZ.js";import"./index-ClIQf3ng.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="557987a5-0f95-4a61-9bd0-78ce817b237d",s._sentryDebugIdIdentifier="sentry-dbid-557987a5-0f95-4a61-9bd0-78ce817b237d")}catch{}})();var m=Object.defineProperty,w=Object.defineProperties,P=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?m(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,d=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(h)for(var t of h(e))O.call(e,t)&&c(s,t,e[t]);return s},p=(s,e)=>w(s,P(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 v.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=l(e),r=await(await o(this.url,p(d({},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=l({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,p(d({},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"?b(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=u(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};
2
- //# sourceMappingURL=index.es-C1YwoJJN.js.map
1
+ import{e as v}from"./index-B67Ropoe.js";import{o}from"./browser-ponyfill-DqHLL_k5.js";import{i as a,s as l,a as b,f as u,p as y}from"./index-D_2nYoM8.js";import"./index-CgfbItO2.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="557987a5-0f95-4a61-9bd0-78ce817b237d",s._sentryDebugIdIdentifier="sentry-dbid-557987a5-0f95-4a61-9bd0-78ce817b237d")}catch{}})();var m=Object.defineProperty,w=Object.defineProperties,P=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?m(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,d=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(h)for(var t of h(e))O.call(e,t)&&c(s,t,e[t]);return s},p=(s,e)=>w(s,P(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 v.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=l(e),r=await(await o(this.url,p(d({},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=l({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,p(d({},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"?b(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=u(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};
2
+ //# sourceMappingURL=index.es-D61fhzOk.js.map
@@ -1,2 +1,2 @@
1
- import{B as M}from"./dcl-schemas-BgQanFex.js";import{B as Tt,m as Mt,K as ot,o as J,q as Bt,Y as F,P as $t,F as B,V as R,r as z,t as At,u as Lt}from"./wallets-Cor67NYq.js";import"./index-ClIQf3ng.js";import{b as Jt,o as g,c as Et}from"./index-Cf6ERmsZ.js";import{f as P}from"./index.es-C1YwoJJN.js";import{N as zt}from"./index-DFQS58XE.js";import"./react-57wE9FMW.js";import"./signing-D8djUTSU.js";import"./prepare-contract-call-CVD1LMqZ.js";import"./utils-DyoF2n1_.js";import"./sentry-C6Mao8WI.js";import"./index-C0EB4Nb3.js";import"./ethers-RdXTApYJ.js";import"./intl-AKLEHPeO.js";import"./to-serializable-transaction-BKQS5d49.js";import"./transaction-BVLpkah4.js";import"./get-bytecode-Bbw_Evod.js";import"./execute-Da7DgAmR.js";import"./detectExtension-mxrpMjPD.js";import"./linkAccount-CHDe6wUT.js";import"./index-DCdW2yi4.js";import"./ethereum-CtosgwHU.js";import"./types-BeDU9GfL.js";import"./store-80QKZ2rN.js";import"./hashTypedData-CUDRpwju.js";import"./send-transaction-CydyNIuj.js";import"./eth_sendRawTransaction-DYAsy3sS.js";import"./index-OpYIGLSa.js";import"./index-BIAEBlSw.js";import"./index-DU6vOlyL.js";import"./browser-ponyfill-Dmn_2mUU.js";import"./events-DcSLjVuU.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new i.Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="4ab2a32b-c7dc-4eed-99f6-5e1a6385b902",i._sentryDebugIdIdentifier="sentry-dbid-4ab2a32b-c7dc-4eed-99f6-5e1a6385b902")}catch{}})();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 Ie(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 Ce(i,...t){return Ie(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 I(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 Ce(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)}`,It=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=It(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)]),It(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,Ct=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(Ct)for(var e of Ct(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,C=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){C(this,"name","polkadot"),C(this,"client"),C(this,"httpProviders"),C(this,"events"),C(this,"namespace"),C(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=I(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(I(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=I(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=I(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=I(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,Ii=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ii(i,typeof t!="symbol"?t+"":t,e);class Ci{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=I(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=I(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 Ci({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 ws=nt;export{ws as UniversalProvider,nt as default};
2
- //# sourceMappingURL=index.es-YMSgumSf.js.map
1
+ import{B as M}from"./dcl-schemas-BW3BbT5l.js";import{B as Tt,m as Mt,K as ot,o as J,q as Bt,Y as F,P as $t,F as B,V as R,r as z,t as At,u as Lt}from"./wallets-BM2FKp9V.js";import"./index-CgfbItO2.js";import{b as Jt,o as g,c as Et}from"./index-D_2nYoM8.js";import{f as P}from"./index.es-D61fhzOk.js";import{N as zt}from"./index-B67Ropoe.js";import"./react-Ddn-9d83.js";import"./signing-BCODmgNV.js";import"./prepare-contract-call-BitMGE96.js";import"./utils-BGzZ7mCg.js";import"./sentry-D_8KijKQ.js";import"./index-BBS-v8LD.js";import"./ethers-DGYWmyb1.js";import"./intl-AKLEHPeO.js";import"./to-serializable-transaction-DzZsdRzk.js";import"./transaction-Cbet3IZc.js";import"./get-bytecode-N2OV9nFo.js";import"./execute-CVxgGRa9.js";import"./detectExtension-C_GbFz5_.js";import"./linkAccount-D_xpNX67.js";import"./index-DIYb1IGB.js";import"./ethereum-Cez4WhJf.js";import"./types-BeDU9GfL.js";import"./store-80QKZ2rN.js";import"./hashTypedData-ywahqODz.js";import"./send-transaction-bNnxjmkm.js";import"./eth_sendRawTransaction-DYAsy3sS.js";import"./index-OpYIGLSa.js";import"./index-ChIjTbh5.js";import"./index-DyhsaJtc.js";import"./browser-ponyfill-DqHLL_k5.js";import"./events-YMZCt1yV.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new i.Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="4ab2a32b-c7dc-4eed-99f6-5e1a6385b902",i._sentryDebugIdIdentifier="sentry-dbid-4ab2a32b-c7dc-4eed-99f6-5e1a6385b902")}catch{}})();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 Ie(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 Ce(i,...t){return Ie(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 I(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 Ce(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)}`,It=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=It(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)]),It(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,Ct=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(Ct)for(var e of Ct(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,C=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){C(this,"name","polkadot"),C(this,"client"),C(this,"httpProviders"),C(this,"events"),C(this,"namespace"),C(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=I(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(I(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=I(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=I(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=I(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,Ii=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ii(i,typeof t!="symbol"?t+"":t,e);class Ci{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=I(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=I(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 Ci({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 ws=nt;export{ws as UniversalProvider,nt as default};
2
+ //# sourceMappingURL=index.es-DUQRyY8V.js.map