@wormhole-foundation/wormhole-connect 1.0.0-beta.6-development → 1.0.0-beta.8-development

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 (133) hide show
  1. package/README.md +30 -9
  2. package/dist/assets/{ccip-HS3Cs5py.js → ccip-BorgJkc_.js} +1 -1
  3. package/dist/assets/{evm-DyY55Fca.js → evm-DqZ4cf4F.js} +24 -24
  4. package/dist/assets/{index-CeF-n8om.js → index-D2KpdQOJ.js} +1 -1
  5. package/dist/assets/{index-CqxhuXyT.js → index-Sz5xP7AP.js} +1 -1
  6. package/dist/assets/{index-CwoiJQ9y.js → index-atAB1u0t.js} +2 -2
  7. package/dist/assets/{index.es-BHZwRRXn.js → index.es-dXXum9j3.js} +2 -2
  8. package/dist/main.js +64 -65
  9. package/dist/src/config/ui.d.ts +0 -24
  10. package/dist/src/config/ui.d.ts.map +1 -1
  11. package/dist/src/hosted.d.ts +10 -0
  12. package/dist/src/hosted.d.ts.map +1 -0
  13. package/dist/src/index.d.ts +4 -2
  14. package/dist/src/index.d.ts.map +1 -1
  15. package/dist/src/main.d.ts.map +1 -1
  16. package/dist/src/utils/index.d.ts +1 -0
  17. package/dist/src/utils/index.d.ts.map +1 -1
  18. package/dist/src/utils/wallet/evm.d.ts +2 -1
  19. package/dist/src/utils/wallet/evm.d.ts.map +1 -1
  20. package/dist/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
  21. package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  22. package/dist/src/views/v2/Bridge/WalletConnector/index.d.ts.map +1 -1
  23. package/lib/{algorand-CIOlvhGh.mjs → algorand-BDmGwgo0.mjs} +3 -3
  24. package/lib/{algorand-B3jpS4mY.js → algorand-BRrCXLHv.js} +1 -1
  25. package/lib/{aptos-CKPSmGSC.mjs → aptos-B4tHgth_.mjs} +3 -3
  26. package/lib/{aptos-CrnZjgsh.mjs → aptos-BDOVJaPS.mjs} +1 -1
  27. package/lib/{aptos-B7P6JL1S.js → aptos-CocAk52h.js} +1 -1
  28. package/lib/{aptos-Cx4TaXYo.js → aptos-Olu7hLbM.js} +2 -2
  29. package/lib/{ccip-B-q-r_A1.js → ccip-DW70XeRB.js} +1 -1
  30. package/lib/{ccip-pU66-Jja.mjs → ccip-csPmnvrR.mjs} +1 -1
  31. package/lib/{cosmos-BDlV5WWM.js → cosmos-J7vmObWX.js} +1 -1
  32. package/lib/{cosmos-mLLSK_Nm.mjs → cosmos-Q00_Achm.mjs} +6 -6
  33. package/lib/{cosmwasm-CViLVch6.js → cosmwasm-FcaxCHUR.js} +2 -2
  34. package/lib/{cosmwasm-CGolR9gL.mjs → cosmwasm-Ukd2lv6A.mjs} +7 -7
  35. package/lib/{events-Dzr-GrPB.mjs → events-Bp5VnuCn.mjs} +1 -1
  36. package/lib/{events-BSNN9qkd.js → events-wlbN7cam.js} +1 -1
  37. package/lib/{evm-DXAiSRNs.mjs → evm-CAbq9PkI.mjs} +7 -7
  38. package/lib/{evm-DMGYpAGT.js → evm-DLuufB6t.js} +19 -19
  39. package/lib/{evm-BILIyDaj.mjs → evm-DPxnFflA.mjs} +1440 -1431
  40. package/lib/{evm-ronpaGiZ.js → evm-eTUzSuGR.js} +1 -1
  41. package/lib/{index-Byr7P1JY.js → index-0Pz-U2V0.js} +1 -1
  42. package/lib/{index-YNti7nIJ.mjs → index-1LKv8b31.mjs} +3 -3
  43. package/lib/{index-Dpzov1Io.js → index-2fV7-V0g.js} +1 -1
  44. package/lib/{index-C1jcO7wH.mjs → index-872kdch5.mjs} +1 -1
  45. package/lib/{index-bdAItiPr.js → index-9lDHF16W.js} +1 -1
  46. package/lib/{index-Da7Cxyq1.mjs → index-B1X1DEbd.mjs} +2 -2
  47. package/lib/{index-Be-kzEHF.mjs → index-B6FCEsUJ.mjs} +4 -4
  48. package/lib/{index-DFZ0Ndqh.js → index-B7Wuhlae.js} +1 -1
  49. package/lib/{index-C2WFu8In.mjs → index-BHg1HEL3.mjs} +2 -2
  50. package/lib/{index-C2DCdxRC.mjs → index-BNQfXzmT.mjs} +1153 -1119
  51. package/lib/{index-BWe8c3sQ.mjs → index-BVYe6gGw.mjs} +2 -2
  52. package/lib/{index-e3UZ_0nd.mjs → index-BW6AEYrS.mjs} +3 -3
  53. package/lib/{index-CSKSjjgt.mjs → index-BapiN3L3.mjs} +2 -2
  54. package/lib/{index-CZj2FglQ.mjs → index-Bd9jd8Va.mjs} +2 -2
  55. package/lib/{index-DFa89Itc.js → index-BhhG9UHE.js} +1 -1
  56. package/lib/{index-BvbKk4T6.mjs → index-Bk-7wCMM.mjs} +1 -1
  57. package/lib/{index-DEAhtMw_.js → index-Bob7GenS.js} +1 -1
  58. package/lib/{index-AslWQnUt.js → index-C9KuiVwT.js} +1 -1
  59. package/lib/{index-DXCl1vFR.mjs → index-CCOplDw1.mjs} +3 -3
  60. package/lib/{index-D6u6ZlbM.mjs → index-CGgCe-TN.mjs} +4 -4
  61. package/lib/{index-DiF1ira9.mjs → index-CQvIjyqH.mjs} +1 -1
  62. package/lib/{index-CMWEjIGj.mjs → index-CUqF5ByT.mjs} +1 -1
  63. package/lib/{index-BVxqSkXh.js → index-CZPVj8Bj.js} +1 -1
  64. package/lib/{index-BAErxF8G.mjs → index-C_Z08_5j.mjs} +2 -2
  65. package/lib/{index-wXdILngm.js → index-CctKy8T0.js} +1 -1
  66. package/lib/{index-g3eZpZJ1.js → index-CqdXRW8h.js} +1 -1
  67. package/lib/{index-Co1vTibS.mjs → index-CskDAU3i.mjs} +2 -2
  68. package/lib/{index-BO5ATVUH.js → index-Ct15piQO.js} +1 -1
  69. package/lib/{index-ZD733qpV.js → index-Cxt_cpUB.js} +1 -1
  70. package/lib/{index-oMwdMcy1.mjs → index-DB-FvxOY.mjs} +1 -1
  71. package/lib/{index-58isS1fK.js → index-DHP-njvh.js} +1 -1
  72. package/lib/{index-BTS53_Aj.mjs → index-DNAg_uGu.mjs} +2 -2
  73. package/lib/{index-DWKvilYv.mjs → index-DRHfM-dJ.mjs} +4 -4
  74. package/lib/{index-iXByZuY7.js → index-DYietgbP.js} +1 -1
  75. package/lib/{index-BN2lROi0.js → index-DbmyBX4Q.js} +1 -1
  76. package/lib/{index-BRdg8SSa.js → index-De3vN78v.js} +1 -1
  77. package/lib/{index-Cd8xotiJ.js → index-DjM7nJNJ.js} +1 -1
  78. package/lib/{index-BHGS0dw3.js → index-DpZGf7ao.js} +49 -49
  79. package/lib/{index-DbI4zYHg.js → index-DtM_PqGv.js} +1 -1
  80. package/lib/{index-CruftbOC.mjs → index-DwR3_jmz.mjs} +7 -7
  81. package/lib/{index-BJQjdDt-.js → index-KhbqJyoM.js} +1 -1
  82. package/lib/{index-CAcB_0Hd.js → index-NBy_JDT2.js} +1 -1
  83. package/lib/{index-BdINnTi7.mjs → index-PUKgAuvv.mjs} +2 -2
  84. package/lib/{index-mUmOCSLG.mjs → index-WWXvZLn0.mjs} +1 -1
  85. package/lib/{index-Dmko8wT8.js → index-XTtbdN9X.js} +1 -1
  86. package/lib/{index-CHAdrAO4.js → index-YgTGeKLj.js} +1 -1
  87. package/lib/{index-BKDeZ8n5.js → index-mom8Zmou.js} +1 -1
  88. package/lib/{index-CAHXQCTs.mjs → index-tGVSGULu.mjs} +2 -2
  89. package/lib/{index.es-B6NnL7-2.js → index.es-B9gxwZcm.js} +2 -2
  90. package/lib/{index.es-DNGjs0VX.mjs → index.es-Dt88ZW7f.mjs} +5 -5
  91. package/lib/index.js +1 -1
  92. package/lib/index.mjs +17 -15
  93. package/lib/{libsodium-wrappers-B21TAmoM.js → libsodium-wrappers-BuwfTfTY.js} +1 -1
  94. package/lib/{libsodium-wrappers-BKcruoKB.mjs → libsodium-wrappers-DLU5hUMu.mjs} +1 -1
  95. package/lib/{pako.esm-C_3vjkSx.mjs → pako.esm-CZW6iyfv.mjs} +3 -3
  96. package/lib/{pako.esm-x_RIwOhS.js → pako.esm-DUxkbXW4.js} +1 -1
  97. package/lib/{pbkdf2-h3af_qT8.mjs → pbkdf2-BYeu_Rh5.mjs} +1 -1
  98. package/lib/{pbkdf2-BiOly-Fb.js → pbkdf2-CQsb-hnh.js} +1 -1
  99. package/lib/{sei-CsiLK3q4.js → sei-DldsY9OJ.js} +1 -1
  100. package/lib/{sei-J7Ndid0z.mjs → sei-jkF24TbQ.mjs} +4 -4
  101. package/lib/{signer-Bqq-7pmw.mjs → signer-BHaj-Q7Z.mjs} +1 -1
  102. package/lib/{signer-DqTjY4LV.js → signer-DAZjtwBF.js} +1 -1
  103. package/lib/{solana-Ce3qepls.js → solana-B6pHDYwK.js} +1 -1
  104. package/lib/{solana-DoXIYwUz.mjs → solana-BGrKM-L5.mjs} +4 -4
  105. package/lib/solana-BJkYDvEg.js +1 -0
  106. package/lib/solana-BhT0qjBR.mjs +16 -0
  107. package/lib/{solanaEmbed.esm-BDiuwARH.mjs → solanaEmbed.esm-DsaELY_p.mjs} +4 -4
  108. package/lib/{solanaEmbed.esm-aEhVr3dz.js → solanaEmbed.esm-byA6SJdX.js} +1 -1
  109. package/lib/src/config/ui.d.ts +0 -24
  110. package/lib/src/config/ui.d.ts.map +1 -1
  111. package/lib/src/hosted.d.ts +10 -0
  112. package/lib/src/hosted.d.ts.map +1 -0
  113. package/lib/src/index.d.ts +4 -2
  114. package/lib/src/index.d.ts.map +1 -1
  115. package/lib/src/main.d.ts.map +1 -1
  116. package/lib/src/utils/index.d.ts +1 -0
  117. package/lib/src/utils/index.d.ts.map +1 -1
  118. package/lib/src/utils/wallet/evm.d.ts +2 -1
  119. package/lib/src/utils/wallet/evm.d.ts.map +1 -1
  120. package/lib/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
  121. package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  122. package/lib/src/views/v2/Bridge/WalletConnector/index.d.ts.map +1 -1
  123. package/lib/{sui-sEkivVSe.mjs → sui-Bxl_8F_i.mjs} +4 -4
  124. package/lib/{sui-CthAG5pi.js → sui-CusyBEEj.js} +1 -1
  125. package/lib/{sui-Bd2bm_yF.mjs → sui-J5LtM0N2.mjs} +1 -1
  126. package/lib/{sui-CNNdjXyR.js → sui-ShulHFzj.js} +2 -2
  127. package/lib/{unsignedTransaction-CA2s3rKG.mjs → unsignedTransaction-BjLsY8jQ.mjs} +2 -2
  128. package/lib/{unsignedTransaction-qKKmqcBf.js → unsignedTransaction-DIl-FgDa.js} +1 -1
  129. package/lib/{utils-OPA3b1An.mjs → utils-Cvu_YuwT.mjs} +2 -2
  130. package/lib/{utils-Deb--_8V.js → utils-lAfFWpGW.js} +1 -1
  131. package/package.json +4 -4
  132. package/lib/solana-CRL9xy7K.mjs +0 -16
  133. package/lib/solana-rhlzUaN7.js +0 -1
@@ -1,6 +1,6 @@
1
1
  const fe = Symbol(), ee = Object.getPrototypeOf, G = /* @__PURE__ */ new WeakMap(), me = (e) => e && (G.has(e) ? G.get(e) : ee(e) === Object.prototype || ee(e) === Array.prototype), ge = (e) => me(e) && e[fe] || null, te = (e, t = !0) => {
2
2
  G.set(e, t);
3
- }, z = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "66567716b06cd59468bd3f6c21d89fba8d52a52d", REACT_APP_CONNECT_VERSION: "1.0.0-beta.6-development", SSR: !1 }, q = (e) => typeof e == "object" && e !== null, A = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakSet(), he = (e = Object.is, t = (n, h) => new Proxy(n, h), s = (n) => q(n) && !x.has(n) && (Array.isArray(n) || !(Symbol.iterator in n)) && !(n instanceof WeakMap) && !(n instanceof WeakSet) && !(n instanceof Error) && !(n instanceof Number) && !(n instanceof Date) && !(n instanceof String) && !(n instanceof RegExp) && !(n instanceof ArrayBuffer), r = (n) => {
3
+ }, z = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "9548507ca68dfd249bf84057889dc61553b17b5f", REACT_APP_CONNECT_VERSION: "1.0.0-beta.8-development", SSR: !1 }, q = (e) => typeof e == "object" && e !== null, A = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakSet(), he = (e = Object.is, t = (n, h) => new Proxy(n, h), s = (n) => q(n) && !x.has(n) && (Array.isArray(n) || !(Symbol.iterator in n)) && !(n instanceof WeakMap) && !(n instanceof WeakSet) && !(n instanceof Error) && !(n instanceof Number) && !(n instanceof Date) && !(n instanceof String) && !(n instanceof RegExp) && !(n instanceof ArrayBuffer), r = (n) => {
4
4
  switch (n.status) {
5
5
  case "fulfilled":
6
6
  return n.value;
@@ -375,7 +375,7 @@ class _e {
375
375
  }
376
376
  async initUi() {
377
377
  if (typeof window < "u") {
378
- await import("./index-CAHXQCTs.mjs");
378
+ await import("./index-tGVSGULu.mjs");
379
379
  const t = document.createElement("wcm-modal");
380
380
  document.body.insertAdjacentElement("beforeend", t), w.setIsUiLoaded(!0);
381
381
  }
@@ -1,6 +1,6 @@
1
- import { Z as Me, ac as Kr, a1 as Xn, V as Ze } from "./index-C2DCdxRC.mjs";
2
- import { k as Yn, l as qn, m as Zn, n as Qn, o as ei, p as ti, q as ri, t as ni, u as ii, v as si, w as oi, y as Ur, r as Wr, c as ai } from "./index-mUmOCSLG.mjs";
3
- import { e as fi } from "./events-Dzr-GrPB.mjs";
1
+ import { Z as Me, ac as Kr, a1 as Xn, V as Ze } from "./index-BNQfXzmT.mjs";
2
+ import { k as Yn, l as qn, m as Zn, n as Qn, o as ei, p as ti, q as ri, t as ni, u as ii, v as si, w as oi, y as Ur, r as Wr, c as ai } from "./index-WWXvZLn0.mjs";
3
+ import { e as fi } from "./events-Bp5VnuCn.mjs";
4
4
  function Hr(e = 0) {
5
5
  return globalThis.Buffer != null && globalThis.Buffer.allocUnsafe != null ? globalThis.Buffer.allocUnsafe(e) : new Uint8Array(e);
6
6
  }
@@ -1,8 +1,8 @@
1
1
  var v = Object.defineProperty;
2
2
  var S = (i, e, t) => e in i ? v(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
3
  var a = (i, e, t) => S(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { cM as f, cN as I, a5 as x, r as p, cO as b, a8 as w, c7 as U, c8 as E, c9 as m, u as o, cP as k, s as c, p as h, cQ as F, ce as _, Z as $, cb as C, m as T, bM as l, cR as R, bR as N } from "./index-C2DCdxRC.mjs";
5
- import { A as O } from "./aptos-CKPSmGSC.mjs";
4
+ import { cM as f, cN as I, a5 as x, r as p, cO as b, a8 as w, c7 as U, c8 as E, c9 as m, u as o, cP as k, s as c, p as h, cQ as F, ce as _, Z as $, cb as C, m as T, bM as l, cR as R, bR as N } from "./index-BNQfXzmT.mjs";
5
+ import { A as O } from "./aptos-B4tHgth_.mjs";
6
6
  class Q {
7
7
  constructor(e, t, s, r, n = !1) {
8
8
  a(this, "transaction");
@@ -1,8 +1,8 @@
1
1
  var se = Object.defineProperty;
2
2
  var oe = (s, e, t) => e in s ? se(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
3
  var d = (s, e, t) => oe(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { de as l, dh as T, da as y, cp as _, a8 as C, a5 as f, p as re, u as M, dl as Q, dm as ae, N as S, dc as ce, Z as ie, an as X, dd as N, df as P, dn as de, dp as $, cL as pe, dg as ge, dq as ue, dr as J, cb as fe, bM as le, bR as he } from "./index-C2DCdxRC.mjs";
5
- import { A as Ae } from "./algorand-CIOlvhGh.mjs";
4
+ import { de as l, dh as T, da as y, cp as _, a8 as C, a5 as f, p as re, u as M, dl as Q, dm as ae, N as S, dc as ce, Z as ie, an as X, dd as N, df as P, dn as de, dp as $, cL as pe, dg as ge, dq as ue, dr as J, cb as fe, bM as le, bR as he } from "./index-BNQfXzmT.mjs";
5
+ import { A as Ae } from "./algorand-BDmGwgo0.mjs";
6
6
  class ye {
7
7
  constructor(e, t, o, n, r = !1) {
8
8
  d(this, "transaction");
@@ -1 +1 @@
1
- "use strict";var m=Object.defineProperty;var w=(i,e,t)=>e in i?m(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var s=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-BHGS0dw3.js"),g=require("./aptos-Cx4TaXYo.js");class d{constructor(e,t,r,o){s(this,"network");s(this,"chain");s(this,"connection");s(this,"contracts");s(this,"chainId");s(this,"coreBridge");this.network=e,this.chain=t,this.connection=r,this.contracts=o,this.chainId=c.toChainId(t);const n=o.coreBridge;if(!n)throw new Error(`CoreBridge contract Address for chain ${t} not found`);this.coreBridge=n}getGuardianSet(e){throw new Error("Method not implemented.")}getGuardianSetIndex(){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,t){const[r,o]=await g.AptosPlatform.chainFromRpc(e),n=t[o];if(n.network!==r)throw new Error(`Network mismatch: ${n.network} !== ${r}`);return new d(r,o,e,n.contracts)}async*publishMessage(e,t){throw new Error("Method not implemented.")}async*verifyMessage(e,t){throw new Error("Not implemented.")}async parseTransaction(e){return(await this.parseMessages(e)).map(r=>({chain:r.emitterChain,emitter:r.emitterAddress,sequence:r.sequence}))}async parseMessages(e){const t=await this.connection.getTransactionByHash(e);if(t.type!=="user_transaction")throw new Error(`${e} is not a user_transaction`);const o=t.events.filter(n=>n.type.endsWith("WormholeMessage"));if(!o||o.length===0)throw new Error(`WormholeMessage not found for ${e}`);return o.map(n=>{const a=n.data,h=new c.UniversalAddress(BigInt(a.sender).toString(16).padStart(64,"0"));return c.createVAA("Uint8Array",{guardianSet:0,emitterChain:this.chain,emitterAddress:h,sequence:BigInt(a.sequence),timestamp:Number(a.timestamp),consistencyLevel:a.consistency_level,nonce:Number(a.nonce),signatures:[],payload:c.hex.decode(a.payload)})})}}c.registerProtocol("Aptos","WormholeCore",d);exports.AptosWormholeCore=d;
1
+ "use strict";var m=Object.defineProperty;var w=(i,e,t)=>e in i?m(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var s=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-DpZGf7ao.js"),g=require("./aptos-Olu7hLbM.js");class d{constructor(e,t,r,o){s(this,"network");s(this,"chain");s(this,"connection");s(this,"contracts");s(this,"chainId");s(this,"coreBridge");this.network=e,this.chain=t,this.connection=r,this.contracts=o,this.chainId=c.toChainId(t);const n=o.coreBridge;if(!n)throw new Error(`CoreBridge contract Address for chain ${t} not found`);this.coreBridge=n}getGuardianSet(e){throw new Error("Method not implemented.")}getGuardianSetIndex(){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,t){const[r,o]=await g.AptosPlatform.chainFromRpc(e),n=t[o];if(n.network!==r)throw new Error(`Network mismatch: ${n.network} !== ${r}`);return new d(r,o,e,n.contracts)}async*publishMessage(e,t){throw new Error("Method not implemented.")}async*verifyMessage(e,t){throw new Error("Not implemented.")}async parseTransaction(e){return(await this.parseMessages(e)).map(r=>({chain:r.emitterChain,emitter:r.emitterAddress,sequence:r.sequence}))}async parseMessages(e){const t=await this.connection.getTransactionByHash(e);if(t.type!=="user_transaction")throw new Error(`${e} is not a user_transaction`);const o=t.events.filter(n=>n.type.endsWith("WormholeMessage"));if(!o||o.length===0)throw new Error(`WormholeMessage not found for ${e}`);return o.map(n=>{const a=n.data,h=new c.UniversalAddress(BigInt(a.sender).toString(16).padStart(64,"0"));return c.createVAA("Uint8Array",{guardianSet:0,emitterChain:this.chain,emitterAddress:h,sequence:BigInt(a.sequence),timestamp:Number(a.timestamp),consistencyLevel:a.consistency_level,nonce:Number(a.nonce),signatures:[],payload:c.hex.decode(a.payload)})})}}c.registerProtocol("Aptos","WormholeCore",d);exports.AptosWormholeCore=d;
@@ -1,4 +1,4 @@
1
- import { a1 as Z, dC as cr, dD as vr } from "./index-C2DCdxRC.mjs";
1
+ import { a1 as Z, dC as cr, dD as vr } from "./index-BNQfXzmT.mjs";
2
2
  const he = /* @__PURE__ */ Z(cr), me = /* @__PURE__ */ Z(vr);
3
3
  var M = Object.prototype.toString, rr = function(r) {
4
4
  var e = M.call(r), t = e === "[object Arguments]";
@@ -1 +1 @@
1
- "use strict";var U=Object.defineProperty;var b=(m,n,e)=>n in m?U(m,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[n]=e;var c=(m,n,e)=>b(m,typeof n!="symbol"?n+"":n,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BHGS0dw3.js");require("./index-Dpzov1Io.js");const N=new t.Interface(["function start((bytes32,address,address,address,address,address,uint256,uint256,uint256,uint256)) returns (address,uint16,uint64)","function receiveMessageAndSwap(bytes)"]),W=new t.Interface(["function quoteExactInputSingle((address,address,uint256,uint24,uint160)) public view returns (uint256,uint160,uint32,uint256)"]),T=100,B="https://gfx.relayers.xlabs.xyz/api/v1/swap/quote",_="https://thermae.fly.dev/api/order/create";class R{static async createOrder(n,e,r,o,s,a,i,h){var d,p;try{const{minAmountStart:l,minAmountFinish:w}=i.swapAmounts,g=t.canonicalAddress(r),[u,f]=t.resolveWrappedToken(n,e,o),[A,E]=t.resolveWrappedToken(n,r.chain,a),v=t.canonicalAddress(f),k=t.canonicalAddress(E),C=t.portico.get(n,e).portico,S=t.portico.get(n,r.chain).portico,I=t.networkChainToNativeChainId.get(n,e),F=t.networkChainToNativeChainId.get(n,r.chain),x={startingChainId:Number(I),startingToken:v.toLowerCase(),destinationChainId:Number(F),destinationToken:k.toLowerCase(),destinationAddress:g,porticoAddress:C,destinationPorticoAddress:S,startingTokenAmount:s.toString(),minAmountStart:l.toString(),minAmountEnd:w.toString(),bridgeNonce:h,relayerFee:i.relayerFee.toString(),feeTierStart:T,feeTierEnd:T,shouldWrapNative:u,shouldUnwrapNative:A},P=await t.axios.post(_,x);return this.validateCreateOrderResponse(P.data,x),P.data}catch(l){if(t.axios.isAxiosError(l)){const w=`${(d=l.response)==null?void 0:d.statusText}: ${(p=l.response)==null?void 0:p.data.message}`;throw new Error(`Could not create order: ${w},`)}throw l}}static async quoteRelayer(n,e,r){var h;if(t.isNative(e)||t.isNative(r))throw new Error("how did you get here tho?");const o=t.hex.encode(e.toUniversalAddress().toUint8Array(),!1),s=t.hex.encode(r.toUniversalAddress().toUint8Array(),!1),i={targetChain:t.toChainId(n),sourceToken:o,targetToken:s};try{const d=await t.axios.post(B,i);return BigInt(d.data.fee)}catch(d){throw t.axios.isAxiosError(d)?new Error(`Error getting relayer fee: ${(h=d.response)==null?void 0:h.statusText}`):d}}}c(R,"validateCreateOrderResponse",(n,e)=>{if(!t.isEqualCaseInsensitive(e.porticoAddress||"",n.transactionTarget))throw new Error("portico address mismatch");const r=N.decodeFunctionData("start",n.transactionData);if(r.length!==1||r[0].length!==10)throw new Error("decoded length mismatch");const o=t.hex.decode(r[0][0]);if(o.length!==32)throw new Error("flag set length mismatch");const{recipientChain:s,feeTierStart:a,feeTierFinish:i,flags:h}=t.PorticoBridge.deserializeFlagSet(o),{shouldWrapNative:d,shouldUnwrapNative:p}=h,[l,w]=t.platformNativeChainIdToNetworkChain("Evm",BigInt(e.destinationChainId));if(s!==t.toChainId(w))throw new Error("recipient chain mismatch");if(a!==e.feeTierStart)throw new Error("fee tier start mismatch");if(i!==e.feeTierEnd)throw new Error("fee tier end mismatch");if(!!d!==e.shouldWrapNative)throw new Error("should wrap native mismatch");if(!!p!==e.shouldUnwrapNative)throw new Error("should unwrap native mismatch");const g=r[0][1];if(!t.isEqualCaseInsensitive(g,e.startingToken))throw new Error("start token address mismatch");const u=r[0][3];if(!t.isEqualCaseInsensitive(u,e.destinationToken))throw new Error("final token address mismatch");const f=r[0][4];if(!t.isEqualCaseInsensitive(f,e.destinationAddress))throw new Error("recipient address mismatch");const A=r[0][5];if(!t.isEqualCaseInsensitive(A,e.destinationPorticoAddress||""))throw new Error("destination portico address mismatch");if(r[0][6].toString()!==e.startingTokenAmount)throw new Error("amount mismatch");if(r[0][7].toString()!==e.minAmountStart)throw new Error("min amount start mismatch");if(r[0][8].toString()!==e.minAmountEnd)throw new Error("min amount finish mismatch");if(r[0][9].toString()!==e.relayerFee)throw new Error("relayer fee mismatch")});class y{constructor(n,e,r,o){c(this,"network");c(this,"chain");c(this,"provider");c(this,"contracts");c(this,"chainId");c(this,"porticoAddress");c(this,"uniswapAddress");c(this,"porticoContract");c(this,"uniswapContract");c(this,"core");if(this.network=n,this.chain=e,this.provider=r,this.contracts=o,!o.portico)throw new Error("Unsupported chain, no contract addresses for: "+e);this.core=new t.EvmWormholeCore(n,e,r,o);const{portico:s,uniswapQuoterV2:a}=o.portico;this.porticoAddress=s,this.uniswapAddress=a,this.chainId=t.networkChainToNativeChainId.get(n,e),this.porticoContract=new t.Contract(this.porticoAddress,N.fragments,this.provider),this.uniswapContract=new t.Contract(this.uniswapAddress,W.fragments,this.provider)}static async fromRpc(n,e){const[r,o]=await t.EvmPlatform.chainFromRpc(n),s=e[o];if(s.network!==r)throw new Error(`Network mismatch: ${s.network} != ${r}`);return new y(r,o,n,s.contracts)}async*transfer(n,e,r,o,s,a){const{minAmountStart:i,minAmountFinish:h}=a.swapAmounts;if(i===0n)throw new Error("Invalid min swap amount");if(h===0n)throw new Error("Invalid min swap amount");const d=new t.EvmAddress(n).toString(),[p,l]=t.resolveWrappedToken(this.network,this.chain,r),[w,g]=t.resolveWrappedToken(this.network,e.chain,s),u=t.canonicalAddress(l),f=t.canonicalAddress(this.getTransferrableToken(u)),A=t.canonicalAddress(e),E=t.canonicalAddress(g),v=t.portico.get(this.network,e.chain).portico,k=new Date().valueOf()%2**4,C=t.PorticoBridge.serializeFlagSet({flags:{shouldWrapNative:p,shouldUnwrapNative:w},recipientChain:t.toChainId(e.chain),bridgeNonce:k,feeTierStart:T,feeTierFinish:T,padding:new Uint8Array(19)}),S=N.encodeFunctionData("start",[[C,u.toLowerCase(),f,E.toLowerCase(),A,v,o.toString(),i.toString(),h.toString(),a.relayerFee.toString()]]);p||(yield*this.approve(u,d,o,this.porticoAddress));const I=await this.core.getMessageFee(),F={to:this.porticoAddress,data:S,value:I+(p?o:0n)};yield this.createUnsignedTransaction(t.addFrom(F,d),"PorticoBridge.Transfer")}async*redeem(n,e){const r=await this.porticoContract.getFunction("receiveMessageAndSwap").populateTransaction(t.serialize(e)),o=new t.EvmAddress(n).toString();yield this.createUnsignedTransaction(t.addFrom(r,o),"PorticoBridge.Redeem")}async quoteSwap(n,e,r){const[,o]=t.resolveWrappedToken(this.network,this.chain,n),[,s]=t.resolveWrappedToken(this.network,this.chain,e),a=t.canonicalAddress(o),i=t.canonicalAddress(s);return t.isEqualCaseInsensitive(a,i)?r:(await this.uniswapContract.getFunction("quoteExactInputSingle").staticCall([a,i,r,T,0]))[0]}async quoteRelay(n,e){return await R.quoteRelayer(this.chain,n,e)}getTransferrableToken(n){var o;if(this.chain==="Ethereum")return t.Wormhole.tokenId("Ethereum",n);const e=t.getTokenByAddress(this.network,this.chain,n);if(!e)throw new Error("Unsupported source token: "+n);const r=(o=t.getTokensBySymbol(this.network,this.chain,e.symbol))==null?void 0:o.find(s=>s.original==="Ethereum");if(!r)throw new Error(`Unsupported symbol for chain ${e.symbol}: ${this.chain} `);return t.Wormhole.tokenId(r.chain,r.address)}async*approve(n,e,r,o){const s=t.EvmPlatform.getTokenImplementation(this.provider,n);if(await s.allowance(e,o)<r){const i=await s.approve.populateTransaction(o,r);yield this.createUnsignedTransaction(t.addFrom(i,e),"PorticoBridge.Approve")}}createUnsignedTransaction(n,e){return new t.EvmUnsignedTransaction(t.addChainId(n,this.chainId),this.network,this.chain,e,!1)}}t.registerProtocol(t._platform,"PorticoBridge",y);exports.EvmPorticoBridge=y;
1
+ "use strict";var U=Object.defineProperty;var b=(m,n,e)=>n in m?U(m,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[n]=e;var c=(m,n,e)=>b(m,typeof n!="symbol"?n+"":n,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-DpZGf7ao.js");require("./index-2fV7-V0g.js");const N=new t.Interface(["function start((bytes32,address,address,address,address,address,uint256,uint256,uint256,uint256)) returns (address,uint16,uint64)","function receiveMessageAndSwap(bytes)"]),W=new t.Interface(["function quoteExactInputSingle((address,address,uint256,uint24,uint160)) public view returns (uint256,uint160,uint32,uint256)"]),T=100,B="https://gfx.relayers.xlabs.xyz/api/v1/swap/quote",_="https://thermae.fly.dev/api/order/create";class R{static async createOrder(n,e,r,o,s,a,i,h){var d,p;try{const{minAmountStart:l,minAmountFinish:w}=i.swapAmounts,g=t.canonicalAddress(r),[u,f]=t.resolveWrappedToken(n,e,o),[A,E]=t.resolveWrappedToken(n,r.chain,a),v=t.canonicalAddress(f),k=t.canonicalAddress(E),C=t.portico.get(n,e).portico,S=t.portico.get(n,r.chain).portico,I=t.networkChainToNativeChainId.get(n,e),F=t.networkChainToNativeChainId.get(n,r.chain),x={startingChainId:Number(I),startingToken:v.toLowerCase(),destinationChainId:Number(F),destinationToken:k.toLowerCase(),destinationAddress:g,porticoAddress:C,destinationPorticoAddress:S,startingTokenAmount:s.toString(),minAmountStart:l.toString(),minAmountEnd:w.toString(),bridgeNonce:h,relayerFee:i.relayerFee.toString(),feeTierStart:T,feeTierEnd:T,shouldWrapNative:u,shouldUnwrapNative:A},P=await t.axios.post(_,x);return this.validateCreateOrderResponse(P.data,x),P.data}catch(l){if(t.axios.isAxiosError(l)){const w=`${(d=l.response)==null?void 0:d.statusText}: ${(p=l.response)==null?void 0:p.data.message}`;throw new Error(`Could not create order: ${w},`)}throw l}}static async quoteRelayer(n,e,r){var h;if(t.isNative(e)||t.isNative(r))throw new Error("how did you get here tho?");const o=t.hex.encode(e.toUniversalAddress().toUint8Array(),!1),s=t.hex.encode(r.toUniversalAddress().toUint8Array(),!1),i={targetChain:t.toChainId(n),sourceToken:o,targetToken:s};try{const d=await t.axios.post(B,i);return BigInt(d.data.fee)}catch(d){throw t.axios.isAxiosError(d)?new Error(`Error getting relayer fee: ${(h=d.response)==null?void 0:h.statusText}`):d}}}c(R,"validateCreateOrderResponse",(n,e)=>{if(!t.isEqualCaseInsensitive(e.porticoAddress||"",n.transactionTarget))throw new Error("portico address mismatch");const r=N.decodeFunctionData("start",n.transactionData);if(r.length!==1||r[0].length!==10)throw new Error("decoded length mismatch");const o=t.hex.decode(r[0][0]);if(o.length!==32)throw new Error("flag set length mismatch");const{recipientChain:s,feeTierStart:a,feeTierFinish:i,flags:h}=t.PorticoBridge.deserializeFlagSet(o),{shouldWrapNative:d,shouldUnwrapNative:p}=h,[l,w]=t.platformNativeChainIdToNetworkChain("Evm",BigInt(e.destinationChainId));if(s!==t.toChainId(w))throw new Error("recipient chain mismatch");if(a!==e.feeTierStart)throw new Error("fee tier start mismatch");if(i!==e.feeTierEnd)throw new Error("fee tier end mismatch");if(!!d!==e.shouldWrapNative)throw new Error("should wrap native mismatch");if(!!p!==e.shouldUnwrapNative)throw new Error("should unwrap native mismatch");const g=r[0][1];if(!t.isEqualCaseInsensitive(g,e.startingToken))throw new Error("start token address mismatch");const u=r[0][3];if(!t.isEqualCaseInsensitive(u,e.destinationToken))throw new Error("final token address mismatch");const f=r[0][4];if(!t.isEqualCaseInsensitive(f,e.destinationAddress))throw new Error("recipient address mismatch");const A=r[0][5];if(!t.isEqualCaseInsensitive(A,e.destinationPorticoAddress||""))throw new Error("destination portico address mismatch");if(r[0][6].toString()!==e.startingTokenAmount)throw new Error("amount mismatch");if(r[0][7].toString()!==e.minAmountStart)throw new Error("min amount start mismatch");if(r[0][8].toString()!==e.minAmountEnd)throw new Error("min amount finish mismatch");if(r[0][9].toString()!==e.relayerFee)throw new Error("relayer fee mismatch")});class y{constructor(n,e,r,o){c(this,"network");c(this,"chain");c(this,"provider");c(this,"contracts");c(this,"chainId");c(this,"porticoAddress");c(this,"uniswapAddress");c(this,"porticoContract");c(this,"uniswapContract");c(this,"core");if(this.network=n,this.chain=e,this.provider=r,this.contracts=o,!o.portico)throw new Error("Unsupported chain, no contract addresses for: "+e);this.core=new t.EvmWormholeCore(n,e,r,o);const{portico:s,uniswapQuoterV2:a}=o.portico;this.porticoAddress=s,this.uniswapAddress=a,this.chainId=t.networkChainToNativeChainId.get(n,e),this.porticoContract=new t.Contract(this.porticoAddress,N.fragments,this.provider),this.uniswapContract=new t.Contract(this.uniswapAddress,W.fragments,this.provider)}static async fromRpc(n,e){const[r,o]=await t.EvmPlatform.chainFromRpc(n),s=e[o];if(s.network!==r)throw new Error(`Network mismatch: ${s.network} != ${r}`);return new y(r,o,n,s.contracts)}async*transfer(n,e,r,o,s,a){const{minAmountStart:i,minAmountFinish:h}=a.swapAmounts;if(i===0n)throw new Error("Invalid min swap amount");if(h===0n)throw new Error("Invalid min swap amount");const d=new t.EvmAddress(n).toString(),[p,l]=t.resolveWrappedToken(this.network,this.chain,r),[w,g]=t.resolveWrappedToken(this.network,e.chain,s),u=t.canonicalAddress(l),f=t.canonicalAddress(this.getTransferrableToken(u)),A=t.canonicalAddress(e),E=t.canonicalAddress(g),v=t.portico.get(this.network,e.chain).portico,k=new Date().valueOf()%2**4,C=t.PorticoBridge.serializeFlagSet({flags:{shouldWrapNative:p,shouldUnwrapNative:w},recipientChain:t.toChainId(e.chain),bridgeNonce:k,feeTierStart:T,feeTierFinish:T,padding:new Uint8Array(19)}),S=N.encodeFunctionData("start",[[C,u.toLowerCase(),f,E.toLowerCase(),A,v,o.toString(),i.toString(),h.toString(),a.relayerFee.toString()]]);p||(yield*this.approve(u,d,o,this.porticoAddress));const I=await this.core.getMessageFee(),F={to:this.porticoAddress,data:S,value:I+(p?o:0n)};yield this.createUnsignedTransaction(t.addFrom(F,d),"PorticoBridge.Transfer")}async*redeem(n,e){const r=await this.porticoContract.getFunction("receiveMessageAndSwap").populateTransaction(t.serialize(e)),o=new t.EvmAddress(n).toString();yield this.createUnsignedTransaction(t.addFrom(r,o),"PorticoBridge.Redeem")}async quoteSwap(n,e,r){const[,o]=t.resolveWrappedToken(this.network,this.chain,n),[,s]=t.resolveWrappedToken(this.network,this.chain,e),a=t.canonicalAddress(o),i=t.canonicalAddress(s);return t.isEqualCaseInsensitive(a,i)?r:(await this.uniswapContract.getFunction("quoteExactInputSingle").staticCall([a,i,r,T,0]))[0]}async quoteRelay(n,e){return await R.quoteRelayer(this.chain,n,e)}getTransferrableToken(n){var o;if(this.chain==="Ethereum")return t.Wormhole.tokenId("Ethereum",n);const e=t.getTokenByAddress(this.network,this.chain,n);if(!e)throw new Error("Unsupported source token: "+n);const r=(o=t.getTokensBySymbol(this.network,this.chain,e.symbol))==null?void 0:o.find(s=>s.original==="Ethereum");if(!r)throw new Error(`Unsupported symbol for chain ${e.symbol}: ${this.chain} `);return t.Wormhole.tokenId(r.chain,r.address)}async*approve(n,e,r,o){const s=t.EvmPlatform.getTokenImplementation(this.provider,n);if(await s.allowance(e,o)<r){const i=await s.approve.populateTransaction(o,r);yield this.createUnsignedTransaction(t.addFrom(i,e),"PorticoBridge.Approve")}}createUnsignedTransaction(n,e){return new t.EvmUnsignedTransaction(t.addChainId(n,this.chainId),this.network,this.chain,e,!1)}}t.registerProtocol(t._platform,"PorticoBridge",y);exports.EvmPorticoBridge=y;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CAcB_0Hd.js"),kr=require("./dijkstra-CtFxn7S9.js"),Mr=require("./index-BHGS0dw3.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-NBy_JDT2.js"),kr=require("./dijkstra-CtFxn7S9.js"),Mr=require("./index-DpZGf7ao.js");/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,9 +1,9 @@
1
1
  var Q = Object.defineProperty;
2
2
  var X = (O, e, t) => e in O ? Q(O, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : O[e] = t;
3
3
  var d = (O, e, t) => X(O, typeof e != "symbol" ? e + "" : e, t);
4
- import { A as b, S as g, a as Y } from "./index-CZj2FglQ.mjs";
5
- import { d9 as Z, a5 as C, a8 as $, da as _, an as I, db as v, dc as q, c8 as tt, cp as S, c9 as et, p as H, ce as K, dd as y, de as u, df as k, dg as U, bM as L, dh as z, di as st, dj as V, dk as ot, bR as nt, ak as rt } from "./index-C2DCdxRC.mjs";
6
- import { A as at } from "./algorand-CIOlvhGh.mjs";
4
+ import { A as b, S as g, a as Y } from "./index-Bd9jd8Va.mjs";
5
+ import { d9 as Z, a5 as C, a8 as $, da as _, an as I, db as v, dc as q, c8 as tt, cp as S, c9 as et, p as H, ce as K, dd as y, de as u, df as k, dg as U, bM as L, dh as z, di as st, dj as V, dk as ot, bR as nt, ak as rt } from "./index-BNQfXzmT.mjs";
6
+ import { A as at } from "./algorand-BDmGwgo0.mjs";
7
7
  const G = Z.fromSignature("portal_transfer(byte[])byte[]"), c = class c {
8
8
  constructor(e, t, n, o) {
9
9
  d(this, "network");
@@ -1,10 +1,10 @@
1
1
  var Vg = Object.defineProperty;
2
2
  var Wg = (c, B, Q) => B in c ? Vg(c, B, { enumerable: !0, configurable: !0, writable: !0, value: Q }) : c[B] = Q;
3
3
  var yr = (c, B, Q) => Wg(c, typeof B != "symbol" ? B + "" : B, Q);
4
- import { V as le, Z as fA, aS as E2, $ as ya, a1 as Zg, ac as rs, aT as Yn, a0 as is, aU as as, aK as G2, X as os, aV as ns, aW as $g } from "./index-C2DCdxRC.mjs";
5
- import { s as Af, h as ef, u as tf, r as Y1, k as rf, a as ji, b as af } from "./utils-OPA3b1An.mjs";
6
- import { r as of } from "./index-BvbKk4T6.mjs";
7
- import { a as nf, r as sf } from "./pako.esm-C_3vjkSx.mjs";
4
+ import { V as le, Z as fA, aS as E2, $ as ya, a1 as Zg, ac as rs, aT as Yn, a0 as is, aU as as, aK as G2, X as os, aV as ns, aW as $g } from "./index-BNQfXzmT.mjs";
5
+ import { s as Af, h as ef, u as tf, r as Y1, k as rf, a as ji, b as af } from "./utils-Cvu_YuwT.mjs";
6
+ import { r as of } from "./index-Bk-7wCMM.mjs";
7
+ import { a as nf, r as sf } from "./pako.esm-CZW6iyfv.mjs";
8
8
  var cf = {}, Ti = {}, Sr = {}, di = {};
9
9
  Object.defineProperty(di, "__esModule", { value: !0 });
10
10
  di.utf8Write = di.utf8Read = di.utf8Length = void 0;
@@ -1,7 +1,7 @@
1
1
  var $ = Object.defineProperty;
2
2
  var V = (i, e, b) => e in i ? $(i, e, { enumerable: !0, configurable: !0, writable: !0, value: b }) : i[e] = b;
3
3
  var d = (i, e, b) => V(i, typeof e != "symbol" ? e + "" : e, b);
4
- import { aj as E, E as o, c7 as x, a8 as l, c8 as z, c9 as L, a as c, p as k, ca as j, cb as Q, bM as g, cc as W, cd as T, bL as s, ce as _, bP as P, bQ as N, c6 as F, bE as q, aA as D, bR as H, _ as O } from "./index-C2DCdxRC.mjs";
4
+ import { aj as E, E as o, c7 as x, a8 as l, c8 as z, c9 as L, a as c, p as k, ca as j, cb as Q, bM as g, cc as W, cd as T, bL as s, ce as _, bP as P, bQ as N, c6 as F, bE as q, aA as D, bR as H, _ as O } from "./index-BNQfXzmT.mjs";
5
5
  class B {
6
6
  constructor(e, b, a, t) {
7
7
  d(this, "network");
@@ -1,7 +1,7 @@
1
1
  var Pt = Object.defineProperty;
2
2
  var _t = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var f = (e, t, r) => _t(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { aX as c, bw as A, bA as z, bz as U, Z as l, cf as le, bB as G, by as S, bx as V, cg as Ge, ch as Ze, ci as Wt, cj as It, ck as Ut, cl as Nt, cm as O, cn as E, a8 as y, co as b, cp as Ft, cq as ye, c9 as dt, cr as xt, cs as lt, ct as zt, cu as Ot, cv as Q, cw as Lt, cx as Z, cy as H, cz as Dt, cA as qt, cB as Kt, cC as Vt, cD as Se, cE as Gt, cF as v, cG as Zt, e as oe, S as k, c7 as Ce, c8 as Ht, p as $, ce as Be, cH as Yt, cI as Qt, b6 as se, a$ as L, a5 as Xt, cJ as ft, bR as mt, g as gt } from "./index-C2DCdxRC.mjs";
4
+ import { aX as c, bw as A, bA as z, bz as U, Z as l, cf as le, bB as G, by as S, bx as V, cg as Ge, ch as Ze, ci as Wt, cj as It, ck as Ut, cl as Nt, cm as O, cn as E, a8 as y, co as b, cp as Ft, cq as ye, c9 as dt, cr as xt, cs as lt, ct as zt, cu as Ot, cv as Q, cw as Lt, cx as Z, cy as H, cz as Dt, cA as qt, cB as Kt, cC as Vt, cD as Se, cE as Gt, cF as v, cG as Zt, e as oe, S as k, c7 as Ce, c8 as Ht, p as $, ce as Be, cH as Yt, cI as Qt, b6 as se, a$ as L, a5 as Xt, cJ as ft, bR as mt, g as gt } from "./index-BNQfXzmT.mjs";
5
5
  const M = new c("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
6
6
  new c("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
7
7
  const Ae = new c("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"), D = new c("So11111111111111111111111111111111111111112");
@@ -1,4 +1,4 @@
1
- "use strict";const N=require("./index-BHGS0dw3.js"),ze=require("./index-Cd8xotiJ.js"),Qn=require("./events-BSNN9qkd.js");function Wr(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function Hr(e,r){r||(r=e.reduce((s,d)=>s+d.length,0));const n=Wr(r);let a=0;for(const s of e)n.set(s,a),a+=s.length;return n}const vr={...ze.identityBase,...ze.base2,...ze.base8,...ze.base10,...ze.base16,...ze.base32,...ze.base36,...ze.base58,...ze.base64,...ze.base256emoji};function $r(e,r,n,a){return{name:e,prefix:r,encoder:{name:e,prefix:r,encode:n},decoder:{decode:a}}}const xr=$r("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Yt=$r("ascii","a",e=>{let r="a";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return r},e=>{e=e.substring(1);const r=Wr(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}),Gr={utf8:xr,"utf-8":xr,hex:vr.base16,latin1:Yt,ascii:Yt,binary:Yt,...vr};function Ft(e,r="utf8"){const n=Gr[r];if(!n)throw new Error(`Unsupported encoding "${r}"`);return(r==="utf8"||r==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):n.decoder.decode(`${n.prefix}${e}`)}function Jt(e,r="utf8"){const n=Gr[r];if(!n)throw new Error(`Unsupported encoding "${r}"`);return(r==="utf8"||r==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):n.encoder.encode(e).substring(1)}var Er=function(e,r,n){if(n||arguments.length===2)for(var a=0,s=r.length,d;a<s;a++)(d||!(a in r))&&(d||(d=Array.prototype.slice.call(r,0,a)),d[a]=r[a]);return e.concat(d||Array.prototype.slice.call(r))},ei=function(){function e(r,n,a){this.name=r,this.version=n,this.os=a,this.type="browser"}return e}(),ti=function(){function e(r){this.version=r,this.type="node",this.name="node",this.os=N.dist.process.platform}return e}(),ri=function(){function e(r,n,a,s){this.name=r,this.version=n,this.os=a,this.bot=s,this.type="bot-device"}return e}(),ni=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),ii=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),si=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,oi=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Sr=3,ai=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",si]],Ir=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function fi(e){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new ii:typeof navigator<"u"?ui(navigator.userAgent):di()}function ci(e){return e!==""&&ai.reduce(function(r,n){var a=n[0],s=n[1];if(r)return r;var d=s.exec(e);return!!d&&[a,d]},!1)}function ui(e){var r=ci(e);if(!r)return null;var n=r[0],a=r[1];if(n==="searchbot")return new ni;var s=a[1]&&a[1].split(".").join("_").split("_").slice(0,3);s?s.length<Sr&&(s=Er(Er([],s,!0),hi(Sr-s.length),!0)):s=[];var d=s.join("."),E=li(e),v=oi.exec(e);return v&&v[1]?new ri(n,d,E,v[1]):new ei(n,d,E)}function li(e){for(var r=0,n=Ir.length;r<n;r++){var a=Ir[r],s=a[0],d=a[1],E=d.exec(e);if(E)return s}return null}function di(){var e=typeof N.dist.process<"u"&&N.dist.process.version;return e?new ti(N.dist.process.version.slice(1)):null}function hi(e){for(var r=[],n=0;n<e;n++)r.push("0");return r}const bi={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}},gi=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,yi=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,pi=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function _i(e,r){if(e==="__proto__"||e==="constructor"&&r&&typeof r=="object"&&"prototype"in r){mi(e);return}return r}function mi(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function zt(e,r={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;if(a==="undefined")return;if(a==="null")return null;if(a==="nan")return Number.NaN;if(a==="infinity")return Number.POSITIVE_INFINITY;if(a==="-infinity")return Number.NEGATIVE_INFINITY}if(!pi.test(e)){if(r.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(gi.test(e)||yi.test(e)){if(r.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,_i)}return JSON.parse(e)}catch(a){if(r.strict)throw a;return e}}function wi(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Te(e,...r){try{return wi(e(...r))}catch(n){return Promise.reject(n)}}function vi(e){const r=typeof e;return e===null||r!=="object"&&r!=="function"}function xi(e){const r=Object.getPrototypeOf(e);return!r||r.isPrototypeOf(Object)}function Ut(e){if(vi(e))return String(e);if(xi(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON=="function")return Ut(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function kr(){if(typeof N.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const tr="base64:";function Ei(e){if(typeof e=="string")return e;kr();const r=N.dist.Buffer.from(e).toString("base64");return tr+r}function Si(e){return typeof e!="string"||!e.startsWith(tr)?e:(kr(),N.dist.Buffer.from(e.slice(tr.length),"base64"))}function Ue(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function Ii(...e){return Ue(e.join(":"))}function Dt(e){return e=Ue(e),e?e+":":""}const Oi="memory",Ti=()=>{const e=new Map;return{name:Oi,options:{},hasItem(r){return e.has(r)},getItem(r){return e.get(r)??null},getItemRaw(r){return e.get(r)??null},setItem(r,n){e.set(r,n)},setItemRaw(r,n){e.set(r,n)},removeItem(r){e.delete(r)},getKeys(){return Array.from(e.keys())},clear(){e.clear()},dispose(){e.clear()}}};function Ai(e={}){const r={mounts:{"":e.driver||Ti()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=o=>{for(const l of r.mountpoints)if(o.startsWith(l))return{base:l,relativeKey:o.slice(l.length),driver:r.mounts[l]};return{base:"",relativeKey:o,driver:r.mounts[""]}},a=(o,l)=>r.mountpoints.filter(y=>y.startsWith(o)||l&&o.startsWith(y)).map(y=>({relativeBase:o.length>y.length?o.slice(y.length):void 0,mountpoint:y,driver:r.mounts[y]})),s=(o,l)=>{if(r.watching){l=Ue(l);for(const y of r.watchListeners)y(o,l)}},d=async()=>{if(!r.watching){r.watching=!0;for(const o in r.mounts)r.unwatch[o]=await Or(r.mounts[o],s,o)}},E=async()=>{if(r.watching){for(const o in r.unwatch)await r.unwatch[o]();r.unwatch={},r.watching=!1}},v=(o,l,y)=>{const S=new Map,x=w=>{let j=S.get(w.base);return j||(j={driver:w.driver,base:w.base,items:[]},S.set(w.base,j)),j};for(const w of o){const j=typeof w=="string",J=Ue(j?w:w.key),q=j?void 0:w.value,B=j||!w.options?l:{...l,...w.options},Ae=n(J);x(Ae).items.push({key:J,value:q,relativeKey:Ae.relativeKey,options:B})}return Promise.all([...S.values()].map(w=>y(w))).then(w=>w.flat())},g={hasItem(o,l={}){o=Ue(o);const{relativeKey:y,driver:S}=n(o);return Te(S.hasItem,y,l)},getItem(o,l={}){o=Ue(o);const{relativeKey:y,driver:S}=n(o);return Te(S.getItem,y,l).then(x=>zt(x))},getItems(o,l){return v(o,l,y=>y.driver.getItems?Te(y.driver.getItems,y.items.map(S=>({key:S.relativeKey,options:S.options})),l).then(S=>S.map(x=>({key:Ii(y.base,x.key),value:zt(x.value)}))):Promise.all(y.items.map(S=>Te(y.driver.getItem,S.relativeKey,S.options).then(x=>({key:S.key,value:zt(x)})))))},getItemRaw(o,l={}){o=Ue(o);const{relativeKey:y,driver:S}=n(o);return S.getItemRaw?Te(S.getItemRaw,y,l):Te(S.getItem,y,l).then(x=>Si(x))},async setItem(o,l,y={}){if(l===void 0)return g.removeItem(o);o=Ue(o);const{relativeKey:S,driver:x}=n(o);x.setItem&&(await Te(x.setItem,S,Ut(l),y),x.watch||s("update",o))},async setItems(o,l){await v(o,l,async y=>{if(y.driver.setItems)return Te(y.driver.setItems,y.items.map(S=>({key:S.relativeKey,value:Ut(S.value),options:S.options})),l);y.driver.setItem&&await Promise.all(y.items.map(S=>Te(y.driver.setItem,S.relativeKey,Ut(S.value),S.options)))})},async setItemRaw(o,l,y={}){if(l===void 0)return g.removeItem(o,y);o=Ue(o);const{relativeKey:S,driver:x}=n(o);if(x.setItemRaw)await Te(x.setItemRaw,S,l,y);else if(x.setItem)await Te(x.setItem,S,Ei(l),y);else return;x.watch||s("update",o)},async removeItem(o,l={}){typeof l=="boolean"&&(l={removeMeta:l}),o=Ue(o);const{relativeKey:y,driver:S}=n(o);S.removeItem&&(await Te(S.removeItem,y,l),(l.removeMeta||l.removeMata)&&await Te(S.removeItem,y+"$",l),S.watch||s("remove",o))},async getMeta(o,l={}){typeof l=="boolean"&&(l={nativeOnly:l}),o=Ue(o);const{relativeKey:y,driver:S}=n(o),x=Object.create(null);if(S.getMeta&&Object.assign(x,await Te(S.getMeta,y,l)),!l.nativeOnly){const w=await Te(S.getItem,y+"$",l).then(j=>zt(j));w&&typeof w=="object"&&(typeof w.atime=="string"&&(w.atime=new Date(w.atime)),typeof w.mtime=="string"&&(w.mtime=new Date(w.mtime)),Object.assign(x,w))}return x},setMeta(o,l,y={}){return this.setItem(o+"$",l,y)},removeMeta(o,l={}){return this.removeItem(o+"$",l)},async getKeys(o,l={}){o=Dt(o);const y=a(o,!0);let S=[];const x=[];for(const w of y){const J=(await Te(w.driver.getKeys,w.relativeBase,l)).map(q=>w.mountpoint+Ue(q)).filter(q=>!S.some(B=>q.startsWith(B)));x.push(...J),S=[w.mountpoint,...S.filter(q=>!q.startsWith(w.mountpoint))]}return o?x.filter(w=>w.startsWith(o)&&!w.endsWith("$")):x.filter(w=>!w.endsWith("$"))},async clear(o,l={}){o=Dt(o),await Promise.all(a(o,!1).map(async y=>{if(y.driver.clear)return Te(y.driver.clear,y.relativeBase,l);if(y.driver.removeItem){const S=await y.driver.getKeys(y.relativeBase||"",l);return Promise.all(S.map(x=>y.driver.removeItem(x,l)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(o=>Tr(o)))},async watch(o){return await d(),r.watchListeners.push(o),async()=>{r.watchListeners=r.watchListeners.filter(l=>l!==o),r.watchListeners.length===0&&await E()}},async unwatch(){r.watchListeners=[],await E()},mount(o,l){if(o=Dt(o),o&&r.mounts[o])throw new Error(`already mounted at ${o}`);return o&&(r.mountpoints.push(o),r.mountpoints.sort((y,S)=>S.length-y.length)),r.mounts[o]=l,r.watching&&Promise.resolve(Or(l,s,o)).then(y=>{r.unwatch[o]=y}).catch(console.error),g},async unmount(o,l=!0){o=Dt(o),!(!o||!r.mounts[o])&&(r.watching&&o in r.unwatch&&(r.unwatch[o](),delete r.unwatch[o]),l&&await Tr(r.mounts[o]),r.mountpoints=r.mountpoints.filter(y=>y!==o),delete r.mounts[o])},getMount(o=""){o=Ue(o)+":";const l=n(o);return{driver:l.driver,base:l.base}},getMounts(o="",l={}){return o=Ue(o),a(o,l.parents).map(S=>({driver:S.driver,base:S.mountpoint}))}};return g}function Or(e,r,n){return e.watch?e.watch((a,s)=>r(a,n+s)):()=>{}}async function Tr(e){typeof e.dispose=="function"&&await Te(e.dispose)}function bt(e){return new Promise((r,n)=>{e.oncomplete=e.onsuccess=()=>r(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Fr(e,r){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(r);const a=bt(n);return(s,d)=>a.then(E=>d(E.transaction(r,s).objectStore(r)))}let Zt;function At(){return Zt||(Zt=Fr("keyval-store","keyval")),Zt}function Ar(e,r=At()){return r("readonly",n=>bt(n.get(e)))}function Li(e,r,n=At()){return n("readwrite",a=>(a.put(r,e),bt(a.transaction)))}function Ri(e,r=At()){return r("readwrite",n=>(n.delete(e),bt(n.transaction)))}function Pi(e=At()){return e("readwrite",r=>(r.clear(),bt(r.transaction)))}function Ci(e,r){return e.openCursor().onsuccess=function(){this.result&&(r(this.result),this.result.continue())},bt(e.transaction)}function Mi(e=At()){return e("readonly",r=>{if(r.getAllKeys)return bt(r.getAllKeys());const n=[];return Ci(r,a=>n.push(a.key)).then(()=>n)})}const ji=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n),Ni=e=>{const r=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,n=e.replace(r,'$1"$2n"$3');return JSON.parse(n,(a,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Vt(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return Ni(e)}catch{return e}}function ht(e){return typeof e=="string"?e:ji(e)||""}const Bi="idb-keyval";var zi=(e={})=>{const r=e.base&&e.base.length>0?`${e.base}:`:"",n=s=>r+s;let a;return e.dbName&&e.storeName&&(a=Fr(e.dbName,e.storeName)),{name:Bi,options:e,async hasItem(s){return!(typeof await Ar(n(s),a)>"u")},async getItem(s){return await Ar(n(s),a)??null},setItem(s,d){return Li(n(s),d,a)},removeItem(s){return Ri(n(s),a)},getKeys(){return Mi(a)},clear(){return Pi(a)}}};const Di="WALLET_CONNECT_V2_INDEXED_DB",Ki="keyvaluestorage";let Ui=class{constructor(){this.indexedDb=Ai({driver:zi({dbName:Di,storeName:Ki})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(r=>[r.key,r.value])}async getItem(r){const n=await this.indexedDb.getItem(r);if(n!==null)return n}async setItem(r,n){await this.indexedDb.setItem(r,ht(n))}async removeItem(r){await this.indexedDb.removeItem(r)}};var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof N.dist.global<"u"?N.dist.global:typeof self<"u"?self:{},Wt={exports:{}};(function(){let e;function r(){}e=r,e.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},e.prototype.setItem=function(n,a){this[n]=String(a)},e.prototype.removeItem=function(n){delete this[n]},e.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(a){n[a]=void 0,delete n[a]})},e.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Qt<"u"&&Qt.localStorage?Wt.exports=Qt.localStorage:typeof window<"u"&&window.localStorage?Wt.exports=window.localStorage:Wt.exports=new r})();function Wi(e){var r;return[e[0],Vt((r=e[1])!=null?r:"")]}class Hi{constructor(){this.localStorage=Wt.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Wi)}async getItem(r){const n=this.localStorage.getItem(r);if(n!==null)return Vt(n)}async setItem(r,n){this.localStorage.setItem(r,ht(n))}async removeItem(r){this.localStorage.removeItem(r)}}const $i="wc_storage_version",Lr=1,Gi=async(e,r,n)=>{const a=$i,s=await r.getItem(a);if(s&&s>=Lr){n(r);return}const d=await e.getKeys();if(!d.length){n(r);return}const E=[];for(;d.length;){const v=d.shift();if(!v)continue;const g=v.toLowerCase();if(g.includes("wc@")||g.includes("walletconnect")||g.includes("wc_")||g.includes("wallet_connect")){const o=await e.getItem(v);await r.setItem(v,o),E.push(v)}}await r.setItem(a,Lr),n(r),ki(e,E)},ki=async(e,r)=>{r.length&&r.forEach(async n=>{await e.removeItem(n)})};let Fi=class{constructor(){this.initialized=!1,this.setInitialized=n=>{this.storage=n,this.initialized=!0};const r=new Hi;this.storage=r;try{const n=new Ui;Gi(r,n,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(r){return await this.initialize(),this.storage.getItem(r)}async setItem(r,n){return await this.initialize(),this.storage.setItem(r,n)}async removeItem(r){return await this.initialize(),this.storage.removeItem(r)}async initialize(){this.initialized||await new Promise(r=>{const n=setInterval(()=>{this.initialized&&(clearInterval(n),r())},20)})}};class Ji{}function Vi(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Xi=qi;function qi(e,r,n){var a=n&&n.stringify||Vi,s=1;if(typeof e=="object"&&e!==null){var d=r.length+s;if(d===1)return e;var E=new Array(d);E[0]=a(e);for(var v=1;v<d;v++)E[v]=a(r[v]);return E.join(" ")}if(typeof e!="string")return e;var g=r.length;if(g===0)return e;for(var o="",l=1-s,y=-1,S=e&&e.length||0,x=0;x<S;){if(e.charCodeAt(x)===37&&x+1<S){switch(y=y>-1?y:0,e.charCodeAt(x+1)){case 100:case 102:if(l>=g||r[l]==null)break;y<x&&(o+=e.slice(y,x)),o+=Number(r[l]),y=x+2,x++;break;case 105:if(l>=g||r[l]==null)break;y<x&&(o+=e.slice(y,x)),o+=Math.floor(Number(r[l])),y=x+2,x++;break;case 79:case 111:case 106:if(l>=g||r[l]===void 0)break;y<x&&(o+=e.slice(y,x));var w=typeof r[l];if(w==="string"){o+="'"+r[l]+"'",y=x+2,x++;break}if(w==="function"){o+=r[l].name||"<anonymous>",y=x+2,x++;break}o+=a(r[l]),y=x+2,x++;break;case 115:if(l>=g)break;y<x&&(o+=e.slice(y,x)),o+=String(r[l]),y=x+2,x++;break;case 37:y<x&&(o+=e.slice(y,x)),o+="%",y=x+2,x++,l--;break}++l}++x}return y===-1?e:(y<S&&(o+=e.slice(y)),o)}const Rr=Xi;var mt=Qe;const It=os().console||{},Yi={mapHttpRequest:Kt,mapHttpResponse:Kt,wrapRequestSerializer:er,wrapResponseSerializer:er,wrapErrorSerializer:er,req:Kt,res:Kt,err:rs};function Zi(e,r){return Array.isArray(e)?e.filter(function(a){return a!=="!stdSerializers.err"}):e===!0?Object.keys(r):!1}function Qe(e){e=e||{},e.browser=e.browser||{};const r=e.browser.transmit;if(r&&typeof r.send!="function")throw Error("pino: transmit option must have a send function");const n=e.browser.write||It;e.browser.write&&(e.browser.asObject=!0);const a=e.serializers||{},s=Zi(e.browser.serialize,a);let d=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(d=!1);const E=["error","fatal","warn","info","debug","trace"];typeof n=="function"&&(n.error=n.fatal=n.warn=n.info=n.debug=n.trace=n),e.enabled===!1&&(e.level="silent");const v=e.level||"info",g=Object.create(n);g.log||(g.log=Ot),Object.defineProperty(g,"levelVal",{get:l}),Object.defineProperty(g,"level",{get:y,set:S});const o={transmit:r,serialize:s,asObject:e.browser.asObject,levels:E,timestamp:ns(e)};g.levels=Qe.levels,g.level=v,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=Ot,g.serializers=a,g._serialize=s,g._stdErrSerialize=d,g.child=x,r&&(g._logEvent=rr());function l(){return this.level==="silent"?1/0:this.levels.values[this.level]}function y(){return this._level}function S(w){if(w!=="silent"&&!this.levels.values[w])throw Error("unknown level "+w);this._level=w,pt(o,g,"error","log"),pt(o,g,"fatal","error"),pt(o,g,"warn","error"),pt(o,g,"info","log"),pt(o,g,"debug","log"),pt(o,g,"trace","log")}function x(w,j){if(!w)throw new Error("missing bindings for child Pino");j=j||{},s&&w.serializers&&(j.serializers=w.serializers);const J=j.serializers;if(s&&J){var q=Object.assign({},a,J),B=e.browser.serialize===!0?Object.keys(q):s;delete w.serializers,Xt([w],B,q,this._stdErrSerialize)}function Ae(ge){this._childLevel=(ge._childLevel|0)+1,this.error=_t(ge,w,"error"),this.fatal=_t(ge,w,"fatal"),this.warn=_t(ge,w,"warn"),this.info=_t(ge,w,"info"),this.debug=_t(ge,w,"debug"),this.trace=_t(ge,w,"trace"),q&&(this.serializers=q,this._serialize=B),r&&(this._logEvent=rr([].concat(ge._logEvent.bindings,w)))}return Ae.prototype=this,new Ae(this)}return g}Qe.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Qe.stdSerializers=Yi;Qe.stdTimeFunctions=Object.assign({},{nullTime:Jr,epochTime:Vr,unixTime:is,isoTime:ss});function pt(e,r,n,a){const s=Object.getPrototypeOf(r);r[n]=r.levelVal>r.levels.values[n]?Ot:s[n]?s[n]:It[n]||It[a]||Ot,Qi(e,r,n)}function Qi(e,r,n){!e.transmit&&r[n]===Ot||(r[n]=function(a){return function(){const d=e.timestamp(),E=new Array(arguments.length),v=Object.getPrototypeOf&&Object.getPrototypeOf(this)===It?It:this;for(var g=0;g<E.length;g++)E[g]=arguments[g];if(e.serialize&&!e.asObject&&Xt(E,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?a.call(v,es(this,n,E,d)):a.apply(v,E),e.transmit){const o=e.transmit.level||r.level,l=Qe.levels.values[o],y=Qe.levels.values[n];if(y<l)return;ts(this,{ts:d,methodLevel:n,methodValue:y,transmitLevel:o,transmitValue:Qe.levels.values[e.transmit.level||r.level],send:e.transmit.send,val:r.levelVal},E)}}}(r[n]))}function es(e,r,n,a){e._serialize&&Xt(n,e._serialize,e.serializers,e._stdErrSerialize);const s=n.slice();let d=s[0];const E={};a&&(E.time=a),E.level=Qe.levels.values[r];let v=(e._childLevel|0)+1;if(v<1&&(v=1),d!==null&&typeof d=="object"){for(;v--&&typeof s[0]=="object";)Object.assign(E,s.shift());d=s.length?Rr(s.shift(),s):void 0}else typeof d=="string"&&(d=Rr(s.shift(),s));return d!==void 0&&(E.msg=d),E}function Xt(e,r,n,a){for(const s in e)if(a&&e[s]instanceof Error)e[s]=Qe.stdSerializers.err(e[s]);else if(typeof e[s]=="object"&&!Array.isArray(e[s]))for(const d in e[s])r&&r.indexOf(d)>-1&&d in n&&(e[s][d]=n[d](e[s][d]))}function _t(e,r,n){return function(){const a=new Array(1+arguments.length);a[0]=r;for(var s=1;s<a.length;s++)a[s]=arguments[s-1];return e[n].apply(this,a)}}function ts(e,r,n){const a=r.send,s=r.ts,d=r.methodLevel,E=r.methodValue,v=r.val,g=e._logEvent.bindings;Xt(n,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=s,e._logEvent.messages=n.filter(function(o){return g.indexOf(o)===-1}),e._logEvent.level.label=d,e._logEvent.level.value=E,a(d,e._logEvent,v),e._logEvent=rr(g)}function rr(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function rs(e){const r={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)r[n]===void 0&&(r[n]=e[n]);return r}function ns(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Jr:Vr}function Kt(){return{}}function er(e){return e}function Ot(){}function Jr(){return!1}function Vr(){return Date.now()}function is(){return Math.round(Date.now()/1e3)}function ss(){return new Date(Date.now()).toISOString()}function os(){function e(r){return typeof r<"u"&&r}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}const or=N.getDefaultExportFromCjs(mt),as={level:"info"},Lt="custom_context",ar=1e3*1024;class fs{constructor(r){this.nodeValue=r,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class Pr{constructor(r){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=r,this.sizeInBytes=0}append(r){const n=new fs(r);if(n.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${r} with size ${n.size}`);for(;this.size+n.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=n),this.tail=n):(this.head=n,this.tail=n),this.lengthInNodes++,this.sizeInBytes+=n.size}shift(){if(!this.head)return;const r=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=r.size}toArray(){const r=[];let n=this.head;for(;n!==null;)r.push(n.value),n=n.next;return r}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let r=this.head;return{next:()=>{if(!r)return{done:!0,value:null};const n=r.value;return r=r.next,{done:!1,value:n}}}}}class Xr{constructor(r,n=ar){this.level=r??"error",this.levelValue=mt.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=n,this.logs=new Pr(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(r,n){n===mt.levels.values.error?console.error(r):n===mt.levels.values.warn?console.warn(r):n===mt.levels.values.debug?console.debug(r):n===mt.levels.values.trace?console.trace(r):console.log(r)}appendToLogs(r){this.logs.append(ht({timestamp:new Date().toISOString(),log:r}));const n=typeof r=="string"?JSON.parse(r).level:r.level;n>=this.levelValue&&this.forwardToConsole(r,n)}getLogs(){return this.logs}clearLogs(){this.logs=new Pr(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(r){const n=this.getLogArray();return n.push(ht({extraMetadata:r})),new Blob(n,{type:"application/json"})}}class cs{constructor(r,n=ar){this.baseChunkLogger=new Xr(r,n)}write(r){this.baseChunkLogger.appendToLogs(r)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(r){return this.baseChunkLogger.logsToBlob(r)}downloadLogsBlobInBrowser(r){const n=URL.createObjectURL(this.logsToBlob(r)),a=document.createElement("a");a.href=n,a.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(n)}}class us{constructor(r,n=ar){this.baseChunkLogger=new Xr(r,n)}write(r){this.baseChunkLogger.appendToLogs(r)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(r){return this.baseChunkLogger.logsToBlob(r)}}var ls=Object.defineProperty,ds=Object.defineProperties,hs=Object.getOwnPropertyDescriptors,Cr=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable,Mr=(e,r,n)=>r in e?ls(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Ht=(e,r)=>{for(var n in r||(r={}))bs.call(r,n)&&Mr(e,n,r[n]);if(Cr)for(var n of Cr(r))gs.call(r,n)&&Mr(e,n,r[n]);return e},$t=(e,r)=>ds(e,hs(r));function ys(e){return $t(Ht({},e),{level:(e==null?void 0:e.level)||as.level})}function ps(e,r=Lt){return e[r]||""}function _s(e,r,n=Lt){return e[n]=r,e}function qr(e,r=Lt){let n="";return typeof e.bindings>"u"?n=ps(e,r):n=e.bindings().context||"",n}function ms(e,r,n=Lt){const a=qr(e,n);return a.trim()?`${a}/${r}`:r}function ws(e,r,n=Lt){const a=ms(e,r,n),s=e.child({context:a});return _s(s,a,n)}function vs(e){var r,n;const a=new cs((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:or($t(Ht({},e.opts),{level:"trace",browser:$t(Ht({},(n=e.opts)==null?void 0:n.browser),{write:s=>a.write(s)})})),chunkLoggerController:a}}function xs(e){var r;const n=new us((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:or($t(Ht({},e.opts),{level:"trace"}),n),chunkLoggerController:n}}function Es(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?vs(e):xs(e)}var fr={},Yr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=ze.binary,n=ze.wipe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var a=function(){function v(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return v.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},v.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},v.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},v.prototype.update=function(g,o){if(o===void 0&&(o=g.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var l=0;if(this._bytesHashed+=o,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&o>0;)this._buffer[this._bufferLength++]=g[l++],o--;this._bufferLength===this.blockSize&&(d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(o>=this.blockSize&&(l=d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,g,l,o),o%=this.blockSize);o>0;)this._buffer[this._bufferLength++]=g[l++],o--;return this},v.prototype.finish=function(g){if(!this._finished){var o=this._bytesHashed,l=this._bufferLength,y=o/536870912|0,S=o<<3,x=o%128<112?128:256;this._buffer[l]=128;for(var w=l+1;w<x-8;w++)this._buffer[w]=0;r.writeUint32BE(y,this._buffer,x-8),r.writeUint32BE(S,this._buffer,x-4),d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,x),this._finished=!0}for(var w=0;w<this.digestLength/8;w++)r.writeUint32BE(this._stateHi[w],g,w*8),r.writeUint32BE(this._stateLo[w],g,w*8+4);return this},v.prototype.digest=function(){var g=new Uint8Array(this.digestLength);return this.finish(g),g},v.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},v.prototype.restoreState=function(g){return this._stateHi.set(g.stateHi),this._stateLo.set(g.stateLo),this._bufferLength=g.bufferLength,g.buffer&&this._buffer.set(g.buffer),this._bytesHashed=g.bytesHashed,this._finished=!1,this},v.prototype.cleanSavedState=function(g){n.wipe(g.stateHi),n.wipe(g.stateLo),g.buffer&&n.wipe(g.buffer),g.bufferLength=0,g.bytesHashed=0},v}();e.SHA512=a;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function d(v,g,o,l,y,S,x){for(var w=o[0],j=o[1],J=o[2],q=o[3],B=o[4],Ae=o[5],ge=o[6],Me=o[7],$=l[0],M=l[1],je=l[2],et=l[3],ye=l[4],Fe=l[5],We=l[6],Xe=l[7],m,_,Y,le,L,I,O,A;x>=128;){for(var Le=0;Le<16;Le++){var ne=8*Le+S;v[Le]=r.readUint32BE(y,ne),g[Le]=r.readUint32BE(y,ne+4)}for(var Le=0;Le<80;Le++){var wt=w,z=j,gt=J,b=q,h=B,u=Ae,t=ge,f=Me,R=$,P=M,K=je,U=et,D=ye,W=Fe,Re=We,de=Xe;if(m=Me,_=Xe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=(B>>>14|ye<<18)^(B>>>18|ye<<14)^(ye>>>9|B<<23),_=(ye>>>14|B<<18)^(ye>>>18|B<<14)^(B>>>9|ye<<23),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=B&Ae^~B&ge,_=ye&Fe^~ye&We,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=s[Le*2],_=s[Le*2+1],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=v[Le%16],_=g[Le%16],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,Y=O&65535|A<<16,le=L&65535|I<<16,m=Y,_=le,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=(w>>>28|$<<4)^($>>>2|w<<30)^($>>>7|w<<25),_=($>>>28|w<<4)^(w>>>2|$<<30)^(w>>>7|$<<25),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=w&j^w&J^j&J,_=$&M^$&je^M&je,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,f=O&65535|A<<16,de=L&65535|I<<16,m=b,_=U,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=Y,_=le,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,b=O&65535|A<<16,U=L&65535|I<<16,j=wt,J=z,q=gt,B=b,Ae=h,ge=u,Me=t,w=f,M=R,je=P,et=K,ye=U,Fe=D,We=W,Xe=Re,$=de,Le%16===15)for(var ne=0;ne<16;ne++)m=v[ne],_=g[ne],L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=v[(ne+9)%16],_=g[(ne+9)%16],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,Y=v[(ne+1)%16],le=g[(ne+1)%16],m=(Y>>>1|le<<31)^(Y>>>8|le<<24)^Y>>>7,_=(le>>>1|Y<<31)^(le>>>8|Y<<24)^(le>>>7|Y<<25),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,Y=v[(ne+14)%16],le=g[(ne+14)%16],m=(Y>>>19|le<<13)^(le>>>29|Y<<3)^Y>>>6,_=(le>>>19|Y<<13)^(Y>>>29|le<<3)^(le>>>6|Y<<26),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,v[ne]=O&65535|A<<16,g[ne]=L&65535|I<<16}m=w,_=$,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[0],_=l[0],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[0]=w=O&65535|A<<16,l[0]=$=L&65535|I<<16,m=j,_=M,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[1],_=l[1],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[1]=j=O&65535|A<<16,l[1]=M=L&65535|I<<16,m=J,_=je,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[2],_=l[2],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[2]=J=O&65535|A<<16,l[2]=je=L&65535|I<<16,m=q,_=et,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[3],_=l[3],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[3]=q=O&65535|A<<16,l[3]=et=L&65535|I<<16,m=B,_=ye,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[4],_=l[4],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[4]=B=O&65535|A<<16,l[4]=ye=L&65535|I<<16,m=Ae,_=Fe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[5],_=l[5],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[5]=Ae=O&65535|A<<16,l[5]=Fe=L&65535|I<<16,m=ge,_=We,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[6],_=l[6],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[6]=ge=O&65535|A<<16,l[6]=We=L&65535|I<<16,m=Me,_=Xe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[7],_=l[7],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[7]=Me=O&65535|A<<16,l[7]=Xe=L&65535|I<<16,S+=128,x-=128}return S}function E(v){var g=new a;g.update(v);var o=g.digest();return g.clean(),o}e.hash=E})(Yr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const r=ze.random,n=Yr,a=ze.wipe;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function s(b){const h=new Float64Array(16);if(b)for(let u=0;u<b.length;u++)h[u]=b[u];return h}const d=new Uint8Array(32);d[0]=9;const E=s(),v=s([1]),g=s([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),o=s([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=s([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=s([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),S=s([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function x(b,h){for(let u=0;u<16;u++)b[u]=h[u]|0}function w(b){let h=1;for(let u=0;u<16;u++){let t=b[u]+h+65535;h=Math.floor(t/65536),b[u]=t-h*65536}b[0]+=h-1+37*(h-1)}function j(b,h,u){const t=~(u-1);for(let f=0;f<16;f++){const R=t&(b[f]^h[f]);b[f]^=R,h[f]^=R}}function J(b,h){const u=s(),t=s();for(let f=0;f<16;f++)t[f]=h[f];w(t),w(t),w(t);for(let f=0;f<2;f++){u[0]=t[0]-65517;for(let P=1;P<15;P++)u[P]=t[P]-65535-(u[P-1]>>16&1),u[P-1]&=65535;u[15]=t[15]-32767-(u[14]>>16&1);const R=u[15]>>16&1;u[14]&=65535,j(t,u,1-R)}for(let f=0;f<16;f++)b[2*f]=t[f]&255,b[2*f+1]=t[f]>>8}function q(b,h){let u=0;for(let t=0;t<32;t++)u|=b[t]^h[t];return(1&u-1>>>8)-1}function B(b,h){const u=new Uint8Array(32),t=new Uint8Array(32);return J(u,b),J(t,h),q(u,t)}function Ae(b){const h=new Uint8Array(32);return J(h,b),h[0]&1}function ge(b,h){for(let u=0;u<16;u++)b[u]=h[2*u]+(h[2*u+1]<<8);b[15]&=32767}function Me(b,h,u){for(let t=0;t<16;t++)b[t]=h[t]+u[t]}function $(b,h,u){for(let t=0;t<16;t++)b[t]=h[t]-u[t]}function M(b,h,u){let t,f,R=0,P=0,K=0,U=0,D=0,W=0,Re=0,de=0,Pe=0,pe=0,he=0,ie=0,re=0,Z=0,V=0,H=0,se=0,_e=0,G=0,Ne=0,De=0,He=0,$e=0,Ke=0,qe=0,Ze=0,st=0,Ge=0,ct=0,vt=0,Rt=0,oe=u[0],Q=u[1],ae=u[2],fe=u[3],ce=u[4],ee=u[5],me=u[6],we=u[7],ve=u[8],xe=u[9],Ee=u[10],be=u[11],ue=u[12],F=u[13],Se=u[14],Ie=u[15];t=h[0],R+=t*oe,P+=t*Q,K+=t*ae,U+=t*fe,D+=t*ce,W+=t*ee,Re+=t*me,de+=t*we,Pe+=t*ve,pe+=t*xe,he+=t*Ee,ie+=t*be,re+=t*ue,Z+=t*F,V+=t*Se,H+=t*Ie,t=h[1],P+=t*oe,K+=t*Q,U+=t*ae,D+=t*fe,W+=t*ce,Re+=t*ee,de+=t*me,Pe+=t*we,pe+=t*ve,he+=t*xe,ie+=t*Ee,re+=t*be,Z+=t*ue,V+=t*F,H+=t*Se,se+=t*Ie,t=h[2],K+=t*oe,U+=t*Q,D+=t*ae,W+=t*fe,Re+=t*ce,de+=t*ee,Pe+=t*me,pe+=t*we,he+=t*ve,ie+=t*xe,re+=t*Ee,Z+=t*be,V+=t*ue,H+=t*F,se+=t*Se,_e+=t*Ie,t=h[3],U+=t*oe,D+=t*Q,W+=t*ae,Re+=t*fe,de+=t*ce,Pe+=t*ee,pe+=t*me,he+=t*we,ie+=t*ve,re+=t*xe,Z+=t*Ee,V+=t*be,H+=t*ue,se+=t*F,_e+=t*Se,G+=t*Ie,t=h[4],D+=t*oe,W+=t*Q,Re+=t*ae,de+=t*fe,Pe+=t*ce,pe+=t*ee,he+=t*me,ie+=t*we,re+=t*ve,Z+=t*xe,V+=t*Ee,H+=t*be,se+=t*ue,_e+=t*F,G+=t*Se,Ne+=t*Ie,t=h[5],W+=t*oe,Re+=t*Q,de+=t*ae,Pe+=t*fe,pe+=t*ce,he+=t*ee,ie+=t*me,re+=t*we,Z+=t*ve,V+=t*xe,H+=t*Ee,se+=t*be,_e+=t*ue,G+=t*F,Ne+=t*Se,De+=t*Ie,t=h[6],Re+=t*oe,de+=t*Q,Pe+=t*ae,pe+=t*fe,he+=t*ce,ie+=t*ee,re+=t*me,Z+=t*we,V+=t*ve,H+=t*xe,se+=t*Ee,_e+=t*be,G+=t*ue,Ne+=t*F,De+=t*Se,He+=t*Ie,t=h[7],de+=t*oe,Pe+=t*Q,pe+=t*ae,he+=t*fe,ie+=t*ce,re+=t*ee,Z+=t*me,V+=t*we,H+=t*ve,se+=t*xe,_e+=t*Ee,G+=t*be,Ne+=t*ue,De+=t*F,He+=t*Se,$e+=t*Ie,t=h[8],Pe+=t*oe,pe+=t*Q,he+=t*ae,ie+=t*fe,re+=t*ce,Z+=t*ee,V+=t*me,H+=t*we,se+=t*ve,_e+=t*xe,G+=t*Ee,Ne+=t*be,De+=t*ue,He+=t*F,$e+=t*Se,Ke+=t*Ie,t=h[9],pe+=t*oe,he+=t*Q,ie+=t*ae,re+=t*fe,Z+=t*ce,V+=t*ee,H+=t*me,se+=t*we,_e+=t*ve,G+=t*xe,Ne+=t*Ee,De+=t*be,He+=t*ue,$e+=t*F,Ke+=t*Se,qe+=t*Ie,t=h[10],he+=t*oe,ie+=t*Q,re+=t*ae,Z+=t*fe,V+=t*ce,H+=t*ee,se+=t*me,_e+=t*we,G+=t*ve,Ne+=t*xe,De+=t*Ee,He+=t*be,$e+=t*ue,Ke+=t*F,qe+=t*Se,Ze+=t*Ie,t=h[11],ie+=t*oe,re+=t*Q,Z+=t*ae,V+=t*fe,H+=t*ce,se+=t*ee,_e+=t*me,G+=t*we,Ne+=t*ve,De+=t*xe,He+=t*Ee,$e+=t*be,Ke+=t*ue,qe+=t*F,Ze+=t*Se,st+=t*Ie,t=h[12],re+=t*oe,Z+=t*Q,V+=t*ae,H+=t*fe,se+=t*ce,_e+=t*ee,G+=t*me,Ne+=t*we,De+=t*ve,He+=t*xe,$e+=t*Ee,Ke+=t*be,qe+=t*ue,Ze+=t*F,st+=t*Se,Ge+=t*Ie,t=h[13],Z+=t*oe,V+=t*Q,H+=t*ae,se+=t*fe,_e+=t*ce,G+=t*ee,Ne+=t*me,De+=t*we,He+=t*ve,$e+=t*xe,Ke+=t*Ee,qe+=t*be,Ze+=t*ue,st+=t*F,Ge+=t*Se,ct+=t*Ie,t=h[14],V+=t*oe,H+=t*Q,se+=t*ae,_e+=t*fe,G+=t*ce,Ne+=t*ee,De+=t*me,He+=t*we,$e+=t*ve,Ke+=t*xe,qe+=t*Ee,Ze+=t*be,st+=t*ue,Ge+=t*F,ct+=t*Se,vt+=t*Ie,t=h[15],H+=t*oe,se+=t*Q,_e+=t*ae,G+=t*fe,Ne+=t*ce,De+=t*ee,He+=t*me,$e+=t*we,Ke+=t*ve,qe+=t*xe,Ze+=t*Ee,st+=t*be,Ge+=t*ue,ct+=t*F,vt+=t*Se,Rt+=t*Ie,R+=38*se,P+=38*_e,K+=38*G,U+=38*Ne,D+=38*De,W+=38*He,Re+=38*$e,de+=38*Ke,Pe+=38*qe,pe+=38*Ze,he+=38*st,ie+=38*Ge,re+=38*ct,Z+=38*vt,V+=38*Rt,f=1,t=R+f+65535,f=Math.floor(t/65536),R=t-f*65536,t=P+f+65535,f=Math.floor(t/65536),P=t-f*65536,t=K+f+65535,f=Math.floor(t/65536),K=t-f*65536,t=U+f+65535,f=Math.floor(t/65536),U=t-f*65536,t=D+f+65535,f=Math.floor(t/65536),D=t-f*65536,t=W+f+65535,f=Math.floor(t/65536),W=t-f*65536,t=Re+f+65535,f=Math.floor(t/65536),Re=t-f*65536,t=de+f+65535,f=Math.floor(t/65536),de=t-f*65536,t=Pe+f+65535,f=Math.floor(t/65536),Pe=t-f*65536,t=pe+f+65535,f=Math.floor(t/65536),pe=t-f*65536,t=he+f+65535,f=Math.floor(t/65536),he=t-f*65536,t=ie+f+65535,f=Math.floor(t/65536),ie=t-f*65536,t=re+f+65535,f=Math.floor(t/65536),re=t-f*65536,t=Z+f+65535,f=Math.floor(t/65536),Z=t-f*65536,t=V+f+65535,f=Math.floor(t/65536),V=t-f*65536,t=H+f+65535,f=Math.floor(t/65536),H=t-f*65536,R+=f-1+37*(f-1),f=1,t=R+f+65535,f=Math.floor(t/65536),R=t-f*65536,t=P+f+65535,f=Math.floor(t/65536),P=t-f*65536,t=K+f+65535,f=Math.floor(t/65536),K=t-f*65536,t=U+f+65535,f=Math.floor(t/65536),U=t-f*65536,t=D+f+65535,f=Math.floor(t/65536),D=t-f*65536,t=W+f+65535,f=Math.floor(t/65536),W=t-f*65536,t=Re+f+65535,f=Math.floor(t/65536),Re=t-f*65536,t=de+f+65535,f=Math.floor(t/65536),de=t-f*65536,t=Pe+f+65535,f=Math.floor(t/65536),Pe=t-f*65536,t=pe+f+65535,f=Math.floor(t/65536),pe=t-f*65536,t=he+f+65535,f=Math.floor(t/65536),he=t-f*65536,t=ie+f+65535,f=Math.floor(t/65536),ie=t-f*65536,t=re+f+65535,f=Math.floor(t/65536),re=t-f*65536,t=Z+f+65535,f=Math.floor(t/65536),Z=t-f*65536,t=V+f+65535,f=Math.floor(t/65536),V=t-f*65536,t=H+f+65535,f=Math.floor(t/65536),H=t-f*65536,R+=f-1+37*(f-1),b[0]=R,b[1]=P,b[2]=K,b[3]=U,b[4]=D,b[5]=W,b[6]=Re,b[7]=de,b[8]=Pe,b[9]=pe,b[10]=he,b[11]=ie,b[12]=re,b[13]=Z,b[14]=V,b[15]=H}function je(b,h){M(b,h,h)}function et(b,h){const u=s();let t;for(t=0;t<16;t++)u[t]=h[t];for(t=253;t>=0;t--)je(u,u),t!==2&&t!==4&&M(u,u,h);for(t=0;t<16;t++)b[t]=u[t]}function ye(b,h){const u=s();let t;for(t=0;t<16;t++)u[t]=h[t];for(t=250;t>=0;t--)je(u,u),t!==1&&M(u,u,h);for(t=0;t<16;t++)b[t]=u[t]}function Fe(b,h){const u=s(),t=s(),f=s(),R=s(),P=s(),K=s(),U=s(),D=s(),W=s();$(u,b[1],b[0]),$(W,h[1],h[0]),M(u,u,W),Me(t,b[0],b[1]),Me(W,h[0],h[1]),M(t,t,W),M(f,b[3],h[3]),M(f,f,o),M(R,b[2],h[2]),Me(R,R,R),$(P,t,u),$(K,R,f),Me(U,R,f),Me(D,t,u),M(b[0],P,K),M(b[1],D,U),M(b[2],U,K),M(b[3],P,D)}function We(b,h,u){for(let t=0;t<4;t++)j(b[t],h[t],u)}function Xe(b,h){const u=s(),t=s(),f=s();et(f,h[2]),M(u,h[0],f),M(t,h[1],f),J(b,t),b[31]^=Ae(u)<<7}function m(b,h,u){x(b[0],E),x(b[1],v),x(b[2],v),x(b[3],E);for(let t=255;t>=0;--t){const f=u[t/8|0]>>(t&7)&1;We(b,h,f),Fe(h,b),Fe(b,b),We(b,h,f)}}function _(b,h){const u=[s(),s(),s(),s()];x(u[0],l),x(u[1],y),x(u[2],v),M(u[3],l,y),m(b,u,h)}function Y(b){if(b.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const h=(0,n.hash)(b);h[0]&=248,h[31]&=127,h[31]|=64;const u=new Uint8Array(32),t=[s(),s(),s(),s()];_(t,h),Xe(u,t);const f=new Uint8Array(64);return f.set(b),f.set(u,32),{publicKey:u,secretKey:f}}e.generateKeyPairFromSeed=Y;function le(b){const h=(0,r.randomBytes)(32,b),u=Y(h);return(0,a.wipe)(h),u}e.generateKeyPair=le;function L(b){if(b.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(b.subarray(32))}e.extractPublicKeyFromSecretKey=L;const I=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function O(b,h){let u,t,f,R;for(t=63;t>=32;--t){for(u=0,f=t-32,R=t-12;f<R;++f)h[f]+=u-16*h[t]*I[f-(t-32)],u=Math.floor((h[f]+128)/256),h[f]-=u*256;h[f]+=u,h[t]=0}for(u=0,f=0;f<32;f++)h[f]+=u-(h[31]>>4)*I[f],u=h[f]>>8,h[f]&=255;for(f=0;f<32;f++)h[f]-=u*I[f];for(t=0;t<32;t++)h[t+1]+=h[t]>>8,b[t]=h[t]&255}function A(b){const h=new Float64Array(64);for(let u=0;u<64;u++)h[u]=b[u];for(let u=0;u<64;u++)b[u]=0;O(b,h)}function Le(b,h){const u=new Float64Array(64),t=[s(),s(),s(),s()],f=(0,n.hash)(b.subarray(0,32));f[0]&=248,f[31]&=127,f[31]|=64;const R=new Uint8Array(64);R.set(f.subarray(32),32);const P=new n.SHA512;P.update(R.subarray(32)),P.update(h);const K=P.digest();P.clean(),A(K),_(t,K),Xe(R,t),P.reset(),P.update(R.subarray(0,32)),P.update(b.subarray(32)),P.update(h);const U=P.digest();A(U);for(let D=0;D<32;D++)u[D]=K[D];for(let D=0;D<32;D++)for(let W=0;W<32;W++)u[D+W]+=U[D]*f[W];return O(R.subarray(32),u),R}e.sign=Le;function ne(b,h){const u=s(),t=s(),f=s(),R=s(),P=s(),K=s(),U=s();return x(b[2],v),ge(b[1],h),je(f,b[1]),M(R,f,g),$(f,f,b[2]),Me(R,b[2],R),je(P,R),je(K,P),M(U,K,P),M(u,U,f),M(u,u,R),ye(u,u),M(u,u,f),M(u,u,R),M(u,u,R),M(b[0],u,R),je(t,b[0]),M(t,t,R),B(t,f)&&M(b[0],b[0],S),je(t,b[0]),M(t,t,R),B(t,f)?-1:(Ae(b[0])===h[31]>>7&&$(b[0],E,b[0]),M(b[3],b[0],b[1]),0)}function wt(b,h,u){const t=new Uint8Array(32),f=[s(),s(),s(),s()],R=[s(),s(),s(),s()];if(u.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(ne(R,b))return!1;const P=new n.SHA512;P.update(u.subarray(0,32)),P.update(b),P.update(h);const K=P.digest();return A(K),m(f,R,K),_(R,u.subarray(32)),Fe(f,R),Xe(t,f),!q(u,t)}e.verify=wt;function z(b){let h=[s(),s(),s(),s()];if(ne(h,b))throw new Error("Ed25519: invalid public key");let u=s(),t=s(),f=h[1];Me(u,v,f),$(t,v,f),et(t,t),M(u,u,t);let R=new Uint8Array(32);return J(R,u),R}e.convertPublicKeyToX25519=z;function gt(b){const h=(0,n.hash)(b.subarray(0,32));h[0]&=248,h[31]&=127,h[31]|=64;const u=new Uint8Array(h.subarray(0,32));return(0,a.wipe)(h),u}e.convertSecretKeyToX25519=gt})(fr);const Ss="EdDSA",Is="JWT",Zr=".",Qr="base64url",Os="utf8",Ts="utf8",As=":",Ls="did",Rs="key",jr="base58btc",Ps="z",Cs="K36",Ms=32;function Gt(e){return Jt(Ft(ht(e),Os),Qr)}function en(e){const r=Ft(Cs,jr),n=Ps+Jt(Hr([r,e]),jr);return[Ls,Rs,n].join(As)}function js(e){return Jt(e,Qr)}function Ns(e){return Ft([Gt(e.header),Gt(e.payload)].join(Zr),Ts)}function Bs(e){return[Gt(e.header),Gt(e.payload),js(e.signature)].join(Zr)}function zs(e=ze.random.randomBytes(Ms)){return fr.generateKeyPairFromSeed(e)}async function Ds(e,r,n,a,s=ze.cjs.fromMiliseconds(Date.now())){const d={alg:Ss,typ:Is},E=en(a.publicKey),v=s+n,g={iss:E,sub:e,aud:r,iat:s,exp:v},o=Ns({header:d,payload:g}),l=fr.sign(a.secretKey,o);return Bs({header:d,payload:g,signature:l})}const Ks="PARSE_ERROR",Us="INVALID_REQUEST",Ws="METHOD_NOT_FOUND",Hs="INVALID_PARAMS",tn="INTERNAL_ERROR",cr="SERVER_ERROR",$s=[-32700,-32600,-32601,-32602,-32603],St={[Ks]:{code:-32700,message:"Parse error"},[Us]:{code:-32600,message:"Invalid Request"},[Ws]:{code:-32601,message:"Method not found"},[Hs]:{code:-32602,message:"Invalid params"},[tn]:{code:-32603,message:"Internal error"},[cr]:{code:-32e3,message:"Server error"}},rn=cr;function Gs(e){return $s.includes(e)}function Nr(e){return Object.keys(St).includes(e)?St[e]:St[rn]}function ks(e){const r=Object.values(St).find(n=>n.code===e);return r||St[rn]}function nn(e,r,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${r}`):e}var sn={};/*! *****************************************************************************
1
+ "use strict";const N=require("./index-DpZGf7ao.js"),ze=require("./index-DjM7nJNJ.js"),Qn=require("./events-wlbN7cam.js");function Wr(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function Hr(e,r){r||(r=e.reduce((s,d)=>s+d.length,0));const n=Wr(r);let a=0;for(const s of e)n.set(s,a),a+=s.length;return n}const vr={...ze.identityBase,...ze.base2,...ze.base8,...ze.base10,...ze.base16,...ze.base32,...ze.base36,...ze.base58,...ze.base64,...ze.base256emoji};function $r(e,r,n,a){return{name:e,prefix:r,encoder:{name:e,prefix:r,encode:n},decoder:{decode:a}}}const xr=$r("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Yt=$r("ascii","a",e=>{let r="a";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return r},e=>{e=e.substring(1);const r=Wr(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}),Gr={utf8:xr,"utf-8":xr,hex:vr.base16,latin1:Yt,ascii:Yt,binary:Yt,...vr};function Ft(e,r="utf8"){const n=Gr[r];if(!n)throw new Error(`Unsupported encoding "${r}"`);return(r==="utf8"||r==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):n.decoder.decode(`${n.prefix}${e}`)}function Jt(e,r="utf8"){const n=Gr[r];if(!n)throw new Error(`Unsupported encoding "${r}"`);return(r==="utf8"||r==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):n.encoder.encode(e).substring(1)}var Er=function(e,r,n){if(n||arguments.length===2)for(var a=0,s=r.length,d;a<s;a++)(d||!(a in r))&&(d||(d=Array.prototype.slice.call(r,0,a)),d[a]=r[a]);return e.concat(d||Array.prototype.slice.call(r))},ei=function(){function e(r,n,a){this.name=r,this.version=n,this.os=a,this.type="browser"}return e}(),ti=function(){function e(r){this.version=r,this.type="node",this.name="node",this.os=N.dist.process.platform}return e}(),ri=function(){function e(r,n,a,s){this.name=r,this.version=n,this.os=a,this.bot=s,this.type="bot-device"}return e}(),ni=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),ii=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),si=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,oi=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Sr=3,ai=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",si]],Ir=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function fi(e){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new ii:typeof navigator<"u"?ui(navigator.userAgent):di()}function ci(e){return e!==""&&ai.reduce(function(r,n){var a=n[0],s=n[1];if(r)return r;var d=s.exec(e);return!!d&&[a,d]},!1)}function ui(e){var r=ci(e);if(!r)return null;var n=r[0],a=r[1];if(n==="searchbot")return new ni;var s=a[1]&&a[1].split(".").join("_").split("_").slice(0,3);s?s.length<Sr&&(s=Er(Er([],s,!0),hi(Sr-s.length),!0)):s=[];var d=s.join("."),E=li(e),v=oi.exec(e);return v&&v[1]?new ri(n,d,E,v[1]):new ei(n,d,E)}function li(e){for(var r=0,n=Ir.length;r<n;r++){var a=Ir[r],s=a[0],d=a[1],E=d.exec(e);if(E)return s}return null}function di(){var e=typeof N.dist.process<"u"&&N.dist.process.version;return e?new ti(N.dist.process.version.slice(1)):null}function hi(e){for(var r=[],n=0;n<e;n++)r.push("0");return r}const bi={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}},gi=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,yi=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,pi=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function _i(e,r){if(e==="__proto__"||e==="constructor"&&r&&typeof r=="object"&&"prototype"in r){mi(e);return}return r}function mi(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function zt(e,r={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;if(a==="undefined")return;if(a==="null")return null;if(a==="nan")return Number.NaN;if(a==="infinity")return Number.POSITIVE_INFINITY;if(a==="-infinity")return Number.NEGATIVE_INFINITY}if(!pi.test(e)){if(r.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(gi.test(e)||yi.test(e)){if(r.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,_i)}return JSON.parse(e)}catch(a){if(r.strict)throw a;return e}}function wi(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Te(e,...r){try{return wi(e(...r))}catch(n){return Promise.reject(n)}}function vi(e){const r=typeof e;return e===null||r!=="object"&&r!=="function"}function xi(e){const r=Object.getPrototypeOf(e);return!r||r.isPrototypeOf(Object)}function Ut(e){if(vi(e))return String(e);if(xi(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON=="function")return Ut(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function kr(){if(typeof N.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const tr="base64:";function Ei(e){if(typeof e=="string")return e;kr();const r=N.dist.Buffer.from(e).toString("base64");return tr+r}function Si(e){return typeof e!="string"||!e.startsWith(tr)?e:(kr(),N.dist.Buffer.from(e.slice(tr.length),"base64"))}function Ue(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function Ii(...e){return Ue(e.join(":"))}function Dt(e){return e=Ue(e),e?e+":":""}const Oi="memory",Ti=()=>{const e=new Map;return{name:Oi,options:{},hasItem(r){return e.has(r)},getItem(r){return e.get(r)??null},getItemRaw(r){return e.get(r)??null},setItem(r,n){e.set(r,n)},setItemRaw(r,n){e.set(r,n)},removeItem(r){e.delete(r)},getKeys(){return Array.from(e.keys())},clear(){e.clear()},dispose(){e.clear()}}};function Ai(e={}){const r={mounts:{"":e.driver||Ti()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=o=>{for(const l of r.mountpoints)if(o.startsWith(l))return{base:l,relativeKey:o.slice(l.length),driver:r.mounts[l]};return{base:"",relativeKey:o,driver:r.mounts[""]}},a=(o,l)=>r.mountpoints.filter(y=>y.startsWith(o)||l&&o.startsWith(y)).map(y=>({relativeBase:o.length>y.length?o.slice(y.length):void 0,mountpoint:y,driver:r.mounts[y]})),s=(o,l)=>{if(r.watching){l=Ue(l);for(const y of r.watchListeners)y(o,l)}},d=async()=>{if(!r.watching){r.watching=!0;for(const o in r.mounts)r.unwatch[o]=await Or(r.mounts[o],s,o)}},E=async()=>{if(r.watching){for(const o in r.unwatch)await r.unwatch[o]();r.unwatch={},r.watching=!1}},v=(o,l,y)=>{const S=new Map,x=w=>{let j=S.get(w.base);return j||(j={driver:w.driver,base:w.base,items:[]},S.set(w.base,j)),j};for(const w of o){const j=typeof w=="string",J=Ue(j?w:w.key),q=j?void 0:w.value,B=j||!w.options?l:{...l,...w.options},Ae=n(J);x(Ae).items.push({key:J,value:q,relativeKey:Ae.relativeKey,options:B})}return Promise.all([...S.values()].map(w=>y(w))).then(w=>w.flat())},g={hasItem(o,l={}){o=Ue(o);const{relativeKey:y,driver:S}=n(o);return Te(S.hasItem,y,l)},getItem(o,l={}){o=Ue(o);const{relativeKey:y,driver:S}=n(o);return Te(S.getItem,y,l).then(x=>zt(x))},getItems(o,l){return v(o,l,y=>y.driver.getItems?Te(y.driver.getItems,y.items.map(S=>({key:S.relativeKey,options:S.options})),l).then(S=>S.map(x=>({key:Ii(y.base,x.key),value:zt(x.value)}))):Promise.all(y.items.map(S=>Te(y.driver.getItem,S.relativeKey,S.options).then(x=>({key:S.key,value:zt(x)})))))},getItemRaw(o,l={}){o=Ue(o);const{relativeKey:y,driver:S}=n(o);return S.getItemRaw?Te(S.getItemRaw,y,l):Te(S.getItem,y,l).then(x=>Si(x))},async setItem(o,l,y={}){if(l===void 0)return g.removeItem(o);o=Ue(o);const{relativeKey:S,driver:x}=n(o);x.setItem&&(await Te(x.setItem,S,Ut(l),y),x.watch||s("update",o))},async setItems(o,l){await v(o,l,async y=>{if(y.driver.setItems)return Te(y.driver.setItems,y.items.map(S=>({key:S.relativeKey,value:Ut(S.value),options:S.options})),l);y.driver.setItem&&await Promise.all(y.items.map(S=>Te(y.driver.setItem,S.relativeKey,Ut(S.value),S.options)))})},async setItemRaw(o,l,y={}){if(l===void 0)return g.removeItem(o,y);o=Ue(o);const{relativeKey:S,driver:x}=n(o);if(x.setItemRaw)await Te(x.setItemRaw,S,l,y);else if(x.setItem)await Te(x.setItem,S,Ei(l),y);else return;x.watch||s("update",o)},async removeItem(o,l={}){typeof l=="boolean"&&(l={removeMeta:l}),o=Ue(o);const{relativeKey:y,driver:S}=n(o);S.removeItem&&(await Te(S.removeItem,y,l),(l.removeMeta||l.removeMata)&&await Te(S.removeItem,y+"$",l),S.watch||s("remove",o))},async getMeta(o,l={}){typeof l=="boolean"&&(l={nativeOnly:l}),o=Ue(o);const{relativeKey:y,driver:S}=n(o),x=Object.create(null);if(S.getMeta&&Object.assign(x,await Te(S.getMeta,y,l)),!l.nativeOnly){const w=await Te(S.getItem,y+"$",l).then(j=>zt(j));w&&typeof w=="object"&&(typeof w.atime=="string"&&(w.atime=new Date(w.atime)),typeof w.mtime=="string"&&(w.mtime=new Date(w.mtime)),Object.assign(x,w))}return x},setMeta(o,l,y={}){return this.setItem(o+"$",l,y)},removeMeta(o,l={}){return this.removeItem(o+"$",l)},async getKeys(o,l={}){o=Dt(o);const y=a(o,!0);let S=[];const x=[];for(const w of y){const J=(await Te(w.driver.getKeys,w.relativeBase,l)).map(q=>w.mountpoint+Ue(q)).filter(q=>!S.some(B=>q.startsWith(B)));x.push(...J),S=[w.mountpoint,...S.filter(q=>!q.startsWith(w.mountpoint))]}return o?x.filter(w=>w.startsWith(o)&&!w.endsWith("$")):x.filter(w=>!w.endsWith("$"))},async clear(o,l={}){o=Dt(o),await Promise.all(a(o,!1).map(async y=>{if(y.driver.clear)return Te(y.driver.clear,y.relativeBase,l);if(y.driver.removeItem){const S=await y.driver.getKeys(y.relativeBase||"",l);return Promise.all(S.map(x=>y.driver.removeItem(x,l)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(o=>Tr(o)))},async watch(o){return await d(),r.watchListeners.push(o),async()=>{r.watchListeners=r.watchListeners.filter(l=>l!==o),r.watchListeners.length===0&&await E()}},async unwatch(){r.watchListeners=[],await E()},mount(o,l){if(o=Dt(o),o&&r.mounts[o])throw new Error(`already mounted at ${o}`);return o&&(r.mountpoints.push(o),r.mountpoints.sort((y,S)=>S.length-y.length)),r.mounts[o]=l,r.watching&&Promise.resolve(Or(l,s,o)).then(y=>{r.unwatch[o]=y}).catch(console.error),g},async unmount(o,l=!0){o=Dt(o),!(!o||!r.mounts[o])&&(r.watching&&o in r.unwatch&&(r.unwatch[o](),delete r.unwatch[o]),l&&await Tr(r.mounts[o]),r.mountpoints=r.mountpoints.filter(y=>y!==o),delete r.mounts[o])},getMount(o=""){o=Ue(o)+":";const l=n(o);return{driver:l.driver,base:l.base}},getMounts(o="",l={}){return o=Ue(o),a(o,l.parents).map(S=>({driver:S.driver,base:S.mountpoint}))}};return g}function Or(e,r,n){return e.watch?e.watch((a,s)=>r(a,n+s)):()=>{}}async function Tr(e){typeof e.dispose=="function"&&await Te(e.dispose)}function bt(e){return new Promise((r,n)=>{e.oncomplete=e.onsuccess=()=>r(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Fr(e,r){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(r);const a=bt(n);return(s,d)=>a.then(E=>d(E.transaction(r,s).objectStore(r)))}let Zt;function At(){return Zt||(Zt=Fr("keyval-store","keyval")),Zt}function Ar(e,r=At()){return r("readonly",n=>bt(n.get(e)))}function Li(e,r,n=At()){return n("readwrite",a=>(a.put(r,e),bt(a.transaction)))}function Ri(e,r=At()){return r("readwrite",n=>(n.delete(e),bt(n.transaction)))}function Pi(e=At()){return e("readwrite",r=>(r.clear(),bt(r.transaction)))}function Ci(e,r){return e.openCursor().onsuccess=function(){this.result&&(r(this.result),this.result.continue())},bt(e.transaction)}function Mi(e=At()){return e("readonly",r=>{if(r.getAllKeys)return bt(r.getAllKeys());const n=[];return Ci(r,a=>n.push(a.key)).then(()=>n)})}const ji=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n),Ni=e=>{const r=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,n=e.replace(r,'$1"$2n"$3');return JSON.parse(n,(a,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Vt(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return Ni(e)}catch{return e}}function ht(e){return typeof e=="string"?e:ji(e)||""}const Bi="idb-keyval";var zi=(e={})=>{const r=e.base&&e.base.length>0?`${e.base}:`:"",n=s=>r+s;let a;return e.dbName&&e.storeName&&(a=Fr(e.dbName,e.storeName)),{name:Bi,options:e,async hasItem(s){return!(typeof await Ar(n(s),a)>"u")},async getItem(s){return await Ar(n(s),a)??null},setItem(s,d){return Li(n(s),d,a)},removeItem(s){return Ri(n(s),a)},getKeys(){return Mi(a)},clear(){return Pi(a)}}};const Di="WALLET_CONNECT_V2_INDEXED_DB",Ki="keyvaluestorage";let Ui=class{constructor(){this.indexedDb=Ai({driver:zi({dbName:Di,storeName:Ki})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(r=>[r.key,r.value])}async getItem(r){const n=await this.indexedDb.getItem(r);if(n!==null)return n}async setItem(r,n){await this.indexedDb.setItem(r,ht(n))}async removeItem(r){await this.indexedDb.removeItem(r)}};var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof N.dist.global<"u"?N.dist.global:typeof self<"u"?self:{},Wt={exports:{}};(function(){let e;function r(){}e=r,e.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},e.prototype.setItem=function(n,a){this[n]=String(a)},e.prototype.removeItem=function(n){delete this[n]},e.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(a){n[a]=void 0,delete n[a]})},e.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Qt<"u"&&Qt.localStorage?Wt.exports=Qt.localStorage:typeof window<"u"&&window.localStorage?Wt.exports=window.localStorage:Wt.exports=new r})();function Wi(e){var r;return[e[0],Vt((r=e[1])!=null?r:"")]}class Hi{constructor(){this.localStorage=Wt.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Wi)}async getItem(r){const n=this.localStorage.getItem(r);if(n!==null)return Vt(n)}async setItem(r,n){this.localStorage.setItem(r,ht(n))}async removeItem(r){this.localStorage.removeItem(r)}}const $i="wc_storage_version",Lr=1,Gi=async(e,r,n)=>{const a=$i,s=await r.getItem(a);if(s&&s>=Lr){n(r);return}const d=await e.getKeys();if(!d.length){n(r);return}const E=[];for(;d.length;){const v=d.shift();if(!v)continue;const g=v.toLowerCase();if(g.includes("wc@")||g.includes("walletconnect")||g.includes("wc_")||g.includes("wallet_connect")){const o=await e.getItem(v);await r.setItem(v,o),E.push(v)}}await r.setItem(a,Lr),n(r),ki(e,E)},ki=async(e,r)=>{r.length&&r.forEach(async n=>{await e.removeItem(n)})};let Fi=class{constructor(){this.initialized=!1,this.setInitialized=n=>{this.storage=n,this.initialized=!0};const r=new Hi;this.storage=r;try{const n=new Ui;Gi(r,n,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(r){return await this.initialize(),this.storage.getItem(r)}async setItem(r,n){return await this.initialize(),this.storage.setItem(r,n)}async removeItem(r){return await this.initialize(),this.storage.removeItem(r)}async initialize(){this.initialized||await new Promise(r=>{const n=setInterval(()=>{this.initialized&&(clearInterval(n),r())},20)})}};class Ji{}function Vi(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Xi=qi;function qi(e,r,n){var a=n&&n.stringify||Vi,s=1;if(typeof e=="object"&&e!==null){var d=r.length+s;if(d===1)return e;var E=new Array(d);E[0]=a(e);for(var v=1;v<d;v++)E[v]=a(r[v]);return E.join(" ")}if(typeof e!="string")return e;var g=r.length;if(g===0)return e;for(var o="",l=1-s,y=-1,S=e&&e.length||0,x=0;x<S;){if(e.charCodeAt(x)===37&&x+1<S){switch(y=y>-1?y:0,e.charCodeAt(x+1)){case 100:case 102:if(l>=g||r[l]==null)break;y<x&&(o+=e.slice(y,x)),o+=Number(r[l]),y=x+2,x++;break;case 105:if(l>=g||r[l]==null)break;y<x&&(o+=e.slice(y,x)),o+=Math.floor(Number(r[l])),y=x+2,x++;break;case 79:case 111:case 106:if(l>=g||r[l]===void 0)break;y<x&&(o+=e.slice(y,x));var w=typeof r[l];if(w==="string"){o+="'"+r[l]+"'",y=x+2,x++;break}if(w==="function"){o+=r[l].name||"<anonymous>",y=x+2,x++;break}o+=a(r[l]),y=x+2,x++;break;case 115:if(l>=g)break;y<x&&(o+=e.slice(y,x)),o+=String(r[l]),y=x+2,x++;break;case 37:y<x&&(o+=e.slice(y,x)),o+="%",y=x+2,x++,l--;break}++l}++x}return y===-1?e:(y<S&&(o+=e.slice(y)),o)}const Rr=Xi;var mt=Qe;const It=os().console||{},Yi={mapHttpRequest:Kt,mapHttpResponse:Kt,wrapRequestSerializer:er,wrapResponseSerializer:er,wrapErrorSerializer:er,req:Kt,res:Kt,err:rs};function Zi(e,r){return Array.isArray(e)?e.filter(function(a){return a!=="!stdSerializers.err"}):e===!0?Object.keys(r):!1}function Qe(e){e=e||{},e.browser=e.browser||{};const r=e.browser.transmit;if(r&&typeof r.send!="function")throw Error("pino: transmit option must have a send function");const n=e.browser.write||It;e.browser.write&&(e.browser.asObject=!0);const a=e.serializers||{},s=Zi(e.browser.serialize,a);let d=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(d=!1);const E=["error","fatal","warn","info","debug","trace"];typeof n=="function"&&(n.error=n.fatal=n.warn=n.info=n.debug=n.trace=n),e.enabled===!1&&(e.level="silent");const v=e.level||"info",g=Object.create(n);g.log||(g.log=Ot),Object.defineProperty(g,"levelVal",{get:l}),Object.defineProperty(g,"level",{get:y,set:S});const o={transmit:r,serialize:s,asObject:e.browser.asObject,levels:E,timestamp:ns(e)};g.levels=Qe.levels,g.level=v,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=Ot,g.serializers=a,g._serialize=s,g._stdErrSerialize=d,g.child=x,r&&(g._logEvent=rr());function l(){return this.level==="silent"?1/0:this.levels.values[this.level]}function y(){return this._level}function S(w){if(w!=="silent"&&!this.levels.values[w])throw Error("unknown level "+w);this._level=w,pt(o,g,"error","log"),pt(o,g,"fatal","error"),pt(o,g,"warn","error"),pt(o,g,"info","log"),pt(o,g,"debug","log"),pt(o,g,"trace","log")}function x(w,j){if(!w)throw new Error("missing bindings for child Pino");j=j||{},s&&w.serializers&&(j.serializers=w.serializers);const J=j.serializers;if(s&&J){var q=Object.assign({},a,J),B=e.browser.serialize===!0?Object.keys(q):s;delete w.serializers,Xt([w],B,q,this._stdErrSerialize)}function Ae(ge){this._childLevel=(ge._childLevel|0)+1,this.error=_t(ge,w,"error"),this.fatal=_t(ge,w,"fatal"),this.warn=_t(ge,w,"warn"),this.info=_t(ge,w,"info"),this.debug=_t(ge,w,"debug"),this.trace=_t(ge,w,"trace"),q&&(this.serializers=q,this._serialize=B),r&&(this._logEvent=rr([].concat(ge._logEvent.bindings,w)))}return Ae.prototype=this,new Ae(this)}return g}Qe.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Qe.stdSerializers=Yi;Qe.stdTimeFunctions=Object.assign({},{nullTime:Jr,epochTime:Vr,unixTime:is,isoTime:ss});function pt(e,r,n,a){const s=Object.getPrototypeOf(r);r[n]=r.levelVal>r.levels.values[n]?Ot:s[n]?s[n]:It[n]||It[a]||Ot,Qi(e,r,n)}function Qi(e,r,n){!e.transmit&&r[n]===Ot||(r[n]=function(a){return function(){const d=e.timestamp(),E=new Array(arguments.length),v=Object.getPrototypeOf&&Object.getPrototypeOf(this)===It?It:this;for(var g=0;g<E.length;g++)E[g]=arguments[g];if(e.serialize&&!e.asObject&&Xt(E,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?a.call(v,es(this,n,E,d)):a.apply(v,E),e.transmit){const o=e.transmit.level||r.level,l=Qe.levels.values[o],y=Qe.levels.values[n];if(y<l)return;ts(this,{ts:d,methodLevel:n,methodValue:y,transmitLevel:o,transmitValue:Qe.levels.values[e.transmit.level||r.level],send:e.transmit.send,val:r.levelVal},E)}}}(r[n]))}function es(e,r,n,a){e._serialize&&Xt(n,e._serialize,e.serializers,e._stdErrSerialize);const s=n.slice();let d=s[0];const E={};a&&(E.time=a),E.level=Qe.levels.values[r];let v=(e._childLevel|0)+1;if(v<1&&(v=1),d!==null&&typeof d=="object"){for(;v--&&typeof s[0]=="object";)Object.assign(E,s.shift());d=s.length?Rr(s.shift(),s):void 0}else typeof d=="string"&&(d=Rr(s.shift(),s));return d!==void 0&&(E.msg=d),E}function Xt(e,r,n,a){for(const s in e)if(a&&e[s]instanceof Error)e[s]=Qe.stdSerializers.err(e[s]);else if(typeof e[s]=="object"&&!Array.isArray(e[s]))for(const d in e[s])r&&r.indexOf(d)>-1&&d in n&&(e[s][d]=n[d](e[s][d]))}function _t(e,r,n){return function(){const a=new Array(1+arguments.length);a[0]=r;for(var s=1;s<a.length;s++)a[s]=arguments[s-1];return e[n].apply(this,a)}}function ts(e,r,n){const a=r.send,s=r.ts,d=r.methodLevel,E=r.methodValue,v=r.val,g=e._logEvent.bindings;Xt(n,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=s,e._logEvent.messages=n.filter(function(o){return g.indexOf(o)===-1}),e._logEvent.level.label=d,e._logEvent.level.value=E,a(d,e._logEvent,v),e._logEvent=rr(g)}function rr(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function rs(e){const r={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)r[n]===void 0&&(r[n]=e[n]);return r}function ns(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Jr:Vr}function Kt(){return{}}function er(e){return e}function Ot(){}function Jr(){return!1}function Vr(){return Date.now()}function is(){return Math.round(Date.now()/1e3)}function ss(){return new Date(Date.now()).toISOString()}function os(){function e(r){return typeof r<"u"&&r}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}const or=N.getDefaultExportFromCjs(mt),as={level:"info"},Lt="custom_context",ar=1e3*1024;class fs{constructor(r){this.nodeValue=r,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class Pr{constructor(r){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=r,this.sizeInBytes=0}append(r){const n=new fs(r);if(n.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${r} with size ${n.size}`);for(;this.size+n.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=n),this.tail=n):(this.head=n,this.tail=n),this.lengthInNodes++,this.sizeInBytes+=n.size}shift(){if(!this.head)return;const r=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=r.size}toArray(){const r=[];let n=this.head;for(;n!==null;)r.push(n.value),n=n.next;return r}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let r=this.head;return{next:()=>{if(!r)return{done:!0,value:null};const n=r.value;return r=r.next,{done:!1,value:n}}}}}class Xr{constructor(r,n=ar){this.level=r??"error",this.levelValue=mt.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=n,this.logs=new Pr(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(r,n){n===mt.levels.values.error?console.error(r):n===mt.levels.values.warn?console.warn(r):n===mt.levels.values.debug?console.debug(r):n===mt.levels.values.trace?console.trace(r):console.log(r)}appendToLogs(r){this.logs.append(ht({timestamp:new Date().toISOString(),log:r}));const n=typeof r=="string"?JSON.parse(r).level:r.level;n>=this.levelValue&&this.forwardToConsole(r,n)}getLogs(){return this.logs}clearLogs(){this.logs=new Pr(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(r){const n=this.getLogArray();return n.push(ht({extraMetadata:r})),new Blob(n,{type:"application/json"})}}class cs{constructor(r,n=ar){this.baseChunkLogger=new Xr(r,n)}write(r){this.baseChunkLogger.appendToLogs(r)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(r){return this.baseChunkLogger.logsToBlob(r)}downloadLogsBlobInBrowser(r){const n=URL.createObjectURL(this.logsToBlob(r)),a=document.createElement("a");a.href=n,a.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(n)}}class us{constructor(r,n=ar){this.baseChunkLogger=new Xr(r,n)}write(r){this.baseChunkLogger.appendToLogs(r)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(r){return this.baseChunkLogger.logsToBlob(r)}}var ls=Object.defineProperty,ds=Object.defineProperties,hs=Object.getOwnPropertyDescriptors,Cr=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable,Mr=(e,r,n)=>r in e?ls(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Ht=(e,r)=>{for(var n in r||(r={}))bs.call(r,n)&&Mr(e,n,r[n]);if(Cr)for(var n of Cr(r))gs.call(r,n)&&Mr(e,n,r[n]);return e},$t=(e,r)=>ds(e,hs(r));function ys(e){return $t(Ht({},e),{level:(e==null?void 0:e.level)||as.level})}function ps(e,r=Lt){return e[r]||""}function _s(e,r,n=Lt){return e[n]=r,e}function qr(e,r=Lt){let n="";return typeof e.bindings>"u"?n=ps(e,r):n=e.bindings().context||"",n}function ms(e,r,n=Lt){const a=qr(e,n);return a.trim()?`${a}/${r}`:r}function ws(e,r,n=Lt){const a=ms(e,r,n),s=e.child({context:a});return _s(s,a,n)}function vs(e){var r,n;const a=new cs((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:or($t(Ht({},e.opts),{level:"trace",browser:$t(Ht({},(n=e.opts)==null?void 0:n.browser),{write:s=>a.write(s)})})),chunkLoggerController:a}}function xs(e){var r;const n=new us((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:or($t(Ht({},e.opts),{level:"trace"}),n),chunkLoggerController:n}}function Es(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?vs(e):xs(e)}var fr={},Yr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=ze.binary,n=ze.wipe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var a=function(){function v(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return v.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},v.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},v.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},v.prototype.update=function(g,o){if(o===void 0&&(o=g.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var l=0;if(this._bytesHashed+=o,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&o>0;)this._buffer[this._bufferLength++]=g[l++],o--;this._bufferLength===this.blockSize&&(d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(o>=this.blockSize&&(l=d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,g,l,o),o%=this.blockSize);o>0;)this._buffer[this._bufferLength++]=g[l++],o--;return this},v.prototype.finish=function(g){if(!this._finished){var o=this._bytesHashed,l=this._bufferLength,y=o/536870912|0,S=o<<3,x=o%128<112?128:256;this._buffer[l]=128;for(var w=l+1;w<x-8;w++)this._buffer[w]=0;r.writeUint32BE(y,this._buffer,x-8),r.writeUint32BE(S,this._buffer,x-4),d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,x),this._finished=!0}for(var w=0;w<this.digestLength/8;w++)r.writeUint32BE(this._stateHi[w],g,w*8),r.writeUint32BE(this._stateLo[w],g,w*8+4);return this},v.prototype.digest=function(){var g=new Uint8Array(this.digestLength);return this.finish(g),g},v.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},v.prototype.restoreState=function(g){return this._stateHi.set(g.stateHi),this._stateLo.set(g.stateLo),this._bufferLength=g.bufferLength,g.buffer&&this._buffer.set(g.buffer),this._bytesHashed=g.bytesHashed,this._finished=!1,this},v.prototype.cleanSavedState=function(g){n.wipe(g.stateHi),n.wipe(g.stateLo),g.buffer&&n.wipe(g.buffer),g.bufferLength=0,g.bytesHashed=0},v}();e.SHA512=a;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function d(v,g,o,l,y,S,x){for(var w=o[0],j=o[1],J=o[2],q=o[3],B=o[4],Ae=o[5],ge=o[6],Me=o[7],$=l[0],M=l[1],je=l[2],et=l[3],ye=l[4],Fe=l[5],We=l[6],Xe=l[7],m,_,Y,le,L,I,O,A;x>=128;){for(var Le=0;Le<16;Le++){var ne=8*Le+S;v[Le]=r.readUint32BE(y,ne),g[Le]=r.readUint32BE(y,ne+4)}for(var Le=0;Le<80;Le++){var wt=w,z=j,gt=J,b=q,h=B,u=Ae,t=ge,f=Me,R=$,P=M,K=je,U=et,D=ye,W=Fe,Re=We,de=Xe;if(m=Me,_=Xe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=(B>>>14|ye<<18)^(B>>>18|ye<<14)^(ye>>>9|B<<23),_=(ye>>>14|B<<18)^(ye>>>18|B<<14)^(B>>>9|ye<<23),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=B&Ae^~B&ge,_=ye&Fe^~ye&We,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=s[Le*2],_=s[Le*2+1],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=v[Le%16],_=g[Le%16],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,Y=O&65535|A<<16,le=L&65535|I<<16,m=Y,_=le,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=(w>>>28|$<<4)^($>>>2|w<<30)^($>>>7|w<<25),_=($>>>28|w<<4)^(w>>>2|$<<30)^(w>>>7|$<<25),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=w&j^w&J^j&J,_=$&M^$&je^M&je,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,f=O&65535|A<<16,de=L&65535|I<<16,m=b,_=U,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=Y,_=le,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,b=O&65535|A<<16,U=L&65535|I<<16,j=wt,J=z,q=gt,B=b,Ae=h,ge=u,Me=t,w=f,M=R,je=P,et=K,ye=U,Fe=D,We=W,Xe=Re,$=de,Le%16===15)for(var ne=0;ne<16;ne++)m=v[ne],_=g[ne],L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=v[(ne+9)%16],_=g[(ne+9)%16],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,Y=v[(ne+1)%16],le=g[(ne+1)%16],m=(Y>>>1|le<<31)^(Y>>>8|le<<24)^Y>>>7,_=(le>>>1|Y<<31)^(le>>>8|Y<<24)^(le>>>7|Y<<25),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,Y=v[(ne+14)%16],le=g[(ne+14)%16],m=(Y>>>19|le<<13)^(le>>>29|Y<<3)^Y>>>6,_=(le>>>19|Y<<13)^(Y>>>29|le<<3)^(le>>>6|Y<<26),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,v[ne]=O&65535|A<<16,g[ne]=L&65535|I<<16}m=w,_=$,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[0],_=l[0],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[0]=w=O&65535|A<<16,l[0]=$=L&65535|I<<16,m=j,_=M,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[1],_=l[1],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[1]=j=O&65535|A<<16,l[1]=M=L&65535|I<<16,m=J,_=je,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[2],_=l[2],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[2]=J=O&65535|A<<16,l[2]=je=L&65535|I<<16,m=q,_=et,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[3],_=l[3],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[3]=q=O&65535|A<<16,l[3]=et=L&65535|I<<16,m=B,_=ye,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[4],_=l[4],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[4]=B=O&65535|A<<16,l[4]=ye=L&65535|I<<16,m=Ae,_=Fe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[5],_=l[5],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[5]=Ae=O&65535|A<<16,l[5]=Fe=L&65535|I<<16,m=ge,_=We,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[6],_=l[6],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[6]=ge=O&65535|A<<16,l[6]=We=L&65535|I<<16,m=Me,_=Xe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=o[7],_=l[7],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,o[7]=Me=O&65535|A<<16,l[7]=Xe=L&65535|I<<16,S+=128,x-=128}return S}function E(v){var g=new a;g.update(v);var o=g.digest();return g.clean(),o}e.hash=E})(Yr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const r=ze.random,n=Yr,a=ze.wipe;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function s(b){const h=new Float64Array(16);if(b)for(let u=0;u<b.length;u++)h[u]=b[u];return h}const d=new Uint8Array(32);d[0]=9;const E=s(),v=s([1]),g=s([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),o=s([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=s([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=s([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),S=s([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function x(b,h){for(let u=0;u<16;u++)b[u]=h[u]|0}function w(b){let h=1;for(let u=0;u<16;u++){let t=b[u]+h+65535;h=Math.floor(t/65536),b[u]=t-h*65536}b[0]+=h-1+37*(h-1)}function j(b,h,u){const t=~(u-1);for(let f=0;f<16;f++){const R=t&(b[f]^h[f]);b[f]^=R,h[f]^=R}}function J(b,h){const u=s(),t=s();for(let f=0;f<16;f++)t[f]=h[f];w(t),w(t),w(t);for(let f=0;f<2;f++){u[0]=t[0]-65517;for(let P=1;P<15;P++)u[P]=t[P]-65535-(u[P-1]>>16&1),u[P-1]&=65535;u[15]=t[15]-32767-(u[14]>>16&1);const R=u[15]>>16&1;u[14]&=65535,j(t,u,1-R)}for(let f=0;f<16;f++)b[2*f]=t[f]&255,b[2*f+1]=t[f]>>8}function q(b,h){let u=0;for(let t=0;t<32;t++)u|=b[t]^h[t];return(1&u-1>>>8)-1}function B(b,h){const u=new Uint8Array(32),t=new Uint8Array(32);return J(u,b),J(t,h),q(u,t)}function Ae(b){const h=new Uint8Array(32);return J(h,b),h[0]&1}function ge(b,h){for(let u=0;u<16;u++)b[u]=h[2*u]+(h[2*u+1]<<8);b[15]&=32767}function Me(b,h,u){for(let t=0;t<16;t++)b[t]=h[t]+u[t]}function $(b,h,u){for(let t=0;t<16;t++)b[t]=h[t]-u[t]}function M(b,h,u){let t,f,R=0,P=0,K=0,U=0,D=0,W=0,Re=0,de=0,Pe=0,pe=0,he=0,ie=0,re=0,Z=0,V=0,H=0,se=0,_e=0,G=0,Ne=0,De=0,He=0,$e=0,Ke=0,qe=0,Ze=0,st=0,Ge=0,ct=0,vt=0,Rt=0,oe=u[0],Q=u[1],ae=u[2],fe=u[3],ce=u[4],ee=u[5],me=u[6],we=u[7],ve=u[8],xe=u[9],Ee=u[10],be=u[11],ue=u[12],F=u[13],Se=u[14],Ie=u[15];t=h[0],R+=t*oe,P+=t*Q,K+=t*ae,U+=t*fe,D+=t*ce,W+=t*ee,Re+=t*me,de+=t*we,Pe+=t*ve,pe+=t*xe,he+=t*Ee,ie+=t*be,re+=t*ue,Z+=t*F,V+=t*Se,H+=t*Ie,t=h[1],P+=t*oe,K+=t*Q,U+=t*ae,D+=t*fe,W+=t*ce,Re+=t*ee,de+=t*me,Pe+=t*we,pe+=t*ve,he+=t*xe,ie+=t*Ee,re+=t*be,Z+=t*ue,V+=t*F,H+=t*Se,se+=t*Ie,t=h[2],K+=t*oe,U+=t*Q,D+=t*ae,W+=t*fe,Re+=t*ce,de+=t*ee,Pe+=t*me,pe+=t*we,he+=t*ve,ie+=t*xe,re+=t*Ee,Z+=t*be,V+=t*ue,H+=t*F,se+=t*Se,_e+=t*Ie,t=h[3],U+=t*oe,D+=t*Q,W+=t*ae,Re+=t*fe,de+=t*ce,Pe+=t*ee,pe+=t*me,he+=t*we,ie+=t*ve,re+=t*xe,Z+=t*Ee,V+=t*be,H+=t*ue,se+=t*F,_e+=t*Se,G+=t*Ie,t=h[4],D+=t*oe,W+=t*Q,Re+=t*ae,de+=t*fe,Pe+=t*ce,pe+=t*ee,he+=t*me,ie+=t*we,re+=t*ve,Z+=t*xe,V+=t*Ee,H+=t*be,se+=t*ue,_e+=t*F,G+=t*Se,Ne+=t*Ie,t=h[5],W+=t*oe,Re+=t*Q,de+=t*ae,Pe+=t*fe,pe+=t*ce,he+=t*ee,ie+=t*me,re+=t*we,Z+=t*ve,V+=t*xe,H+=t*Ee,se+=t*be,_e+=t*ue,G+=t*F,Ne+=t*Se,De+=t*Ie,t=h[6],Re+=t*oe,de+=t*Q,Pe+=t*ae,pe+=t*fe,he+=t*ce,ie+=t*ee,re+=t*me,Z+=t*we,V+=t*ve,H+=t*xe,se+=t*Ee,_e+=t*be,G+=t*ue,Ne+=t*F,De+=t*Se,He+=t*Ie,t=h[7],de+=t*oe,Pe+=t*Q,pe+=t*ae,he+=t*fe,ie+=t*ce,re+=t*ee,Z+=t*me,V+=t*we,H+=t*ve,se+=t*xe,_e+=t*Ee,G+=t*be,Ne+=t*ue,De+=t*F,He+=t*Se,$e+=t*Ie,t=h[8],Pe+=t*oe,pe+=t*Q,he+=t*ae,ie+=t*fe,re+=t*ce,Z+=t*ee,V+=t*me,H+=t*we,se+=t*ve,_e+=t*xe,G+=t*Ee,Ne+=t*be,De+=t*ue,He+=t*F,$e+=t*Se,Ke+=t*Ie,t=h[9],pe+=t*oe,he+=t*Q,ie+=t*ae,re+=t*fe,Z+=t*ce,V+=t*ee,H+=t*me,se+=t*we,_e+=t*ve,G+=t*xe,Ne+=t*Ee,De+=t*be,He+=t*ue,$e+=t*F,Ke+=t*Se,qe+=t*Ie,t=h[10],he+=t*oe,ie+=t*Q,re+=t*ae,Z+=t*fe,V+=t*ce,H+=t*ee,se+=t*me,_e+=t*we,G+=t*ve,Ne+=t*xe,De+=t*Ee,He+=t*be,$e+=t*ue,Ke+=t*F,qe+=t*Se,Ze+=t*Ie,t=h[11],ie+=t*oe,re+=t*Q,Z+=t*ae,V+=t*fe,H+=t*ce,se+=t*ee,_e+=t*me,G+=t*we,Ne+=t*ve,De+=t*xe,He+=t*Ee,$e+=t*be,Ke+=t*ue,qe+=t*F,Ze+=t*Se,st+=t*Ie,t=h[12],re+=t*oe,Z+=t*Q,V+=t*ae,H+=t*fe,se+=t*ce,_e+=t*ee,G+=t*me,Ne+=t*we,De+=t*ve,He+=t*xe,$e+=t*Ee,Ke+=t*be,qe+=t*ue,Ze+=t*F,st+=t*Se,Ge+=t*Ie,t=h[13],Z+=t*oe,V+=t*Q,H+=t*ae,se+=t*fe,_e+=t*ce,G+=t*ee,Ne+=t*me,De+=t*we,He+=t*ve,$e+=t*xe,Ke+=t*Ee,qe+=t*be,Ze+=t*ue,st+=t*F,Ge+=t*Se,ct+=t*Ie,t=h[14],V+=t*oe,H+=t*Q,se+=t*ae,_e+=t*fe,G+=t*ce,Ne+=t*ee,De+=t*me,He+=t*we,$e+=t*ve,Ke+=t*xe,qe+=t*Ee,Ze+=t*be,st+=t*ue,Ge+=t*F,ct+=t*Se,vt+=t*Ie,t=h[15],H+=t*oe,se+=t*Q,_e+=t*ae,G+=t*fe,Ne+=t*ce,De+=t*ee,He+=t*me,$e+=t*we,Ke+=t*ve,qe+=t*xe,Ze+=t*Ee,st+=t*be,Ge+=t*ue,ct+=t*F,vt+=t*Se,Rt+=t*Ie,R+=38*se,P+=38*_e,K+=38*G,U+=38*Ne,D+=38*De,W+=38*He,Re+=38*$e,de+=38*Ke,Pe+=38*qe,pe+=38*Ze,he+=38*st,ie+=38*Ge,re+=38*ct,Z+=38*vt,V+=38*Rt,f=1,t=R+f+65535,f=Math.floor(t/65536),R=t-f*65536,t=P+f+65535,f=Math.floor(t/65536),P=t-f*65536,t=K+f+65535,f=Math.floor(t/65536),K=t-f*65536,t=U+f+65535,f=Math.floor(t/65536),U=t-f*65536,t=D+f+65535,f=Math.floor(t/65536),D=t-f*65536,t=W+f+65535,f=Math.floor(t/65536),W=t-f*65536,t=Re+f+65535,f=Math.floor(t/65536),Re=t-f*65536,t=de+f+65535,f=Math.floor(t/65536),de=t-f*65536,t=Pe+f+65535,f=Math.floor(t/65536),Pe=t-f*65536,t=pe+f+65535,f=Math.floor(t/65536),pe=t-f*65536,t=he+f+65535,f=Math.floor(t/65536),he=t-f*65536,t=ie+f+65535,f=Math.floor(t/65536),ie=t-f*65536,t=re+f+65535,f=Math.floor(t/65536),re=t-f*65536,t=Z+f+65535,f=Math.floor(t/65536),Z=t-f*65536,t=V+f+65535,f=Math.floor(t/65536),V=t-f*65536,t=H+f+65535,f=Math.floor(t/65536),H=t-f*65536,R+=f-1+37*(f-1),f=1,t=R+f+65535,f=Math.floor(t/65536),R=t-f*65536,t=P+f+65535,f=Math.floor(t/65536),P=t-f*65536,t=K+f+65535,f=Math.floor(t/65536),K=t-f*65536,t=U+f+65535,f=Math.floor(t/65536),U=t-f*65536,t=D+f+65535,f=Math.floor(t/65536),D=t-f*65536,t=W+f+65535,f=Math.floor(t/65536),W=t-f*65536,t=Re+f+65535,f=Math.floor(t/65536),Re=t-f*65536,t=de+f+65535,f=Math.floor(t/65536),de=t-f*65536,t=Pe+f+65535,f=Math.floor(t/65536),Pe=t-f*65536,t=pe+f+65535,f=Math.floor(t/65536),pe=t-f*65536,t=he+f+65535,f=Math.floor(t/65536),he=t-f*65536,t=ie+f+65535,f=Math.floor(t/65536),ie=t-f*65536,t=re+f+65535,f=Math.floor(t/65536),re=t-f*65536,t=Z+f+65535,f=Math.floor(t/65536),Z=t-f*65536,t=V+f+65535,f=Math.floor(t/65536),V=t-f*65536,t=H+f+65535,f=Math.floor(t/65536),H=t-f*65536,R+=f-1+37*(f-1),b[0]=R,b[1]=P,b[2]=K,b[3]=U,b[4]=D,b[5]=W,b[6]=Re,b[7]=de,b[8]=Pe,b[9]=pe,b[10]=he,b[11]=ie,b[12]=re,b[13]=Z,b[14]=V,b[15]=H}function je(b,h){M(b,h,h)}function et(b,h){const u=s();let t;for(t=0;t<16;t++)u[t]=h[t];for(t=253;t>=0;t--)je(u,u),t!==2&&t!==4&&M(u,u,h);for(t=0;t<16;t++)b[t]=u[t]}function ye(b,h){const u=s();let t;for(t=0;t<16;t++)u[t]=h[t];for(t=250;t>=0;t--)je(u,u),t!==1&&M(u,u,h);for(t=0;t<16;t++)b[t]=u[t]}function Fe(b,h){const u=s(),t=s(),f=s(),R=s(),P=s(),K=s(),U=s(),D=s(),W=s();$(u,b[1],b[0]),$(W,h[1],h[0]),M(u,u,W),Me(t,b[0],b[1]),Me(W,h[0],h[1]),M(t,t,W),M(f,b[3],h[3]),M(f,f,o),M(R,b[2],h[2]),Me(R,R,R),$(P,t,u),$(K,R,f),Me(U,R,f),Me(D,t,u),M(b[0],P,K),M(b[1],D,U),M(b[2],U,K),M(b[3],P,D)}function We(b,h,u){for(let t=0;t<4;t++)j(b[t],h[t],u)}function Xe(b,h){const u=s(),t=s(),f=s();et(f,h[2]),M(u,h[0],f),M(t,h[1],f),J(b,t),b[31]^=Ae(u)<<7}function m(b,h,u){x(b[0],E),x(b[1],v),x(b[2],v),x(b[3],E);for(let t=255;t>=0;--t){const f=u[t/8|0]>>(t&7)&1;We(b,h,f),Fe(h,b),Fe(b,b),We(b,h,f)}}function _(b,h){const u=[s(),s(),s(),s()];x(u[0],l),x(u[1],y),x(u[2],v),M(u[3],l,y),m(b,u,h)}function Y(b){if(b.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const h=(0,n.hash)(b);h[0]&=248,h[31]&=127,h[31]|=64;const u=new Uint8Array(32),t=[s(),s(),s(),s()];_(t,h),Xe(u,t);const f=new Uint8Array(64);return f.set(b),f.set(u,32),{publicKey:u,secretKey:f}}e.generateKeyPairFromSeed=Y;function le(b){const h=(0,r.randomBytes)(32,b),u=Y(h);return(0,a.wipe)(h),u}e.generateKeyPair=le;function L(b){if(b.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(b.subarray(32))}e.extractPublicKeyFromSecretKey=L;const I=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function O(b,h){let u,t,f,R;for(t=63;t>=32;--t){for(u=0,f=t-32,R=t-12;f<R;++f)h[f]+=u-16*h[t]*I[f-(t-32)],u=Math.floor((h[f]+128)/256),h[f]-=u*256;h[f]+=u,h[t]=0}for(u=0,f=0;f<32;f++)h[f]+=u-(h[31]>>4)*I[f],u=h[f]>>8,h[f]&=255;for(f=0;f<32;f++)h[f]-=u*I[f];for(t=0;t<32;t++)h[t+1]+=h[t]>>8,b[t]=h[t]&255}function A(b){const h=new Float64Array(64);for(let u=0;u<64;u++)h[u]=b[u];for(let u=0;u<64;u++)b[u]=0;O(b,h)}function Le(b,h){const u=new Float64Array(64),t=[s(),s(),s(),s()],f=(0,n.hash)(b.subarray(0,32));f[0]&=248,f[31]&=127,f[31]|=64;const R=new Uint8Array(64);R.set(f.subarray(32),32);const P=new n.SHA512;P.update(R.subarray(32)),P.update(h);const K=P.digest();P.clean(),A(K),_(t,K),Xe(R,t),P.reset(),P.update(R.subarray(0,32)),P.update(b.subarray(32)),P.update(h);const U=P.digest();A(U);for(let D=0;D<32;D++)u[D]=K[D];for(let D=0;D<32;D++)for(let W=0;W<32;W++)u[D+W]+=U[D]*f[W];return O(R.subarray(32),u),R}e.sign=Le;function ne(b,h){const u=s(),t=s(),f=s(),R=s(),P=s(),K=s(),U=s();return x(b[2],v),ge(b[1],h),je(f,b[1]),M(R,f,g),$(f,f,b[2]),Me(R,b[2],R),je(P,R),je(K,P),M(U,K,P),M(u,U,f),M(u,u,R),ye(u,u),M(u,u,f),M(u,u,R),M(u,u,R),M(b[0],u,R),je(t,b[0]),M(t,t,R),B(t,f)&&M(b[0],b[0],S),je(t,b[0]),M(t,t,R),B(t,f)?-1:(Ae(b[0])===h[31]>>7&&$(b[0],E,b[0]),M(b[3],b[0],b[1]),0)}function wt(b,h,u){const t=new Uint8Array(32),f=[s(),s(),s(),s()],R=[s(),s(),s(),s()];if(u.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(ne(R,b))return!1;const P=new n.SHA512;P.update(u.subarray(0,32)),P.update(b),P.update(h);const K=P.digest();return A(K),m(f,R,K),_(R,u.subarray(32)),Fe(f,R),Xe(t,f),!q(u,t)}e.verify=wt;function z(b){let h=[s(),s(),s(),s()];if(ne(h,b))throw new Error("Ed25519: invalid public key");let u=s(),t=s(),f=h[1];Me(u,v,f),$(t,v,f),et(t,t),M(u,u,t);let R=new Uint8Array(32);return J(R,u),R}e.convertPublicKeyToX25519=z;function gt(b){const h=(0,n.hash)(b.subarray(0,32));h[0]&=248,h[31]&=127,h[31]|=64;const u=new Uint8Array(h.subarray(0,32));return(0,a.wipe)(h),u}e.convertSecretKeyToX25519=gt})(fr);const Ss="EdDSA",Is="JWT",Zr=".",Qr="base64url",Os="utf8",Ts="utf8",As=":",Ls="did",Rs="key",jr="base58btc",Ps="z",Cs="K36",Ms=32;function Gt(e){return Jt(Ft(ht(e),Os),Qr)}function en(e){const r=Ft(Cs,jr),n=Ps+Jt(Hr([r,e]),jr);return[Ls,Rs,n].join(As)}function js(e){return Jt(e,Qr)}function Ns(e){return Ft([Gt(e.header),Gt(e.payload)].join(Zr),Ts)}function Bs(e){return[Gt(e.header),Gt(e.payload),js(e.signature)].join(Zr)}function zs(e=ze.random.randomBytes(Ms)){return fr.generateKeyPairFromSeed(e)}async function Ds(e,r,n,a,s=ze.cjs.fromMiliseconds(Date.now())){const d={alg:Ss,typ:Is},E=en(a.publicKey),v=s+n,g={iss:E,sub:e,aud:r,iat:s,exp:v},o=Ns({header:d,payload:g}),l=fr.sign(a.secretKey,o);return Bs({header:d,payload:g,signature:l})}const Ks="PARSE_ERROR",Us="INVALID_REQUEST",Ws="METHOD_NOT_FOUND",Hs="INVALID_PARAMS",tn="INTERNAL_ERROR",cr="SERVER_ERROR",$s=[-32700,-32600,-32601,-32602,-32603],St={[Ks]:{code:-32700,message:"Parse error"},[Us]:{code:-32600,message:"Invalid Request"},[Ws]:{code:-32601,message:"Method not found"},[Hs]:{code:-32602,message:"Invalid params"},[tn]:{code:-32603,message:"Internal error"},[cr]:{code:-32e3,message:"Server error"}},rn=cr;function Gs(e){return $s.includes(e)}function Nr(e){return Object.keys(St).includes(e)?St[e]:St[rn]}function ks(e){const r=Object.values(St).find(n=>n.code===e);return r||St[rn]}function nn(e,r,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${r}`):e}var sn={};/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,5 +1,5 @@
1
- import { Z as $, cF as J5, ds as Y5, ac as V1, dt as K4, h as X5 } from "./index-C2DCdxRC.mjs";
2
- import { h as e7, e as t7 } from "./evm-BILIyDaj.mjs";
1
+ import { Z as $, cF as J5, ds as Y5, ac as V1, dt as K4, h as X5 } from "./index-BNQfXzmT.mjs";
2
+ import { h as e7, e as t7 } from "./evm-DPxnFflA.mjs";
3
3
  import * as C3 from "react";
4
4
  import w, { createContext as n7, useState as o3, useEffect as j0, useCallback as r7, useContext as i7 } from "react";
5
5
  import o7 from "react-dom";