@dcl/governance-site 2.5.1 → 2.5.2-35861583677.commit-9185f43

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 (159) hide show
  1. package/assets/{ConstantsUtil-c3a75781.js → ConstantsUtil-0186a343.js} +1 -1
  2. package/assets/{ExchangeController-de6066de.js → ExchangeController-58cfc61e.js} +1 -1
  3. package/assets/{HelpersUtil-47bce835.js → HelpersUtil-026d751f.js} +1 -1
  4. package/assets/{NetworkUtil-cfdab321.js → NetworkUtil-9d775636.js} +1 -1
  5. package/assets/{ReownAuthentication-c1098727.js → ReownAuthentication-e9d543a6.js} +1 -1
  6. package/assets/{SwapController-6f3f28da.js → SwapController-1e7ac90d.js} +1 -1
  7. package/assets/{UserAvatar-4217a7be.js → UserAvatar-9b8de83c.js} +1 -1
  8. package/assets/{W3MFrameProviderSingleton-316899f0.js → W3MFrameProviderSingleton-967a5251.js} +2 -2
  9. package/assets/{basic-d9c0f288.js → basic-8129beff.js} +1 -1
  10. package/assets/{biconomy-bc04f7cc.js → biconomy-341f7abf.js} +1 -1
  11. package/assets/{ccip-d88eddf3.js → ccip-522e35c5.js} +1 -1
  12. package/assets/{ccip-e509a2bd.js → ccip-9be4c874.js} +1 -1
  13. package/assets/{chains-12910e1f.js → chains-3d11688e.js} +1 -1
  14. package/assets/{common-583dfda9.js → common-ac3a84bf.js} +1 -1
  15. package/assets/{compat-000e5801.js → compat-80bca490.js} +1 -1
  16. package/assets/{controller-5a843a75.js → controller-06b1d4a6.js} +1 -1
  17. package/assets/{core-1a166f08.js → core-701e3000.js} +3 -3
  18. package/assets/{custom-3c5e7814.js → custom-05656959.js} +1 -1
  19. package/assets/{data-capture-a27f6e5c.js → data-capture-4c4bff8c.js} +1 -1
  20. package/assets/{decimals-bddbc743.js → decimals-7a8f2808.js} +1 -1
  21. package/assets/decimals-ae1efeb6.js +1 -0
  22. package/assets/{email-0c5024d9.js → email-83340241.js} +1 -1
  23. package/assets/{embedded-wallet-d5992bd8.js → embedded-wallet-5f601961.js} +1 -1
  24. package/assets/{engine-9b39863f.js → engine-a3c58826.js} +1 -1
  25. package/assets/{estimate-l1-fee-69110584.js → estimate-l1-fee-e22e70df.js} +1 -1
  26. package/assets/eth_estimateGas-4bda2940.js +1 -0
  27. package/assets/{eth_getStorageAt-125a2bc1.js → eth_getStorageAt-fece51db.js} +1 -1
  28. package/assets/{eth_getTransactionCount-6240f912.js → eth_getTransactionCount-b3bc696d.js} +1 -1
  29. package/assets/{ethereum-0d579241.js → ethereum-dfcdc726.js} +1 -1
  30. package/assets/{execute-264a98ed.js → execute-ddc9aba5.js} +1 -1
  31. package/assets/{extractIPFS-d48a2b7b.js → extractIPFS-f2fa1c0d.js} +1 -1
  32. package/assets/features-e6abfb3d.js +1 -0
  33. package/assets/{fetchTokenMetadata-f32fb87e.js → fetchTokenMetadata-9aa0579f.js} +1 -1
  34. package/assets/{fortmatic-5f1bb82e.js → fortmatic-b2c3dfe2.js} +1 -1
  35. package/assets/{get-bytecode-7a8c6215.js → get-bytecode-3e525016.js} +1 -1
  36. package/assets/{get-ecosystem-wallet-info-0a9d1fa7.js → get-ecosystem-wallet-info-af73bf8f.js} +1 -1
  37. package/assets/{getBalance-e2e6d859.js → getBalance-5553b762.js} +1 -1
  38. package/assets/{getInstalledModules-4e23fa8a.js → getInstalledModules-8c794f3f.js} +1 -1
  39. package/assets/{getNFT-5486b2f7.js → getNFT-e012001d.js} +1 -1
  40. package/assets/{getNFT-74f5ae81.js → getNFT-e357df62.js} +1 -1
  41. package/assets/{hashBytecode-7a0e56f5.js → hashBytecode-f2cbe7cf.js} +1 -1
  42. package/assets/{hashTypedData-cc1589a7.js → hashTypedData-6c569030.js} +1 -1
  43. package/assets/{hashTypedData-03b693eb.js → hashTypedData-80d0736a.js} +1 -1
  44. package/assets/{in-app-1d212717.js → in-app-98ae0a96.js} +1 -1
  45. package/assets/{in-app-wallet-calls-7fdb5823.js → in-app-wallet-calls-6bbf9789.js} +1 -1
  46. package/assets/{index-fe892b11.js → index-0388e212.js} +1 -1
  47. package/assets/{index-877ffe4a.js → index-08f74686.js} +1 -1
  48. package/assets/{index-8aeaab91.js → index-164d622a.js} +1 -1
  49. package/assets/{index-06d7a58c.js → index-1735c2dc.js} +1 -1
  50. package/assets/{index-59db4a58.css → index-19c63dfb.css} +4 -4
  51. package/assets/{index-10c73e9d.js → index-1a84fe52.js} +215 -215
  52. package/assets/{index-d44b19e2.js → index-1ebd6ac9.js} +1 -1
  53. package/assets/{index-20b33848.js → index-1f941621.js} +1 -1
  54. package/assets/{index-93724bad.js → index-2151fb57.js} +2 -2
  55. package/assets/{index-e583ff4e.js → index-2158aa04.js} +1 -1
  56. package/assets/{index-a6a44c61.js → index-258eaeba.js} +1 -1
  57. package/assets/{index-5d7b6c51.js → index-25b31062.js} +1 -1
  58. package/assets/{index-a151f6d7.js → index-27604e48.js} +1 -1
  59. package/assets/{index-31022e63.js → index-2dea5e5e.js} +1 -1
  60. package/assets/{index-3d19d06c.js → index-2fd9095a.js} +1 -1
  61. package/assets/{index-30a8f53e.js → index-319df612.js} +1 -1
  62. package/assets/{index-b3691f6b.js → index-38eb3ccf.js} +1 -1
  63. package/assets/{index-a22875e4.js → index-3b0c0492.js} +2 -2
  64. package/assets/{index-8fa35f13.js → index-45e821a2.js} +1 -1
  65. package/assets/{index-2f82abe0.js → index-46384ac4.js} +1 -1
  66. package/assets/{index-3bc5c9df.js → index-49378015.js} +1 -1
  67. package/assets/{index-206ffe7d.js → index-56215787.js} +1 -1
  68. package/assets/{index-9bee2cc7.js → index-59fc9a5d.js} +1 -1
  69. package/assets/{index-b3889ac8.js → index-5ad2a852.js} +1 -1
  70. package/assets/{index-e332040b.js → index-63c89e55.js} +1 -1
  71. package/assets/{index-69a0492a.js → index-6780e2be.js} +1 -1
  72. package/assets/{index-6ec6d7c7.js → index-745ac19e.js} +1 -1
  73. package/assets/{index-9d37fa54.js → index-758bf1f0.js} +1 -1
  74. package/assets/{index-3b678484.js → index-7a6898a2.js} +1 -1
  75. package/assets/{index-7ad05b06.js → index-82528685.js} +1 -1
  76. package/assets/{index-2cab452e.js → index-83245c25.js} +1 -1
  77. package/assets/{index-401eba13.js → index-85bdd658.js} +1 -1
  78. package/assets/{index-8d81098b.js → index-88a218ce.js} +1 -1
  79. package/assets/{index-cafc0996.js → index-8b08acb1.js} +1 -1
  80. package/assets/{index-f49c89c1.js → index-8bdaeaf2.js} +1 -1
  81. package/assets/{index-780a2232.js → index-9294dcd7.js} +1 -1
  82. package/assets/{index-d2f37bee.js → index-979a21b1.js} +1 -1
  83. package/assets/{index-bcedc0e6.js → index-9a10118e.js} +1 -1
  84. package/assets/{index-610c7efb.js → index-9b3e03a6.js} +1 -1
  85. package/assets/{index-19891b89.js → index-9d6a41bc.js} +1 -1
  86. package/assets/{index-ad63abcf.js → index-9dbf9a6d.js} +1 -1
  87. package/assets/{index-d77a63d3.js → index-a46e95e9.js} +1 -1
  88. package/assets/{index-8cbb4ff7.js → index-b881deee.js} +2 -2
  89. package/assets/{index-bb13bbcd.js → index-b93c6430.js} +1 -1
  90. package/assets/{index-5071722a.js → index-c4b46d38.js} +1 -1
  91. package/assets/{index-e9ab8876.js → index-c9395bda.js} +1 -1
  92. package/assets/{index-6d8da0b7.js → index-d410c519.js} +1 -1
  93. package/assets/{index-a69ba1cc.js → index-dbe55de2.js} +1 -1
  94. package/assets/{index-5ece9033.js → index-dd7935fc.js} +1 -1
  95. package/assets/{index-23dd6251.js → index-e4a08cd9.js} +2 -2
  96. package/assets/{index-aae2726c.js → index-e706d2dd.js} +1 -1
  97. package/assets/{index-d22cfc35.js → index-e7a5e177.js} +1 -1
  98. package/assets/{index-7f01a27a.js → index-edac5298.js} +1 -1
  99. package/assets/{index-c49dee70.js → index-fabddcdf.js} +1 -1
  100. package/assets/{index-32a45902.js → index-ff52fd4e.js} +1 -1
  101. package/assets/{index.es-30a0ec70.js → index.es-a3dba62d.js} +3 -3
  102. package/assets/{index.es-4520fb10.js → index.es-d75c71a0.js} +1 -1
  103. package/assets/{index.es-0f7943d8.js → index.es-f33fd942.js} +1 -1
  104. package/assets/{index.web-e2526e19.js → index.web-480572c8.js} +1 -1
  105. package/assets/{localBatchGatewayRequest-ff5d42f6.js → localBatchGatewayRequest-efd5ac4a.js} +1 -1
  106. package/assets/{native-3e8a86bb.js → native-a05bab03.js} +1 -1
  107. package/assets/{networks-fc1b1902.js → networks-2b2a76a9.js} +1 -1
  108. package/assets/{onramp-cf41485f.js → onramp-19c3d49b.js} +1 -1
  109. package/assets/{openzeppelin-e72c7daa.js → openzeppelin-b027e042.js} +1 -1
  110. package/assets/{ownerOf-c09a8f45.js → ownerOf-aaa7f15d.js} +1 -1
  111. package/assets/parseNft-50788d83.js +1 -0
  112. package/assets/{parseSignature-b975d9a6.js → parseSignature-2a8160cd.js} +1 -1
  113. package/assets/{parseSignature-6b0b4698.js → parseSignature-993a1f6b.js} +2 -2
  114. package/assets/{passkeys-bb25d43e.js → passkeys-5985ac24.js} +1 -1
  115. package/assets/{pay-with-exchange-cd96ece6.js → pay-with-exchange-be950970.js} +1 -1
  116. package/assets/{prepare-contract-call-4be4cc68.js → prepare-contract-call-8aa69ada.js} +1 -1
  117. package/assets/{qr-overlay-fd67e1ca.js → qr-overlay-af51f28c.js} +1 -1
  118. package/assets/{receive-9ddd4e2d.js → receive-0381a78f.js} +1 -1
  119. package/assets/{redirect-state-301cb22c.js → redirect-state-defbbf42.js} +1 -1
  120. package/assets/{resolveImplementation-6b55308f.js → resolveImplementation-62075124.js} +1 -1
  121. package/assets/{rpc-83ca4b71.js → rpc-238b416b.js} +1 -1
  122. package/assets/{secp256k1-4ab38443.js → secp256k1-1b67b0f3.js} +1 -1
  123. package/assets/{secp256k1-44255658.js → secp256k1-52a3953d.js} +1 -1
  124. package/assets/{secp256k1-ac683ebc.js → secp256k1-cda45740.js} +1 -1
  125. package/assets/{send-7e34f1e6.js → send-1d9bf8b0.js} +1 -1
  126. package/assets/{send-batch-transaction-429c82ee.js → send-batch-transaction-37dfd3aa.js} +1 -1
  127. package/assets/{send-eip712-transaction-20a9b9ed.js → send-eip712-transaction-549d9c5e.js} +1 -1
  128. package/assets/send-gasless-transaction-2889f57e.js +1 -0
  129. package/assets/{send-transaction-c3053b90.js → send-transaction-be048c3f.js} +1 -1
  130. package/assets/{session-proposal-d1473b74.js → session-proposal-bf723dfb.js} +1 -1
  131. package/assets/{session-request-f0a8f695.js → session-request-adcff7df.js} +1 -1
  132. package/assets/{sha256-937f482f.js → sha256-20325278.js} +1 -1
  133. package/assets/{signing-6d6682ec.js → signing-3a53acbe.js} +2 -2
  134. package/assets/{socials-d1713bee.js → socials-f7529d78.js} +1 -1
  135. package/assets/{swaps-8bad12fe.js → swaps-17bc96cf.js} +1 -1
  136. package/assets/{thirdweb-73096eef.js → thirdweb-88164bcf.js} +2 -2
  137. package/assets/{to-serializable-transaction-9e540f8c.js → to-serializable-transaction-b9665f26.js} +2 -2
  138. package/assets/{totalSupply-7e83596b.js → totalSupply-1da49819.js} +1 -1
  139. package/assets/{transaction-ea614a5a.js → transaction-c89d76c9.js} +1 -1
  140. package/assets/{transactionReceipt-1e425ab1.js → transactionReceipt-e9fe9529.js} +1 -1
  141. package/assets/{transactions-a47e2cb5.js → transactions-6a2c06c6.js} +1 -1
  142. package/assets/{tslib.es6-24024d67.js → tslib.es6-627b8828.js} +1 -1
  143. package/assets/{utils-dddc86ba.js → utils-b0786619.js} +1 -1
  144. package/assets/{verifyHash-b21b75c2.js → verifyHash-1c30e3f1.js} +1 -1
  145. package/assets/{w3m-modal-e914d462.js → w3m-modal-35482de7.js} +1 -1
  146. package/assets/{w3m-modal-ff2f112d.js → w3m-modal-c7ed658d.js} +1 -1
  147. package/assets/{wait-for-tx-receipt-50389b4e.js → wait-for-tx-receipt-997fc5db.js} +1 -1
  148. package/assets/{wallets-4e23dd0f.js → wallets-608f085e.js} +4 -4
  149. package/assets/{web-connector-351693f5.js → web-connector-44f067c5.js} +2 -2
  150. package/assets/{writeContract-03e44e49.js → writeContract-8e997358.js} +2 -2
  151. package/assets/{zora-sepolia-72e60034.js → zora-sepolia-da0294c7.js} +1 -1
  152. package/assets/{zoraTestnet-1485f0af.js → zoraTestnet-83f44c9a.js} +1 -1
  153. package/index.html +4 -4
  154. package/package.json +3 -3
  155. package/assets/decimals-50f9fee1.js +0 -1
  156. package/assets/eth_estimateGas-945ce595.js +0 -1
  157. package/assets/features-7c8dc530.js +0 -1
  158. package/assets/parseNft-147a451f.js +0 -1
  159. package/assets/send-gasless-transaction-0435da18.js +0 -1
@@ -1 +1 @@
1
- import{e as f,o}from"./index-10c73e9d.js";import{i as a,s as h,a as y,f as b,p as m}from"./index-b3889ac8.js";import"./index-2cab452e.js";var u=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,l=(s,e,t)=>e in s?u(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)&&l(s,t,e[t]);if(c)for(var t of c(e))O.call(e,t)&&l(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",g={headers:L,method:j},d=10;class C{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new f.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),i=await(await o(this.url,v(p({},g),{body:t}))).json();this.onPayload({data:i})}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((i,r)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),r(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return r(new Error("HTTP connection is missing or invalid"));i()})})}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({},g),{body:t}))}this.onOpen()}catch(t){const i=this.parseError(t);throw this.events.emit("register_error",i),this.onClose(),i}}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"?y(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const i=this.parseError(t),r=i.message||i.toString(),n=b(e,r);this.events.emit("payload",n)}parseError(e,t=this.url){return m(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>d&&this.events.setMaxListeners(d)}}export{C as f};
1
+ import{e as f,o}from"./index-1a84fe52.js";import{i as a,s as h,a as y,f as b,p as m}from"./index-5ad2a852.js";import"./index-83245c25.js";var u=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,l=(s,e,t)=>e in s?u(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)&&l(s,t,e[t]);if(c)for(var t of c(e))O.call(e,t)&&l(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",g={headers:L,method:j},d=10;class C{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new f.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),i=await(await o(this.url,v(p({},g),{body:t}))).json();this.onPayload({data:i})}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((i,r)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),r(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return r(new Error("HTTP connection is missing or invalid"));i()})})}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({},g),{body:t}))}this.onOpen()}catch(t){const i=this.parseError(t);throw this.events.emit("register_error",i),this.onClose(),i}}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"?y(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const i=this.parseError(t),r=i.message||i.toString(),n=b(e,r);this.events.emit("payload",n)}parseError(e,t=this.url){return m(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>d&&this.events.setMaxListeners(d)}}export{C as f};
@@ -1 +1 @@
1
- import{N as Tt,B as M}from"./index-10c73e9d.js";import{B as Mt,m as Bt,K as ot,o as J,q as Lt,Y as F,V as R,P as $t,r as z,F as B,t as Jt,u as At}from"./wallets-4e23dd0f.js";import"./index-2cab452e.js";import{b as zt,o as g,c as Et}from"./index-b3889ac8.js";import{f as P}from"./index.es-4520fb10.js";import"./signing-6d6682ec.js";import"./prepare-contract-call-4be4cc68.js";import"./utils-dddc86ba.js";import"./to-serializable-transaction-9e540f8c.js";import"./transaction-ea614a5a.js";import"./get-bytecode-7a8c6215.js";import"./execute-264a98ed.js";import"./redirect-state-301cb22c.js";import"./index-93724bad.js";import"./ethereum-0d579241.js";import"./types-ba990c1e.js";import"./store-af6293b2.js";import"./hashTypedData-cc1589a7.js";import"./send-transaction-c3053b90.js";import"./eth_sendRawTransaction-5ae15b91.js";import"./index-6ab757a5.js";import"./index-877ffe4a.js";import"./index-accd8060.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]",le="[object Int16Array]",ue="[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,r=void 0){const a=r==null?void 0:r(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 n=new Array(i.length);s.set(i,n);for(let o=0;o<i.length;o++)n[o]=D(i[o],o,e,s,r);return Object.hasOwn(i,"index")&&(n.index=i.index),Object.hasOwn(i,"input")&&(n.input=i.input),n}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const n=new RegExp(i.source,i.flags);return n.lastIndex=i.lastIndex,n}if(i instanceof Map){const n=new Map;s.set(i,n);for(const[o,c]of i)n.set(o,D(c,o,e,s,r));return n}if(i instanceof Set){const n=new Set;s.set(i,n);for(const o of i)n.add(D(o,void 0,e,s,r));return n}if(typeof M<"u"&&M.isBuffer(i))return i.subarray();if(st(i)){const n=new(Object.getPrototypeOf(i)).constructor(i.length);s.set(i,n);for(let o=0;o<i.length;o++)n[o]=D(i[o],o,e,s,r);return n}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const n=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return s.set(i,n),y(n,i,e,s,r),n}if(typeof File<"u"&&i instanceof File){const n=new File([i],i.name,{type:i.type});return s.set(i,n),y(n,i,e,s,r),n}if(i instanceof Blob){const n=new Blob([i],{type:i.type});return s.set(i,n),y(n,i,e,s,r),n}if(i instanceof Error){const n=new i.constructor;return s.set(i,n),n.message=i.message,n.name=i.name,n.stack=i.stack,n.cause=i.cause,y(n,i,e,s,r),n}if(typeof i=="object"&&ve(i)){const n=Object.create(Object.getPrototypeOf(i));return s.set(i,n),y(n,i,e,s,r),n}return i}function y(i,t,e=i,s,r){const a=[...Object.keys(t),...Nt(t)];for(let n=0;n<a.length;n++){const o=a[n],c=Object.getOwnPropertyDescriptor(i,o);(c==null||c.writable)&&(i[o]=D(t[o],o,e,s,r))}}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 le:case ue: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,r,a)=>{const n=t==null?void 0:t(e,s,r,a);if(n!=null)return n;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case Ft:case _t:case Rt:{const o=new i.constructor(i==null?void 0:i.valueOf());return y(o,i),o}case xt:{const o={};return y(o,i),o.length=i.length,o[Symbol.iterator]=i[Symbol.iterator],o}default:return}})}function ht(i){return ge(i)}function pt(i){return i!==null&&typeof i=="object"&&Dt(i)==="[object Arguments]"}function lt(i){return typeof i=="object"&&i!==null}function Pe(){}function we(i){return st(i)}function be(i){var e;if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const s=i[Symbol.toStringTag];return s==null||!((e=Object.getOwnPropertyDescriptor(i,Symbol.toStringTag))!=null&&e.writable)?!1:i.toString()===`[object ${s}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ce(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let r=i;for(let a=0;a<e.length;a++){const n=e[a];r=Z(r,n,s,new Map)}return r}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 r=[...Object.keys(t),...Nt(t)];for(let a=0;a<r.length;a++){const n=r[a];let o=t[n],c=i[n];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 u=[],h=Reflect.ownKeys(c);for(let w=0;w<h.length;w++){const d=h[w];u[d]=c[d]}c=u}else c=[];const l=e(c,o,n,i,t,s);l!=null?i[n]=l:Array.isArray(o)||lt(c)&&lt(o)?i[n]=Z(c,o,e,s):c==null&&be(o)?i[n]=Z({},o,e,s):c==null&&we(o)?i[n]=ht(o):(c===void 0||o!==void 0)&&(i[n]=o)}return i}function Ie(i,...t){return Ce(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,ut=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(ut)for(var e of ut(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 r=B(i);return((s=t.rpcMap)==null?void 0:s[r.reference])||`${St}?chainId=${r.namespace}:${r.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(r=>r.includes(i));if(!e.length)return[];const s=[];return e.forEach(r=>{const a=t.namespaces[r].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,r;return((s=e==null?void 0:e.chains)==null?void 0:s.length)&&((r=e==null?void 0:e.chains)==null?void 0:r.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,r,a;const n={};if(!R(i))return n;for(const[o,c]of Object.entries(i)){const l=$t(o)?[o]:c.chains,u=c.methods||[],h=c.events||[],w=c.rpcMap||{},d=F(o);n[d]=Ee(U(U({},n[d]),c),{chains:z(l,(t=n[d])==null?void 0:t.chains),methods:z(u,(e=n[d])==null?void 0:e.methods),events:z(h,(s=n[d])==null?void 0:s.events)}),(R(w)||R(((r=n[d])==null?void 0:r.rpcMap)||{}))&&(n[d].rpcMap=U(U({},w),(a=n[d])==null?void 0:a.rpcMap))}return n}function vt(i){return i.includes(":")?i.split(":")[2]:i}function gt(i){const t={};for(const[e,s]of Object.entries(i)){const r=s.methods||[],a=s.events||[],n=s.accounts||[],o=$t(e)?[e]:s.chains?s.chains:Ut(s.accounts);t[e]={chains:o,methods:r,events:a,accounts:n}}return t}function G(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}function qe(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}}const kt={},p=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,Ct=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:r={}}=i,a={};if(!R(r)&&!R(s))return;const n=Ct(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=n;const l=r==null?void 0:r[`${yt}:${c}`];if(l){const u=l==null?void 0:l[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),Ct(u||l))}}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,typeof t!="symbol"?t+"":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,r=await Promise.allSettled(s.map(h=>Ye(e.reference,h,t))),a=r.filter(h=>h.status==="fulfilled").map(h=>h.value).filter(h=>h);r.filter(h=>h.status==="rejected").forEach(h=>console.warn("Failed to fetch transaction receipt:",h.reason));const n=!a.length||a.some(h=>!h),o=a.every(h=>(h==null?void 0:h.status)==="0x1"),c=a.every(h=>(h==null?void 0:h.status)==="0x0"),l=a.some(h=>(h==null?void 0:h.status)==="0x0");let u;return n?u=100:o?u=200:c?u=500:l&&(u=600),{id:i.result.id,version:i.request.version,atomic:i.request.atomicRequired,chainId:i.request.chainId,capabilities:i.result.capabilities,receipts:a,status:u}}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==null?void 0:e[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,I=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){I(this,"name","polkadot"),I(this,"client"),I(this,"httpProviders"),I(this,"events"),I(this,"namespace"),I(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var si=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,tt=(i,t,e)=>t in i?si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Y=(i,t)=>{for(var e in t||(t={}))ai.call(t,e)&&tt(i,e,t[e]);if(jt)for(var e of jt(t))oi.call(t,e)&&tt(i,e,t[e]);return i},Q=(i,t)=>ri(i,ni(t)),b=(i,t,e)=>tt(i,typeof t!="symbol"?t+"":t,e);class ci{constructor(t){b(this,"name","eip155"),b(this,"client"),b(this,"chainId"),b(this,"namespace"),b(this,"httpProviders"),b(this,"events"),b(this,"storage"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=rt.getStorage(this.client.core.storage)}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(t);case"wallet_getCallsStatus":return await this.getCallStatus(t);case"wallet_sendCalls":return await this.sendCalls(t)}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(parseInt(t),e),this.chainId=parseInt(t),this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,e){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=parseInt(C(e));t[r]=this.createHttpProvider(r,(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 r=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const a=parseInt(r,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:r}]},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,r,a,n;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(r=t.request)==null?void 0:r.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const l=this.client.session.get(t.topic),u=((n=l==null?void 0:l.sessionProperties)==null?void 0:n.capabilities)||{},h=`${o}${c.join(",")}`,w=u==null?void 0:u[h];if(w)return w;let d;try{d=Ue(l,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({},l.sessionProperties||{}),{capabilities:Q(Y({},u||{}),{[h]:at})})})}catch(L){console.warn("Failed to update session with capabilities",L)}return at}async getCallStatus(t){var e,s,r;const a=this.client.session.get(t.topic),n=(e=a.sessionProperties)==null?void 0:e.bundler_name;if(n){const l=this.getBundlerUrl(t.chainId,n);try{return await this.getUserOperationReceipt(l,t)}catch(u){console.warn("Failed to fetch call status from bundler",u,l)}}const o=(s=a.sessionProperties)==null?void 0:s.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,t)}catch(l){console.warn("Failed to fetch call status from custom bundler",l,o)}const c=await Ze({resultId:(r=t.request.params)==null?void 0:r[0],storage:this.storage});if(c)try{return await We(c,this.getHttpProvider.bind(this))}catch(l){console.warn("Failed to fetch call status from stored send calls",l,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 r=new URL(t),a=await fetch(r,{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,r;const a=await this.client.request(t),n=(e=t.request.params)==null?void 0:e[0],o=a==null?void 0:a.id,c=(a==null?void 0:a.capabilities)||{},l=(s=c==null?void 0:c.caip345)==null?void 0:s.caip2,u=(r=c==null?void 0:c.caip345)==null?void 0:r.transactionHashes;return!o||!l||!(u!=null&&u.length)||await Qe({sendCalls:{request:n,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 li{constructor(t){O(this,"name","solana"),O(this,"client"),O(this,"httpProviders"),O(this,"events"),O(this,"namespace"),O(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var ui=Object.defineProperty,di=(i,t,e)=>t in i?ui(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,j=(i,t,e)=>di(i,typeof t!="symbol"?t+"":t,e);class fi{constructor(t){j(this,"name","cosmos"),j(this,"client"),j(this,"httpProviders"),j(this,"events"),j(this,"namespace"),j(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var mi=Object.defineProperty,vi=(i,t,e)=>t in i?mi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,H=(i,t,e)=>vi(i,typeof t!="symbol"?t+"":t,e);class gi{constructor(t){H(this,"name","algorand"),H(this,"client"),H(this,"httpProviders"),H(this,"events"),H(this,"namespace"),H(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Pi=Object.defineProperty,wi=(i,t,e)=>t in i?Pi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,$=(i,t,e)=>wi(i,typeof t!="symbol"?t+"":t,e);class bi{constructor(t){$(this,"name","cip34"),$(this,"client"),$(this,"httpProviders"),$(this,"events"),$(this,"namespace"),$(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),r=C(e);t[r]=this.createHttpProvider(r,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var yi=Object.defineProperty,Ci=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ci(i,typeof t!="symbol"?t+"":t,e);class Ii{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Oi=Object.defineProperty,ji=(i,t,e)=>t in i?Oi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,E=(i,t,e)=>ji(i,typeof t!="symbol"?t+"":t,e);class Hi{constructor(t){E(this,"name","multiversx"),E(this,"client"),E(this,"httpProviders"),E(this,"events"),E(this,"namespace"),E(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var $i=Object.defineProperty,Ai=(i,t,e)=>t in i?$i(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,S=(i,t,e)=>Ai(i,typeof t!="symbol"?t+"":t,e);class Ei{constructor(t){S(this,"name","near"),S(this,"client"),S(this,"httpProviders"),S(this,"events"),S(this,"namespace"),S(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Si=Object.defineProperty,qi=(i,t,e)=>t in i?Si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,q=(i,t,e)=>qi(i,typeof t!="symbol"?t+"":t,e);class Ni{constructor(t){q(this,"name","tezos"),q(this,"client"),q(this,"httpProviders"),q(this,"events"),q(this,"namespace"),q(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{t[e]=this.createHttpProvider(e)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s))}}var Di=Object.defineProperty,_i=(i,t,e)=>t in i?Di(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t,e)=>_i(i,typeof t!="symbol"?t+"":t,e);class Fi{constructor(t){N(this,"name",qt),N(this,"client"),N(this,"httpProviders"),N(this,"events"),N(this,"namespace"),N(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(t.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(t.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(t.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(t.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider(t.chainId).request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getNamespaceName(){const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return B(t).namespace}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var t,e;const s={};return(e=(t=this.namespace)==null?void 0:t.accounts)==null||e.forEach(r=>{const a=B(r);s[a.reference]=this.createHttpProvider(r)}),s}getHttpProvider(t){const e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Ri=Object.defineProperty,xi=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,et=(i,t,e)=>t in i?Ri(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,T=(i,t)=>{for(var e in t||(t={}))ki.call(t,e)&&et(i,e,t[e]);if(Ht)for(var e of Ht(t))Ti.call(t,e)&&et(i,e,t[e]);return i},X=(i,t)=>xi(i,Ui(t)),m=(i,t,e)=>et(i,typeof t!="symbol"?t+"":t,e);class nt{constructor(t){m(this,"client"),m(this,"namespaces"),m(this,"optionalNamespaces"),m(this,"sessionProperties"),m(this,"scopedProperties"),m(this,"events",new 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==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Mt(Bt({level:(t==null?void 0:t.logger)||ct})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const e=new nt(t);return await e.initialize(),e}async request(t,e,s){const[r,a]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:T({},t),chainId:`${r}:${a}`,topic:this.session.topic,expiry:s})}sendAsync(t,e,s,r){const a=new Date().getTime();this.request(t,s,r).then(n=>e(null,zt(a,n))).catch(n=>e(n,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:r}=await this.client.authenticate(t,e);s&&(this.uri=s,this.events.emit("display_uri",s));const a=await r();if(this.session=a.session,this.session){const n=gt(this.session.namespaces);this.namespaces=k(this.namespaces,n),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 r=await s();this.session=r;const a=gt(r.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,r]=this.validateChain(t);this.getProvider(s).setDefaultChain(r,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==null?void 0:s.length)===0)return;const r=Ut(s),a=k(this.namespaces,this.optionalNamespaces),n=X(T({},a[e]),{accounts:s,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:n});break;case"algorand":this.rpcProviders[e]=new gi({namespace:n});break;case"solana":this.rpcProviders[e]=new li({namespace:n});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:n});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:n});break;case"cip34":this.rpcProviders[e]=new bi({namespace:n});break;case"elrond":this.rpcProviders[e]=new Ii({namespace:n});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:n});break;case"near":this.rpcProviders[e]=new Ei({namespace:n});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:n});break;default:this.rpcProviders[e]=new Fi({namespace:n})}})}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:r}=t;if(r!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const n=a.data;n&&J(n)&&this.events.emit("accountsChanged",n.map(vt))}else if(a.name==="chainChanged"){const n=s.chainId,o=s.event.data,c=F(n),l=G(n)!==G(o)?`${c}:${G(o)}`:n;this.onChainChanged(l)}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,r;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,n=(r=this.client)==null?void 0:r.session.get(t);this.session=X(T({},n),{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:r,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=r,this.scopedProperties=a}validateChain(t){const[e,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,s];if(e&&!Object.keys(this.namespaces||{}).map(n=>F(n)).includes(e))throw new Error(`Namespace '${e}' is not configured. Please call connect() first with namespace config.`);if(e&&s)return[e,s];const r=F(Object.keys(this.namespaces)[0]),a=this.rpcProviders[r].getDefaultChain();return[r,a]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}async onChainChanged(t,e=!1){if(!this.namespaces)return;const[s,r]=this.validateChain(t);if(!r)return;this.updateNamespaceChain(s,r);const a=this.getProvider(s).getDefaultChain();e?(this.events.emit("chainChanged",r),this.emitAccountsChangedOnChainChange({namespace:s,previousChainId:a,newChainId:t})):this.getProvider(s).setDefaultChain(r),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:t,previousChainId:e,newChainId:s}){var r,a;try{if(e===s)return;const n=(a=(r=this.session)==null?void 0:r.namespaces[t])==null?void 0:a.accounts;if(!n)return;const o=n.filter(c=>c.includes(`${s}:`)).map(vt);if(!J(o))return;this.events.emit("accountsChanged",o)}catch(n){this.logger.warn("Failed to emit accountsChanged on chain change",n)}}updateNamespaceChain(t,e){if(!this.namespaces)return;const s=this.namespaces[t]?t:`${t}:${e}`,r={chains:[],methods:[],events:[],defaultChain:e};this.namespaces[s]?this.namespaces[s]&&(this.namespaces[s].defaultChain=e):this.namespaces[s]=r}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 r=((s=this.session)==null?void 0:s.topic)||"";await this.client.core.storage.setItem(`${x}/${t}${r}`,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 ps=nt;export{ps as UniversalProvider,nt as default};
1
+ import{N as Tt,B as M}from"./index-1a84fe52.js";import{B as Mt,m as Bt,K as ot,o as J,q as Lt,Y as F,V as R,P as $t,r as z,F as B,t as Jt,u as At}from"./wallets-608f085e.js";import"./index-83245c25.js";import{b as zt,o as g,c as Et}from"./index-5ad2a852.js";import{f as P}from"./index.es-d75c71a0.js";import"./signing-3a53acbe.js";import"./prepare-contract-call-8aa69ada.js";import"./utils-b0786619.js";import"./to-serializable-transaction-b9665f26.js";import"./transaction-c89d76c9.js";import"./get-bytecode-3e525016.js";import"./execute-ddc9aba5.js";import"./redirect-state-defbbf42.js";import"./index-2151fb57.js";import"./ethereum-dfcdc726.js";import"./types-ba990c1e.js";import"./store-af6293b2.js";import"./hashTypedData-6c569030.js";import"./send-transaction-be048c3f.js";import"./eth_sendRawTransaction-5ae15b91.js";import"./index-6ab757a5.js";import"./index-08f74686.js";import"./index-accd8060.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]",le="[object Int16Array]",ue="[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,r=void 0){const a=r==null?void 0:r(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 n=new Array(i.length);s.set(i,n);for(let o=0;o<i.length;o++)n[o]=D(i[o],o,e,s,r);return Object.hasOwn(i,"index")&&(n.index=i.index),Object.hasOwn(i,"input")&&(n.input=i.input),n}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const n=new RegExp(i.source,i.flags);return n.lastIndex=i.lastIndex,n}if(i instanceof Map){const n=new Map;s.set(i,n);for(const[o,c]of i)n.set(o,D(c,o,e,s,r));return n}if(i instanceof Set){const n=new Set;s.set(i,n);for(const o of i)n.add(D(o,void 0,e,s,r));return n}if(typeof M<"u"&&M.isBuffer(i))return i.subarray();if(st(i)){const n=new(Object.getPrototypeOf(i)).constructor(i.length);s.set(i,n);for(let o=0;o<i.length;o++)n[o]=D(i[o],o,e,s,r);return n}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const n=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return s.set(i,n),y(n,i,e,s,r),n}if(typeof File<"u"&&i instanceof File){const n=new File([i],i.name,{type:i.type});return s.set(i,n),y(n,i,e,s,r),n}if(i instanceof Blob){const n=new Blob([i],{type:i.type});return s.set(i,n),y(n,i,e,s,r),n}if(i instanceof Error){const n=new i.constructor;return s.set(i,n),n.message=i.message,n.name=i.name,n.stack=i.stack,n.cause=i.cause,y(n,i,e,s,r),n}if(typeof i=="object"&&ve(i)){const n=Object.create(Object.getPrototypeOf(i));return s.set(i,n),y(n,i,e,s,r),n}return i}function y(i,t,e=i,s,r){const a=[...Object.keys(t),...Nt(t)];for(let n=0;n<a.length;n++){const o=a[n],c=Object.getOwnPropertyDescriptor(i,o);(c==null||c.writable)&&(i[o]=D(t[o],o,e,s,r))}}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 le:case ue: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,r,a)=>{const n=t==null?void 0:t(e,s,r,a);if(n!=null)return n;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case Ft:case _t:case Rt:{const o=new i.constructor(i==null?void 0:i.valueOf());return y(o,i),o}case xt:{const o={};return y(o,i),o.length=i.length,o[Symbol.iterator]=i[Symbol.iterator],o}default:return}})}function ht(i){return ge(i)}function pt(i){return i!==null&&typeof i=="object"&&Dt(i)==="[object Arguments]"}function lt(i){return typeof i=="object"&&i!==null}function Pe(){}function we(i){return st(i)}function be(i){var e;if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const s=i[Symbol.toStringTag];return s==null||!((e=Object.getOwnPropertyDescriptor(i,Symbol.toStringTag))!=null&&e.writable)?!1:i.toString()===`[object ${s}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ce(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let r=i;for(let a=0;a<e.length;a++){const n=e[a];r=Z(r,n,s,new Map)}return r}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 r=[...Object.keys(t),...Nt(t)];for(let a=0;a<r.length;a++){const n=r[a];let o=t[n],c=i[n];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 u=[],h=Reflect.ownKeys(c);for(let w=0;w<h.length;w++){const d=h[w];u[d]=c[d]}c=u}else c=[];const l=e(c,o,n,i,t,s);l!=null?i[n]=l:Array.isArray(o)||lt(c)&&lt(o)?i[n]=Z(c,o,e,s):c==null&&be(o)?i[n]=Z({},o,e,s):c==null&&we(o)?i[n]=ht(o):(c===void 0||o!==void 0)&&(i[n]=o)}return i}function Ie(i,...t){return Ce(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,ut=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(ut)for(var e of ut(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 r=B(i);return((s=t.rpcMap)==null?void 0:s[r.reference])||`${St}?chainId=${r.namespace}:${r.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(r=>r.includes(i));if(!e.length)return[];const s=[];return e.forEach(r=>{const a=t.namespaces[r].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,r;return((s=e==null?void 0:e.chains)==null?void 0:s.length)&&((r=e==null?void 0:e.chains)==null?void 0:r.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,r,a;const n={};if(!R(i))return n;for(const[o,c]of Object.entries(i)){const l=$t(o)?[o]:c.chains,u=c.methods||[],h=c.events||[],w=c.rpcMap||{},d=F(o);n[d]=Ee(U(U({},n[d]),c),{chains:z(l,(t=n[d])==null?void 0:t.chains),methods:z(u,(e=n[d])==null?void 0:e.methods),events:z(h,(s=n[d])==null?void 0:s.events)}),(R(w)||R(((r=n[d])==null?void 0:r.rpcMap)||{}))&&(n[d].rpcMap=U(U({},w),(a=n[d])==null?void 0:a.rpcMap))}return n}function vt(i){return i.includes(":")?i.split(":")[2]:i}function gt(i){const t={};for(const[e,s]of Object.entries(i)){const r=s.methods||[],a=s.events||[],n=s.accounts||[],o=$t(e)?[e]:s.chains?s.chains:Ut(s.accounts);t[e]={chains:o,methods:r,events:a,accounts:n}}return t}function G(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}function qe(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}}const kt={},p=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,Ct=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:r={}}=i,a={};if(!R(r)&&!R(s))return;const n=Ct(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=n;const l=r==null?void 0:r[`${yt}:${c}`];if(l){const u=l==null?void 0:l[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),Ct(u||l))}}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,typeof t!="symbol"?t+"":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,r=await Promise.allSettled(s.map(h=>Ye(e.reference,h,t))),a=r.filter(h=>h.status==="fulfilled").map(h=>h.value).filter(h=>h);r.filter(h=>h.status==="rejected").forEach(h=>console.warn("Failed to fetch transaction receipt:",h.reason));const n=!a.length||a.some(h=>!h),o=a.every(h=>(h==null?void 0:h.status)==="0x1"),c=a.every(h=>(h==null?void 0:h.status)==="0x0"),l=a.some(h=>(h==null?void 0:h.status)==="0x0");let u;return n?u=100:o?u=200:c?u=500:l&&(u=600),{id:i.result.id,version:i.request.version,atomic:i.request.atomicRequired,chainId:i.request.chainId,capabilities:i.result.capabilities,receipts:a,status:u}}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==null?void 0:e[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,I=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){I(this,"name","polkadot"),I(this,"client"),I(this,"httpProviders"),I(this,"events"),I(this,"namespace"),I(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var si=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,tt=(i,t,e)=>t in i?si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Y=(i,t)=>{for(var e in t||(t={}))ai.call(t,e)&&tt(i,e,t[e]);if(jt)for(var e of jt(t))oi.call(t,e)&&tt(i,e,t[e]);return i},Q=(i,t)=>ri(i,ni(t)),b=(i,t,e)=>tt(i,typeof t!="symbol"?t+"":t,e);class ci{constructor(t){b(this,"name","eip155"),b(this,"client"),b(this,"chainId"),b(this,"namespace"),b(this,"httpProviders"),b(this,"events"),b(this,"storage"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=rt.getStorage(this.client.core.storage)}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(t);case"wallet_getCallsStatus":return await this.getCallStatus(t);case"wallet_sendCalls":return await this.sendCalls(t)}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(parseInt(t),e),this.chainId=parseInt(t),this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,e){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=parseInt(C(e));t[r]=this.createHttpProvider(r,(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 r=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const a=parseInt(r,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:r}]},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,r,a,n;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(r=t.request)==null?void 0:r.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const l=this.client.session.get(t.topic),u=((n=l==null?void 0:l.sessionProperties)==null?void 0:n.capabilities)||{},h=`${o}${c.join(",")}`,w=u==null?void 0:u[h];if(w)return w;let d;try{d=Ue(l,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({},l.sessionProperties||{}),{capabilities:Q(Y({},u||{}),{[h]:at})})})}catch(L){console.warn("Failed to update session with capabilities",L)}return at}async getCallStatus(t){var e,s,r;const a=this.client.session.get(t.topic),n=(e=a.sessionProperties)==null?void 0:e.bundler_name;if(n){const l=this.getBundlerUrl(t.chainId,n);try{return await this.getUserOperationReceipt(l,t)}catch(u){console.warn("Failed to fetch call status from bundler",u,l)}}const o=(s=a.sessionProperties)==null?void 0:s.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,t)}catch(l){console.warn("Failed to fetch call status from custom bundler",l,o)}const c=await Ze({resultId:(r=t.request.params)==null?void 0:r[0],storage:this.storage});if(c)try{return await We(c,this.getHttpProvider.bind(this))}catch(l){console.warn("Failed to fetch call status from stored send calls",l,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 r=new URL(t),a=await fetch(r,{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,r;const a=await this.client.request(t),n=(e=t.request.params)==null?void 0:e[0],o=a==null?void 0:a.id,c=(a==null?void 0:a.capabilities)||{},l=(s=c==null?void 0:c.caip345)==null?void 0:s.caip2,u=(r=c==null?void 0:c.caip345)==null?void 0:r.transactionHashes;return!o||!l||!(u!=null&&u.length)||await Qe({sendCalls:{request:n,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 li{constructor(t){O(this,"name","solana"),O(this,"client"),O(this,"httpProviders"),O(this,"events"),O(this,"namespace"),O(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var ui=Object.defineProperty,di=(i,t,e)=>t in i?ui(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,j=(i,t,e)=>di(i,typeof t!="symbol"?t+"":t,e);class fi{constructor(t){j(this,"name","cosmos"),j(this,"client"),j(this,"httpProviders"),j(this,"events"),j(this,"namespace"),j(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var mi=Object.defineProperty,vi=(i,t,e)=>t in i?mi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,H=(i,t,e)=>vi(i,typeof t!="symbol"?t+"":t,e);class gi{constructor(t){H(this,"name","algorand"),H(this,"client"),H(this,"httpProviders"),H(this,"events"),H(this,"namespace"),H(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Pi=Object.defineProperty,wi=(i,t,e)=>t in i?Pi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,$=(i,t,e)=>wi(i,typeof t!="symbol"?t+"":t,e);class bi{constructor(t){$(this,"name","cip34"),$(this,"client"),$(this,"httpProviders"),$(this,"events"),$(this,"namespace"),$(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),r=C(e);t[r]=this.createHttpProvider(r,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var yi=Object.defineProperty,Ci=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ci(i,typeof t!="symbol"?t+"":t,e);class Ii{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Oi=Object.defineProperty,ji=(i,t,e)=>t in i?Oi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,E=(i,t,e)=>ji(i,typeof t!="symbol"?t+"":t,e);class Hi{constructor(t){E(this,"name","multiversx"),E(this,"client"),E(this,"httpProviders"),E(this,"events"),E(this,"namespace"),E(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const r=C(e);t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var $i=Object.defineProperty,Ai=(i,t,e)=>t in i?$i(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,S=(i,t,e)=>Ai(i,typeof t!="symbol"?t+"":t,e);class Ei{constructor(t){S(this,"name","near"),S(this,"client"),S(this,"httpProviders"),S(this,"events"),S(this,"namespace"),S(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Si=Object.defineProperty,qi=(i,t,e)=>t in i?Si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,q=(i,t,e)=>qi(i,typeof t!="symbol"?t+"":t,e);class Ni{constructor(t){q(this,"name","tezos"),q(this,"client"),q(this,"httpProviders"),q(this,"events"),q(this,"namespace"),q(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{t[e]=this.createHttpProvider(e)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s))}}var Di=Object.defineProperty,_i=(i,t,e)=>t in i?Di(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t,e)=>_i(i,typeof t!="symbol"?t+"":t,e);class Fi{constructor(t){N(this,"name",qt),N(this,"client"),N(this,"httpProviders"),N(this,"events"),N(this,"namespace"),N(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(t.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(t.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(t.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(t.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider(t.chainId).request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getNamespaceName(){const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return B(t).namespace}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var t,e;const s={};return(e=(t=this.namespace)==null?void 0:t.accounts)==null||e.forEach(r=>{const a=B(r);s[a.reference]=this.createHttpProvider(r)}),s}getHttpProvider(t){const e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Ri=Object.defineProperty,xi=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,et=(i,t,e)=>t in i?Ri(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,T=(i,t)=>{for(var e in t||(t={}))ki.call(t,e)&&et(i,e,t[e]);if(Ht)for(var e of Ht(t))Ti.call(t,e)&&et(i,e,t[e]);return i},X=(i,t)=>xi(i,Ui(t)),m=(i,t,e)=>et(i,typeof t!="symbol"?t+"":t,e);class nt{constructor(t){m(this,"client"),m(this,"namespaces"),m(this,"optionalNamespaces"),m(this,"sessionProperties"),m(this,"scopedProperties"),m(this,"events",new 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==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Mt(Bt({level:(t==null?void 0:t.logger)||ct})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const e=new nt(t);return await e.initialize(),e}async request(t,e,s){const[r,a]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:T({},t),chainId:`${r}:${a}`,topic:this.session.topic,expiry:s})}sendAsync(t,e,s,r){const a=new Date().getTime();this.request(t,s,r).then(n=>e(null,zt(a,n))).catch(n=>e(n,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:r}=await this.client.authenticate(t,e);s&&(this.uri=s,this.events.emit("display_uri",s));const a=await r();if(this.session=a.session,this.session){const n=gt(this.session.namespaces);this.namespaces=k(this.namespaces,n),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 r=await s();this.session=r;const a=gt(r.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,r]=this.validateChain(t);this.getProvider(s).setDefaultChain(r,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==null?void 0:s.length)===0)return;const r=Ut(s),a=k(this.namespaces,this.optionalNamespaces),n=X(T({},a[e]),{accounts:s,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:n});break;case"algorand":this.rpcProviders[e]=new gi({namespace:n});break;case"solana":this.rpcProviders[e]=new li({namespace:n});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:n});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:n});break;case"cip34":this.rpcProviders[e]=new bi({namespace:n});break;case"elrond":this.rpcProviders[e]=new Ii({namespace:n});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:n});break;case"near":this.rpcProviders[e]=new Ei({namespace:n});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:n});break;default:this.rpcProviders[e]=new Fi({namespace:n})}})}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:r}=t;if(r!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const n=a.data;n&&J(n)&&this.events.emit("accountsChanged",n.map(vt))}else if(a.name==="chainChanged"){const n=s.chainId,o=s.event.data,c=F(n),l=G(n)!==G(o)?`${c}:${G(o)}`:n;this.onChainChanged(l)}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,r;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,n=(r=this.client)==null?void 0:r.session.get(t);this.session=X(T({},n),{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:r,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=r,this.scopedProperties=a}validateChain(t){const[e,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,s];if(e&&!Object.keys(this.namespaces||{}).map(n=>F(n)).includes(e))throw new Error(`Namespace '${e}' is not configured. Please call connect() first with namespace config.`);if(e&&s)return[e,s];const r=F(Object.keys(this.namespaces)[0]),a=this.rpcProviders[r].getDefaultChain();return[r,a]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}async onChainChanged(t,e=!1){if(!this.namespaces)return;const[s,r]=this.validateChain(t);if(!r)return;this.updateNamespaceChain(s,r);const a=this.getProvider(s).getDefaultChain();e?(this.events.emit("chainChanged",r),this.emitAccountsChangedOnChainChange({namespace:s,previousChainId:a,newChainId:t})):this.getProvider(s).setDefaultChain(r),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:t,previousChainId:e,newChainId:s}){var r,a;try{if(e===s)return;const n=(a=(r=this.session)==null?void 0:r.namespaces[t])==null?void 0:a.accounts;if(!n)return;const o=n.filter(c=>c.includes(`${s}:`)).map(vt);if(!J(o))return;this.events.emit("accountsChanged",o)}catch(n){this.logger.warn("Failed to emit accountsChanged on chain change",n)}}updateNamespaceChain(t,e){if(!this.namespaces)return;const s=this.namespaces[t]?t:`${t}:${e}`,r={chains:[],methods:[],events:[],defaultChain:e};this.namespaces[s]?this.namespaces[s]&&(this.namespaces[s].defaultChain=e):this.namespaces[s]=r}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 r=((s=this.session)==null?void 0:s.topic)||"";await this.client.core.storage.setItem(`${x}/${t}${r}`,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 ps=nt;export{ps as UniversalProvider,nt as default};
@@ -1 +1 @@
1
- let n;const f=new Array(32).fill(void 0);f.push(void 0,null,!0,!1);function b(e){return f[e]}const T=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});T.decode();let y=null;function d(){return(y===null||y.buffer!==n.memory.buffer)&&(y=new Uint8Array(n.memory.buffer)),y}function h(e,t){return T.decode(d().subarray(e,e+t))}let w=f.length;function W(e){w===f.length&&f.push(f.length+1);const t=w;return w=f[t],f[t]=e,t}let l=0;const j=new TextEncoder("utf-8"),N=typeof j.encodeInto=="function"?function(e,t){return j.encodeInto(e,t)}:function(e,t){const r=j.encode(e);return t.set(r),{read:e.length,written:r.length}};function I(e,t,r){if(r===void 0){const c=j.encode(e),a=t(c.length);return d().subarray(a,a+c.length).set(c),l=c.length,a}let i=e.length,o=t(i);const _=d();let s=0;for(;s<i;s++){const c=e.charCodeAt(s);if(c>127)break;_[o+s]=c}if(s!==i){s!==0&&(e=e.slice(s)),o=r(o,i,i=s+e.length*3);const c=d().subarray(o+s,o+i),a=N(e,c);s+=a.written}return l=s,o}let v=null;function u(){return(v===null||v.buffer!==n.memory.buffer)&&(v=new Int32Array(n.memory.buffer)),v}function U(e){e<36||(f[e]=w,w=e)}function p(e){const t=b(e);return U(e),t}function g(e,t){const r=t(e.length*1);return d().set(e,r/1),l=e.length,r}let k=32;function x(e){if(k==1)throw new Error("out of js stack");return f[--k]=e,k}function S(e,t){return d().subarray(e/1,e/1+t)}function L(e,t){try{const c=n.__wbindgen_add_to_stack_pointer(-16),a=g(e,n.__wbindgen_malloc),M=l;n.compress(c,a,M,x(t));var r=u()[c/4+0],i=u()[c/4+1],o=u()[c/4+2],_=u()[c/4+3];if(_)throw p(o);var s=S(r,i).slice();return n.__wbindgen_free(r,i*1),s}finally{n.__wbindgen_add_to_stack_pointer(16),f[k++]=void 0}}function B(e){try{const s=n.__wbindgen_add_to_stack_pointer(-16),c=g(e,n.__wbindgen_malloc),a=l;n.decompress(s,c,a);var t=u()[s/4+0],r=u()[s/4+1],i=u()[s/4+2],o=u()[s/4+3];if(o)throw p(i);var _=S(t,r).slice();return n.__wbindgen_free(t,r*1),_}finally{n.__wbindgen_add_to_stack_pointer(16)}}function R(e){return e==null}const F=Object.freeze({ResultSuccess:1,1:"ResultSuccess",NeedsMoreInput:2,2:"NeedsMoreInput",NeedsMoreOutput:3,3:"NeedsMoreOutput"});class m{static __wrap(t){const r=Object.create(m.prototype);return r.ptr=t,r}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();n.__wbg_brotlistreamresult_free(t)}get code(){return n.__wbg_get_brotlistreamresult_code(this.ptr)>>>0}set code(t){n.__wbg_set_brotlistreamresult_code(this.ptr,t)}get buf(){try{const o=n.__wbindgen_add_to_stack_pointer(-16);n.__wbg_get_brotlistreamresult_buf(o,this.ptr);var t=u()[o/4+0],r=u()[o/4+1],i=S(t,r).slice();return n.__wbindgen_free(t,r*1),i}finally{n.__wbindgen_add_to_stack_pointer(16)}}set buf(t){const r=g(t,n.__wbindgen_malloc),i=l;n.__wbg_set_brotlistreamresult_buf(this.ptr,r,i)}get input_offset(){return n.__wbg_get_brotlistreamresult_input_offset(this.ptr)>>>0}set input_offset(t){n.__wbg_set_brotlistreamresult_input_offset(this.ptr,t)}}class O{static __wrap(t){const r=Object.create(O.prototype);return r.ptr=t,r}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();n.__wbg_compressstream_free(t)}constructor(t){const r=n.compressstream_new(!R(t),R(t)?0:t);return O.__wrap(r)}compress(t,r){try{const a=n.__wbindgen_add_to_stack_pointer(-16);var i=R(t)?0:g(t,n.__wbindgen_malloc),o=l;n.compressstream_compress(a,this.ptr,i,o,r);var _=u()[a/4+0],s=u()[a/4+1],c=u()[a/4+2];if(c)throw p(s);return m.__wrap(_)}finally{n.__wbindgen_add_to_stack_pointer(16)}}total_out(){return n.compressstream_total_out(this.ptr)>>>0}}class A{static __wrap(t){const r=Object.create(A.prototype);return r.ptr=t,r}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();n.__wbg_decompressstream_free(t)}constructor(){const t=n.decompressstream_new();return A.__wrap(t)}decompress(t,r){try{const s=n.__wbindgen_add_to_stack_pointer(-16),c=g(t,n.__wbindgen_malloc),a=l;n.decompressstream_decompress(s,this.ptr,c,a,r);var i=u()[s/4+0],o=u()[s/4+1],_=u()[s/4+2];if(_)throw p(o);return m.__wrap(i)}finally{n.__wbindgen_add_to_stack_pointer(16)}}total_out(){return n.decompressstream_total_out(this.ptr)>>>0}}async function z(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(i){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",i);else throw i}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}async function E(e){typeof e>"u"&&(e=new URL("https://cdn.decentraland.org/@dcl/governance-site/2.5.1/assets/brotli_wasm_bg-9ef0a025.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_is_undefined=function(o){return b(o)===void 0},t.wbg.__wbindgen_is_object=function(o){const _=b(o);return typeof _=="object"&&_!==null},t.wbg.__wbindgen_string_new=function(o,_){const s=h(o,_);return W(s)},t.wbg.__wbindgen_error_new=function(o,_){const s=new Error(h(o,_));return W(s)},t.wbg.__wbindgen_json_serialize=function(o,_){const s=b(_),c=JSON.stringify(s===void 0?null:s),a=I(c,n.__wbindgen_malloc,n.__wbindgen_realloc),M=l;u()[o/4+1]=M,u()[o/4+0]=a},t.wbg.__wbg_new_693216e109162396=function(){const o=new Error;return W(o)},t.wbg.__wbg_stack_0ddaca5d1abfb52f=function(o,_){const s=b(_).stack,c=I(s,n.__wbindgen_malloc,n.__wbindgen_realloc),a=l;u()[o/4+1]=a,u()[o/4+0]=c},t.wbg.__wbg_error_09919627ac0992f5=function(o,_){try{console.error(h(o,_))}finally{n.__wbindgen_free(o,_)}},t.wbg.__wbindgen_object_drop_ref=function(o){p(o)},t.wbg.__wbindgen_throw=function(o,_){throw new Error(h(o,_))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:i}=await z(await e,t);return n=r.exports,E.__wbindgen_wasm_module=i,n}const C=Object.freeze(Object.defineProperty({__proto__:null,BrotliStreamResult:m,BrotliStreamResultCode:F,CompressStream:O,DecompressStream:A,compress:L,decompress:B,default:E},Symbol.toStringTag,{value:"Module"})),D=E().then(()=>C);export{D as default};
1
+ let n;const u=new Array(32).fill(void 0);u.push(void 0,null,!0,!1);function b(e){return u[e]}const T=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});T.decode();let y=null;function d(){return(y===null||y.buffer!==n.memory.buffer)&&(y=new Uint8Array(n.memory.buffer)),y}function h(e,t){return T.decode(d().subarray(e,e+t))}let w=u.length;function W(e){w===u.length&&u.push(u.length+1);const t=w;return w=u[t],u[t]=e,t}let l=0;const j=new TextEncoder("utf-8"),N=typeof j.encodeInto=="function"?function(e,t){return j.encodeInto(e,t)}:function(e,t){const r=j.encode(e);return t.set(r),{read:e.length,written:r.length}};function I(e,t,r){if(r===void 0){const c=j.encode(e),a=t(c.length);return d().subarray(a,a+c.length).set(c),l=c.length,a}let i=e.length,o=t(i);const _=d();let s=0;for(;s<i;s++){const c=e.charCodeAt(s);if(c>127)break;_[o+s]=c}if(s!==i){s!==0&&(e=e.slice(s)),o=r(o,i,i=s+e.length*3);const c=d().subarray(o+s,o+i),a=N(e,c);s+=a.written}return l=s,o}let v=null;function f(){return(v===null||v.buffer!==n.memory.buffer)&&(v=new Int32Array(n.memory.buffer)),v}function U(e){e<36||(u[e]=w,w=e)}function p(e){const t=b(e);return U(e),t}function g(e,t){const r=t(e.length*1);return d().set(e,r/1),l=e.length,r}let k=32;function x(e){if(k==1)throw new Error("out of js stack");return u[--k]=e,k}function S(e,t){return d().subarray(e/1,e/1+t)}function L(e,t){try{const c=n.__wbindgen_add_to_stack_pointer(-16),a=g(e,n.__wbindgen_malloc),M=l;n.compress(c,a,M,x(t));var r=f()[c/4+0],i=f()[c/4+1],o=f()[c/4+2],_=f()[c/4+3];if(_)throw p(o);var s=S(r,i).slice();return n.__wbindgen_free(r,i*1),s}finally{n.__wbindgen_add_to_stack_pointer(16),u[k++]=void 0}}function B(e){try{const s=n.__wbindgen_add_to_stack_pointer(-16),c=g(e,n.__wbindgen_malloc),a=l;n.decompress(s,c,a);var t=f()[s/4+0],r=f()[s/4+1],i=f()[s/4+2],o=f()[s/4+3];if(o)throw p(i);var _=S(t,r).slice();return n.__wbindgen_free(t,r*1),_}finally{n.__wbindgen_add_to_stack_pointer(16)}}function R(e){return e==null}const F=Object.freeze({ResultSuccess:1,1:"ResultSuccess",NeedsMoreInput:2,2:"NeedsMoreInput",NeedsMoreOutput:3,3:"NeedsMoreOutput"});class m{static __wrap(t){const r=Object.create(m.prototype);return r.ptr=t,r}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();n.__wbg_brotlistreamresult_free(t)}get code(){return n.__wbg_get_brotlistreamresult_code(this.ptr)>>>0}set code(t){n.__wbg_set_brotlistreamresult_code(this.ptr,t)}get buf(){try{const o=n.__wbindgen_add_to_stack_pointer(-16);n.__wbg_get_brotlistreamresult_buf(o,this.ptr);var t=f()[o/4+0],r=f()[o/4+1],i=S(t,r).slice();return n.__wbindgen_free(t,r*1),i}finally{n.__wbindgen_add_to_stack_pointer(16)}}set buf(t){const r=g(t,n.__wbindgen_malloc),i=l;n.__wbg_set_brotlistreamresult_buf(this.ptr,r,i)}get input_offset(){return n.__wbg_get_brotlistreamresult_input_offset(this.ptr)>>>0}set input_offset(t){n.__wbg_set_brotlistreamresult_input_offset(this.ptr,t)}}class O{static __wrap(t){const r=Object.create(O.prototype);return r.ptr=t,r}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();n.__wbg_compressstream_free(t)}constructor(t){const r=n.compressstream_new(!R(t),R(t)?0:t);return O.__wrap(r)}compress(t,r){try{const a=n.__wbindgen_add_to_stack_pointer(-16);var i=R(t)?0:g(t,n.__wbindgen_malloc),o=l;n.compressstream_compress(a,this.ptr,i,o,r);var _=f()[a/4+0],s=f()[a/4+1],c=f()[a/4+2];if(c)throw p(s);return m.__wrap(_)}finally{n.__wbindgen_add_to_stack_pointer(16)}}total_out(){return n.compressstream_total_out(this.ptr)>>>0}}class A{static __wrap(t){const r=Object.create(A.prototype);return r.ptr=t,r}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();n.__wbg_decompressstream_free(t)}constructor(){const t=n.decompressstream_new();return A.__wrap(t)}decompress(t,r){try{const s=n.__wbindgen_add_to_stack_pointer(-16),c=g(t,n.__wbindgen_malloc),a=l;n.decompressstream_decompress(s,this.ptr,c,a,r);var i=f()[s/4+0],o=f()[s/4+1],_=f()[s/4+2];if(_)throw p(o);return m.__wrap(i)}finally{n.__wbindgen_add_to_stack_pointer(16)}}total_out(){return n.decompressstream_total_out(this.ptr)>>>0}}async function z(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(i){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",i);else throw i}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}async function E(e){typeof e>"u"&&(e=new URL("https://cdn.decentraland.org/@dcl/governance-site/2.5.2-35861583677.commit-9185f43/assets/brotli_wasm_bg-9ef0a025.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_is_undefined=function(o){return b(o)===void 0},t.wbg.__wbindgen_is_object=function(o){const _=b(o);return typeof _=="object"&&_!==null},t.wbg.__wbindgen_string_new=function(o,_){const s=h(o,_);return W(s)},t.wbg.__wbindgen_error_new=function(o,_){const s=new Error(h(o,_));return W(s)},t.wbg.__wbindgen_json_serialize=function(o,_){const s=b(_),c=JSON.stringify(s===void 0?null:s),a=I(c,n.__wbindgen_malloc,n.__wbindgen_realloc),M=l;f()[o/4+1]=M,f()[o/4+0]=a},t.wbg.__wbg_new_693216e109162396=function(){const o=new Error;return W(o)},t.wbg.__wbg_stack_0ddaca5d1abfb52f=function(o,_){const s=b(_).stack,c=I(s,n.__wbindgen_malloc,n.__wbindgen_realloc),a=l;f()[o/4+1]=a,f()[o/4+0]=c},t.wbg.__wbg_error_09919627ac0992f5=function(o,_){try{console.error(h(o,_))}finally{n.__wbindgen_free(o,_)}},t.wbg.__wbindgen_object_drop_ref=function(o){p(o)},t.wbg.__wbindgen_throw=function(o,_){throw new Error(h(o,_))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:i}=await z(await e,t);return n=r.exports,E.__wbindgen_wasm_module=i,n}const C=Object.freeze(Object.defineProperty({__proto__:null,BrotliStreamResult:m,BrotliStreamResultCode:F,CompressStream:O,DecompressStream:A,compress:L,decompress:B,default:E},Symbol.toStringTag,{value:"Module"})),D=E().then(()=>C);export{D as default};
@@ -1 +1 @@
1
- import{d as f}from"./createBatchScheduler-7c9ada66.js";import{s as l,t as b,f as w,A,b as y,g,h as m,j as F,e as E,k as N,l as h,m as P,I,n as R}from"./writeContract-03e44e49.js";function q(n){const{abi:r,data:a}=n,e=l(a,0,4),t=r.find(o=>o.type==="function"&&e===b(w(o)));if(!t)throw new A(e,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?y(t.inputs,l(a,4)):void 0}}const u="/docs/contract/encodeErrorResult";function p(n){const{abi:r,errorName:a,args:e}=n;let t=r[0];if(a){const c=g({abi:r,args:e,name:a});if(!c)throw new m(a,{docsPath:u});t=c}if(t.type!=="error")throw new m(void 0,{docsPath:u});const o=w(t),s=b(o);let i="0x";if(e&&e.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=E(t.inputs,e)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function x(n){const{abi:r,functionName:a,result:e}=n;let t=r[0];if(a){const s=g({abi:r,name:a});if(!s)throw new h(a,{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[e];if(Array.isArray(e))return e;throw new I(e)})();return E(t.outputs,o)}const G="x-batch-gateway:true";async function H(n){const{data:r,ccipRequest:a}=n,{args:[e]}=q({abi:f,data:r}),t=[],o=[];return await Promise.all(e.map(async(s,i)=>{try{o[i]=s.urls.includes(G)?await H({data:s.data,ccipRequest:a}):await a(s),t[i]=!1}catch(c){t[i]=!0,o[i]=M(c)}})),x({abi:f,functionName:"query",result:[t,o]})}function M(n){return n.name==="HttpRequestError"&&n.status?p({abi:f,errorName:"HttpError",args:[n.status,n.shortMessage]}):p({abi:[R],errorName:"Error",args:["shortMessage"in n?n.shortMessage:n.message]})}export{H as a,x as b,q as d,p as e,G as l};
1
+ import{d as f}from"./createBatchScheduler-7c9ada66.js";import{s as l,t as b,f as w,A,b as y,g,h as m,j as F,e as E,k as N,l as h,m as P,I,n as R}from"./writeContract-8e997358.js";function q(n){const{abi:r,data:a}=n,e=l(a,0,4),t=r.find(o=>o.type==="function"&&e===b(w(o)));if(!t)throw new A(e,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?y(t.inputs,l(a,4)):void 0}}const u="/docs/contract/encodeErrorResult";function p(n){const{abi:r,errorName:a,args:e}=n;let t=r[0];if(a){const c=g({abi:r,args:e,name:a});if(!c)throw new m(a,{docsPath:u});t=c}if(t.type!=="error")throw new m(void 0,{docsPath:u});const o=w(t),s=b(o);let i="0x";if(e&&e.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=E(t.inputs,e)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function x(n){const{abi:r,functionName:a,result:e}=n;let t=r[0];if(a){const s=g({abi:r,name:a});if(!s)throw new h(a,{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[e];if(Array.isArray(e))return e;throw new I(e)})();return E(t.outputs,o)}const G="x-batch-gateway:true";async function H(n){const{data:r,ccipRequest:a}=n,{args:[e]}=q({abi:f,data:r}),t=[],o=[];return await Promise.all(e.map(async(s,i)=>{try{o[i]=s.urls.includes(G)?await H({data:s.data,ccipRequest:a}):await a(s),t[i]=!1}catch(c){t[i]=!0,o[i]=M(c)}})),x({abi:f,functionName:"query",result:[t,o]})}function M(n){return n.name==="HttpRequestError"&&n.status?p({abi:f,errorName:"HttpError",args:[n.status,n.shortMessage]}):p({abi:[R],errorName:"Error",args:["shortMessage"in n?n.shortMessage:n.message]})}export{H as a,x as b,q as d,p as e,G as l};
@@ -1 +1 @@
1
- import{a as e}from"./index-10c73e9d.js";function t(){if(typeof WebSocket<"u")return WebSocket;if(typeof e.WebSocket<"u")return e.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const n=t();export{n as WebSocket};
1
+ import{a as e}from"./index-1a84fe52.js";function t(){if(typeof WebSocket<"u")return WebSocket;if(typeof e.WebSocket<"u")return e.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const n=t();export{n as WebSocket};
@@ -1 +1 @@
1
- import{A as y}from"./NetworkUtil-cfdab321.js";import{a as v,b as S,c as x,d as w,e as C,f as N,g as z,h as M,i as E,j as q,k as B,l as D,m as L,n as A,o as O,p as P,q as U,r as V,s as I,t as R,u as G,v as H,w as Z,x as K,y as X,z as Y,A as J,B as F,C as W,D as Q,E as _,F as $,G as aa,H as sa,I as ea,J as ta,K as na,L as ia,M as oa,N as ra,O as la,P as ca,Q as ha,R as pa,S as da,T as ma,U as Ta,V as ua,W as ba,X as ka,Y as fa,Z as ga,_ as ya,$ as ja,a0 as va,a1 as Sa,a2 as xa,a3 as wa,a4 as Ca,a5 as Na,a6 as za,a7 as Ma,a8 as Ea,a9 as qa,aa as Ba,ab as Da,ac as La,ad as Aa,ae as Oa,af as Pa,ag as Ua,ah as Va,ai as Ia,aj as Ra,ak as Ga,al as Ha,am as Za,an as Ka,ao as Xa,ap as Ya,aq as Ja,ar as Fa,as as Wa,at as Qa,au as _a,av as $a,aw as as,ax as ss,ay as es,az as ts,aA as ns,aB as is,aC as os,aD as rs,aE as ls,aF as cs,aG as hs,aH as ps,aI as ds,aJ as ms,aK as Ts,aL as us,aM as bs,aN as ks,aO as fs,aP as gs,aQ as ys,aR as js,aS as vs,aT as Ss,aU as xs,aV as ws,aW as Cs,aX as Ns,aY as zs,aZ as Ms,a_ as Es,a$ as qs,b0 as Bs,b1 as Ds,b2 as Ls,b3 as As,b4 as Os,b5 as Ps,b6 as Us,b7 as Vs,b8 as Is,b9 as Rs,ba as Gs,bb as Hs,bc as Zs,bd as Ks,be as Xs,bf as Ys,bg as Js,bh as Fs,bi as Ws,bj as Qs,bk as _s,bl as $s,bm as ae,bn as se,bo as ee,bp as te,bq as ne,br as ie,bs as oe,bt as re,bu as le,bv as ce,bw as he,bx as pe,by as de,bz as me,bA as Te,bB as ue,bC as be,bD as ke,bE as fe,bF as ge,bG as ye,bH as je,bI as ve,bJ as Se,bK as xe,bL as we,bM as Ce,bN as Ne,bO as ze,bP as Me,bQ as Ee,bR as qe,bS as Be,bT as De,bU as Le,bV as Ae,bW as Oe,bX as Pe,bY as Ue,bZ as Ve,b_ as Ie,b$ as Re,c0 as Ge,c1 as He,c2 as Ze,c3 as Ke,c4 as Xe,c5 as Ye,c6 as Je,c7 as Fe,c8 as We,c9 as Qe,ca as _e,cb as $e,cc as at,cd as st,ce as et,cf as tt,cg as nt,ch as it,ci as ot,cj as rt,ck as lt,cl as ct,cm as ht,cn as pt,co as dt,cp as mt,cq as Tt,cr as ut,cs as bt,ct as kt,cu as ft,cv as gt,cw as yt,cx as jt,cy as vt,cz as St,cA as xt,cB as wt,cC as Ct,cD as Nt,cE as zt,cF as Mt,cG as Et,cH as qt,cI as Bt,cJ as Dt,cK as Lt,cL as At,cM as Ot,cN as Pt,cO as Ut,cP as Vt,cQ as It,cR as Rt,cS as Gt,cT as Ht,cU as Zt,cV as Kt,cW as Xt,cX as Yt,cY as Jt,cZ as Ft,c_ as Wt,c$ as Qt,d0 as _t,d1 as $t,d2 as an,d3 as sn,d4 as en,d5 as tn,d6 as nn,d7 as on,d8 as rn,d9 as ln,da as cn,db as hn,dc as pn,dd as dn,de as mn,df as Tn,dg as un,dh as bn,di as kn,dj as fn,dk as gn,dl as yn,dm as jn,dn as vn,dp as Sn,dq as xn,dr as wn,ds as Cn,dt as Nn,du as zn,dv as Mn,dw as En,dx as qn,dy as Bn,dz as Dn,dA as Ln,dA as An,dB as On,dC as Pn,dD as Un,dE as Vn,dF as In,dG as Rn,dH as Gn,dI as Hn,dJ as Zn,dK as Kn,dL as Xn,dM as Yn,dN as Jn,dO as Fn,dP as Wn,dQ as Qn,dR as _n,dS as $n,dT as ai,dU as si,dV as ei,dW as ti,dX as ni,dY as ii,dZ as oi,d_ as ri,d$ as li,e0 as ci,e1 as hi,e2 as pi,e3 as di,e4 as mi,e5 as Ti,e6 as ui,e7 as bi,e8 as ki,e9 as fi,ea as gi,eb as yi,ec as ji,ed as vi,ee as Si,ef as xi,eg as wi,eh as Ci,ei as Ni,ej as zi,ek as Mi,el as Ei,em as qi,en as Bi,eo as Di,ep as Li,eq as Ai,er as Oi,es as Pi,et as Ui,eu as Vi,ev as Ii,ew as Ri,ex as Gi,ey as Hi,ez as Zi,eA as Ki,eB as Xi,eC as Yi,eD as Ji,eE as Fi,eF as Wi,eG as Qi,eH as _i,eI as $i,eJ as ao,eK as so,eL as eo,eM as to,eN as no,eO as io,eP as oo,eQ as ro,eR as lo,eS as co,eT as ho,eU as po,eV as mo,eW as To,eX as uo,eY as bo,eZ as ko,e_ as fo,e$ as go,f0 as yo,f1 as jo,f2 as vo,f3 as So,f4 as xo,f5 as wo,f6 as Co,f7 as No,f8 as zo,f9 as Mo,fa as Eo,fb as qo,fc as Bo,fd as Do,fe as Lo,ff as Ao,fg as Oo,fh as Po,fi as Uo,fj as Vo,fk as Io,fl as Ro,fm as Go,fn as Ho,fo as Zo,fp as Ko,fq as Xo,fr as Yo,fs as Jo,ft as Fo,fu as Wo,fv as Qo,fw as _o,fx as $o,fy as ar,fz as sr,fA as er,fB as tr,fC as nr,fD as ir,fE as or,fF as rr,fG as lr,fH as cr,fI as hr,fJ as pr,fK as dr,fL as mr,fM as Tr,fN as ur,fO as br,fP as kr,fQ as fr,fR as gr,fS as yr,fT as jr,fU as vr,fV as Sr,fW as xr,fX as wr,fY as Cr,fZ as Nr,f_ as zr,f$ as Mr,g0 as Er,g1 as qr,g2 as Br,g3 as Dr,g4 as Lr,g5 as Ar,g6 as Or,g7 as Pr,g8 as Ur,g9 as Vr,ga as Ir,gb as Rr,gc as Gr,gd as Hr,ge as Zr,gf as Kr,gg as Xr,gh as Yr,gi as Jr,gj as Fr,gk as Wr,gl as Qr,gm as _r,gn as $r,go as al,gp as sl,gq as el,gr as tl,gs as nl,gt as il,gu as ol,gv as rl,gw as ll,gx as cl,gy as hl,gz as pl,gA as dl,gB as ml,gC as Tl,gD as ul,gE as bl,gF as kl,gG as fl,gH as gl,gI as yl,gJ as jl,gK as vl,gL as Sl,gM as xl,gN as wl,gO as Cl,gP as Nl,gQ as zl,gR as Ml,gS as El,gT as ql,gU as Bl,gV as Dl,gW as Ll,gX as Al,gY as Ol,gZ as Pl,g_ as Ul,g$ as Vl,h0 as Il,h1 as Rl,h2 as Gl,h3 as Hl,h4 as Zl,h5 as Kl,h6 as Xl,h7 as Yl,h8 as Jl,h9 as Fl,ha as Wl,hb as Ql,hc as _l,hd as $l,he as ac,hf as sc,hg as ec,hh as tc,hi as nc,hj as ic,hk as oc,hl as rc,hm as lc,hn as cc,ho as hc,hp as pc,hq as dc,hr as mc,hs as Tc,ht as uc,hu as bc,hv as kc,hw as fc,hx as gc,hy as yc,hz as jc,hA as vc,hB as Sc,hC as xc,hD as wc,hE as Cc,hF as Nc,hG as zc,hH as Mc,hI as Ec,hJ as qc,hK as Bc,hL as Dc,hM as Lc,hN as Ac,hO as Oc,hP as Pc,hQ as Uc,hR as Vc,hS as Ic,hT as Rc,hU as Gc,hV as Hc,hW as Zc,hX as Kc,hY as Xc,hZ as Yc,h_ as Jc,h$ as Fc,i0 as Wc,i1 as Qc,i2 as _c,i3 as $c,i4 as ah,i5 as sh,i6 as eh,i7 as th,i8 as nh,i9 as ih,ia as oh,ib as rh,ic as lh,id as ch,ie as hh,ig as ph,ih as dh,ii as mh,ij as Th,ij as uh,ik as bh,il as kh,im as fh,io as gh,ip as yh,iq as jh,ir as vh,is as Sh,it as xh,iu as wh,iv as Ch,iw as Nh,ix as zh,iy as Mh,iz as Eh,iA as qh,iB as Bh,iC as Dh,iD as Lh,iE as Ah,iF as Oh,iG as Ph,iH as Uh,iI as Vh,iJ as Ih,iK as Rh,iL as Gh,iM as Hh,iN as Zh,iO as Kh,iP as Xh,iQ as Yh,iR as Jh,iS as Fh,iT as Wh,iU as Qh,iV as _h,iT as $h,iW as ap,iW as sp,iX as ep,iY as tp,iZ as np,i_ as ip,i$ as op,j0 as rp,j1 as lp,j2 as cp,j3 as hp,j4 as pp,j5 as dp,j6 as mp,j7 as Tp,j8 as up,j9 as bp,ja as kp,jb as fp,jc as gp,jd as yp,je as jp,jf as vp,jg as Sp,jh as xp,ji as wp,jj as Cp,jk as Np,jl as zp,jm as Mp,jn as Ep,jo as qp,jp as Bp,jq as Dp,jr as Lp,js as Ap,jt as Op,ju as Pp,jv as Up,jw as Vp,jx as Ip,jy as Rp,jz as Gp,jA as Hp,jB as Zp,jC as Kp,jD as Xp,jE as Yp,jF as Jp,jG as Fp,jH as Wp,jI as Qp,jJ as _p,jK as $p,jJ as ad,jL as sd,jM as ed,jN as td,jO as nd,jP as id,jQ as od,jR as rd,jS as ld,jT as cd,jU as hd,jV as pd,jW as dd,jX as md,jY as Td,jZ as ud,j_ as bd,j$ as kd,k0 as fd,k1 as gd,k2 as yd,k3 as jd,k4 as vd,k5 as Sd,k6 as xd,k7 as wd,k8 as Cd,k9 as Nd,ka as zd,kb as Md,kc as Ed,kd as qd,ke as Bd,kf as Dd,kg as Ld,kh as Ad,ki as Od,kj as Pd,kk as Ud,kl as Vd,km as Id,kn as Rd,ko as Gd,kj as Hd,kk as Zd,kp as Kd,kq as Xd,kr as Yd,kl as Jd,km as Fd,ks as Wd,kt as Qd,ku as _d}from"./zoraTestnet-1485f0af.js";import"./index-10c73e9d.js";import"./verifyHash-b21b75c2.js";import"./writeContract-03e44e49.js";import"./createBatchScheduler-7c9ada66.js";import"./secp256k1-44255658.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const r=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"}),l=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"}),c=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"}),h=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"]}}}),p=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}),d=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}),m=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"}),T=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"}),u=a({id:"0x2b6653dc",name:"TRON",network:"tron-mainnet",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org"}},testnet:!1,chainNamespace:"tron",caipNetworkId:"tron:0x2b6653dc"}),b=a({id:"0x94a9059e",name:"TRON Shasta",network:"tron-shasta",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.shasta.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0x94a9059e"}),k=a({id:"0xcd8690dc",name:"TRON Nile",network:"tron-nile",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://nile.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0xcd8690dc"});export{y as AVAILABLE_NAMESPACES,v as abey,S as abstract,x as abstractTestnet,w as acala,C as acria,N as adf,z as adi,M as agungTestnet,E as aioz,q as alephZero,B as alephZeroTestnet,D as alienx,L as alienxHalTestnet,A as alpenTestnet,O as ancient8,P as ancient8Sepolia,U as anvil,V as apeChain,I as apexTestnet,R as apollo,G as arbitrum,H as arbitrumGoerli,Z as arbitrumNova,K as arbitrumSepolia,X as arc,Y as arcTestnet,J as arenaz,F as areonNetwork,W as areonNetworkTestnet,Q as areum,_ as artelaTestnet,$ as arthera,aa as artheraTestnet,sa as assetChain,ea as assetChainTestnet,ta as astar,na as astarZkEVM,ia as astarZkyoto,oa as atletaOlympia,ra as aurora,la as auroraTestnet,ca as auroria,ha as autheoTestnet,pa as avalanche,da as avalancheFuji,ma as b3,Ta as b3Sepolia,ua as bahamut,ba as base,ka as baseGoerli,fa as basePreconf,ga as baseSepolia,ya as baseSepoliaPreconf,ja as basecampTestnet,va as battlechain,Sa as battlechainTestnet,xa as beam,wa as beamTestnet,Ca as bearNetworkChainMainnet,Na as bearNetworkChainTestnet,za as berachain,Ma as berachainBepolia,Ea as berachainTestnet,qa as berachainTestnetbArtio,Ba as bevmMainnet,Da as bifrost,La as birdlayer,Aa as bitTorrent,Oa as bitTorrentTestnet,h as bitcoin,d as bitcoinSignet,p as bitcoinTestnet,Pa as bitgert,Ua as bitkub,Va as bitkubTestnet,Ia as bitlayer,Ra as bitlayerTestnet,Ga as bitrock,Ha as blast,Za as blastSepolia,Ka as bob,Xa as bobSepolia,Ya as boba,Ja as bobaSepolia,Fa as boolBetaMainnet,Wa as botanix,Qa as botanixTestnet,_a as bounceBit,$a as bounceBitTestnet,as as bronos,ss as bronosTestnet,es as bsc,ts as bscGreenfield,ns as bscTestnet,is as bsquared,os as bsquaredTestnet,rs as btr,ls as btrTestnet,cs as bxn,hs as bxnTestnet,ps as cannon,ds as canto,ms as celo,Ts as celoAlfajores,us as celoSepolia,bs as chang,ks as chiliz,fs as chips,gs as citrate,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,Ds as cornTestnet,Ls as cpchain,As as crab,Os as creatorTestnet,Ps as creditCoin3Devnet,Us as creditCoin3Mainnet,Vs as creditCoin3Testnet,Is as cronos,Rs as cronosTestnet,Gs 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 defiOracleMetaMainnet,te as defichainEvm,ne as defichainEvmTestnet,a as defineChain,ie as degen,oe as dfk,re as diode,le as disChain,ce as dodochainTestnet,he as dogechain,pe as domaTestnet,de as donatuz,me as dosChain,Te as dosChainTestnet,ue as dreyerxMainnet,be as dreyerxTestnet,ke as dustboyIoT,fe as dymension,ge as eden,ye as edexa,je as edexaTestnet,ve as edgeless,Se as edgelessTestnet,xe as edgeware,we as edgewareTestnet,Ce as eduChain,Ne as eduChainTestnet,ze as elastos,Me as elastosTestnet,Ee as electroneum,qe as electroneumTestnet,Be as elysiumTestnet,De as energy,Le as eni,Ae as eniTestnet,Oe as enuls,Pe as eon,Ue as eos,Ve as eosTestnet,Ie as eteria,Re as etherlink,Ge as etherlinkShadownetTestnet,He as etherlinkTestnet,Ze as ethernity,Ke as etp,Xe as evmos,Ye as evmosTestnet,Je as excelonMainnet,Fe as expanse,We as exsat,Qe as exsatTestnet,_e as fantom,$e as fantomSonicTestnet,at as fantomTestnet,st as fibo,et as filecoin,tt as filecoinCalibration,nt as filecoinHyperspace,it as fireChain,ot as flame,rt as flare,lt as flareTestnet,ct as flowMainnet,ht as flowPreviewnet,pt as flowTestnet,dt as fluence,mt as fluenceStage,Tt as fluenceTestnet,ut as fluent,bt as fluentDevnet,kt as fluentTestnet,ft as form,gt as formTestnet,yt as forma,jt as formicarium,vt as forta,St as foundry,xt as fraxtal,wt as fraxtalTestnet,Ct as funkiMainnet,Nt as funkiSepolia,zt as fuse,Mt as fuseSparknet,Et as fusion,qt as fusionTestnet,Bt as garnet,Dt as gatechain,Lt as geist,At as genesys,Ot as gensyn,Pt as giwaSepolia,Ut as giwaSepoliaPreconf,Vt as glideL1Protocol,It as glideL2Protocol,Rt as gnosis,Gt as gnosisChiado,Ht as goChain,Zt as goat,Kt as gobi,Xt as godwoken,Yt as goerli,Jt as graphite,Ft as graphiteTestnet,Wt as grav,Qt as gravity,_t as gunz,$t as guruNetwork,an as guruTestnet,sn as ham,en as happychainTestnet,tn as haqqMainnet,nn as haqqTestedge2,on as hardhat,rn as harmonyOne,ln as hashkey,cn as hashkeyTestnet,hn as hausTestnet,pn as haustTestnet,dn as hedera,mn as hederaPreviewnet,Tn as hederaTestnet,un as hela,bn as heliosTestnet,kn as hemi,fn as hemiSepolia,gn as henesys,yn as holesky,jn as hoodi,vn as horizenTestnet,Sn as hpb,xn as hpp,wn as hppSepolia,Cn as huddle01Mainnet,Nn as huddle01Testnet,zn as humanity,Mn as humanityTestnet,En as humanode,qn as humanodeTestnet5,Bn as hychain,Dn as hychainTestnet,Ln as hyperEvm,An as hyperliquid,On as hyperliquidEvmTestnet,Pn as iSunCoin,Un as icbNetwork,Vn as idchain,In as igra,Rn as immutableZkEvm,Gn as immutableZkEvmTestnet,Hn as inEVM,Zn as initVerse,Kn as initVerseGenesis,Xn as injective,Yn as injectiveTestnet,Jn as ink,Fn as inkSepolia,Wn as iota,Qn as iotaTestnet,_n as iotex,$n as iotexTestnet,ai as jasmyChain,si as jasmyChainTestnet,ei as jbc,ti as jbcTestnet,ni as jocMainnet,ii as jocTestnet,oi as jovay,ri as jovaySepolia,li as juneo,ci as juneoBCH1Chain,hi as juneoDAI1Chain,pi as juneoDOGE1Chain,di as juneoEUR1Chain,mi as juneoGLD1Chain,Ti as juneoLINK1Chain,ui as juneoLTC1Chain,bi as juneoSGD1Chain,ki as juneoSocotraTestnet,fi as juneoUSD1Chain,gi as juneoUSDT1Chain,yi as juneomBTC1Chain,ji as kaia,vi as kairos,Si as kakarotSepolia,xi as kakarotStarknetSepolia,wi as kardiaChain,Ci as karura,Ni as katana,zi as kava,Mi as kavaTestnet,Ei as kcc,qi as kii,Bi as kiiTestnetOro,Di as kinto,Li as klaytn,Ai as klaytnBaobab,Oi as koi,Pi as kroma,Ui as kromaSepolia,Vi as krown,Ii as l3x,Ri as l3xTestnet,Gi as ladyChain,Hi as lavita,Zi as lens,Ki as lensTestnet,Xi as lestnet,Yi as lightlinkPegasus,Ji as lightlinkPhoenix,Fi as linea,Wi as lineaGoerli,Qi as lineaSepolia,_i as lineaTestnet,$i as lisk,ao as liskSepolia,so as loadAlphanet,eo as localhost,to as loop,no as lukso,io as luksoTestnet,oo as lumiaMainnet,ro as lumiaTestnet,lo as lumoz,co as lumozTestnet,ho as luxeports,po as lycan,mo as lyra,To as mainnet,uo as mandala,bo as manta,ko as mantaSepoliaTestnet,fo as mantaTestnet,go as mantle,yo as mantleSepoliaTestnet,jo as mantleTestnet,vo as mantraDuKongEVMTestnet,So as mantraEVM,xo as mapProtocol,wo as marooTestnet,Co as marsCredit,No as matchain,zo as matchainTestnet,Mo as mchVerse,Eo as megaeth,qo as megaethTestnet,Bo as mekong,Do as meld,Lo as memecore,Ao as merlin,Oo as merlinErigonTestnet,Po as metachain,Uo as metachainIstanbul,Vo as metadium,Io as metalL2,Ro as meter,Go as meterTestnet,Ho as metis,Zo as metisGoerli,Ko as metisSepolia,Xo as mev,Yo as mevTestnet,Jo as mezo,Fo as mezoTestnet,Wo as mint,Qo as mintSepoliaTestnet,_o as mitosisTestnet,$o as mizuhikiTestnetAwaji,ar as mode,sr as modeTestnet,er as monad,tr as monadTestnet,nr as moonbaseAlpha,ir as moonbeam,or as moonbeamDev,rr as moonriver,lr as morph,cr as morphHolesky,hr as morphSepolia,pr as morphTachyon,dr as morphTachyonTestnet,mr as nahmii,Tr as nautilus,ur as near,br as nearTestnet,kr as neonDevnet,fr as neonMainnet,gr as neoxMainnet,yr as neoxT4,jr as newton,vr as nexi,Sr as nexilix,xr as nibiru,wr as nitrographTestnet,Cr as nomina,Nr as oasisTestnet,zr as oasys,Mr as odysseyTestnet,Er as okc,qr as omax,Br as omni,Dr as omniOmega,Lr as oneWorld,Ar as oortMainnetDev,Or as opBNB,Pr as opBNBTestnet,Ur as openledger,Vr as optimism,Ir as optimismGoerli,Rr as optimismSepolia,Gr as optopia,Hr as optopiaTestnet,Zr as orderly,Kr as orderlySepolia,Xr as otimDevnet,Yr as palm,Jr as palmTestnet,Fr as paseoPassetHub,Wr as peaq,Qr as pgn,_r as pgnTestnet,$r as phoenix,al as planq,sl as plasma,el as plasmaDevnet,tl as plasmaTestnet,nl as playfiAlbireo,il as plinga,ol as plume,rl as plumeDevnet,ll as plumeMainnet,cl as plumeSepolia,hl as plumeTestnet,pl as polterTestnet,dl as polygon,ml as polygonAmoy,Tl as polygonMumbai,ul as polygonZkEvm,bl as polygonZkEvmCardona,kl as polygonZkEvmTestnet,fl as polynomial,gl as polynomialSepolia,yl as potos,jl as potosTestnet,vl as premiumBlockTestnet,Sl as pulsechain,xl as pulsechainV4,wl as pumpfiTestnet,Cl as pyrope,Nl as qMainnet,zl as qTestnet,Ml as ql1,El as quai,ql as quaiTestnet,Bl as radius,Dl as radiusTestnet,Ll as reactiveTestnet,Al as real,Ol as redbellyMainnet,Pl as redbellyTestnet,Ul as reddio,Vl as reddioSepolia,Il as redstone,Rl as rei,Gl as reyaNetwork,Hl as rise,Zl as riseTestnet,Kl as rivalz,Xl as robinhood,Yl as robinhoodTestnet,Jl as rollux,Fl as rolluxTestnet,Wl as ronin,Ql as root,_l as rootPorcini,$l as rootstock,ac as rootstockTestnet,sc as rss3,ec as rss3Sepolia,tc as saakuru,nc as saga,ic as saigon,oc as sanko,rc as sapphire,lc as sapphireTestnet,cc as satoshiVM,hc as satoshiVMTestnet,pc as scroll,dc as scrollSepolia,mc as sei,Tc as seiTestnet,uc as seismicDevnet,bc as sentrix,kc as sentrixTestnet,fc as sepolia,gc as shape,yc as shapeSepolia,jc as shardeum,vc as shardeumSphinx,Sc as shibarium,xc as shibariumTestnet,wc as shiden,Cc as shimmer,Nc as shimmerTestnet,zc as sidraChain,Mc as silentData,Ec as silicon,qc as siliconSepolia,Bc as sixProtocol,Dc as skaleBase,Lc as skaleBaseSepoliaTestnet,Ac as skaleBlockBrawlers,Oc as skaleCalypso,Pc as skaleCalypsoTestnet,Uc as skaleCryptoBlades,Vc as skaleCryptoColosseum,Ic as skaleEuropa,Rc as skaleEuropaTestnet,Gc as skaleExorde,Hc as skaleHumanProtocol,Zc as skaleNebula,Kc as skaleNebulaTestnet,Xc as skaleRazor,Yc as skaleTitan,Jc as skaleTitanTestnet,Fc as sketchpad,Wc as snax,Qc as snaxTestnet,r as solana,l as solanaDevnet,c as solanaTestnet,_c as somnia,$c as somniaTestnet,ah as soneium,sh as soneiumMinato,eh as songbird,th as songbirdTestnet,nh as sonic,ih as sonicBlazeTestnet,oh as sonicTestnet,rh as sophon,lh as sophonTestnet,ch as sova,hh as sovaSepolia,ph as spicy,dh as stable,mh as stableTestnet,Th as statusNetworkSepolia,uh as statusSepolia,bh as step,kh as story,fh as storyAeneid,gh as storyOdyssey,yh as storyTestnet,jh as stratis,vh as subtensorEvm,Sh as superlumio,xh as superposition,wh as superseed,Ch as superseedSepolia,Nh as surgeTestnet,zh as swan,Mh as swanProximaTestnet,Eh as swanSaturnTestnet,qh as swellchain,Bh as swellchainTestnet,Dh as swissdlt,Lh as syscoin,Ah as syscoinTestnet,Oh as tac,Ph as tacSPB,Uh as taiko,Vh as taikoHekla,Ih as taikoHoodi,Rh as taikoJolnir,Gh as taikoKatla,Hh as taikoTestnetSepolia,Zh as taraxa,Kh as taraxaTestnet,Xh as teaSepolia,Yh as telcoinTestnet,Jh as telos,Fh as telosTestnet,Wh as tempo,Qh as tempoDevnet,_h as tempoLocalnet,$h as tempoMainnet,ap as tempoModerato,sp as tempoTestnet,ep as tenet,tp as ternoa,np as thaiChain,ip as that,op as theta,rp as thetaTestnet,lp as thunderCore,cp as thunderTestnet,hp as tiktrixTestnet,pp as tomb,m as ton,T as tonTestnet,dp as treasure,mp as treasureTopaz,Tp as tron,u as tronMainnet,up as tronNile,k as tronNileTestnet,bp as tronShasta,b as tronShastaTestnet,kp as ubiq,fp as ultra,gp as ultraTestnet,yp as ultron,jp as ultronTestnet,vp as unichain,Sp as unichainSepolia,xp as unique,wp as uniqueOpal,Cp as uniqueQuartz,Np as unreal,zp as valygoNft,Mp as valygoSmartchain,Ep as vana,qp as vanaMoksha,Bp as vanar,Dp as vechain,Lp as velas,Ap as viction,Op as victionTestnet,Pp as vision,Up as visionTestnet,Vp as wanchain,Ip as wanchainTestnet,Rp as weaveVMAlphanet,Gp as wemix,Hp as wemixTestnet,Zp as westendAssetHub,Kp as whitechain,Xp as whitechainSepolia,Yp as whitechainTestnet,Jp as wmcTestnet,Fp as worldLand,Wp as worldchain,Qp as worldchainSepolia,_p as x1Testnet,$p as xLayer,ad as xLayerTestnet,sd as xai,ed as xaiTestnet,td as xdc,nd as xdcTestnet,id as xgr,od as xoneMainnet,rd as xoneTestnet,ld as xphereMainnet,cd as xphereTestnet,hd as xpla,pd as xrOne,dd as xrSepolia,md as xrplevm,Td as xrplevmDevnet,ud as xrplevmTestnet,bd as ynxTestnet,kd as yooldoVerse,fd as yooldoVerseTestnet,gd as zenchainTestnet,yd as zeniq,jd as zeroG,vd as zeroGGalileoTestnet,Sd as zeroGMainnet,xd as zeroGTestnet,wd as zeroNetwork,Cd as zetachain,Nd as zetachainAthensTestnet,zd as zhejiang,Md as zilliqa,Ed as zilliqaTestnet,qd as zircuit,Bd as zircuitGarfieldTestnet,Dd as zkFair,Ld as zkFairTestnet,Ad as zkLinkNova,Od as zkLinkNovaSepoliaTestnet,Pd as zkSync,Ud as zkSyncInMemoryNode,Vd as zkSyncLocalNode,Id as zkSyncSepoliaTestnet,Rd as zkXPLA,Gd as zkXPLATestnet,Hd as zksync,Zd as zksyncInMemoryNode,Kd as zksyncLocalCustomHyperchain,Xd as zksyncLocalHyperchain,Yd as zksyncLocalHyperchainL1,Jd as zksyncLocalNode,Fd as zksyncSepoliaTestnet,Wd as zora,Qd as zoraSepolia,_d as zoraTestnet};
1
+ import{A as y}from"./NetworkUtil-9d775636.js";import{a as v,b as S,c as x,d as w,e as C,f as N,g as z,h as M,i as E,j as q,k as B,l as D,m as L,n as A,o as O,p as P,q as U,r as V,s as I,t as R,u as G,v as H,w as Z,x as K,y as X,z as Y,A as J,B as F,C as W,D as Q,E as _,F as $,G as aa,H as sa,I as ea,J as ta,K as na,L as ia,M as oa,N as ra,O as la,P as ca,Q as ha,R as pa,S as da,T as ma,U as Ta,V as ua,W as ba,X as ka,Y as fa,Z as ga,_ as ya,$ as ja,a0 as va,a1 as Sa,a2 as xa,a3 as wa,a4 as Ca,a5 as Na,a6 as za,a7 as Ma,a8 as Ea,a9 as qa,aa as Ba,ab as Da,ac as La,ad as Aa,ae as Oa,af as Pa,ag as Ua,ah as Va,ai as Ia,aj as Ra,ak as Ga,al as Ha,am as Za,an as Ka,ao as Xa,ap as Ya,aq as Ja,ar as Fa,as as Wa,at as Qa,au as _a,av as $a,aw as as,ax as ss,ay as es,az as ts,aA as ns,aB as is,aC as os,aD as rs,aE as ls,aF as cs,aG as hs,aH as ps,aI as ds,aJ as ms,aK as Ts,aL as us,aM as bs,aN as ks,aO as fs,aP as gs,aQ as ys,aR as js,aS as vs,aT as Ss,aU as xs,aV as ws,aW as Cs,aX as Ns,aY as zs,aZ as Ms,a_ as Es,a$ as qs,b0 as Bs,b1 as Ds,b2 as Ls,b3 as As,b4 as Os,b5 as Ps,b6 as Us,b7 as Vs,b8 as Is,b9 as Rs,ba as Gs,bb as Hs,bc as Zs,bd as Ks,be as Xs,bf as Ys,bg as Js,bh as Fs,bi as Ws,bj as Qs,bk as _s,bl as $s,bm as ae,bn as se,bo as ee,bp as te,bq as ne,br as ie,bs as oe,bt as re,bu as le,bv as ce,bw as he,bx as pe,by as de,bz as me,bA as Te,bB as ue,bC as be,bD as ke,bE as fe,bF as ge,bG as ye,bH as je,bI as ve,bJ as Se,bK as xe,bL as we,bM as Ce,bN as Ne,bO as ze,bP as Me,bQ as Ee,bR as qe,bS as Be,bT as De,bU as Le,bV as Ae,bW as Oe,bX as Pe,bY as Ue,bZ as Ve,b_ as Ie,b$ as Re,c0 as Ge,c1 as He,c2 as Ze,c3 as Ke,c4 as Xe,c5 as Ye,c6 as Je,c7 as Fe,c8 as We,c9 as Qe,ca as _e,cb as $e,cc as at,cd as st,ce as et,cf as tt,cg as nt,ch as it,ci as ot,cj as rt,ck as lt,cl as ct,cm as ht,cn as pt,co as dt,cp as mt,cq as Tt,cr as ut,cs as bt,ct as kt,cu as ft,cv as gt,cw as yt,cx as jt,cy as vt,cz as St,cA as xt,cB as wt,cC as Ct,cD as Nt,cE as zt,cF as Mt,cG as Et,cH as qt,cI as Bt,cJ as Dt,cK as Lt,cL as At,cM as Ot,cN as Pt,cO as Ut,cP as Vt,cQ as It,cR as Rt,cS as Gt,cT as Ht,cU as Zt,cV as Kt,cW as Xt,cX as Yt,cY as Jt,cZ as Ft,c_ as Wt,c$ as Qt,d0 as _t,d1 as $t,d2 as an,d3 as sn,d4 as en,d5 as tn,d6 as nn,d7 as on,d8 as rn,d9 as ln,da as cn,db as hn,dc as pn,dd as dn,de as mn,df as Tn,dg as un,dh as bn,di as kn,dj as fn,dk as gn,dl as yn,dm as jn,dn as vn,dp as Sn,dq as xn,dr as wn,ds as Cn,dt as Nn,du as zn,dv as Mn,dw as En,dx as qn,dy as Bn,dz as Dn,dA as Ln,dA as An,dB as On,dC as Pn,dD as Un,dE as Vn,dF as In,dG as Rn,dH as Gn,dI as Hn,dJ as Zn,dK as Kn,dL as Xn,dM as Yn,dN as Jn,dO as Fn,dP as Wn,dQ as Qn,dR as _n,dS as $n,dT as ai,dU as si,dV as ei,dW as ti,dX as ni,dY as ii,dZ as oi,d_ as ri,d$ as li,e0 as ci,e1 as hi,e2 as pi,e3 as di,e4 as mi,e5 as Ti,e6 as ui,e7 as bi,e8 as ki,e9 as fi,ea as gi,eb as yi,ec as ji,ed as vi,ee as Si,ef as xi,eg as wi,eh as Ci,ei as Ni,ej as zi,ek as Mi,el as Ei,em as qi,en as Bi,eo as Di,ep as Li,eq as Ai,er as Oi,es as Pi,et as Ui,eu as Vi,ev as Ii,ew as Ri,ex as Gi,ey as Hi,ez as Zi,eA as Ki,eB as Xi,eC as Yi,eD as Ji,eE as Fi,eF as Wi,eG as Qi,eH as _i,eI as $i,eJ as ao,eK as so,eL as eo,eM as to,eN as no,eO as io,eP as oo,eQ as ro,eR as lo,eS as co,eT as ho,eU as po,eV as mo,eW as To,eX as uo,eY as bo,eZ as ko,e_ as fo,e$ as go,f0 as yo,f1 as jo,f2 as vo,f3 as So,f4 as xo,f5 as wo,f6 as Co,f7 as No,f8 as zo,f9 as Mo,fa as Eo,fb as qo,fc as Bo,fd as Do,fe as Lo,ff as Ao,fg as Oo,fh as Po,fi as Uo,fj as Vo,fk as Io,fl as Ro,fm as Go,fn as Ho,fo as Zo,fp as Ko,fq as Xo,fr as Yo,fs as Jo,ft as Fo,fu as Wo,fv as Qo,fw as _o,fx as $o,fy as ar,fz as sr,fA as er,fB as tr,fC as nr,fD as ir,fE as or,fF as rr,fG as lr,fH as cr,fI as hr,fJ as pr,fK as dr,fL as mr,fM as Tr,fN as ur,fO as br,fP as kr,fQ as fr,fR as gr,fS as yr,fT as jr,fU as vr,fV as Sr,fW as xr,fX as wr,fY as Cr,fZ as Nr,f_ as zr,f$ as Mr,g0 as Er,g1 as qr,g2 as Br,g3 as Dr,g4 as Lr,g5 as Ar,g6 as Or,g7 as Pr,g8 as Ur,g9 as Vr,ga as Ir,gb as Rr,gc as Gr,gd as Hr,ge as Zr,gf as Kr,gg as Xr,gh as Yr,gi as Jr,gj as Fr,gk as Wr,gl as Qr,gm as _r,gn as $r,go as al,gp as sl,gq as el,gr as tl,gs as nl,gt as il,gu as ol,gv as rl,gw as ll,gx as cl,gy as hl,gz as pl,gA as dl,gB as ml,gC as Tl,gD as ul,gE as bl,gF as kl,gG as fl,gH as gl,gI as yl,gJ as jl,gK as vl,gL as Sl,gM as xl,gN as wl,gO as Cl,gP as Nl,gQ as zl,gR as Ml,gS as El,gT as ql,gU as Bl,gV as Dl,gW as Ll,gX as Al,gY as Ol,gZ as Pl,g_ as Ul,g$ as Vl,h0 as Il,h1 as Rl,h2 as Gl,h3 as Hl,h4 as Zl,h5 as Kl,h6 as Xl,h7 as Yl,h8 as Jl,h9 as Fl,ha as Wl,hb as Ql,hc as _l,hd as $l,he as ac,hf as sc,hg as ec,hh as tc,hi as nc,hj as ic,hk as oc,hl as rc,hm as lc,hn as cc,ho as hc,hp as pc,hq as dc,hr as mc,hs as Tc,ht as uc,hu as bc,hv as kc,hw as fc,hx as gc,hy as yc,hz as jc,hA as vc,hB as Sc,hC as xc,hD as wc,hE as Cc,hF as Nc,hG as zc,hH as Mc,hI as Ec,hJ as qc,hK as Bc,hL as Dc,hM as Lc,hN as Ac,hO as Oc,hP as Pc,hQ as Uc,hR as Vc,hS as Ic,hT as Rc,hU as Gc,hV as Hc,hW as Zc,hX as Kc,hY as Xc,hZ as Yc,h_ as Jc,h$ as Fc,i0 as Wc,i1 as Qc,i2 as _c,i3 as $c,i4 as ah,i5 as sh,i6 as eh,i7 as th,i8 as nh,i9 as ih,ia as oh,ib as rh,ic as lh,id as ch,ie as hh,ig as ph,ih as dh,ii as mh,ij as Th,ij as uh,ik as bh,il as kh,im as fh,io as gh,ip as yh,iq as jh,ir as vh,is as Sh,it as xh,iu as wh,iv as Ch,iw as Nh,ix as zh,iy as Mh,iz as Eh,iA as qh,iB as Bh,iC as Dh,iD as Lh,iE as Ah,iF as Oh,iG as Ph,iH as Uh,iI as Vh,iJ as Ih,iK as Rh,iL as Gh,iM as Hh,iN as Zh,iO as Kh,iP as Xh,iQ as Yh,iR as Jh,iS as Fh,iT as Wh,iU as Qh,iV as _h,iT as $h,iW as ap,iW as sp,iX as ep,iY as tp,iZ as np,i_ as ip,i$ as op,j0 as rp,j1 as lp,j2 as cp,j3 as hp,j4 as pp,j5 as dp,j6 as mp,j7 as Tp,j8 as up,j9 as bp,ja as kp,jb as fp,jc as gp,jd as yp,je as jp,jf as vp,jg as Sp,jh as xp,ji as wp,jj as Cp,jk as Np,jl as zp,jm as Mp,jn as Ep,jo as qp,jp as Bp,jq as Dp,jr as Lp,js as Ap,jt as Op,ju as Pp,jv as Up,jw as Vp,jx as Ip,jy as Rp,jz as Gp,jA as Hp,jB as Zp,jC as Kp,jD as Xp,jE as Yp,jF as Jp,jG as Fp,jH as Wp,jI as Qp,jJ as _p,jK as $p,jJ as ad,jL as sd,jM as ed,jN as td,jO as nd,jP as id,jQ as od,jR as rd,jS as ld,jT as cd,jU as hd,jV as pd,jW as dd,jX as md,jY as Td,jZ as ud,j_ as bd,j$ as kd,k0 as fd,k1 as gd,k2 as yd,k3 as jd,k4 as vd,k5 as Sd,k6 as xd,k7 as wd,k8 as Cd,k9 as Nd,ka as zd,kb as Md,kc as Ed,kd as qd,ke as Bd,kf as Dd,kg as Ld,kh as Ad,ki as Od,kj as Pd,kk as Ud,kl as Vd,km as Id,kn as Rd,ko as Gd,kj as Hd,kk as Zd,kp as Kd,kq as Xd,kr as Yd,kl as Jd,km as Fd,ks as Wd,kt as Qd,ku as _d}from"./zoraTestnet-83f44c9a.js";import"./index-1a84fe52.js";import"./verifyHash-1c30e3f1.js";import"./writeContract-8e997358.js";import"./createBatchScheduler-7c9ada66.js";import"./secp256k1-52a3953d.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const r=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"}),l=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"}),c=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"}),h=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"]}}}),p=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}),d=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}),m=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"}),T=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"}),u=a({id:"0x2b6653dc",name:"TRON",network:"tron-mainnet",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org"}},testnet:!1,chainNamespace:"tron",caipNetworkId:"tron:0x2b6653dc"}),b=a({id:"0x94a9059e",name:"TRON Shasta",network:"tron-shasta",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.shasta.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0x94a9059e"}),k=a({id:"0xcd8690dc",name:"TRON Nile",network:"tron-nile",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://nile.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0xcd8690dc"});export{y as AVAILABLE_NAMESPACES,v as abey,S as abstract,x as abstractTestnet,w as acala,C as acria,N as adf,z as adi,M as agungTestnet,E as aioz,q as alephZero,B as alephZeroTestnet,D as alienx,L as alienxHalTestnet,A as alpenTestnet,O as ancient8,P as ancient8Sepolia,U as anvil,V as apeChain,I as apexTestnet,R as apollo,G as arbitrum,H as arbitrumGoerli,Z as arbitrumNova,K as arbitrumSepolia,X as arc,Y as arcTestnet,J as arenaz,F as areonNetwork,W as areonNetworkTestnet,Q as areum,_ as artelaTestnet,$ as arthera,aa as artheraTestnet,sa as assetChain,ea as assetChainTestnet,ta as astar,na as astarZkEVM,ia as astarZkyoto,oa as atletaOlympia,ra as aurora,la as auroraTestnet,ca as auroria,ha as autheoTestnet,pa as avalanche,da as avalancheFuji,ma as b3,Ta as b3Sepolia,ua as bahamut,ba as base,ka as baseGoerli,fa as basePreconf,ga as baseSepolia,ya as baseSepoliaPreconf,ja as basecampTestnet,va as battlechain,Sa as battlechainTestnet,xa as beam,wa as beamTestnet,Ca as bearNetworkChainMainnet,Na as bearNetworkChainTestnet,za as berachain,Ma as berachainBepolia,Ea as berachainTestnet,qa as berachainTestnetbArtio,Ba as bevmMainnet,Da as bifrost,La as birdlayer,Aa as bitTorrent,Oa as bitTorrentTestnet,h as bitcoin,d as bitcoinSignet,p as bitcoinTestnet,Pa as bitgert,Ua as bitkub,Va as bitkubTestnet,Ia as bitlayer,Ra as bitlayerTestnet,Ga as bitrock,Ha as blast,Za as blastSepolia,Ka as bob,Xa as bobSepolia,Ya as boba,Ja as bobaSepolia,Fa as boolBetaMainnet,Wa as botanix,Qa as botanixTestnet,_a as bounceBit,$a as bounceBitTestnet,as as bronos,ss as bronosTestnet,es as bsc,ts as bscGreenfield,ns as bscTestnet,is as bsquared,os as bsquaredTestnet,rs as btr,ls as btrTestnet,cs as bxn,hs as bxnTestnet,ps as cannon,ds as canto,ms as celo,Ts as celoAlfajores,us as celoSepolia,bs as chang,ks as chiliz,fs as chips,gs as citrate,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,Ds as cornTestnet,Ls as cpchain,As as crab,Os as creatorTestnet,Ps as creditCoin3Devnet,Us as creditCoin3Mainnet,Vs as creditCoin3Testnet,Is as cronos,Rs as cronosTestnet,Gs 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 defiOracleMetaMainnet,te as defichainEvm,ne as defichainEvmTestnet,a as defineChain,ie as degen,oe as dfk,re as diode,le as disChain,ce as dodochainTestnet,he as dogechain,pe as domaTestnet,de as donatuz,me as dosChain,Te as dosChainTestnet,ue as dreyerxMainnet,be as dreyerxTestnet,ke as dustboyIoT,fe as dymension,ge as eden,ye as edexa,je as edexaTestnet,ve as edgeless,Se as edgelessTestnet,xe as edgeware,we as edgewareTestnet,Ce as eduChain,Ne as eduChainTestnet,ze as elastos,Me as elastosTestnet,Ee as electroneum,qe as electroneumTestnet,Be as elysiumTestnet,De as energy,Le as eni,Ae as eniTestnet,Oe as enuls,Pe as eon,Ue as eos,Ve as eosTestnet,Ie as eteria,Re as etherlink,Ge as etherlinkShadownetTestnet,He as etherlinkTestnet,Ze as ethernity,Ke as etp,Xe as evmos,Ye as evmosTestnet,Je as excelonMainnet,Fe as expanse,We as exsat,Qe as exsatTestnet,_e as fantom,$e as fantomSonicTestnet,at as fantomTestnet,st as fibo,et as filecoin,tt as filecoinCalibration,nt as filecoinHyperspace,it as fireChain,ot as flame,rt as flare,lt as flareTestnet,ct as flowMainnet,ht as flowPreviewnet,pt as flowTestnet,dt as fluence,mt as fluenceStage,Tt as fluenceTestnet,ut as fluent,bt as fluentDevnet,kt as fluentTestnet,ft as form,gt as formTestnet,yt as forma,jt as formicarium,vt as forta,St as foundry,xt as fraxtal,wt as fraxtalTestnet,Ct as funkiMainnet,Nt as funkiSepolia,zt as fuse,Mt as fuseSparknet,Et as fusion,qt as fusionTestnet,Bt as garnet,Dt as gatechain,Lt as geist,At as genesys,Ot as gensyn,Pt as giwaSepolia,Ut as giwaSepoliaPreconf,Vt as glideL1Protocol,It as glideL2Protocol,Rt as gnosis,Gt as gnosisChiado,Ht as goChain,Zt as goat,Kt as gobi,Xt as godwoken,Yt as goerli,Jt as graphite,Ft as graphiteTestnet,Wt as grav,Qt as gravity,_t as gunz,$t as guruNetwork,an as guruTestnet,sn as ham,en as happychainTestnet,tn as haqqMainnet,nn as haqqTestedge2,on as hardhat,rn as harmonyOne,ln as hashkey,cn as hashkeyTestnet,hn as hausTestnet,pn as haustTestnet,dn as hedera,mn as hederaPreviewnet,Tn as hederaTestnet,un as hela,bn as heliosTestnet,kn as hemi,fn as hemiSepolia,gn as henesys,yn as holesky,jn as hoodi,vn as horizenTestnet,Sn as hpb,xn as hpp,wn as hppSepolia,Cn as huddle01Mainnet,Nn as huddle01Testnet,zn as humanity,Mn as humanityTestnet,En as humanode,qn as humanodeTestnet5,Bn as hychain,Dn as hychainTestnet,Ln as hyperEvm,An as hyperliquid,On as hyperliquidEvmTestnet,Pn as iSunCoin,Un as icbNetwork,Vn as idchain,In as igra,Rn as immutableZkEvm,Gn as immutableZkEvmTestnet,Hn as inEVM,Zn as initVerse,Kn as initVerseGenesis,Xn as injective,Yn as injectiveTestnet,Jn as ink,Fn as inkSepolia,Wn as iota,Qn as iotaTestnet,_n as iotex,$n as iotexTestnet,ai as jasmyChain,si as jasmyChainTestnet,ei as jbc,ti as jbcTestnet,ni as jocMainnet,ii as jocTestnet,oi as jovay,ri as jovaySepolia,li as juneo,ci as juneoBCH1Chain,hi as juneoDAI1Chain,pi as juneoDOGE1Chain,di as juneoEUR1Chain,mi as juneoGLD1Chain,Ti as juneoLINK1Chain,ui as juneoLTC1Chain,bi as juneoSGD1Chain,ki as juneoSocotraTestnet,fi as juneoUSD1Chain,gi as juneoUSDT1Chain,yi as juneomBTC1Chain,ji as kaia,vi as kairos,Si as kakarotSepolia,xi as kakarotStarknetSepolia,wi as kardiaChain,Ci as karura,Ni as katana,zi as kava,Mi as kavaTestnet,Ei as kcc,qi as kii,Bi as kiiTestnetOro,Di as kinto,Li as klaytn,Ai as klaytnBaobab,Oi as koi,Pi as kroma,Ui as kromaSepolia,Vi as krown,Ii as l3x,Ri as l3xTestnet,Gi as ladyChain,Hi as lavita,Zi as lens,Ki as lensTestnet,Xi as lestnet,Yi as lightlinkPegasus,Ji as lightlinkPhoenix,Fi as linea,Wi as lineaGoerli,Qi as lineaSepolia,_i as lineaTestnet,$i as lisk,ao as liskSepolia,so as loadAlphanet,eo as localhost,to as loop,no as lukso,io as luksoTestnet,oo as lumiaMainnet,ro as lumiaTestnet,lo as lumoz,co as lumozTestnet,ho as luxeports,po as lycan,mo as lyra,To as mainnet,uo as mandala,bo as manta,ko as mantaSepoliaTestnet,fo as mantaTestnet,go as mantle,yo as mantleSepoliaTestnet,jo as mantleTestnet,vo as mantraDuKongEVMTestnet,So as mantraEVM,xo as mapProtocol,wo as marooTestnet,Co as marsCredit,No as matchain,zo as matchainTestnet,Mo as mchVerse,Eo as megaeth,qo as megaethTestnet,Bo as mekong,Do as meld,Lo as memecore,Ao as merlin,Oo as merlinErigonTestnet,Po as metachain,Uo as metachainIstanbul,Vo as metadium,Io as metalL2,Ro as meter,Go as meterTestnet,Ho as metis,Zo as metisGoerli,Ko as metisSepolia,Xo as mev,Yo as mevTestnet,Jo as mezo,Fo as mezoTestnet,Wo as mint,Qo as mintSepoliaTestnet,_o as mitosisTestnet,$o as mizuhikiTestnetAwaji,ar as mode,sr as modeTestnet,er as monad,tr as monadTestnet,nr as moonbaseAlpha,ir as moonbeam,or as moonbeamDev,rr as moonriver,lr as morph,cr as morphHolesky,hr as morphSepolia,pr as morphTachyon,dr as morphTachyonTestnet,mr as nahmii,Tr as nautilus,ur as near,br as nearTestnet,kr as neonDevnet,fr as neonMainnet,gr as neoxMainnet,yr as neoxT4,jr as newton,vr as nexi,Sr as nexilix,xr as nibiru,wr as nitrographTestnet,Cr as nomina,Nr as oasisTestnet,zr as oasys,Mr as odysseyTestnet,Er as okc,qr as omax,Br as omni,Dr as omniOmega,Lr as oneWorld,Ar as oortMainnetDev,Or as opBNB,Pr as opBNBTestnet,Ur as openledger,Vr as optimism,Ir as optimismGoerli,Rr as optimismSepolia,Gr as optopia,Hr as optopiaTestnet,Zr as orderly,Kr as orderlySepolia,Xr as otimDevnet,Yr as palm,Jr as palmTestnet,Fr as paseoPassetHub,Wr as peaq,Qr as pgn,_r as pgnTestnet,$r as phoenix,al as planq,sl as plasma,el as plasmaDevnet,tl as plasmaTestnet,nl as playfiAlbireo,il as plinga,ol as plume,rl as plumeDevnet,ll as plumeMainnet,cl as plumeSepolia,hl as plumeTestnet,pl as polterTestnet,dl as polygon,ml as polygonAmoy,Tl as polygonMumbai,ul as polygonZkEvm,bl as polygonZkEvmCardona,kl as polygonZkEvmTestnet,fl as polynomial,gl as polynomialSepolia,yl as potos,jl as potosTestnet,vl as premiumBlockTestnet,Sl as pulsechain,xl as pulsechainV4,wl as pumpfiTestnet,Cl as pyrope,Nl as qMainnet,zl as qTestnet,Ml as ql1,El as quai,ql as quaiTestnet,Bl as radius,Dl as radiusTestnet,Ll as reactiveTestnet,Al as real,Ol as redbellyMainnet,Pl as redbellyTestnet,Ul as reddio,Vl as reddioSepolia,Il as redstone,Rl as rei,Gl as reyaNetwork,Hl as rise,Zl as riseTestnet,Kl as rivalz,Xl as robinhood,Yl as robinhoodTestnet,Jl as rollux,Fl as rolluxTestnet,Wl as ronin,Ql as root,_l as rootPorcini,$l as rootstock,ac as rootstockTestnet,sc as rss3,ec as rss3Sepolia,tc as saakuru,nc as saga,ic as saigon,oc as sanko,rc as sapphire,lc as sapphireTestnet,cc as satoshiVM,hc as satoshiVMTestnet,pc as scroll,dc as scrollSepolia,mc as sei,Tc as seiTestnet,uc as seismicDevnet,bc as sentrix,kc as sentrixTestnet,fc as sepolia,gc as shape,yc as shapeSepolia,jc as shardeum,vc as shardeumSphinx,Sc as shibarium,xc as shibariumTestnet,wc as shiden,Cc as shimmer,Nc as shimmerTestnet,zc as sidraChain,Mc as silentData,Ec as silicon,qc as siliconSepolia,Bc as sixProtocol,Dc as skaleBase,Lc as skaleBaseSepoliaTestnet,Ac as skaleBlockBrawlers,Oc as skaleCalypso,Pc as skaleCalypsoTestnet,Uc as skaleCryptoBlades,Vc as skaleCryptoColosseum,Ic as skaleEuropa,Rc as skaleEuropaTestnet,Gc as skaleExorde,Hc as skaleHumanProtocol,Zc as skaleNebula,Kc as skaleNebulaTestnet,Xc as skaleRazor,Yc as skaleTitan,Jc as skaleTitanTestnet,Fc as sketchpad,Wc as snax,Qc as snaxTestnet,r as solana,l as solanaDevnet,c as solanaTestnet,_c as somnia,$c as somniaTestnet,ah as soneium,sh as soneiumMinato,eh as songbird,th as songbirdTestnet,nh as sonic,ih as sonicBlazeTestnet,oh as sonicTestnet,rh as sophon,lh as sophonTestnet,ch as sova,hh as sovaSepolia,ph as spicy,dh as stable,mh as stableTestnet,Th as statusNetworkSepolia,uh as statusSepolia,bh as step,kh as story,fh as storyAeneid,gh as storyOdyssey,yh as storyTestnet,jh as stratis,vh as subtensorEvm,Sh as superlumio,xh as superposition,wh as superseed,Ch as superseedSepolia,Nh as surgeTestnet,zh as swan,Mh as swanProximaTestnet,Eh as swanSaturnTestnet,qh as swellchain,Bh as swellchainTestnet,Dh as swissdlt,Lh as syscoin,Ah as syscoinTestnet,Oh as tac,Ph as tacSPB,Uh as taiko,Vh as taikoHekla,Ih as taikoHoodi,Rh as taikoJolnir,Gh as taikoKatla,Hh as taikoTestnetSepolia,Zh as taraxa,Kh as taraxaTestnet,Xh as teaSepolia,Yh as telcoinTestnet,Jh as telos,Fh as telosTestnet,Wh as tempo,Qh as tempoDevnet,_h as tempoLocalnet,$h as tempoMainnet,ap as tempoModerato,sp as tempoTestnet,ep as tenet,tp as ternoa,np as thaiChain,ip as that,op as theta,rp as thetaTestnet,lp as thunderCore,cp as thunderTestnet,hp as tiktrixTestnet,pp as tomb,m as ton,T as tonTestnet,dp as treasure,mp as treasureTopaz,Tp as tron,u as tronMainnet,up as tronNile,k as tronNileTestnet,bp as tronShasta,b as tronShastaTestnet,kp as ubiq,fp as ultra,gp as ultraTestnet,yp as ultron,jp as ultronTestnet,vp as unichain,Sp as unichainSepolia,xp as unique,wp as uniqueOpal,Cp as uniqueQuartz,Np as unreal,zp as valygoNft,Mp as valygoSmartchain,Ep as vana,qp as vanaMoksha,Bp as vanar,Dp as vechain,Lp as velas,Ap as viction,Op as victionTestnet,Pp as vision,Up as visionTestnet,Vp as wanchain,Ip as wanchainTestnet,Rp as weaveVMAlphanet,Gp as wemix,Hp as wemixTestnet,Zp as westendAssetHub,Kp as whitechain,Xp as whitechainSepolia,Yp as whitechainTestnet,Jp as wmcTestnet,Fp as worldLand,Wp as worldchain,Qp as worldchainSepolia,_p as x1Testnet,$p as xLayer,ad as xLayerTestnet,sd as xai,ed as xaiTestnet,td as xdc,nd as xdcTestnet,id as xgr,od as xoneMainnet,rd as xoneTestnet,ld as xphereMainnet,cd as xphereTestnet,hd as xpla,pd as xrOne,dd as xrSepolia,md as xrplevm,Td as xrplevmDevnet,ud as xrplevmTestnet,bd as ynxTestnet,kd as yooldoVerse,fd as yooldoVerseTestnet,gd as zenchainTestnet,yd as zeniq,jd as zeroG,vd as zeroGGalileoTestnet,Sd as zeroGMainnet,xd as zeroGTestnet,wd as zeroNetwork,Cd as zetachain,Nd as zetachainAthensTestnet,zd as zhejiang,Md as zilliqa,Ed as zilliqaTestnet,qd as zircuit,Bd as zircuitGarfieldTestnet,Dd as zkFair,Ld as zkFairTestnet,Ad as zkLinkNova,Od as zkLinkNovaSepoliaTestnet,Pd as zkSync,Ud as zkSyncInMemoryNode,Vd as zkSyncLocalNode,Id as zkSyncSepoliaTestnet,Rd as zkXPLA,Gd as zkXPLATestnet,Hd as zksync,Zd as zksyncInMemoryNode,Kd as zksyncLocalCustomHyperchain,Xd as zksyncLocalHyperchain,Yd as zksyncLocalHyperchainL1,Jd as zksyncLocalNode,Fd as zksyncSepoliaTestnet,Wd as zora,Qd as zoraSepolia,_d as zoraTestnet};
@@ -1,4 +1,4 @@
1
- import{i as w,b as u}from"./lit-element-0711c853.js";import{o as m,r as c,n as d}from"./class-map-d7835e88.js";import{d as O,O as l}from"./index-23dd6251.js";import{c as g}from"./index-5ece9033.js";import"./index-401eba13.js";import{O as _}from"./index-06d7a58c.js";import{F as C,O as j,M as $,C as I,n as E,R as S,c as B,E as z,i as V,W as M,h as K,T as F,S as W}from"./W3MFrameProviderSingleton-316899f0.js";import"./index-e9ab8876.js";import"./index-d2f37bee.js";import"./index-fe892b11.js";import"./index-30a8f53e.js";import"./index-d44b19e2.js";import"./index-6d8da0b7.js";import"./index-8aeaab91.js";import"./index-a151f6d7.js";import"./index-10c73e9d.js";import"./index-b3889ac8.js";import"./index-accd8060.js";import"./index-2cab452e.js";import"./index-877ffe4a.js";import"./index.es-4520fb10.js";import"./NetworkUtil-cfdab321.js";import"./createBatchScheduler-7c9ada66.js";import"./ref-8c2954ee.js";import"./async-directive-ff05e1a6.js";import"./http-a4cf4808.js";const N=O`
1
+ import{i as w,b as u}from"./lit-element-0711c853.js";import{o as m,r as c,n as d}from"./class-map-d7835e88.js";import{d as O,O as l}from"./index-e4a08cd9.js";import{c as g}from"./index-dd7935fc.js";import"./index-85bdd658.js";import{O as _}from"./index-1735c2dc.js";import{F as C,O as j,M as $,C as I,n as E,R as S,c as B,E as z,i as V,W as M,h as K,T as F,S as W}from"./W3MFrameProviderSingleton-967a5251.js";import"./index-c9395bda.js";import"./index-979a21b1.js";import"./index-0388e212.js";import"./index-319df612.js";import"./index-1ebd6ac9.js";import"./index-d410c519.js";import"./index-164d622a.js";import"./index-27604e48.js";import"./index-1a84fe52.js";import"./index-5ad2a852.js";import"./index-accd8060.js";import"./index-83245c25.js";import"./index-08f74686.js";import"./index.es-d75c71a0.js";import"./NetworkUtil-9d775636.js";import"./createBatchScheduler-7c9ada66.js";import"./ref-8c2954ee.js";import"./async-directive-ff05e1a6.js";import"./http-a4cf4808.js";const N=O`
2
2
  :host > wui-grid {
3
3
  max-height: 360px;
4
4
  overflow: auto;
@@ -1 +1 @@
1
- import{g as y}from"./to-serializable-transaction-9e540f8c.js";import{r as c,s as p,l as w}from"./prepare-contract-call-4be4cc68.js";import"./index-10c73e9d.js";import"./transaction-ea614a5a.js";import"./utils-dddc86ba.js";async function u({account:e,serializableTransaction:a,transaction:n,gasless:s}){const t=y({address:s.relayerForwarderAddress,chain:n.chain,client:n.client}),r=await c({contract:t,method:"function getNonce(address) view returns (uint256)",params:[e.address]}),[o,m]=await(async()=>{if(!a.to)throw new Error("OpenZeppelin transactions must have a 'to' address");if(!a.gas)throw new Error("OpenZeppelin transactions must have a 'gas' value");if(!a.data)throw new Error("OpenZeppelin transactions must have a 'data' value");if(s.experimentalChainlessSupport){const i={chainid:BigInt(n.chain.id),data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{name:"GSNv2 Forwarder",verifyingContract:t.address,version:"0.0.1"},message:i,primaryType:"ForwardRequest",types:{ForwardRequest:h}}),i]}const d={data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{chainId:n.chain.id,name:s.domainName??"GSNv2 Forwarder",verifyingContract:t.address,version:s.domainVersion??"0.0.1"},message:d,primaryType:"ForwardRequest",types:{ForwardRequest:g}}),d]})();return{message:m,messageType:"forward",signature:o}}const g=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"}],h=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"},{name:"chainid",type:"uint256"}];async function q(e){const{message:a,messageType:n,signature:s}=await u(e),t=await fetch(e.gasless.relayerUrl,{body:p({forwarderAddress:e.gasless.relayerForwarderAddress,request:a,signature:s,type:n}),method:"POST"});if(!t.ok)throw new Error(`Failed to send transaction: ${await t.text()}`);const r=await t.json();if(!r.result)throw new Error(`Relay transaction failed: ${r.message}`);const o=JSON.parse(r.result).txHash;if(w(o))return{chain:e.transaction.chain,client:e.transaction.client,transactionHash:o};throw new Error(`Failed to send transaction: ${p(r)}`)}export{u as prepareOpenZeppelinTransaction,q as relayOpenZeppelinTransaction};
1
+ import{g as y}from"./to-serializable-transaction-b9665f26.js";import{r as c,s as p,l as w}from"./prepare-contract-call-8aa69ada.js";import"./index-1a84fe52.js";import"./transaction-c89d76c9.js";import"./utils-b0786619.js";async function u({account:e,serializableTransaction:a,transaction:n,gasless:s}){const t=y({address:s.relayerForwarderAddress,chain:n.chain,client:n.client}),r=await c({contract:t,method:"function getNonce(address) view returns (uint256)",params:[e.address]}),[o,m]=await(async()=>{if(!a.to)throw new Error("OpenZeppelin transactions must have a 'to' address");if(!a.gas)throw new Error("OpenZeppelin transactions must have a 'gas' value");if(!a.data)throw new Error("OpenZeppelin transactions must have a 'data' value");if(s.experimentalChainlessSupport){const i={chainid:BigInt(n.chain.id),data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{name:"GSNv2 Forwarder",verifyingContract:t.address,version:"0.0.1"},message:i,primaryType:"ForwardRequest",types:{ForwardRequest:h}}),i]}const d={data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{chainId:n.chain.id,name:s.domainName??"GSNv2 Forwarder",verifyingContract:t.address,version:s.domainVersion??"0.0.1"},message:d,primaryType:"ForwardRequest",types:{ForwardRequest:g}}),d]})();return{message:m,messageType:"forward",signature:o}}const g=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"}],h=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"},{name:"chainid",type:"uint256"}];async function q(e){const{message:a,messageType:n,signature:s}=await u(e),t=await fetch(e.gasless.relayerUrl,{body:p({forwarderAddress:e.gasless.relayerForwarderAddress,request:a,signature:s,type:n}),method:"POST"});if(!t.ok)throw new Error(`Failed to send transaction: ${await t.text()}`);const r=await t.json();if(!r.result)throw new Error(`Relay transaction failed: ${r.message}`);const o=JSON.parse(r.result).txHash;if(w(o))return{chain:e.transaction.chain,client:e.transaction.client,transactionHash:o};throw new Error(`Failed to send transaction: ${p(r)}`)}export{u as prepareOpenZeppelinTransaction,q as relayOpenZeppelinTransaction};
@@ -1 +1 @@
1
- import{d as o,e as c,b as a,r as d}from"./prepare-contract-call-4be4cc68.js";import"./utils-dddc86ba.js";import"./index-10c73e9d.js";const t="0x6352211e",n=[{name:"tokenId",type:"uint256"}],r=[{type:"address"}];function m(e){return o({availableSelectors:e,method:[t,n,r]})}function s(e){return c(n,[e.tokenId])}function O(e){return t+s(e).slice(2)}function p(e){return a(r,e)[0]}async function w(e){return d({contract:e.contract,method:[t,n,r],params:[e.tokenId]})}export{t as FN_SELECTOR,p as decodeOwnerOfResult,O as encodeOwnerOf,s as encodeOwnerOfParams,m as isOwnerOfSupported,w as ownerOf};
1
+ import{d as o,e as c,b as a,r as d}from"./prepare-contract-call-8aa69ada.js";import"./utils-b0786619.js";import"./index-1a84fe52.js";const t="0x6352211e",n=[{name:"tokenId",type:"uint256"}],r=[{type:"address"}];function m(e){return o({availableSelectors:e,method:[t,n,r]})}function s(e){return c(n,[e.tokenId])}function O(e){return t+s(e).slice(2)}function p(e){return a(r,e)[0]}async function w(e){return d({contract:e.contract,method:[t,n,r],params:[e.tokenId]})}export{t as FN_SELECTOR,p as decodeOwnerOfResult,O as encodeOwnerOf,s as encodeOwnerOfParams,m as isOwnerOfSupported,w as ownerOf};
@@ -0,0 +1 @@
1
+ import{_ as o}from"./index-1a84fe52.js";import{a as I}from"./utils-b0786619.js";import{g as u}from"./to-serializable-transaction-b9665f26.js";import{i as h}from"./prepare-contract-call-8aa69ada.js";import"./transaction-c89d76c9.js";function C(t,e){switch(e.type){case"ERC721":return{chainId:e.chainId,id:e.tokenId,metadata:t,owner:(e==null?void 0:e.owner)??null,tokenAddress:e.tokenAddress,tokenURI:e.tokenUri,type:e.type};case"ERC1155":return{chainId:e.chainId,id:e.tokenId,metadata:t,owner:(e==null?void 0:e.owner)??null,supply:e.supply,tokenAddress:e.tokenAddress,tokenURI:e.tokenUri,type:e.type};default:throw new Error("Invalid NFT type")}}async function y(t){let e=t.uri;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[f="",l="",r=""]=e.split("/"),[a,c]=f.split(":"),[i,n]=l.split(":");if(!a||a.toLowerCase()!=="eip155")throw new Error(`Invalid EIP namespace, expected EIP155, got: "${a}"`);if(!c)throw new Error("Chain ID not found");if(!n||!h(n))throw new Error("Contract address not found");if(!r)throw new Error("Token ID not found");const m=I(Number(c)),s=u({address:n,chain:m,client:t.client});switch(i){case"erc721":{const{getNFT:d}=await o(()=>import("./getNFT-e012001d.js"),["assets/getNFT-e012001d.js","assets/index-1a84fe52.js","assets/index-19c63dfb.css","assets/fetchTokenMetadata-9aa0579f.js","assets/uint8-array-63adf023.js","assets/prepare-contract-call-8aa69ada.js","assets/utils-b0786619.js","assets/thirdweb-88164bcf.js","assets/signing-3a53acbe.js","assets/to-serializable-transaction-b9665f26.js","assets/transaction-c89d76c9.js","assets/get-bytecode-3e525016.js","assets/wait-for-tx-receipt-997fc5db.js","assets/transactionReceipt-e9fe9529.js","assets/sleep-9eff569f.js","assets/eth_estimateGas-4bda2940.js","assets/eth_getStorageAt-fece51db.js","assets/eth_getTransactionCount-b3bc696d.js","assets/eth_sendRawTransaction-5ae15b91.js","assets/decimals-ae1efeb6.js","assets/decimals-7a8f2808.js","assets/zora-sepolia-da0294c7.js","assets/send-batch-transaction-37dfd3aa.js","assets/send-transaction-be048c3f.js"]);return(await d({contract:s,tokenId:BigInt(r)})).metadata.image??null}case"erc1155":{const{getNFT:d}=await o(()=>import("./getNFT-e357df62.js"),["assets/getNFT-e357df62.js","assets/thirdweb-88164bcf.js","assets/utils-b0786619.js","assets/index-1a84fe52.js","assets/index-19c63dfb.css","assets/prepare-contract-call-8aa69ada.js","assets/signing-3a53acbe.js","assets/to-serializable-transaction-b9665f26.js","assets/transaction-c89d76c9.js","assets/get-bytecode-3e525016.js","assets/wait-for-tx-receipt-997fc5db.js","assets/transactionReceipt-e9fe9529.js","assets/sleep-9eff569f.js","assets/eth_estimateGas-4bda2940.js","assets/eth_getStorageAt-fece51db.js","assets/eth_getTransactionCount-b3bc696d.js","assets/eth_sendRawTransaction-5ae15b91.js","assets/decimals-ae1efeb6.js","assets/decimals-7a8f2808.js","assets/zora-sepolia-da0294c7.js","assets/send-batch-transaction-37dfd3aa.js","assets/send-transaction-be048c3f.js","assets/fetchTokenMetadata-9aa0579f.js","assets/uint8-array-63adf023.js","assets/totalSupply-1da49819.js"]);return(await d({contract:s,tokenId:BigInt(r)})).metadata.image??null}default:throw new Error(`Invalid ERC namespace, expected ERC721 or ERC1155, got: "${i}"`)}}export{C as parseNFT,y as parseNftUri};