@dcl/explorer-website 2.6.1-25865517797.commit-b7a7cba → 2.6.1-25877826901.commit-3465800

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 (140) hide show
  1. package/assets/{ConstantsUtil-ByjAYmvC.js → ConstantsUtil-C4lJZ9QJ.js} +1 -1
  2. package/assets/{ExchangeController-Bp8ztJrX.js → ExchangeController-BSoHrJkH.js} +1 -1
  3. package/assets/{HelpersUtil-Dp4e1zvd.js → HelpersUtil-COJM8Fma.js} +1 -1
  4. package/assets/{NetworkUtil-DqGcuBfF.js → NetworkUtil-XsBaDkTf.js} +1 -1
  5. package/assets/{SwapController-DUCq2f7d.js → SwapController-CykJEtRW.js} +1 -1
  6. package/assets/{W3MFrameProviderSingleton-9eitOT0j.js → W3MFrameProviderSingleton-eYQGtm7P.js} +3 -3
  7. package/assets/{basic-C7tUDecp.js → basic-OoSQYHEk.js} +1 -1
  8. package/assets/{biconomy-plHCR2Qq.js → biconomy-PKn4tIKl.js} +1 -1
  9. package/assets/{browser-VYI7gorG.js → browser-DoJWAFam.js} +1 -1
  10. package/assets/browser-ponyfill-CqiVi-O8.js +1 -0
  11. package/assets/{ccip-CrAifiNa.js → ccip-BvTmJITs.js} +1 -1
  12. package/assets/{ccip-Bldffu31.js → ccip-ByLIoOC6.js} +1 -1
  13. package/assets/{chains-DTVDhUwv.js → chains-icJ3HR5v.js} +1 -1
  14. package/assets/{common-BEf2T7Hi.js → common-DMnogLd5.js} +1 -1
  15. package/assets/{controller-B8Iy-6V9.js → controller-BXwg_bJl.js} +2 -2
  16. package/assets/{core-XFvzSI58.js → core-DOL3gnfb.js} +4 -4
  17. package/assets/{custom-cPmISGcH.js → custom-CZYipZz1.js} +1 -1
  18. package/assets/{data-capture-DnvAEYWK.js → data-capture-CRDSEIY_.js} +1 -1
  19. package/assets/{decimals-8g2-fBFa.js → decimals-DNQm_OiO.js} +1 -1
  20. package/assets/decimals-DnutWGXb.js +1 -0
  21. package/assets/{detectExtension-yvI5WWZb.js → detectExtension-BfmE7TOs.js} +1 -1
  22. package/assets/{email-C8DRQjTT.js → email-CvS0g63O.js} +1 -1
  23. package/assets/{embedded-wallet-BxgtT1uV.js → embedded-wallet-BH2dkm4W.js} +1 -1
  24. package/assets/{engine-BERe87yT.js → engine-Di9rAbBn.js} +1 -1
  25. package/assets/{estimate-l1-fee-BTeKvFv5.js → estimate-l1-fee-D5Yk5K_j.js} +1 -1
  26. package/assets/eth_estimateGas-BmOR31h-.js +1 -0
  27. package/assets/{eth_getStorageAt-SbVMAQY-.js → eth_getStorageAt-7xIaoYHZ.js} +1 -1
  28. package/assets/{eth_getTransactionCount-qv0oO1Md.js → eth_getTransactionCount-DrnF23O4.js} +1 -1
  29. package/assets/{ethereum-BP59xYBe.js → ethereum-2kM2S7dx.js} +1 -1
  30. package/assets/{extractIPFS-BOFlZk7U.js → extractIPFS-C9Vdpa9n.js} +1 -1
  31. package/assets/{features-DVWd8_kC.js → features-DRiKivpi.js} +1 -1
  32. package/assets/{fetchTokenMetadata-BaJXN6RH.js → fetchTokenMetadata-DZl1qOjc.js} +2 -2
  33. package/assets/{fortmatic-DARkeYTE.js → fortmatic-6-9Hxtzg.js} +1 -1
  34. package/assets/get-ecosystem-wallet-info-DQQrfAsE.js +1 -0
  35. package/assets/{getBalance-D6wpo61w.js → getBalance-BfwFhtAu.js} +2 -2
  36. package/assets/{getInstalledModules-Dkj379ys.js → getInstalledModules-Dlcyw_6V.js} +1 -1
  37. package/assets/{getNFT-HMkoXD7L.js → getNFT-CkUzlgLt.js} +2 -2
  38. package/assets/{getNFT-Drn4rxrk.js → getNFT-DIu1VS3y.js} +1 -1
  39. package/assets/{hashTypedData-B5shS-rs.js → hashTypedData-CM_9VEoH.js} +1 -1
  40. package/assets/{hashTypedData-CMDSWYgs.js → hashTypedData-DrZol7nF.js} +1 -1
  41. package/assets/{in-app-wallet-calls-l9-2W_Em.js → in-app-wallet-calls-BABhagi9.js} +1 -1
  42. package/assets/{index-CH0zI801.js → index--SuwY_Sr.js} +1 -1
  43. package/assets/{index-B9U0GcYk.js → index-3gZjXx6v.js} +1 -1
  44. package/assets/{index-BXAxcybX.js → index-3jhEomSV.js} +1 -1
  45. package/assets/{index-D0LvjNIX.js → index-8eDD30Uv.js} +1 -1
  46. package/assets/{index-DfWsAOhN.js → index-B26CWJm4.js} +3 -3
  47. package/assets/{index-8M7OkBFm.js → index-B3Bk-Bdi.js} +1 -1
  48. package/assets/{index-DPxCDCvr.js → index-B7_b_SxX.js} +1 -1
  49. package/assets/{index-DK-ZMNLh.js → index-BI0nsxQ1.js} +1 -1
  50. package/assets/{index-BKL7nv1p.js → index-BPxeLdJF.js} +1 -1
  51. package/assets/{index-CWnFK_-0.js → index-BQJscq8u.js} +1 -1
  52. package/assets/{index-B5ECjSS9.js → index-BSmpP1mK.js} +1 -1
  53. package/assets/{index-JfVynEph.js → index-BUjSLaXy.js} +1 -1
  54. package/assets/{index-aoxVkzFE.js → index-BVL3WVs3.js} +1 -1
  55. package/assets/{index-829Uxa3Y.css → index-BXaGpRRD.css} +1 -1
  56. package/assets/{index-TBthDmkl.js → index-BYwd36WC.js} +1 -1
  57. package/assets/{index-0ShVRzxt.js → index-BlANYCHN.js} +1 -1
  58. package/assets/{index-BaGjqMte.js → index-BxZwJKty.js} +2 -2
  59. package/assets/{index-DOnRCLNP.js → index-C68kxEIB.js} +2 -2
  60. package/assets/{index-okvlQSs2.js → index-CEE50lK9.js} +1 -1
  61. package/assets/{index-BxdNwV86.js → index-CFn3Q12F.js} +1 -1
  62. package/assets/{index-DP1DuCnR.js → index-CNR7tadx.js} +1 -1
  63. package/assets/{index-CWGeCZBJ.js → index-CNttLYqM.js} +1 -1
  64. package/assets/{index-B-vyBZw9.js → index-CPCCdjXg.js} +1 -1
  65. package/assets/{index-C8NSq3HK.js → index-CQx7Nvt8.js} +1 -1
  66. package/assets/{index-I68folnJ.js → index-CUqVNGI9.js} +1 -1
  67. package/assets/{index-wds8TuUm.js → index-CYGUludi.js} +1 -1
  68. package/assets/{index-DS2Lm9tG.js → index-CcHsPndE.js} +1 -1
  69. package/assets/{index-DFE6t65x.js → index-CdCaVlZ8.js} +1 -1
  70. package/assets/{index-r_1z0VI_.js → index-CpGStcFm.js} +1 -1
  71. package/assets/{index-i4VBSYqA.js → index-CzGhZ9cz.js} +1 -1
  72. package/assets/{index-kXKMGszW.js → index-D2eOGoyM.js} +1 -1
  73. package/assets/{index-DIlwNfpB.js → index-D4_P_6_0.js} +1 -1
  74. package/assets/{index-D2ZBQG8w.js → index-D4h65XPa.js} +1 -1
  75. package/assets/{index-CE5G6IEJ.js → index-D6EwKnFm.js} +1 -1
  76. package/assets/{index-BDgZ3gDE.js → index-DD7htze-.js} +1 -1
  77. package/assets/{index-CjiwjbqL.js → index-DErCc5s3.js} +1 -1
  78. package/assets/{index-DvJmANzU.js → index-DIZhmTRA.js} +1 -1
  79. package/assets/{index-Cp7mdTuR.js → index-DNf75mcI.js} +1 -1
  80. package/assets/{index-BIPd_vR5.js → index-DVWnrfKr.js} +1 -1
  81. package/assets/{index-C5ciuua_.js → index-DcSeumRb.js} +1 -1
  82. package/assets/{index-DWRq2SN_.js → index-Dh25pQLC.js} +1 -1
  83. package/assets/{index-mZa0UiRt.js → index-DhJ5PMMP.js} +1 -1
  84. package/assets/{index-C51HwlD0.js → index-DvBfOXXL.js} +1 -1
  85. package/assets/{index-C-uqursN.js → index-ZSDK0Ila.js} +1 -1
  86. package/assets/{index-Cu4ZjLNb.js → index-a-a2MqTK.js} +5 -5
  87. package/assets/{index-B7Jt3b4d.js → index-jd0SXoNg.js} +1 -1
  88. package/assets/{index-BlykZ8Gp.js → index-kYi3llt9.js} +1 -1
  89. package/assets/{index-DbAu4Peg.js → index-mUrlue57.js} +3 -3
  90. package/assets/{index-Cy1X3n_C.js → index-vqWCp_18.js} +1 -1
  91. package/assets/{index.es-cEGj7JU0.js → index.es-B6W15sA5.js} +4 -4
  92. package/assets/{index.es-YpI01v2I.js → index.es-BpysnXQX.js} +1 -1
  93. package/assets/{index.es-CkxUaFYS.js → index.es-CjcoN6we.js} +1 -1
  94. package/assets/{localBatchGatewayRequest-CNIOIq-Z.js → localBatchGatewayRequest-BH_HSMtg.js} +1 -1
  95. package/assets/{networks-DJ72puSk.js → networks-xuo_6MCS.js} +1 -1
  96. package/assets/{onramp--l5ZLxWE.js → onramp-CYabKBjQ.js} +1 -1
  97. package/assets/{openzeppelin-CqtRqxtF.js → openzeppelin-ChIJtXh7.js} +1 -1
  98. package/assets/{ownerOf-cWkgEtd8.js → ownerOf-CpA7K1ak.js} +1 -1
  99. package/assets/{parseEventLogs-D1xiFnCH.js → parseEventLogs-DTRl5YJ_.js} +3 -3
  100. package/assets/{parseNft-DH5KlHPI.js → parseNft-BmgScKdM.js} +2 -2
  101. package/assets/{parseSignature-BYhcrVdX.js → parseSignature-On3IHrnn.js} +1 -1
  102. package/assets/{parseSignature-HAlgOHnm.js → parseSignature-XxRbPHFh.js} +3 -3
  103. package/assets/{pay-with-exchange-CiXPJJ6-.js → pay-with-exchange-DehF3o8r.js} +1 -1
  104. package/assets/{qr-overlay-CmFgwJBd.js → qr-overlay-BEl3x4xw.js} +3 -3
  105. package/assets/{receive-t2TxUItI.js → receive-C_KTgg4c.js} +1 -1
  106. package/assets/{resolveImplementation-iG9WRRnW.js → resolveImplementation-LbazawSf.js} +1 -1
  107. package/assets/{rpc-sIdV4wiJ.js → rpc-BVFdxD_n.js} +1 -1
  108. package/assets/{secp256k1-Co_Jve4c.js → secp256k1-6WLSeO2i.js} +1 -1
  109. package/assets/{secp256k1-Rk5k9i7o.js → secp256k1-CUFDPHqP.js} +1 -1
  110. package/assets/{secp256k1-Bg2aUJRs.js → secp256k1-DjijwK4n.js} +1 -1
  111. package/assets/{send-ByB5fOtm.js → send-BvXhUAZg.js} +1 -1
  112. package/assets/{send-batch-transaction-D79MC_wr.js → send-batch-transaction-PvOdFKh_.js} +1 -1
  113. package/assets/{send-eip712-transaction-CB6qLgks.js → send-eip712-transaction-DW2Z39R_.js} +2 -2
  114. package/assets/{send-gasless-transaction-Dt1qtUR8.js → send-gasless-transaction-DZNXePZn.js} +2 -2
  115. package/assets/{session-proposal-CY0k9Jnm.js → session-proposal-BDKOEjOS.js} +1 -1
  116. package/assets/{session-request-B_2glC9e.js → session-request-C6gEdmiF.js} +2 -2
  117. package/assets/{sha256-Dy8KQE_5.js → sha256-DOODwtIM.js} +1 -1
  118. package/assets/{signing-gNn6SJWz.js → signing-lyeTiv6v.js} +5 -5
  119. package/assets/{socials-Dx84-PrV.js → socials-J163g-WS.js} +1 -1
  120. package/assets/{swaps-CK9Sfcew.js → swaps-DhRGH4D_.js} +1 -1
  121. package/assets/{thirdweb-Bx5V_C1s.js → thirdweb-Dqspr20y.js} +3 -3
  122. package/assets/{totalSupply-O-VFDoRO.js → totalSupply-C4K7aOAr.js} +1 -1
  123. package/assets/{transactionReceipt-BqEjx5q-.js → transactionReceipt-DIRSM0gr.js} +1 -1
  124. package/assets/{transactions-BLOC2qYE.js → transactions-CIkqFxc1.js} +1 -1
  125. package/assets/{utils-h8VUSGPW.js → utils-Cj9H0gW-.js} +1 -1
  126. package/assets/{verifyHash-CNJ6t8Wp.js → verifyHash-CoWeO2NB.js} +1 -1
  127. package/assets/{w3m-modal-CCQuGDus.js → w3m-modal-BkrZujFe.js} +1 -1
  128. package/assets/{w3m-modal-nzPxg0Fr.js → w3m-modal-Cam7s-1S.js} +1 -1
  129. package/assets/{wait-for-tx-receipt-5pSBMNe2.js → wait-for-tx-receipt-CN6uf72q.js} +1 -1
  130. package/assets/{wallets-Bz03-Btm.js → wallets-HiUhftO5.js} +6 -6
  131. package/assets/{web-connector-CAOe_uvv.js → web-connector-Dq2kV8N4.js} +3 -3
  132. package/assets/{writeContract-CCar3Ocq.js → writeContract-jh5z7q6H.js} +1 -1
  133. package/assets/{zora-sepolia-D6mjhB5j.js → zora-sepolia-CS_uSNQg.js} +1 -1
  134. package/assets/{zoraTestnet-WLSFziQl.js → zoraTestnet-CvoUlJGq.js} +1 -1
  135. package/index.html +4 -4
  136. package/package.json +3 -3
  137. package/assets/browser-ponyfill-BmgQyNz0.js +0 -1
  138. package/assets/decimals-DR6jraOc.js +0 -1
  139. package/assets/eth_estimateGas-DKKwG-Ue.js +0 -1
  140. package/assets/get-ecosystem-wallet-info-Cvjz8DFX.js +0 -1
@@ -1 +1 @@
1
- import{N as Tt,B as M}from"./index-Cu4ZjLNb.js";import{B as Mt,q as Bt,K as ot,t as J,u as Lt,Y as F,P as $t,F as B,V as R,v as z,w as At,x as Jt}from"./wallets-Bz03-Btm.js";import"./index-DS2Lm9tG.js";import{b as zt,o as g,c as Et}from"./index-B-vyBZw9.js";import{f as P}from"./index.es-CkxUaFYS.js";import"./signing-gNn6SJWz.js";import"./utils-h8VUSGPW.js";import"./store-DOLZnwHk.js";import"./hashTypedData-CMDSWYgs.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-r_1z0VI_.js";import"./ethereum-BP59xYBe.js";import"./browser-ponyfill-BmgQyNz0.js";const ct="error",Gt="wss://relay.walletconnect.org",Vt="wc",Kt="universal_provider",x=`${Vt}@2:${Kt}:`,St="https://rpc.walletconnect.org/v1/",qt="generic",Wt=`${St}bundler`,_="call_status",Yt=86400,v={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function it(i){return i==null||typeof i!="object"&&typeof i!="function"}function Nt(i){return Object.getOwnPropertySymbols(i).filter(t=>Object.prototype.propertyIsEnumerable.call(i,t))}function Dt(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Qt="[object RegExp]",_t="[object String]",Ft="[object Number]",Rt="[object Boolean]",xt="[object Arguments]",Xt="[object Symbol]",Zt="[object Date]",te="[object Map]",ee="[object Set]",ie="[object Array]",se="[object ArrayBuffer]",re="[object Object]",ne="[object DataView]",ae="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",he="[object Uint32Array]",pe="[object Int8Array]",ue="[object Int16Array]",le="[object Int32Array]",de="[object Float32Array]",fe="[object Float64Array]";function st(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function me(i,t){return D(i,void 0,i,new Map,t)}function D(i,t,e,s=new Map,n=void 0){const a=n?.(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?.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){if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const e=i[Symbol.toStringTag];return e==null||!Object.getOwnPropertyDescriptor(i,Symbol.toStringTag)?.writable?!1:i.toString()===`[object ${e}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ce(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let n=i;for(let a=0;a<e.length;a++){const r=e[a];n=Z(n,r,s,new Map)}return n}function Z(i,t,e,s){if(it(i)&&(i=Object(i)),t==null||typeof t!="object")return i;if(s.has(t))return ye(s.get(t));if(s.set(t,i),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const n=[...Object.keys(t),...Nt(t)];for(let a=0;a<n.length;a++){const r=n[a];let o=t[r],c=i[r];if(pt(o)&&(o={...o}),pt(c)&&(c={...c}),typeof M<"u"&&M.isBuffer(o)&&(o=ht(o)),Array.isArray(o))if(typeof c=="object"&&c!=null){const l=[],p=Reflect.ownKeys(c);for(let w=0;w<p.length;w++){const d=p[w];l[d]=c[d]}c=l}else c=[];const u=e(c,o,r,i,t,s);u!=null?i[r]=u:Array.isArray(o)||ut(c)&&ut(o)?i[r]=Z(c,o,e,s):c==null&&be(o)?i[r]=Z({},o,e,s):c==null&&we(o)?i[r]=ht(o):(c===void 0||o!==void 0)&&(i[r]=o)}return i}function Ie(i,...t){return Ce(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,dt=(i,t,e)=>t in i?Oe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t)=>{for(var e in t||(t={}))$e.call(t,e)&&dt(i,e,t[e]);if(lt)for(var e of lt(t))Ae.call(t,e)&&dt(i,e,t[e]);return i},Ee=(i,t)=>je(i,He(t));function f(i,t,e){var s;const n=B(i);return((s=t.rpcMap)==null?void 0:s[n.reference])||`${St}?chainId=${n.namespace}:${n.reference}&projectId=${e}`}function C(i){return i.includes(":")?i.split(":")[1]:i}function Ut(i){return i.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Se(i,t){const e=Object.keys(t.namespaces).filter(n=>n.includes(i));if(!e.length)return[];const s=[];return e.forEach(n=>{const a=t.namespaces[n].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,n;return((s=e?.chains)==null?void 0:s.length)&&((n=e?.chains)==null?void 0:n.length)>0}))}function k(i={},t={}){const e=ft(mt(i)),s=ft(mt(t));return Ie(e,s)}function mt(i){var t,e,s,n,a;const r={};if(!R(i))return r;for(const[o,c]of Object.entries(i)){const u=$t(o)?[o]:c.chains,l=c.methods||[],p=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(p,(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={},h=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,Ct=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:n={}}=i,a={};if(!R(n)&&!R(s))return;const r=Ct(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=r;const u=n?.[`${yt}:${c}`];if(u){const l=u?.[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),Ct(l||u))}}for(const[o,c]of Object.entries(a))Object.keys(c).length===0&&delete a[o];return Object.keys(a).length>0?a:void 0};var ke=Object.defineProperty,Te=(i,t,e)=>t in i?ke(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Me=(i,t,e)=>Te(i,t+"",e);let W;class rt{constructor(t){Me(this,"storage"),this.storage=t}async getItem(t){return await this.storage.getItem(t)}async setItem(t,e){return await this.storage.setItem(t,e)}async removeItem(t){return await this.storage.removeItem(t)}static getStorage(t){return W||(W=new rt(t)),W}}var Be=Object.defineProperty,Le=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ot=(i,t,e)=>t in i?Be(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ve=(i,t)=>{for(var e in t||(t={}))ze.call(t,e)&&Ot(i,e,t[e]);if(It)for(var e of It(t))Ge.call(t,e)&&Ot(i,e,t[e]);return i},Ke=(i,t)=>Le(i,Je(t));async function We(i,t){const e=B(i.result.capabilities.caip345.caip2),s=i.result.capabilities.caip345.transactionHashes,n=await Promise.allSettled(s.map(p=>Ye(e.reference,p,t))),a=n.filter(p=>p.status==="fulfilled").map(p=>p.value).filter(p=>p);n.filter(p=>p.status==="rejected").forEach(p=>console.warn("Failed to fetch transaction receipt:",p.reason));const r=!a.length||a.some(p=>!p),o=a.every(p=>p?.status==="0x1"),c=a.every(p=>p?.status==="0x0"),u=a.some(p=>p?.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:Jt(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?.[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,I=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){I(this,"name","polkadot"),I(this,"client"),I(this,"httpProviders"),I(this,"events"),I(this,"namespace"),I(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("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,h("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=parseInt(C(e));t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(t){const e=t||this.chainId;return this.httpProviders[e]||(this.httpProviders=Q(Y({},this.httpProviders),{[e]:this.createHttpProvider(e)}),this.httpProviders[e])}async handleSwitchChain(t){var e,s;let n=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}async getCapabilities(t){var e,s,n,a,r;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(n=t.request)==null?void 0:n.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(t.topic),l=((r=u?.sessionProperties)==null?void 0:r.capabilities)||{},p=`${o}${c.join(",")}`,w=l?.[p];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||{}),{[p]: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?.id,c=a?.capabilities||{},u=(s=c?.caip345)==null?void 0:s.caip2,l=(n=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=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("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,h("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=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),n=C(e);t[n]=this.createHttpProvider(n,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var yi=Object.defineProperty,Ci=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ci(i,typeof t!="symbol"?t+"":t,e);class Ii{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("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,h("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=h("events"),this.client=h("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=h("events"),this.client=h("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,h("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 Tt),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?.logger<"u"&&typeof t?.logger!="string"?t.logger:Mt(Bt({level:t?.logger||ct})),this.disableProviderPing=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,zt(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 Lt.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?.length===0)return;const n=Ut(s),a=k(this.namespaces,this.optionalNamespaces),r=X(T({},a[e]),{accounts:s,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:r});break;case"algorand":this.rpcProviders[e]=new gi({namespace:r});break;case"solana":this.rpcProviders[e]=new ui({namespace:r});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:r});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:r});break;case"cip34":this.rpcProviders[e]=new bi({namespace:r});break;case"elrond":this.rpcProviders[e]=new Ii({namespace:r});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:r});break;case"near":this.rpcProviders[e]=new Ei({namespace:r});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:r});break;default:this.rpcProviders[e]=new Fi({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{var e;const{topic:s}=t;s===((e=this.session)==null?void 0:e.topic)&&this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{var e;const{params:s,topic:n}=t;if(n!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const r=a.data;r&&J(r)&&this.events.emit("accountsChanged",r.map(vt))}else if(a.name==="chainChanged"){const r=s.chainId,o=s.event.data,c=F(r),u=G(r)!==G(o)?`${c}:${G(o)}`:r;this.onChainChanged(u)}else this.events.emit(a.name,a.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:e})=>{var s,n;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,r=(n=this.client)==null?void 0:n.session.get(t);this.session=X(T({},r),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:e})}),this.client.on("session_delete",async t=>{var e;t.topic===((e=this.session)==null?void 0:e.topic)&&(await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",X(T({},ot("USER_DISCONNECTED")),{data:t.topic})))}),this.on(v.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){return this.rpcProviders[t]||this.rpcProviders[qt]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var e;this.getProvider(t).updateNamespace((e=this.session)==null?void 0:e.namespaces[t])})}setNamespaces(t){const{namespaces:e={},optionalNamespaces:s={},sessionProperties:n,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=n,this.scopedProperties=a}validateChain(t){const[e,s]=t?.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 es=nt;export{es as UniversalProvider,nt as default};
1
+ import{N as Tt,B as M}from"./index-a-a2MqTK.js";import{B as Mt,q as Bt,K as ot,t as J,u as Lt,Y as F,P as $t,F as B,V as R,v as z,w as At,x as Jt}from"./wallets-HiUhftO5.js";import"./index-CcHsPndE.js";import{b as zt,o as g,c as Et}from"./index-CPCCdjXg.js";import{f as P}from"./index.es-CjcoN6we.js";import"./signing-lyeTiv6v.js";import"./utils-Cj9H0gW-.js";import"./store-DOLZnwHk.js";import"./hashTypedData-DrZol7nF.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-CpGStcFm.js";import"./ethereum-2kM2S7dx.js";import"./browser-ponyfill-CqiVi-O8.js";const ct="error",Gt="wss://relay.walletconnect.org",Vt="wc",Kt="universal_provider",x=`${Vt}@2:${Kt}:`,St="https://rpc.walletconnect.org/v1/",qt="generic",Wt=`${St}bundler`,_="call_status",Yt=86400,v={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function it(i){return i==null||typeof i!="object"&&typeof i!="function"}function Nt(i){return Object.getOwnPropertySymbols(i).filter(t=>Object.prototype.propertyIsEnumerable.call(i,t))}function Dt(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Qt="[object RegExp]",_t="[object String]",Ft="[object Number]",Rt="[object Boolean]",xt="[object Arguments]",Xt="[object Symbol]",Zt="[object Date]",te="[object Map]",ee="[object Set]",ie="[object Array]",se="[object ArrayBuffer]",re="[object Object]",ne="[object DataView]",ae="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",he="[object Uint32Array]",pe="[object Int8Array]",ue="[object Int16Array]",le="[object Int32Array]",de="[object Float32Array]",fe="[object Float64Array]";function st(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function me(i,t){return D(i,void 0,i,new Map,t)}function D(i,t,e,s=new Map,n=void 0){const a=n?.(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?.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){if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const e=i[Symbol.toStringTag];return e==null||!Object.getOwnPropertyDescriptor(i,Symbol.toStringTag)?.writable?!1:i.toString()===`[object ${e}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ce(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let n=i;for(let a=0;a<e.length;a++){const r=e[a];n=Z(n,r,s,new Map)}return n}function Z(i,t,e,s){if(it(i)&&(i=Object(i)),t==null||typeof t!="object")return i;if(s.has(t))return ye(s.get(t));if(s.set(t,i),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const n=[...Object.keys(t),...Nt(t)];for(let a=0;a<n.length;a++){const r=n[a];let o=t[r],c=i[r];if(pt(o)&&(o={...o}),pt(c)&&(c={...c}),typeof M<"u"&&M.isBuffer(o)&&(o=ht(o)),Array.isArray(o))if(typeof c=="object"&&c!=null){const l=[],p=Reflect.ownKeys(c);for(let w=0;w<p.length;w++){const d=p[w];l[d]=c[d]}c=l}else c=[];const u=e(c,o,r,i,t,s);u!=null?i[r]=u:Array.isArray(o)||ut(c)&&ut(o)?i[r]=Z(c,o,e,s):c==null&&be(o)?i[r]=Z({},o,e,s):c==null&&we(o)?i[r]=ht(o):(c===void 0||o!==void 0)&&(i[r]=o)}return i}function Ie(i,...t){return Ce(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,dt=(i,t,e)=>t in i?Oe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t)=>{for(var e in t||(t={}))$e.call(t,e)&&dt(i,e,t[e]);if(lt)for(var e of lt(t))Ae.call(t,e)&&dt(i,e,t[e]);return i},Ee=(i,t)=>je(i,He(t));function f(i,t,e){var s;const n=B(i);return((s=t.rpcMap)==null?void 0:s[n.reference])||`${St}?chainId=${n.namespace}:${n.reference}&projectId=${e}`}function C(i){return i.includes(":")?i.split(":")[1]:i}function Ut(i){return i.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Se(i,t){const e=Object.keys(t.namespaces).filter(n=>n.includes(i));if(!e.length)return[];const s=[];return e.forEach(n=>{const a=t.namespaces[n].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,n;return((s=e?.chains)==null?void 0:s.length)&&((n=e?.chains)==null?void 0:n.length)>0}))}function k(i={},t={}){const e=ft(mt(i)),s=ft(mt(t));return Ie(e,s)}function mt(i){var t,e,s,n,a;const r={};if(!R(i))return r;for(const[o,c]of Object.entries(i)){const u=$t(o)?[o]:c.chains,l=c.methods||[],p=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(p,(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={},h=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,Ct=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:n={}}=i,a={};if(!R(n)&&!R(s))return;const r=Ct(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=r;const u=n?.[`${yt}:${c}`];if(u){const l=u?.[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),Ct(l||u))}}for(const[o,c]of Object.entries(a))Object.keys(c).length===0&&delete a[o];return Object.keys(a).length>0?a:void 0};var ke=Object.defineProperty,Te=(i,t,e)=>t in i?ke(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Me=(i,t,e)=>Te(i,t+"",e);let W;class rt{constructor(t){Me(this,"storage"),this.storage=t}async getItem(t){return await this.storage.getItem(t)}async setItem(t,e){return await this.storage.setItem(t,e)}async removeItem(t){return await this.storage.removeItem(t)}static getStorage(t){return W||(W=new rt(t)),W}}var Be=Object.defineProperty,Le=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ot=(i,t,e)=>t in i?Be(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ve=(i,t)=>{for(var e in t||(t={}))ze.call(t,e)&&Ot(i,e,t[e]);if(It)for(var e of It(t))Ge.call(t,e)&&Ot(i,e,t[e]);return i},Ke=(i,t)=>Le(i,Je(t));async function We(i,t){const e=B(i.result.capabilities.caip345.caip2),s=i.result.capabilities.caip345.transactionHashes,n=await Promise.allSettled(s.map(p=>Ye(e.reference,p,t))),a=n.filter(p=>p.status==="fulfilled").map(p=>p.value).filter(p=>p);n.filter(p=>p.status==="rejected").forEach(p=>console.warn("Failed to fetch transaction receipt:",p.reason));const r=!a.length||a.some(p=>!p),o=a.every(p=>p?.status==="0x1"),c=a.every(p=>p?.status==="0x0"),u=a.some(p=>p?.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:Jt(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?.[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,I=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){I(this,"name","polkadot"),I(this,"client"),I(this,"httpProviders"),I(this,"events"),I(this,"namespace"),I(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("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,h("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=parseInt(C(e));t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(t){const e=t||this.chainId;return this.httpProviders[e]||(this.httpProviders=Q(Y({},this.httpProviders),{[e]:this.createHttpProvider(e)}),this.httpProviders[e])}async handleSwitchChain(t){var e,s;let n=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}async getCapabilities(t){var e,s,n,a,r;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(n=t.request)==null?void 0:n.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(t.topic),l=((r=u?.sessionProperties)==null?void 0:r.capabilities)||{},p=`${o}${c.join(",")}`,w=l?.[p];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||{}),{[p]: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?.id,c=a?.capabilities||{},u=(s=c?.caip345)==null?void 0:s.caip2,l=(n=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=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("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,h("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=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),n=C(e);t[n]=this.createHttpProvider(n,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var yi=Object.defineProperty,Ci=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ci(i,typeof t!="symbol"?t+"":t,e);class Ii{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("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=h("events"),this.client=h("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,h("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=h("events"),this.client=h("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=h("events"),this.client=h("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,h("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 Tt),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?.logger<"u"&&typeof t?.logger!="string"?t.logger:Mt(Bt({level:t?.logger||ct})),this.disableProviderPing=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,zt(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 Lt.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?.length===0)return;const n=Ut(s),a=k(this.namespaces,this.optionalNamespaces),r=X(T({},a[e]),{accounts:s,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:r});break;case"algorand":this.rpcProviders[e]=new gi({namespace:r});break;case"solana":this.rpcProviders[e]=new ui({namespace:r});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:r});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:r});break;case"cip34":this.rpcProviders[e]=new bi({namespace:r});break;case"elrond":this.rpcProviders[e]=new Ii({namespace:r});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:r});break;case"near":this.rpcProviders[e]=new Ei({namespace:r});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:r});break;default:this.rpcProviders[e]=new Fi({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{var e;const{topic:s}=t;s===((e=this.session)==null?void 0:e.topic)&&this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{var e;const{params:s,topic:n}=t;if(n!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const r=a.data;r&&J(r)&&this.events.emit("accountsChanged",r.map(vt))}else if(a.name==="chainChanged"){const r=s.chainId,o=s.event.data,c=F(r),u=G(r)!==G(o)?`${c}:${G(o)}`:r;this.onChainChanged(u)}else this.events.emit(a.name,a.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:e})=>{var s,n;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,r=(n=this.client)==null?void 0:n.session.get(t);this.session=X(T({},r),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:e})}),this.client.on("session_delete",async t=>{var e;t.topic===((e=this.session)==null?void 0:e.topic)&&(await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",X(T({},ot("USER_DISCONNECTED")),{data:t.topic})))}),this.on(v.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){return this.rpcProviders[t]||this.rpcProviders[qt]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var e;this.getProvider(t).updateNamespace((e=this.session)==null?void 0:e.namespaces[t])})}setNamespaces(t){const{namespaces:e={},optionalNamespaces:s={},sessionProperties:n,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=n,this.scopedProperties=a}validateChain(t){const[e,s]=t?.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 es=nt;export{es as UniversalProvider,nt as default};
@@ -1 +1 @@
1
- import{e as d}from"./index-Cu4ZjLNb.js";import{o}from"./browser-ponyfill-BmgQyNz0.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-B-vyBZw9.js";import"./index-DS2Lm9tG.js";var b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?b(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,p=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(l)for(var t of l(e))O.call(e,t)&&c(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",f={headers:L,method:j},g=10;class M{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new d.EventEmitter,this.isAvailable=!1,this.registering=!1,!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=h(e),r=await(await o(this.url,v(p({},f),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((r,i)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),i(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));r()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=h({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,v(p({},f),{body:t}))}this.onOpen()}catch(t){const r=this.parseError(t);throw this.events.emit("register_error",r),this.onClose(),r}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?u(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=m(e,i);this.events.emit("payload",n)}parseError(e,t=this.url){return y(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{M as f};
1
+ import{e as d}from"./index-a-a2MqTK.js";import{o}from"./browser-ponyfill-CqiVi-O8.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-CPCCdjXg.js";import"./index-CcHsPndE.js";var b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?b(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,p=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(l)for(var t of l(e))O.call(e,t)&&c(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",f={headers:L,method:j},g=10;class M{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new d.EventEmitter,this.isAvailable=!1,this.registering=!1,!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=h(e),r=await(await o(this.url,v(p({},f),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((r,i)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),i(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));r()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=h({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,v(p({},f),{body:t}))}this.onOpen()}catch(t){const r=this.parseError(t);throw this.events.emit("register_error",r),this.onClose(),r}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?u(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=m(e,i);this.events.emit("payload",n)}parseError(e,t=this.url){return y(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{M as f};
@@ -1 +1 @@
1
- import{as as f}from"./NetworkUtil-DqGcuBfF.js";import{a$ as l,aN as p,bh as w,o as y,an as A,aH as g,h as m,g as F,ax as E,am as N,m as h,n as P,O as R,bi as I}from"./parseEventLogs-D1xiFnCH.js";function x(a){const{abi:r,data:e}=a,n=l(e,0,4),t=r.find(o=>o.type==="function"&&n===p(w(o)));if(!t)throw new y(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?A(t.inputs,l(e,4)):void 0}}const u="/docs/contract/encodeErrorResult";function b(a){const{abi:r,errorName:e,args:n}=a;let t=r[0];if(e){const c=g({abi:r,args:n,name:e});if(!c)throw new m(e,{docsPath:u});t=c}if(t.type!=="error")throw new m(void 0,{docsPath:u});const o=w(t),s=p(o);let i="0x";if(n&&n.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=E(t.inputs,n)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function H(a){const{abi:r,functionName:e,result:n}=a;let t=r[0];if(e){const s=g({abi:r,name:e});if(!s)throw new h(e,{docsPath:d});t=s}if(t.type!=="function")throw new h(void 0,{docsPath:d});if(!t.outputs)throw new P(t.name,{docsPath:d});const o=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new R(n)})();return E(t.outputs,o)}const q="x-batch-gateway:true";async function G(a){const{data:r,ccipRequest:e}=a,{args:[n]}=x({abi:f,data:r}),t=[],o=[];return await Promise.all(n.map(async(s,i)=>{try{o[i]=s.urls.includes(q)?await G({data:s.data,ccipRequest:e}):await e(s),t[i]=!1}catch(c){t[i]=!0,o[i]=M(c)}})),H({abi:f,functionName:"query",result:[t,o]})}function M(a){return a.name==="HttpRequestError"&&a.status?b({abi:f,errorName:"HttpError",args:[a.status,a.shortMessage]}):b({abi:[I],errorName:"Error",args:["shortMessage"in a?a.shortMessage:a.message]})}export{H as a,G as b,x as d,b as e,q as l};
1
+ import{as as f}from"./NetworkUtil-XsBaDkTf.js";import{a$ as l,aN as p,bh as w,o as y,an as A,aH as g,h as m,g as F,ax as E,am as N,m as h,n as P,O as R,bi as I}from"./parseEventLogs-DTRl5YJ_.js";function x(a){const{abi:r,data:e}=a,n=l(e,0,4),t=r.find(o=>o.type==="function"&&n===p(w(o)));if(!t)throw new y(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?A(t.inputs,l(e,4)):void 0}}const u="/docs/contract/encodeErrorResult";function b(a){const{abi:r,errorName:e,args:n}=a;let t=r[0];if(e){const c=g({abi:r,args:n,name:e});if(!c)throw new m(e,{docsPath:u});t=c}if(t.type!=="error")throw new m(void 0,{docsPath:u});const o=w(t),s=p(o);let i="0x";if(n&&n.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=E(t.inputs,n)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function H(a){const{abi:r,functionName:e,result:n}=a;let t=r[0];if(e){const s=g({abi:r,name:e});if(!s)throw new h(e,{docsPath:d});t=s}if(t.type!=="function")throw new h(void 0,{docsPath:d});if(!t.outputs)throw new P(t.name,{docsPath:d});const o=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new R(n)})();return E(t.outputs,o)}const q="x-batch-gateway:true";async function G(a){const{data:r,ccipRequest:e}=a,{args:[n]}=x({abi:f,data:r}),t=[],o=[];return await Promise.all(n.map(async(s,i)=>{try{o[i]=s.urls.includes(q)?await G({data:s.data,ccipRequest:e}):await e(s),t[i]=!1}catch(c){t[i]=!0,o[i]=M(c)}})),H({abi:f,functionName:"query",result:[t,o]})}function M(a){return a.name==="HttpRequestError"&&a.status?b({abi:f,errorName:"HttpError",args:[a.status,a.shortMessage]}):b({abi:[I],errorName:"Error",args:["shortMessage"in a?a.shortMessage:a.message]})}export{H as a,G as b,x as d,b as e,q as l};
@@ -1 +1 @@
1
- import{at as S}from"./NetworkUtil-DqGcuBfF.js";import{a as w,b as C,c as N,d as z,e as M,f as E,g as q,h as B,i as L,j as D,k as P,l as U,m as V,n as A,o as I,p as O,q as G,r as R,s as H,t as Z,u as K,v as X,w as Y,x as J,y as F,z as W,A as Q,B as _,C as $,D as aa,E as sa,F as ea,G as ta,H as na,I as oa,J as ia,K as ra,L as la,M as ca,N as pa,O as ha,P as da,Q as ma,R as Ta,S as ua,T as ba,U as ka,V as fa,W as ga,X as ya,Y as ja,Z as va,_ as Sa,$ as xa,a0 as wa,a1 as Ca,a2 as Na,a3 as za,a4 as Ma,a5 as Ea,a6 as qa,a7 as Ba,a8 as La,a9 as Da,aa as Pa,ab as Ua,ac as Va,ad as Aa,ae as Ia,af as Oa,ag as Ga,ah as Ra,ai as Ha,aj as Za,ak as Ka,al as Xa,am as Ya,an as Ja,ao as Fa,ap as Wa,aq as Qa,ar as _a,as as $a,at as as,au as ss,av as es,aw as ts,ax as ns,ay as os,az as is,aA as rs,aB as ls,aC as cs,aD as ps,aE as hs,aF as ds,aG as ms,aH as Ts,aI as us,aJ as bs,aK as ks,aL as fs,aM as gs,aN as ys,aO as js,aP as vs,aQ as Ss,aR as xs,aS as ws,aT as Cs,aU as Ns,aV as zs,aW as Ms,aX as Es,aY as qs,aZ as Bs,a_ as Ls,a$ as Ds,b0 as Ps,b1 as Us,b2 as Vs,b3 as As,b4 as Is,b5 as Os,b6 as Gs,b7 as Rs,b8 as Hs,b9 as Zs,ba as Ks,bb as Xs,bc as Ys,bd as Js,be as Fs,bf as Ws,bg as Qs,bh as _s,bi as $s,bj as ae,bk as se,bl as ee,bm as te,bn as ne,bo as oe,bp as ie,bq as re,br as le,bs as ce,bt as pe,bu as he,bv as de,bw as me,bx as Te,by as ue,bz as be,bA as ke,bB as fe,bC as ge,bD as ye,bE as je,bF as ve,bG as Se,bH as xe,bI as we,bJ as Ce,bK as Ne,bL as ze,bM as Me,bN as Ee,bO as qe,bP as Be,bQ as Le,bR as De,bS as Pe,bT as Ue,bU as Ve,bV as Ae,bW as Ie,bX as Oe,bY as Ge,bZ as Re,b_ as He,b$ as Ze,c0 as Ke,c1 as Xe,c2 as Ye,c3 as Je,c4 as Fe,c5 as We,c6 as Qe,c7 as _e,c8 as $e,c9 as at,ca as st,cb as et,cc as tt,cd as nt,ce as ot,cf as it,cg as rt,ch as lt,ci as ct,cj as pt,ck as ht,cl as dt,cm as mt,cn as Tt,co as ut,cp as bt,cq as kt,cr as ft,cs as gt,ct as yt,cu as jt,cv as vt,cw as St,cx as xt,cy as wt,cz as Ct,cA as Nt,cB as zt,cC as Mt,cD as Et,cE as qt,cF as Bt,cG as Lt,cH as Dt,cI as Pt,cJ as Ut,cK as Vt,cL as At,cM as It,cN as Ot,cO as Gt,cP as Rt,cQ as Ht,cR as Zt,cS as Kt,cT as Xt,cU as Yt,cV as Jt,cW as Ft,cX as Wt,cY as Qt,cZ as _t,c_ as $t,c$ as an,d0 as sn,d1 as en,d2 as tn,d3 as nn,d4 as on,d5 as rn,d6 as ln,d7 as cn,d8 as pn,d9 as hn,da as dn,db as mn,dc as Tn,dd as un,de as bn,df as kn,dg as fn,dh as gn,di as yn,dj as jn,dk as vn,dl as Sn,dm as xn,dn as wn,dp as Cn,dq as Nn,dr as zn,ds as Mn,dt as En,du as qn,du as Bn,dv as Ln,dw as Dn,dx as Pn,dy as Un,dz as Vn,dA as An,dB as In,dC as On,dD as Gn,dE as Rn,dF as Hn,dG as Zn,dH as Kn,dI as Xn,dJ as Yn,dK as Jn,dL as Fn,dM as Wn,dN as Qn,dO as _n,dP as $n,dQ as ao,dR as so,dS as eo,dT as to,dU as no,dV as oo,dW as io,dX as ro,dY as lo,dZ as co,d_ as po,d$ as ho,e0 as mo,e1 as To,e2 as uo,e3 as bo,e4 as ko,e5 as fo,e6 as go,e7 as yo,e8 as jo,e9 as vo,ea as So,eb as xo,ec as wo,ed as Co,ee as No,ef as zo,eg as Mo,eh as Eo,ei as qo,ej as Bo,ek as Lo,el as Do,em as Po,en as Uo,eo as Vo,ep as Ao,eq as Io,er as Oo,es as Go,et as Ro,eu as Ho,ev as Zo,ew as Ko,ex as Xo,ey as Yo,ez as Jo,eA as Fo,eB as Wo,eC as Qo,eD as _o,eE as $o,eF as ai,eG as si,eH as ei,eI as ti,eJ as ni,eK as oi,eL as ii,eM as ri,eN as li,eO as ci,eP as pi,eQ as hi,eR as di,eS as mi,eT as Ti,eU as ui,eV as bi,eW as ki,eX as fi,eY as gi,eZ as yi,e_ as ji,e$ as vi,f0 as Si,f1 as xi,f2 as wi,f3 as Ci,f4 as Ni,f5 as zi,f6 as Mi,f7 as Ei,f8 as qi,f9 as Bi,fa as Li,fb as Di,fc as Pi,fd as Ui,fe as Vi,ff as Ai,fg as Ii,fh as Oi,fi as Gi,fj as Ri,fk as Hi,fl as Zi,fm as Ki,fn as Xi,fo as Yi,fp as Ji,fq as Fi,fr as Wi,fs as Qi,ft as _i,fu as $i,fv as ar,fw as sr,fx as er,fy as tr,fz as nr,fA as or,fB as ir,fC as rr,fD as lr,fE as cr,fF as pr,fG as hr,fH as dr,fI as mr,fJ as Tr,fK as ur,fL as br,fM as kr,fN as fr,fO as gr,fP as yr,fQ as jr,fR as vr,fS as Sr,fT as xr,fU as wr,fV as Cr,fW as Nr,fX as zr,fY as Mr,fZ as Er,f_ as qr,f$ as Br,g0 as Lr,g1 as Dr,g2 as Pr,g3 as Ur,g4 as Vr,g5 as Ar,g6 as Ir,g7 as Or,g8 as Gr,g9 as Rr,ga as Hr,gb as Zr,gc as Kr,gd as Xr,ge as Yr,gf as Jr,gg as Fr,gh as Wr,gi as Qr,gj as _r,gk as $r,gl as al,gm as sl,gn as el,go as tl,gp as nl,gq as ol,gr as il,gs as rl,gt as ll,gu as cl,gv as pl,gw as hl,gx as dl,gy as ml,gz as Tl,gA as ul,gB as bl,gC as kl,gD as fl,gE as gl,gF as yl,gG as jl,gH as vl,gI as Sl,gJ as xl,gK as wl,gL as Cl,gM as Nl,gN as zl,gO as Ml,gP as El,gQ as ql,gR as Bl,gS as Ll,gT as Dl,gU as Pl,gV as Ul,gW as Vl,gX as Al,gY as Il,gZ as Ol,g_ as Gl,g$ as Rl,h0 as Hl,h1 as Zl,h2 as Kl,h3 as Xl,h4 as Yl,h5 as Jl,h6 as Fl,h7 as Wl,h8 as Ql,h9 as _l,ha as $l,hb as ac,hc as sc,hd as ec,he as tc,hf as nc,hg as oc,hh as ic,hi as rc,hj as lc,hk as cc,hl as pc,hm as hc,hn as dc,ho as mc,hp as Tc,hq as uc,hr as bc,hs as kc,ht as fc,hu as gc,hv as yc,hw as jc,hx as vc,hy as Sc,hz as xc,hA as wc,hB as Cc,hC as Nc,hD as zc,hE as Mc,hF as Ec,hG as qc,hH as Bc,hI as Lc,hJ as Dc,hK as Pc,hL as Uc,hM as Vc,hN as Ac,hO as Ic,hP as Oc,hQ as Gc,hR as Rc,hS as Hc,hT as Zc,hU as Kc,hV as Xc,hW as Yc,hX as Jc,hY as Fc,hZ as Wc,h_ as Qc,h$ as _c,i0 as $c,i1 as ap,i2 as sp,i2 as ep,i3 as tp,i4 as np,i5 as op,i6 as ip,i7 as rp,i8 as lp,i9 as cp,ia as pp,ib as hp,ic as dp,id as mp,ie as Tp,ig as up,ih as bp,ii as kp,ij as fp,ik as gp,il as yp,im as jp,io as vp,ip as Sp,iq as xp,ir as wp,is as Cp,it as Np,iu as zp,iv as Mp,iw as Ep,ix as qp,iy as Bp,iz as Lp,iA as Dp,iB as Pp,iC as Up,iD as Vp,iE as Ap,iF as Ip,iD as Op,iG as Gp,iG as Rp,iH as Hp,iI as Zp,iJ as Kp,iK as Xp,iL as Yp,iM as Jp,iN as Fp,iO as Wp,iP as Qp,iQ as _p,iR as $p,iS as ah,iT as sh,iU as eh,iV as th,iW as nh,iX as oh,iY as ih,iZ as rh,i_ as lh,i$ as ch,j0 as ph,j1 as hh,j2 as dh,j3 as mh,j4 as Th,j5 as uh,j6 as bh,j7 as kh,j8 as fh,j9 as gh,ja as yh,jb as jh,jc as vh,jd as Sh,je as xh,jf as wh,jg as Ch,jh as Nh,ji as zh,jj as Mh,jk as Eh,jl as qh,jm as Bh,jn as Lh,jo as Dh,jp as Ph,jq as Uh,jr as Vh,jq as Ah,js as Ih,jt as Oh,ju as Gh,jv as Rh,jw as Hh,jx as Zh,jy as Kh,jz as Xh,jA as Yh,jB as Jh,jC as Fh,jD as Wh,jE as Qh,jF as _h,jG as $h,jH as ad,jI as sd,jJ as ed,jK as td,jL as nd,jM as od,jN as id,jO as rd,jP as ld,jQ as cd,jR as pd,jS as hd,jT as dd,jU as md,jV as Td,jW as ud,jX as bd,jY as kd,jZ as fd,j_ as gd,j$ as yd,k0 as jd,k1 as vd,k2 as Sd,k3 as xd,k4 as wd,j$ as Cd,k0 as Nd,k5 as zd,k6 as Md,k7 as Ed,k1 as qd,k2 as Bd,k8 as Ld,k9 as Dd,ka as Pd}from"./zoraTestnet-WLSFziQl.js";import"./sha2-D3ryOfi3.js";import"./index-Cu4ZjLNb.js";import"./verifyHash-CNJ6t8Wp.js";import"./parseEventLogs-D1xiFnCH.js";import"./sha256-D33fGSQc.js";import"./secp256k1-Bg2aUJRs.js";import"./hmac-BMnSt9Ou.js";import"./writeContract-CCar3Ocq.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const p=a({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}),h=a({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"}),d=a({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"}),m=a({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}}),T=a({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),u=a({id:"00000008819873e925422c1ff0f99f7c",caipNetworkId:"bip122:00000008819873e925422c1ff0f99f7c",chainNamespace:"bip122",name:"Bitcoin Signet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),b=a({id:"-239",name:"TON",network:"ton-mainnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://tonscan.org"}},testnet:!1,chainNamespace:"ton",caipNetworkId:"ton:-239"}),k=a({id:"-3",name:"TON Testnet",network:"ton-testnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://testnet.tonscan.org"}},testnet:!0,chainNamespace:"ton",caipNetworkId:"ton:-3"}),f=a({id:"0x2b6653dc",name:"TRON",network:"tron-mainnet",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org"}},testnet:!1,chainNamespace:"tron",caipNetworkId:"tron:0x2b6653dc"}),g=a({id:"0x94a9059e",name:"TRON Shasta",network:"tron-shasta",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0x94a9059e"}),y=a({id:"0xcd8690dc",name:"TRON Nile",network:"tron-nile",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0xcd8690dc"});export{S as AVAILABLE_NAMESPACES,w as abey,C as abstract,N as abstractTestnet,z as acala,M as acria,E as adf,q as adi,B as agungTestnet,L as aioz,D as alephZero,P as alephZeroTestnet,U as alienx,V as alienxHalTestnet,A as alpenTestnet,I as ancient8,O as ancient8Sepolia,G as anvil,R as apeChain,H as apexTestnet,Z as apollo,K as arbitrum,X as arbitrumGoerli,Y as arbitrumNova,J as arbitrumSepolia,F as arcTestnet,W as arenaz,Q as areonNetwork,_ as areonNetworkTestnet,$ as areum,aa as artelaTestnet,sa as arthera,ea as artheraTestnet,ta as assetChain,na as assetChainTestnet,oa as astar,ia as astarZkEVM,ra as astarZkyoto,la as atletaOlympia,ca as aurora,pa as auroraTestnet,ha as auroria,da as autheoTestnet,ma as avalanche,Ta as avalancheFuji,ua as b3,ba as b3Sepolia,ka as bahamut,fa as base,ga as baseGoerli,ya as basePreconf,ja as baseSepolia,va as baseSepoliaPreconf,Sa as basecampTestnet,xa as battlechainTestnet,wa as beam,Ca as beamTestnet,Na as bearNetworkChainMainnet,za as bearNetworkChainTestnet,Ma as berachain,Ea as berachainBepolia,qa as berachainTestnet,Ba as berachainTestnetbArtio,La as bevmMainnet,Da as bifrost,Pa as birdlayer,Ua as bitTorrent,Va as bitTorrentTestnet,m as bitcoin,u as bitcoinSignet,T as bitcoinTestnet,Aa as bitgert,Ia as bitkub,Oa as bitkubTestnet,Ga as bitlayer,Ra as bitlayerTestnet,Ha as bitrock,Za as blast,Ka as blastSepolia,Xa as bob,Ya as bobSepolia,Ja as boba,Fa as bobaSepolia,Wa as boolBetaMainnet,Qa as botanix,_a as botanixTestnet,$a as bounceBit,as as bounceBitTestnet,ss as bronos,es as bronosTestnet,ts as bsc,ns as bscGreenfield,os as bscTestnet,is as bsquared,rs as bsquaredTestnet,ls as btr,cs as btrTestnet,ps as bxn,hs as bxnTestnet,ds as cannon,ms as canto,Ts as celo,us as celoAlfajores,bs as celoSepolia,ks as chang,fs as chiliz,gs as chips,ys as citrea,js as citreaTestnet,vs as classic,Ss as codex,xs as codexTestnet,ws as coinbit,Cs as coinex,Ns as confluxESpace,zs as confluxESpaceTestnet,Ms as coreDao,Es as coreTestnet1,qs as coreTestnet2,Bs as corn,Ls as cornTestnet,Ds as cpchain,Ps as crab,Us as creatorTestnet,Vs as creditCoin3Devnet,As as creditCoin3Mainnet,Is as creditCoin3Testnet,Os as cronos,Gs as cronosTestnet,Rs as cronoszkEVM,Hs as cronoszkEVMTestnet,Zs as crossbell,Ks as crossfi,Xs as curtis,Ys as cyber,Js as cyberTestnet,Fs as dailyNetwork,Ws as dailyNetworkTestnet,Qs as darwinia,_s as datahavenTestnet,$s as dbkchain,ae as dchain,se as dchainTestnet,ee as defichainEvm,te as defichainEvmTestnet,a as defineChain,ne as degen,oe as dfk,ie as diode,re as disChain,le as dodochainTestnet,ce as dogechain,pe as domaTestnet,he as donatuz,de as dosChain,me as dosChainTestnet,Te as dreyerxMainnet,ue as dreyerxTestnet,be as dustboyIoT,ke as dymension,fe as eden,ge as edexa,ye as edexaTestnet,je as edgeless,ve as edgelessTestnet,Se as edgeware,xe as edgewareTestnet,we as eduChain,Ce as eduChainTestnet,Ne as elastos,ze as elastosTestnet,Me as electroneum,Ee as electroneumTestnet,qe as elysiumTestnet,Be as energy,Le as eni,De as eniTestnet,Pe as enuls,Ue as eon,Ve as eos,Ae as eosTestnet,Ie as eteria,Oe as etherlink,Ge as etherlinkShadownetTestnet,Re as etherlinkTestnet,He as ethernity,Ze as etp,Ke as evmos,Xe as evmosTestnet,Ye as excelonMainnet,Je as expanse,Fe as exsat,We as exsatTestnet,Qe as fantom,_e as fantomSonicTestnet,$e as fantomTestnet,at as fibo,st as filecoin,et as filecoinCalibration,tt as filecoinHyperspace,nt as fireChain,ot as flame,it as flare,rt as flareTestnet,lt as flowMainnet,ct as flowPreviewnet,pt as flowTestnet,ht as fluence,dt as fluenceStage,mt as fluenceTestnet,Tt as fluent,ut as fluentDevnet,bt as fluentTestnet,kt as form,ft as formTestnet,gt as forma,yt as formicarium,jt as forta,vt as foundry,St as fraxtal,xt as fraxtalTestnet,wt as funkiMainnet,Ct as funkiSepolia,Nt as fuse,zt as fuseSparknet,Mt as fusion,Et as fusionTestnet,qt as garnet,Bt as gatechain,Lt as geist,Dt as genesys,Pt as gensyn,Ut as giwaSepolia,Vt as giwaSepoliaPreconf,At as glideL1Protocol,It as glideL2Protocol,Ot as gnosis,Gt as gnosisChiado,Rt as goChain,Ht as goat,Zt as gobi,Kt as godwoken,Xt as goerli,Yt as graphite,Jt as graphiteTestnet,Ft as gravity,Wt as gunz,Qt as guruNetwork,_t as guruTestnet,$t as ham,an as happychainTestnet,sn as haqqMainnet,en as haqqTestedge2,tn as hardhat,nn as harmonyOne,on as hashkey,rn as hashkeyTestnet,ln as haustTestnet,cn as hedera,pn as hederaPreviewnet,hn as hederaTestnet,dn as hela,mn as heliosTestnet,Tn as hemi,un as hemiSepolia,bn as henesys,kn as holesky,fn as hoodi,gn as horizenTestnet,yn as hpb,jn as hpp,vn as hppSepolia,Sn as huddle01Mainnet,xn as huddle01Testnet,wn as humanity,Cn as humanityTestnet,Nn as humanode,zn as humanodeTestnet5,Mn as hychain,En as hychainTestnet,qn as hyperEvm,Bn as hyperliquid,Ln as hyperliquidEvmTestnet,Dn as iSunCoin,Pn as icbNetwork,Un as idchain,Vn as igra,An as immutableZkEvm,In as immutableZkEvmTestnet,On as inEVM,Gn as initVerse,Rn as initVerseGenesis,Hn as injective,Zn as injectiveTestnet,Kn as ink,Xn as inkSepolia,Yn as iota,Jn as iotaTestnet,Fn as iotex,Wn as iotexTestnet,Qn as jasmyChain,_n as jasmyChainTestnet,$n as jbc,ao as jbcTestnet,so as jocMainnet,eo as jocTestnet,to as jovay,no as jovaySepolia,oo as juneo,io as juneoBCH1Chain,ro as juneoDAI1Chain,lo as juneoDOGE1Chain,co as juneoEUR1Chain,po as juneoGLD1Chain,ho as juneoLINK1Chain,mo as juneoLTC1Chain,To as juneoSGD1Chain,uo as juneoSocotraTestnet,bo as juneoUSD1Chain,ko as juneoUSDT1Chain,fo as juneomBTC1Chain,go as kaia,yo as kairos,jo as kakarotSepolia,vo as kakarotStarknetSepolia,So as kardiaChain,xo as karura,wo as katana,Co as kava,No as kavaTestnet,zo as kcc,Mo as kii,Eo as kiiTestnetOro,qo as kinto,Bo as klaytn,Lo as klaytnBaobab,Do as koi,Po as kroma,Uo as kromaSepolia,Vo as krown,Ao as l3x,Io as l3xTestnet,Oo as lavita,Go as lens,Ro as lensTestnet,Ho as lestnet,Zo as lightlinkPegasus,Ko as lightlinkPhoenix,Xo as linea,Yo as lineaGoerli,Jo as lineaSepolia,Fo as lineaTestnet,Wo as lisk,Qo as liskSepolia,_o as loadAlphanet,$o as localhost,ai as loop,si as lukso,ei as luksoTestnet,ti as lumiaMainnet,ni as lumiaTestnet,oi as lumoz,ii as lumozTestnet,ri as luxeports,li as lycan,ci as lyra,pi as mainnet,hi as mandala,di as manta,mi as mantaSepoliaTestnet,Ti as mantaTestnet,ui as mantle,bi as mantleSepoliaTestnet,ki as mantleTestnet,fi as mantraDuKongEVMTestnet,gi as mantraEVM,yi as mapProtocol,ji as matchain,vi as matchainTestnet,Si as mchVerse,xi as megaeth,wi as megaethTestnet,Ci as mekong,Ni as meld,zi as memecore,Mi as merlin,Ei as merlinErigonTestnet,qi as metachain,Bi as metachainIstanbul,Li as metadium,Di as metalL2,Pi as meter,Ui as meterTestnet,Vi as metis,Ai as metisGoerli,Ii as metisSepolia,Oi as mev,Gi as mevTestnet,Ri as mezo,Hi as mezoTestnet,Zi as mint,Ki as mintSepoliaTestnet,Xi as mitosisTestnet,Yi as mode,Ji as modeTestnet,Fi as monad,Wi as monadTestnet,Qi as moonbaseAlpha,_i as moonbeam,$i as moonbeamDev,ar as moonriver,sr as morph,er as morphHolesky,tr as morphSepolia,nr as nahmii,or as nautilus,ir as near,rr as nearTestnet,lr as neonDevnet,cr as neonMainnet,pr as neoxMainnet,hr as neoxT4,dr as newton,mr as nexi,Tr as nexilix,ur as nibiru,br as nitrographTestnet,kr as nomina,fr as oasisTestnet,gr as oasys,yr as odysseyTestnet,jr as okc,vr as omax,Sr as omni,xr as omniOmega,wr as oneWorld,Cr as oortMainnetDev,Nr as opBNB,zr as opBNBTestnet,Mr as openledger,Er as optimism,qr as optimismGoerli,Br as optimismSepolia,Lr as optopia,Dr as optopiaTestnet,Pr as orderly,Ur as orderlySepolia,Vr as otimDevnet,Ar as palm,Ir as palmTestnet,Or as paseoPassetHub,Gr as peaq,Rr as pgn,Hr as pgnTestnet,Zr as phoenix,Kr as planq,Xr as plasma,Yr as plasmaDevnet,Jr as plasmaTestnet,Fr as playfiAlbireo,Wr as plinga,Qr as plume,_r as plumeDevnet,$r as plumeMainnet,al as plumeSepolia,sl as plumeTestnet,el as polterTestnet,tl as polygon,nl as polygonAmoy,ol as polygonMumbai,il as polygonZkEvm,rl as polygonZkEvmCardona,ll as polygonZkEvmTestnet,cl as polynomial,pl as polynomialSepolia,hl as potos,dl as potosTestnet,ml as premiumBlockTestnet,Tl as pulsechain,ul as pulsechainV4,bl as pumpfiTestnet,kl as pyrope,fl as qMainnet,gl as qTestnet,yl as ql1,jl as quai,vl as quaiTestnet,Sl as radius,xl as radiusTestnet,wl as reactiveTestnet,Cl as real,Nl as redbellyMainnet,zl as redbellyTestnet,Ml as reddio,El as reddioSepolia,ql as redstone,Bl as rei,Ll as reyaNetwork,Dl as rise,Pl as riseTestnet,Ul as rivalz,Vl as rollux,Al as rolluxTestnet,Il as ronin,Ol as root,Gl as rootPorcini,Rl as rootstock,Hl as rootstockTestnet,Zl as rss3,Kl as rss3Sepolia,Xl as saakuru,Yl as saga,Jl as saigon,Fl as sanko,Wl as sapphire,Ql as sapphireTestnet,_l as satoshiVM,$l as satoshiVMTestnet,ac as scroll,sc as scrollSepolia,ec as sei,tc as seiTestnet,nc as seismicDevnet,oc as sepolia,ic as shape,rc as shapeSepolia,lc as shardeum,cc as shardeumSphinx,pc as shibarium,hc as shibariumTestnet,dc as shiden,mc as shimmer,Tc as shimmerTestnet,uc as sidraChain,bc as silentData,kc as silicon,fc as siliconSepolia,gc as sixProtocol,yc as skaleBase,jc as skaleBaseSepoliaTestnet,vc as skaleBlockBrawlers,Sc as skaleCalypso,xc as skaleCalypsoTestnet,wc as skaleCryptoBlades,Cc as skaleCryptoColosseum,Nc as skaleEuropa,zc as skaleEuropaTestnet,Mc as skaleExorde,Ec as skaleHumanProtocol,qc as skaleNebula,Bc as skaleNebulaTestnet,Lc as skaleRazor,Dc as skaleTitan,Pc as skaleTitanTestnet,Uc as sketchpad,Vc as snax,Ac as snaxTestnet,p as solana,h as solanaDevnet,d as solanaTestnet,Ic as somnia,Oc as somniaTestnet,Gc as soneium,Rc as soneiumMinato,Hc as songbird,Zc as songbirdTestnet,Kc as sonic,Xc as sonicBlazeTestnet,Yc as sonicTestnet,Jc as sophon,Fc as sophonTestnet,Wc as sova,Qc as sovaSepolia,_c as spicy,$c as stable,ap as stableTestnet,sp as statusNetworkSepolia,ep as statusSepolia,tp as step,np as story,op as storyAeneid,ip as storyOdyssey,rp as storyTestnet,lp as stratis,cp as subtensorEvm,pp as superlumio,hp as superposition,dp as superseed,mp as superseedSepolia,Tp as surgeTestnet,up as swan,bp as swanProximaTestnet,kp as swanSaturnTestnet,fp as swellchain,gp as swellchainTestnet,yp as swissdlt,jp as syscoin,vp as syscoinTestnet,Sp as tac,xp as tacSPB,wp as taiko,Cp as taikoHekla,Np as taikoHoodi,zp as taikoJolnir,Mp as taikoKatla,Ep as taikoTestnetSepolia,qp as taraxa,Bp as taraxaTestnet,Lp as teaSepolia,Dp as telcoinTestnet,Pp as telos,Up as telosTestnet,Vp as tempo,Ap as tempoDevnet,Ip as tempoLocalnet,Op as tempoMainnet,Gp as tempoModerato,Rp as tempoTestnet,Hp as tenet,Zp as ternoa,Kp as thaiChain,Xp as that,Yp as theta,Jp as thetaTestnet,Fp as thunderCore,Wp as thunderTestnet,Qp as tiktrixTestnet,_p as tomb,b as ton,k as tonTestnet,$p as treasure,ah as treasureTopaz,sh as tron,f as tronMainnet,eh as tronNile,y as tronNileTestnet,th as tronShasta,g as tronShastaTestnet,nh as ubiq,oh as ultra,ih as ultraTestnet,rh as ultron,lh as ultronTestnet,ch as unichain,ph as unichainSepolia,hh as unique,dh as uniqueOpal,mh as uniqueQuartz,Th as unreal,uh as vana,bh as vanaMoksha,kh as vanar,fh as vechain,gh as velas,yh as viction,jh as victionTestnet,vh as vision,Sh as visionTestnet,xh as wanchain,wh as wanchainTestnet,Ch as weaveVMAlphanet,Nh as wemix,zh as wemixTestnet,Mh as westendAssetHub,Eh as whitechain,qh as whitechainTestnet,Bh as wmcTestnet,Lh as worldLand,Dh as worldchain,Ph as worldchainSepolia,Uh as x1Testnet,Vh as xLayer,Ah as xLayerTestnet,Ih as xai,Oh as xaiTestnet,Gh as xdc,Rh as xdcTestnet,Hh as xgr,Zh as xoneMainnet,Kh as xoneTestnet,Xh as xphereMainnet,Yh as xphereTestnet,Jh as xpla,Fh as xrOne,Wh as xrSepolia,Qh as xrplevm,_h as xrplevmDevnet,$h as xrplevmTestnet,ad as yooldoVerse,sd as yooldoVerseTestnet,ed as zenchainTestnet,td as zeniq,nd as zeroG,od as zeroGGalileoTestnet,id as zeroGMainnet,rd as zeroGTestnet,ld as zeroNetwork,cd as zetachain,pd as zetachainAthensTestnet,hd as zhejiang,dd as zilliqa,md as zilliqaTestnet,Td as zircuit,ud as zircuitGarfieldTestnet,bd as zkFair,kd as zkFairTestnet,fd as zkLinkNova,gd as zkLinkNovaSepoliaTestnet,yd as zkSync,jd as zkSyncInMemoryNode,vd as zkSyncLocalNode,Sd as zkSyncSepoliaTestnet,xd as zkXPLA,wd as zkXPLATestnet,Cd as zksync,Nd as zksyncInMemoryNode,zd as zksyncLocalCustomHyperchain,Md as zksyncLocalHyperchain,Ed as zksyncLocalHyperchainL1,qd as zksyncLocalNode,Bd as zksyncSepoliaTestnet,Ld as zora,Dd as zoraSepolia,Pd as zoraTestnet};
1
+ import{at as S}from"./NetworkUtil-XsBaDkTf.js";import{a as w,b as C,c as N,d as z,e as M,f as E,g as q,h as B,i as L,j as D,k as P,l as U,m as V,n as A,o as I,p as O,q as G,r as R,s as H,t as Z,u as K,v as X,w as Y,x as J,y as F,z as W,A as Q,B as _,C as $,D as aa,E as sa,F as ea,G as ta,H as na,I as oa,J as ia,K as ra,L as la,M as ca,N as pa,O as ha,P as da,Q as ma,R as Ta,S as ua,T as ba,U as ka,V as fa,W as ga,X as ya,Y as ja,Z as va,_ as Sa,$ as xa,a0 as wa,a1 as Ca,a2 as Na,a3 as za,a4 as Ma,a5 as Ea,a6 as qa,a7 as Ba,a8 as La,a9 as Da,aa as Pa,ab as Ua,ac as Va,ad as Aa,ae as Ia,af as Oa,ag as Ga,ah as Ra,ai as Ha,aj as Za,ak as Ka,al as Xa,am as Ya,an as Ja,ao as Fa,ap as Wa,aq as Qa,ar as _a,as as $a,at as as,au as ss,av as es,aw as ts,ax as ns,ay as os,az as is,aA as rs,aB as ls,aC as cs,aD as ps,aE as hs,aF as ds,aG as ms,aH as Ts,aI as us,aJ as bs,aK as ks,aL as fs,aM as gs,aN as ys,aO as js,aP as vs,aQ as Ss,aR as xs,aS as ws,aT as Cs,aU as Ns,aV as zs,aW as Ms,aX as Es,aY as qs,aZ as Bs,a_ as Ls,a$ as Ds,b0 as Ps,b1 as Us,b2 as Vs,b3 as As,b4 as Is,b5 as Os,b6 as Gs,b7 as Rs,b8 as Hs,b9 as Zs,ba as Ks,bb as Xs,bc as Ys,bd as Js,be as Fs,bf as Ws,bg as Qs,bh as _s,bi as $s,bj as ae,bk as se,bl as ee,bm as te,bn as ne,bo as oe,bp as ie,bq as re,br as le,bs as ce,bt as pe,bu as he,bv as de,bw as me,bx as Te,by as ue,bz as be,bA as ke,bB as fe,bC as ge,bD as ye,bE as je,bF as ve,bG as Se,bH as xe,bI as we,bJ as Ce,bK as Ne,bL as ze,bM as Me,bN as Ee,bO as qe,bP as Be,bQ as Le,bR as De,bS as Pe,bT as Ue,bU as Ve,bV as Ae,bW as Ie,bX as Oe,bY as Ge,bZ as Re,b_ as He,b$ as Ze,c0 as Ke,c1 as Xe,c2 as Ye,c3 as Je,c4 as Fe,c5 as We,c6 as Qe,c7 as _e,c8 as $e,c9 as at,ca as st,cb as et,cc as tt,cd as nt,ce as ot,cf as it,cg as rt,ch as lt,ci as ct,cj as pt,ck as ht,cl as dt,cm as mt,cn as Tt,co as ut,cp as bt,cq as kt,cr as ft,cs as gt,ct as yt,cu as jt,cv as vt,cw as St,cx as xt,cy as wt,cz as Ct,cA as Nt,cB as zt,cC as Mt,cD as Et,cE as qt,cF as Bt,cG as Lt,cH as Dt,cI as Pt,cJ as Ut,cK as Vt,cL as At,cM as It,cN as Ot,cO as Gt,cP as Rt,cQ as Ht,cR as Zt,cS as Kt,cT as Xt,cU as Yt,cV as Jt,cW as Ft,cX as Wt,cY as Qt,cZ as _t,c_ as $t,c$ as an,d0 as sn,d1 as en,d2 as tn,d3 as nn,d4 as on,d5 as rn,d6 as ln,d7 as cn,d8 as pn,d9 as hn,da as dn,db as mn,dc as Tn,dd as un,de as bn,df as kn,dg as fn,dh as gn,di as yn,dj as jn,dk as vn,dl as Sn,dm as xn,dn as wn,dp as Cn,dq as Nn,dr as zn,ds as Mn,dt as En,du as qn,du as Bn,dv as Ln,dw as Dn,dx as Pn,dy as Un,dz as Vn,dA as An,dB as In,dC as On,dD as Gn,dE as Rn,dF as Hn,dG as Zn,dH as Kn,dI as Xn,dJ as Yn,dK as Jn,dL as Fn,dM as Wn,dN as Qn,dO as _n,dP as $n,dQ as ao,dR as so,dS as eo,dT as to,dU as no,dV as oo,dW as io,dX as ro,dY as lo,dZ as co,d_ as po,d$ as ho,e0 as mo,e1 as To,e2 as uo,e3 as bo,e4 as ko,e5 as fo,e6 as go,e7 as yo,e8 as jo,e9 as vo,ea as So,eb as xo,ec as wo,ed as Co,ee as No,ef as zo,eg as Mo,eh as Eo,ei as qo,ej as Bo,ek as Lo,el as Do,em as Po,en as Uo,eo as Vo,ep as Ao,eq as Io,er as Oo,es as Go,et as Ro,eu as Ho,ev as Zo,ew as Ko,ex as Xo,ey as Yo,ez as Jo,eA as Fo,eB as Wo,eC as Qo,eD as _o,eE as $o,eF as ai,eG as si,eH as ei,eI as ti,eJ as ni,eK as oi,eL as ii,eM as ri,eN as li,eO as ci,eP as pi,eQ as hi,eR as di,eS as mi,eT as Ti,eU as ui,eV as bi,eW as ki,eX as fi,eY as gi,eZ as yi,e_ as ji,e$ as vi,f0 as Si,f1 as xi,f2 as wi,f3 as Ci,f4 as Ni,f5 as zi,f6 as Mi,f7 as Ei,f8 as qi,f9 as Bi,fa as Li,fb as Di,fc as Pi,fd as Ui,fe as Vi,ff as Ai,fg as Ii,fh as Oi,fi as Gi,fj as Ri,fk as Hi,fl as Zi,fm as Ki,fn as Xi,fo as Yi,fp as Ji,fq as Fi,fr as Wi,fs as Qi,ft as _i,fu as $i,fv as ar,fw as sr,fx as er,fy as tr,fz as nr,fA as or,fB as ir,fC as rr,fD as lr,fE as cr,fF as pr,fG as hr,fH as dr,fI as mr,fJ as Tr,fK as ur,fL as br,fM as kr,fN as fr,fO as gr,fP as yr,fQ as jr,fR as vr,fS as Sr,fT as xr,fU as wr,fV as Cr,fW as Nr,fX as zr,fY as Mr,fZ as Er,f_ as qr,f$ as Br,g0 as Lr,g1 as Dr,g2 as Pr,g3 as Ur,g4 as Vr,g5 as Ar,g6 as Ir,g7 as Or,g8 as Gr,g9 as Rr,ga as Hr,gb as Zr,gc as Kr,gd as Xr,ge as Yr,gf as Jr,gg as Fr,gh as Wr,gi as Qr,gj as _r,gk as $r,gl as al,gm as sl,gn as el,go as tl,gp as nl,gq as ol,gr as il,gs as rl,gt as ll,gu as cl,gv as pl,gw as hl,gx as dl,gy as ml,gz as Tl,gA as ul,gB as bl,gC as kl,gD as fl,gE as gl,gF as yl,gG as jl,gH as vl,gI as Sl,gJ as xl,gK as wl,gL as Cl,gM as Nl,gN as zl,gO as Ml,gP as El,gQ as ql,gR as Bl,gS as Ll,gT as Dl,gU as Pl,gV as Ul,gW as Vl,gX as Al,gY as Il,gZ as Ol,g_ as Gl,g$ as Rl,h0 as Hl,h1 as Zl,h2 as Kl,h3 as Xl,h4 as Yl,h5 as Jl,h6 as Fl,h7 as Wl,h8 as Ql,h9 as _l,ha as $l,hb as ac,hc as sc,hd as ec,he as tc,hf as nc,hg as oc,hh as ic,hi as rc,hj as lc,hk as cc,hl as pc,hm as hc,hn as dc,ho as mc,hp as Tc,hq as uc,hr as bc,hs as kc,ht as fc,hu as gc,hv as yc,hw as jc,hx as vc,hy as Sc,hz as xc,hA as wc,hB as Cc,hC as Nc,hD as zc,hE as Mc,hF as Ec,hG as qc,hH as Bc,hI as Lc,hJ as Dc,hK as Pc,hL as Uc,hM as Vc,hN as Ac,hO as Ic,hP as Oc,hQ as Gc,hR as Rc,hS as Hc,hT as Zc,hU as Kc,hV as Xc,hW as Yc,hX as Jc,hY as Fc,hZ as Wc,h_ as Qc,h$ as _c,i0 as $c,i1 as ap,i2 as sp,i2 as ep,i3 as tp,i4 as np,i5 as op,i6 as ip,i7 as rp,i8 as lp,i9 as cp,ia as pp,ib as hp,ic as dp,id as mp,ie as Tp,ig as up,ih as bp,ii as kp,ij as fp,ik as gp,il as yp,im as jp,io as vp,ip as Sp,iq as xp,ir as wp,is as Cp,it as Np,iu as zp,iv as Mp,iw as Ep,ix as qp,iy as Bp,iz as Lp,iA as Dp,iB as Pp,iC as Up,iD as Vp,iE as Ap,iF as Ip,iD as Op,iG as Gp,iG as Rp,iH as Hp,iI as Zp,iJ as Kp,iK as Xp,iL as Yp,iM as Jp,iN as Fp,iO as Wp,iP as Qp,iQ as _p,iR as $p,iS as ah,iT as sh,iU as eh,iV as th,iW as nh,iX as oh,iY as ih,iZ as rh,i_ as lh,i$ as ch,j0 as ph,j1 as hh,j2 as dh,j3 as mh,j4 as Th,j5 as uh,j6 as bh,j7 as kh,j8 as fh,j9 as gh,ja as yh,jb as jh,jc as vh,jd as Sh,je as xh,jf as wh,jg as Ch,jh as Nh,ji as zh,jj as Mh,jk as Eh,jl as qh,jm as Bh,jn as Lh,jo as Dh,jp as Ph,jq as Uh,jr as Vh,jq as Ah,js as Ih,jt as Oh,ju as Gh,jv as Rh,jw as Hh,jx as Zh,jy as Kh,jz as Xh,jA as Yh,jB as Jh,jC as Fh,jD as Wh,jE as Qh,jF as _h,jG as $h,jH as ad,jI as sd,jJ as ed,jK as td,jL as nd,jM as od,jN as id,jO as rd,jP as ld,jQ as cd,jR as pd,jS as hd,jT as dd,jU as md,jV as Td,jW as ud,jX as bd,jY as kd,jZ as fd,j_ as gd,j$ as yd,k0 as jd,k1 as vd,k2 as Sd,k3 as xd,k4 as wd,j$ as Cd,k0 as Nd,k5 as zd,k6 as Md,k7 as Ed,k1 as qd,k2 as Bd,k8 as Ld,k9 as Dd,ka as Pd}from"./zoraTestnet-CvoUlJGq.js";import"./sha2-D3ryOfi3.js";import"./index-a-a2MqTK.js";import"./verifyHash-CoWeO2NB.js";import"./parseEventLogs-DTRl5YJ_.js";import"./sha256-D33fGSQc.js";import"./secp256k1-DjijwK4n.js";import"./hmac-BMnSt9Ou.js";import"./writeContract-jh5z7q6H.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const p=a({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}),h=a({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"}),d=a({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"}),m=a({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}}),T=a({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),u=a({id:"00000008819873e925422c1ff0f99f7c",caipNetworkId:"bip122:00000008819873e925422c1ff0f99f7c",chainNamespace:"bip122",name:"Bitcoin Signet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),b=a({id:"-239",name:"TON",network:"ton-mainnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://tonscan.org"}},testnet:!1,chainNamespace:"ton",caipNetworkId:"ton:-239"}),k=a({id:"-3",name:"TON Testnet",network:"ton-testnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://testnet.tonscan.org"}},testnet:!0,chainNamespace:"ton",caipNetworkId:"ton:-3"}),f=a({id:"0x2b6653dc",name:"TRON",network:"tron-mainnet",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org"}},testnet:!1,chainNamespace:"tron",caipNetworkId:"tron:0x2b6653dc"}),g=a({id:"0x94a9059e",name:"TRON Shasta",network:"tron-shasta",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0x94a9059e"}),y=a({id:"0xcd8690dc",name:"TRON Nile",network:"tron-nile",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0xcd8690dc"});export{S as AVAILABLE_NAMESPACES,w as abey,C as abstract,N as abstractTestnet,z as acala,M as acria,E as adf,q as adi,B as agungTestnet,L as aioz,D as alephZero,P as alephZeroTestnet,U as alienx,V as alienxHalTestnet,A as alpenTestnet,I as ancient8,O as ancient8Sepolia,G as anvil,R as apeChain,H as apexTestnet,Z as apollo,K as arbitrum,X as arbitrumGoerli,Y as arbitrumNova,J as arbitrumSepolia,F as arcTestnet,W as arenaz,Q as areonNetwork,_ as areonNetworkTestnet,$ as areum,aa as artelaTestnet,sa as arthera,ea as artheraTestnet,ta as assetChain,na as assetChainTestnet,oa as astar,ia as astarZkEVM,ra as astarZkyoto,la as atletaOlympia,ca as aurora,pa as auroraTestnet,ha as auroria,da as autheoTestnet,ma as avalanche,Ta as avalancheFuji,ua as b3,ba as b3Sepolia,ka as bahamut,fa as base,ga as baseGoerli,ya as basePreconf,ja as baseSepolia,va as baseSepoliaPreconf,Sa as basecampTestnet,xa as battlechainTestnet,wa as beam,Ca as beamTestnet,Na as bearNetworkChainMainnet,za as bearNetworkChainTestnet,Ma as berachain,Ea as berachainBepolia,qa as berachainTestnet,Ba as berachainTestnetbArtio,La as bevmMainnet,Da as bifrost,Pa as birdlayer,Ua as bitTorrent,Va as bitTorrentTestnet,m as bitcoin,u as bitcoinSignet,T as bitcoinTestnet,Aa as bitgert,Ia as bitkub,Oa as bitkubTestnet,Ga as bitlayer,Ra as bitlayerTestnet,Ha as bitrock,Za as blast,Ka as blastSepolia,Xa as bob,Ya as bobSepolia,Ja as boba,Fa as bobaSepolia,Wa as boolBetaMainnet,Qa as botanix,_a as botanixTestnet,$a as bounceBit,as as bounceBitTestnet,ss as bronos,es as bronosTestnet,ts as bsc,ns as bscGreenfield,os as bscTestnet,is as bsquared,rs as bsquaredTestnet,ls as btr,cs as btrTestnet,ps as bxn,hs as bxnTestnet,ds as cannon,ms as canto,Ts as celo,us as celoAlfajores,bs as celoSepolia,ks as chang,fs as chiliz,gs as chips,ys as citrea,js as citreaTestnet,vs as classic,Ss as codex,xs as codexTestnet,ws as coinbit,Cs as coinex,Ns as confluxESpace,zs as confluxESpaceTestnet,Ms as coreDao,Es as coreTestnet1,qs as coreTestnet2,Bs as corn,Ls as cornTestnet,Ds as cpchain,Ps as crab,Us as creatorTestnet,Vs as creditCoin3Devnet,As as creditCoin3Mainnet,Is as creditCoin3Testnet,Os as cronos,Gs as cronosTestnet,Rs as cronoszkEVM,Hs as cronoszkEVMTestnet,Zs as crossbell,Ks as crossfi,Xs as curtis,Ys as cyber,Js as cyberTestnet,Fs as dailyNetwork,Ws as dailyNetworkTestnet,Qs as darwinia,_s as datahavenTestnet,$s as dbkchain,ae as dchain,se as dchainTestnet,ee as defichainEvm,te as defichainEvmTestnet,a as defineChain,ne as degen,oe as dfk,ie as diode,re as disChain,le as dodochainTestnet,ce as dogechain,pe as domaTestnet,he as donatuz,de as dosChain,me as dosChainTestnet,Te as dreyerxMainnet,ue as dreyerxTestnet,be as dustboyIoT,ke as dymension,fe as eden,ge as edexa,ye as edexaTestnet,je as edgeless,ve as edgelessTestnet,Se as edgeware,xe as edgewareTestnet,we as eduChain,Ce as eduChainTestnet,Ne as elastos,ze as elastosTestnet,Me as electroneum,Ee as electroneumTestnet,qe as elysiumTestnet,Be as energy,Le as eni,De as eniTestnet,Pe as enuls,Ue as eon,Ve as eos,Ae as eosTestnet,Ie as eteria,Oe as etherlink,Ge as etherlinkShadownetTestnet,Re as etherlinkTestnet,He as ethernity,Ze as etp,Ke as evmos,Xe as evmosTestnet,Ye as excelonMainnet,Je as expanse,Fe as exsat,We as exsatTestnet,Qe as fantom,_e as fantomSonicTestnet,$e as fantomTestnet,at as fibo,st as filecoin,et as filecoinCalibration,tt as filecoinHyperspace,nt as fireChain,ot as flame,it as flare,rt as flareTestnet,lt as flowMainnet,ct as flowPreviewnet,pt as flowTestnet,ht as fluence,dt as fluenceStage,mt as fluenceTestnet,Tt as fluent,ut as fluentDevnet,bt as fluentTestnet,kt as form,ft as formTestnet,gt as forma,yt as formicarium,jt as forta,vt as foundry,St as fraxtal,xt as fraxtalTestnet,wt as funkiMainnet,Ct as funkiSepolia,Nt as fuse,zt as fuseSparknet,Mt as fusion,Et as fusionTestnet,qt as garnet,Bt as gatechain,Lt as geist,Dt as genesys,Pt as gensyn,Ut as giwaSepolia,Vt as giwaSepoliaPreconf,At as glideL1Protocol,It as glideL2Protocol,Ot as gnosis,Gt as gnosisChiado,Rt as goChain,Ht as goat,Zt as gobi,Kt as godwoken,Xt as goerli,Yt as graphite,Jt as graphiteTestnet,Ft as gravity,Wt as gunz,Qt as guruNetwork,_t as guruTestnet,$t as ham,an as happychainTestnet,sn as haqqMainnet,en as haqqTestedge2,tn as hardhat,nn as harmonyOne,on as hashkey,rn as hashkeyTestnet,ln as haustTestnet,cn as hedera,pn as hederaPreviewnet,hn as hederaTestnet,dn as hela,mn as heliosTestnet,Tn as hemi,un as hemiSepolia,bn as henesys,kn as holesky,fn as hoodi,gn as horizenTestnet,yn as hpb,jn as hpp,vn as hppSepolia,Sn as huddle01Mainnet,xn as huddle01Testnet,wn as humanity,Cn as humanityTestnet,Nn as humanode,zn as humanodeTestnet5,Mn as hychain,En as hychainTestnet,qn as hyperEvm,Bn as hyperliquid,Ln as hyperliquidEvmTestnet,Dn as iSunCoin,Pn as icbNetwork,Un as idchain,Vn as igra,An as immutableZkEvm,In as immutableZkEvmTestnet,On as inEVM,Gn as initVerse,Rn as initVerseGenesis,Hn as injective,Zn as injectiveTestnet,Kn as ink,Xn as inkSepolia,Yn as iota,Jn as iotaTestnet,Fn as iotex,Wn as iotexTestnet,Qn as jasmyChain,_n as jasmyChainTestnet,$n as jbc,ao as jbcTestnet,so as jocMainnet,eo as jocTestnet,to as jovay,no as jovaySepolia,oo as juneo,io as juneoBCH1Chain,ro as juneoDAI1Chain,lo as juneoDOGE1Chain,co as juneoEUR1Chain,po as juneoGLD1Chain,ho as juneoLINK1Chain,mo as juneoLTC1Chain,To as juneoSGD1Chain,uo as juneoSocotraTestnet,bo as juneoUSD1Chain,ko as juneoUSDT1Chain,fo as juneomBTC1Chain,go as kaia,yo as kairos,jo as kakarotSepolia,vo as kakarotStarknetSepolia,So as kardiaChain,xo as karura,wo as katana,Co as kava,No as kavaTestnet,zo as kcc,Mo as kii,Eo as kiiTestnetOro,qo as kinto,Bo as klaytn,Lo as klaytnBaobab,Do as koi,Po as kroma,Uo as kromaSepolia,Vo as krown,Ao as l3x,Io as l3xTestnet,Oo as lavita,Go as lens,Ro as lensTestnet,Ho as lestnet,Zo as lightlinkPegasus,Ko as lightlinkPhoenix,Xo as linea,Yo as lineaGoerli,Jo as lineaSepolia,Fo as lineaTestnet,Wo as lisk,Qo as liskSepolia,_o as loadAlphanet,$o as localhost,ai as loop,si as lukso,ei as luksoTestnet,ti as lumiaMainnet,ni as lumiaTestnet,oi as lumoz,ii as lumozTestnet,ri as luxeports,li as lycan,ci as lyra,pi as mainnet,hi as mandala,di as manta,mi as mantaSepoliaTestnet,Ti as mantaTestnet,ui as mantle,bi as mantleSepoliaTestnet,ki as mantleTestnet,fi as mantraDuKongEVMTestnet,gi as mantraEVM,yi as mapProtocol,ji as matchain,vi as matchainTestnet,Si as mchVerse,xi as megaeth,wi as megaethTestnet,Ci as mekong,Ni as meld,zi as memecore,Mi as merlin,Ei as merlinErigonTestnet,qi as metachain,Bi as metachainIstanbul,Li as metadium,Di as metalL2,Pi as meter,Ui as meterTestnet,Vi as metis,Ai as metisGoerli,Ii as metisSepolia,Oi as mev,Gi as mevTestnet,Ri as mezo,Hi as mezoTestnet,Zi as mint,Ki as mintSepoliaTestnet,Xi as mitosisTestnet,Yi as mode,Ji as modeTestnet,Fi as monad,Wi as monadTestnet,Qi as moonbaseAlpha,_i as moonbeam,$i as moonbeamDev,ar as moonriver,sr as morph,er as morphHolesky,tr as morphSepolia,nr as nahmii,or as nautilus,ir as near,rr as nearTestnet,lr as neonDevnet,cr as neonMainnet,pr as neoxMainnet,hr as neoxT4,dr as newton,mr as nexi,Tr as nexilix,ur as nibiru,br as nitrographTestnet,kr as nomina,fr as oasisTestnet,gr as oasys,yr as odysseyTestnet,jr as okc,vr as omax,Sr as omni,xr as omniOmega,wr as oneWorld,Cr as oortMainnetDev,Nr as opBNB,zr as opBNBTestnet,Mr as openledger,Er as optimism,qr as optimismGoerli,Br as optimismSepolia,Lr as optopia,Dr as optopiaTestnet,Pr as orderly,Ur as orderlySepolia,Vr as otimDevnet,Ar as palm,Ir as palmTestnet,Or as paseoPassetHub,Gr as peaq,Rr as pgn,Hr as pgnTestnet,Zr as phoenix,Kr as planq,Xr as plasma,Yr as plasmaDevnet,Jr as plasmaTestnet,Fr as playfiAlbireo,Wr as plinga,Qr as plume,_r as plumeDevnet,$r as plumeMainnet,al as plumeSepolia,sl as plumeTestnet,el as polterTestnet,tl as polygon,nl as polygonAmoy,ol as polygonMumbai,il as polygonZkEvm,rl as polygonZkEvmCardona,ll as polygonZkEvmTestnet,cl as polynomial,pl as polynomialSepolia,hl as potos,dl as potosTestnet,ml as premiumBlockTestnet,Tl as pulsechain,ul as pulsechainV4,bl as pumpfiTestnet,kl as pyrope,fl as qMainnet,gl as qTestnet,yl as ql1,jl as quai,vl as quaiTestnet,Sl as radius,xl as radiusTestnet,wl as reactiveTestnet,Cl as real,Nl as redbellyMainnet,zl as redbellyTestnet,Ml as reddio,El as reddioSepolia,ql as redstone,Bl as rei,Ll as reyaNetwork,Dl as rise,Pl as riseTestnet,Ul as rivalz,Vl as rollux,Al as rolluxTestnet,Il as ronin,Ol as root,Gl as rootPorcini,Rl as rootstock,Hl as rootstockTestnet,Zl as rss3,Kl as rss3Sepolia,Xl as saakuru,Yl as saga,Jl as saigon,Fl as sanko,Wl as sapphire,Ql as sapphireTestnet,_l as satoshiVM,$l as satoshiVMTestnet,ac as scroll,sc as scrollSepolia,ec as sei,tc as seiTestnet,nc as seismicDevnet,oc as sepolia,ic as shape,rc as shapeSepolia,lc as shardeum,cc as shardeumSphinx,pc as shibarium,hc as shibariumTestnet,dc as shiden,mc as shimmer,Tc as shimmerTestnet,uc as sidraChain,bc as silentData,kc as silicon,fc as siliconSepolia,gc as sixProtocol,yc as skaleBase,jc as skaleBaseSepoliaTestnet,vc as skaleBlockBrawlers,Sc as skaleCalypso,xc as skaleCalypsoTestnet,wc as skaleCryptoBlades,Cc as skaleCryptoColosseum,Nc as skaleEuropa,zc as skaleEuropaTestnet,Mc as skaleExorde,Ec as skaleHumanProtocol,qc as skaleNebula,Bc as skaleNebulaTestnet,Lc as skaleRazor,Dc as skaleTitan,Pc as skaleTitanTestnet,Uc as sketchpad,Vc as snax,Ac as snaxTestnet,p as solana,h as solanaDevnet,d as solanaTestnet,Ic as somnia,Oc as somniaTestnet,Gc as soneium,Rc as soneiumMinato,Hc as songbird,Zc as songbirdTestnet,Kc as sonic,Xc as sonicBlazeTestnet,Yc as sonicTestnet,Jc as sophon,Fc as sophonTestnet,Wc as sova,Qc as sovaSepolia,_c as spicy,$c as stable,ap as stableTestnet,sp as statusNetworkSepolia,ep as statusSepolia,tp as step,np as story,op as storyAeneid,ip as storyOdyssey,rp as storyTestnet,lp as stratis,cp as subtensorEvm,pp as superlumio,hp as superposition,dp as superseed,mp as superseedSepolia,Tp as surgeTestnet,up as swan,bp as swanProximaTestnet,kp as swanSaturnTestnet,fp as swellchain,gp as swellchainTestnet,yp as swissdlt,jp as syscoin,vp as syscoinTestnet,Sp as tac,xp as tacSPB,wp as taiko,Cp as taikoHekla,Np as taikoHoodi,zp as taikoJolnir,Mp as taikoKatla,Ep as taikoTestnetSepolia,qp as taraxa,Bp as taraxaTestnet,Lp as teaSepolia,Dp as telcoinTestnet,Pp as telos,Up as telosTestnet,Vp as tempo,Ap as tempoDevnet,Ip as tempoLocalnet,Op as tempoMainnet,Gp as tempoModerato,Rp as tempoTestnet,Hp as tenet,Zp as ternoa,Kp as thaiChain,Xp as that,Yp as theta,Jp as thetaTestnet,Fp as thunderCore,Wp as thunderTestnet,Qp as tiktrixTestnet,_p as tomb,b as ton,k as tonTestnet,$p as treasure,ah as treasureTopaz,sh as tron,f as tronMainnet,eh as tronNile,y as tronNileTestnet,th as tronShasta,g as tronShastaTestnet,nh as ubiq,oh as ultra,ih as ultraTestnet,rh as ultron,lh as ultronTestnet,ch as unichain,ph as unichainSepolia,hh as unique,dh as uniqueOpal,mh as uniqueQuartz,Th as unreal,uh as vana,bh as vanaMoksha,kh as vanar,fh as vechain,gh as velas,yh as viction,jh as victionTestnet,vh as vision,Sh as visionTestnet,xh as wanchain,wh as wanchainTestnet,Ch as weaveVMAlphanet,Nh as wemix,zh as wemixTestnet,Mh as westendAssetHub,Eh as whitechain,qh as whitechainTestnet,Bh as wmcTestnet,Lh as worldLand,Dh as worldchain,Ph as worldchainSepolia,Uh as x1Testnet,Vh as xLayer,Ah as xLayerTestnet,Ih as xai,Oh as xaiTestnet,Gh as xdc,Rh as xdcTestnet,Hh as xgr,Zh as xoneMainnet,Kh as xoneTestnet,Xh as xphereMainnet,Yh as xphereTestnet,Jh as xpla,Fh as xrOne,Wh as xrSepolia,Qh as xrplevm,_h as xrplevmDevnet,$h as xrplevmTestnet,ad as yooldoVerse,sd as yooldoVerseTestnet,ed as zenchainTestnet,td as zeniq,nd as zeroG,od as zeroGGalileoTestnet,id as zeroGMainnet,rd as zeroGTestnet,ld as zeroNetwork,cd as zetachain,pd as zetachainAthensTestnet,hd as zhejiang,dd as zilliqa,md as zilliqaTestnet,Td as zircuit,ud as zircuitGarfieldTestnet,bd as zkFair,kd as zkFairTestnet,fd as zkLinkNova,gd as zkLinkNovaSepoliaTestnet,yd as zkSync,jd as zkSyncInMemoryNode,vd as zkSyncLocalNode,Sd as zkSyncSepoliaTestnet,xd as zkXPLA,wd as zkXPLATestnet,Cd as zksync,Nd as zksyncInMemoryNode,zd as zksyncLocalCustomHyperchain,Md as zksyncLocalHyperchain,Ed as zksyncLocalHyperchainL1,qd as zksyncLocalNode,Bd as zksyncSepoliaTestnet,Ld as zora,Dd as zoraSepolia,Pd as zoraTestnet};
@@ -1,4 +1,4 @@
1
- import{i as b,b as u}from"./lit-element-Cn7T8F1W.js";import{r as l,n as p}from"./class-map-mFRv1nW8.js";import{o as m}from"./if-defined-DsPifBxM.js";import{d as O,O as c}from"./index-DbAu4Peg.js";import{c as g}from"./index-wds8TuUm.js";import"./index-CjiwjbqL.js";import{O as T}from"./index-DFE6t65x.js";import{L as C,O as j,M as $,C as I,q as E,R as L,b as B,E as z,l as N,W as V,k as q,T as M,S as W}from"./W3MFrameProviderSingleton-9eitOT0j.js";import"./index-i4VBSYqA.js";import"./index-B9U0GcYk.js";import"./index-DPxCDCvr.js";import"./index-DvJmANzU.js";import"./index-DP1DuCnR.js";import"./index-C5ciuua_.js";import"./index-aoxVkzFE.js";import"./index-JfVynEph.js";import"./index-Cu4ZjLNb.js";import"./index-B-vyBZw9.js";import"./index-DS2Lm9tG.js";import"./index-nibyPLVP.js";import"./index-r_1z0VI_.js";import"./sha2-D3ryOfi3.js";import"./hmac-BMnSt9Ou.js";import"./NetworkUtil-DqGcuBfF.js";import"./index.es-CkxUaFYS.js";import"./browser-ponyfill-BmgQyNz0.js";import"./ref-CYZXcxoe.js";import"./async-directive-DJs0ey8-.js";const K=O`
1
+ import{i as b,b as u}from"./lit-element-Cn7T8F1W.js";import{r as l,n as p}from"./class-map-mFRv1nW8.js";import{o as m}from"./if-defined-DsPifBxM.js";import{d as O,O as c}from"./index-mUrlue57.js";import{c as g}from"./index-CYGUludi.js";import"./index-DErCc5s3.js";import{O as T}from"./index-CdCaVlZ8.js";import{L as C,O as j,M as $,C as I,q as E,R as L,b as B,E as z,l as N,W as V,k as q,T as M,S as W}from"./W3MFrameProviderSingleton-eYQGtm7P.js";import"./index-CzGhZ9cz.js";import"./index-3gZjXx6v.js";import"./index-B7_b_SxX.js";import"./index-DIZhmTRA.js";import"./index-CNR7tadx.js";import"./index-DcSeumRb.js";import"./index-BVL3WVs3.js";import"./index-BUjSLaXy.js";import"./index-a-a2MqTK.js";import"./index-CPCCdjXg.js";import"./index-CcHsPndE.js";import"./index-nibyPLVP.js";import"./index-CpGStcFm.js";import"./sha2-D3ryOfi3.js";import"./hmac-BMnSt9Ou.js";import"./NetworkUtil-XsBaDkTf.js";import"./index.es-CjcoN6we.js";import"./browser-ponyfill-CqiVi-O8.js";import"./ref-CYZXcxoe.js";import"./async-directive-DJs0ey8-.js";const K=O`
2
2
  :host > wui-grid {
3
3
  max-height: 360px;
4
4
  overflow: auto;
@@ -1 +1 @@
1
- import{j as p,o as y,b as c,r as w}from"./signing-gNn6SJWz.js";import"./utils-h8VUSGPW.js";import"./index-Cu4ZjLNb.js";async function u({account:e,serializableTransaction:a,transaction:n,gasless:s}){const t=c({address:s.relayerForwarderAddress,chain:n.chain,client:n.client}),r=await w({contract:t,method:"function getNonce(address) view returns (uint256)",params:[e.address]}),[o,m]=await(async()=>{if(!a.to)throw new Error("OpenZeppelin transactions must have a 'to' address");if(!a.gas)throw new Error("OpenZeppelin transactions must have a 'gas' value");if(!a.data)throw new Error("OpenZeppelin transactions must have a 'data' value");if(s.experimentalChainlessSupport){const i={chainid:BigInt(n.chain.id),data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{name:"GSNv2 Forwarder",verifyingContract:t.address,version:"0.0.1"},message:i,primaryType:"ForwardRequest",types:{ForwardRequest:h}}),i]}const d={data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{chainId:n.chain.id,name:s.domainName??"GSNv2 Forwarder",verifyingContract:t.address,version:s.domainVersion??"0.0.1"},message:d,primaryType:"ForwardRequest",types:{ForwardRequest:g}}),d]})();return{message:m,messageType:"forward",signature:o}}const g=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"}],h=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"},{name:"chainid",type:"uint256"}];async function C(e){const{message:a,messageType:n,signature:s}=await u(e),t=await fetch(e.gasless.relayerUrl,{body:p({forwarderAddress:e.gasless.relayerForwarderAddress,request:a,signature:s,type:n}),method:"POST"});if(!t.ok)throw new Error(`Failed to send transaction: ${await t.text()}`);const r=await t.json();if(!r.result)throw new Error(`Relay transaction failed: ${r.message}`);const o=JSON.parse(r.result).txHash;if(y(o))return{chain:e.transaction.chain,client:e.transaction.client,transactionHash:o};throw new Error(`Failed to send transaction: ${p(r)}`)}export{u as prepareOpenZeppelinTransaction,C as relayOpenZeppelinTransaction};
1
+ import{j as p,o as y,b as c,r as w}from"./signing-lyeTiv6v.js";import"./utils-Cj9H0gW-.js";import"./index-a-a2MqTK.js";async function u({account:e,serializableTransaction:a,transaction:n,gasless:s}){const t=c({address:s.relayerForwarderAddress,chain:n.chain,client:n.client}),r=await w({contract:t,method:"function getNonce(address) view returns (uint256)",params:[e.address]}),[o,m]=await(async()=>{if(!a.to)throw new Error("OpenZeppelin transactions must have a 'to' address");if(!a.gas)throw new Error("OpenZeppelin transactions must have a 'gas' value");if(!a.data)throw new Error("OpenZeppelin transactions must have a 'data' value");if(s.experimentalChainlessSupport){const i={chainid:BigInt(n.chain.id),data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{name:"GSNv2 Forwarder",verifyingContract:t.address,version:"0.0.1"},message:i,primaryType:"ForwardRequest",types:{ForwardRequest:h}}),i]}const d={data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{chainId:n.chain.id,name:s.domainName??"GSNv2 Forwarder",verifyingContract:t.address,version:s.domainVersion??"0.0.1"},message:d,primaryType:"ForwardRequest",types:{ForwardRequest:g}}),d]})();return{message:m,messageType:"forward",signature:o}}const g=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"}],h=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"},{name:"chainid",type:"uint256"}];async function C(e){const{message:a,messageType:n,signature:s}=await u(e),t=await fetch(e.gasless.relayerUrl,{body:p({forwarderAddress:e.gasless.relayerForwarderAddress,request:a,signature:s,type:n}),method:"POST"});if(!t.ok)throw new Error(`Failed to send transaction: ${await t.text()}`);const r=await t.json();if(!r.result)throw new Error(`Relay transaction failed: ${r.message}`);const o=JSON.parse(r.result).txHash;if(y(o))return{chain:e.transaction.chain,client:e.transaction.client,transactionHash:o};throw new Error(`Failed to send transaction: ${p(r)}`)}export{u as prepareOpenZeppelinTransaction,C as relayOpenZeppelinTransaction};
@@ -1 +1 @@
1
- import{d as o,e as c,r as d}from"./signing-gNn6SJWz.js";import{d as a}from"./detectExtension-yvI5WWZb.js";import"./utils-h8VUSGPW.js";import"./index-Cu4ZjLNb.js";const t="0x6352211e",r=[{name:"tokenId",type:"uint256"}],n=[{type:"address"}];function O(e){return a({availableSelectors:e,method:[t,r,n]})}function s(e){return c(r,[e.tokenId])}function p(e){return t+s(e).slice(2)}function w(e){return o(n,e)[0]}async function P(e){return d({contract:e.contract,method:[t,r,n],params:[e.tokenId]})}export{t as FN_SELECTOR,w as decodeOwnerOfResult,p as encodeOwnerOf,s as encodeOwnerOfParams,O as isOwnerOfSupported,P as ownerOf};
1
+ import{d as o,e as c,r as d}from"./signing-lyeTiv6v.js";import{d as a}from"./detectExtension-BfmE7TOs.js";import"./utils-Cj9H0gW-.js";import"./index-a-a2MqTK.js";const t="0x6352211e",r=[{name:"tokenId",type:"uint256"}],n=[{type:"address"}];function O(e){return a({availableSelectors:e,method:[t,r,n]})}function s(e){return c(r,[e.tokenId])}function p(e){return t+s(e).slice(2)}function w(e){return o(n,e)[0]}async function P(e){return d({contract:e.contract,method:[t,r,n],params:[e.tokenId]})}export{t as FN_SELECTOR,w as decodeOwnerOfResult,p as encodeOwnerOf,s as encodeOwnerOfParams,O as isOwnerOfSupported,P as ownerOf};