@wormhole-foundation/wormhole-connect 0.3.19-beta.3-development → 0.3.19-beta.5-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 (115) hide show
  1. package/dist/assets/{ccip-B8sh0red.js → ccip-De5bB7ry.js} +1 -1
  2. package/dist/assets/{evm-B3YdeaCI.js → evm-DJTN7n-6.js} +4 -4
  3. package/dist/assets/{index-moDeJTxm.js → index-CdA027fm.js} +1 -1
  4. package/dist/assets/{index-1ZJmfQkw.js → index-D8xdfMo8.js} +2 -2
  5. package/dist/assets/{index.es-CXmj0UJy.js → index.es-DsPAzXeV.js} +2 -2
  6. package/dist/main.js +7 -7
  7. package/dist/src/components/ManualAddressInput.d.ts.map +1 -1
  8. package/dist/src/routes/cosmosGateway/cosmosGateway.d.ts +2 -0
  9. package/dist/src/routes/cosmosGateway/cosmosGateway.d.ts.map +1 -1
  10. package/dist/src/routes/porticoBridge/porticoBridge.d.ts +2 -0
  11. package/dist/src/routes/porticoBridge/porticoBridge.d.ts.map +1 -1
  12. package/dist/src/routes/sdkv2/route.d.ts +1 -1
  13. package/dist/src/routes/sdkv2/route.d.ts.map +1 -1
  14. package/dist/src/routes/tbtc/tbtc.d.ts +2 -0
  15. package/dist/src/routes/tbtc/tbtc.d.ts.map +1 -1
  16. package/lib/{algorand-BDR3KPTJ.js → algorand-BizCMnCe.js} +1 -1
  17. package/lib/{algorand-CNPRWbNB.mjs → algorand-CZC9cPKi.mjs} +4 -4
  18. package/lib/{aptos-BPs26BCC.mjs → aptos-B4ng1XsR.mjs} +1 -1
  19. package/lib/{aptos-t3uXFwih.mjs → aptos-CRkEBLid.mjs} +4 -4
  20. package/lib/{aptos-tCZHrDAP.js → aptos-CXyHqFt8.js} +2 -2
  21. package/lib/{aptos-Br9Q1n2N.js → aptos-i8WEm-Fe.js} +1 -1
  22. package/lib/{browser-33Nc32cs.mjs → browser-CIwNo6kY.mjs} +2 -2
  23. package/lib/{browser-Cz60hQ-L.js → browser-DEzmpMBm.js} +1 -1
  24. package/lib/{ccip-CtmuOQGX.js → ccip-6omn1tDF.js} +1 -1
  25. package/lib/{ccip-CE49B2YD.mjs → ccip-LzzuUWf7.mjs} +1 -1
  26. package/lib/{chain-BT07YJHt.js → chain-BteoJHpg.js} +1 -1
  27. package/lib/{chain-CbwtJlkc.mjs → chain-Cc-vL0Ji.mjs} +1 -1
  28. package/lib/{cosmos-LlwNYP69.mjs → cosmos-5NiZ8EbB.mjs} +3 -3
  29. package/lib/{cosmos-t65H2NQC.js → cosmos-DM4Lrmu1.js} +1 -1
  30. package/lib/{cosmwasm-CiJ3I3AY.js → cosmwasm-8FJsT7LT.js} +2 -2
  31. package/lib/{cosmwasm-CbTKetWD.mjs → cosmwasm-BHEBPmf7.mjs} +6 -6
  32. package/lib/{create-Chqnlpoq.js → create-48Wkagqs.js} +1 -1
  33. package/lib/{create-HNw0Emrd.mjs → create-BIAJIVSg.mjs} +1 -1
  34. package/lib/{ens-validation.es6-BaZUabxu.js → ens-validation.es6-Bw--s4Qc.js} +1 -1
  35. package/lib/{ens-validation.es6-CyEOHc9J.mjs → ens-validation.es6-DQFhqeC0.mjs} +2 -2
  36. package/lib/{evm-lHNM4jqm.mjs → evm-B5hnoH2O.mjs} +6 -6
  37. package/lib/{evm-CjvzIUCn.mjs → evm-Dd33ef5o.mjs} +6 -6
  38. package/lib/{evm-CNC7JHe1.js → evm-JNEgzI8_.js} +4 -4
  39. package/lib/{evm-3AGyBI-h.js → evm-OwiMOsDg.js} +2 -2
  40. package/lib/{index-BWsL77BI.mjs → index-10BWvX1N.mjs} +3 -3
  41. package/lib/{index-DPNt5r2L.js → index-670AMJe5.js} +1 -1
  42. package/lib/{index-C4kvGnSA.mjs → index-B03MiI2p.mjs} +2 -2
  43. package/lib/{index-BpuXk_6h.js → index-B9pFbfyU.js} +1 -1
  44. package/lib/{index-35qsyZLz.js → index-BDi5PNJc.js} +1 -1
  45. package/lib/{index-BCSt_UXY.js → index-BFIX3imu.js} +1 -1
  46. package/lib/{index-CACyup9A.js → index-BHUxBugG.js} +1 -1
  47. package/lib/{index-DVVJw5ml.js → index-BHWhOqWI.js} +1 -1
  48. package/lib/{index-ztQgUCWf.js → index-BJPmRnHn.js} +1 -1
  49. package/lib/{index-BCnyHegg.mjs → index-Bg59b-Bk.mjs} +4 -4
  50. package/lib/{index-CbCfazgA.mjs → index-By8Yxkcx.mjs} +5 -5
  51. package/lib/{index-Tl7zYqHL.js → index-C1oy9Lkm.js} +6 -6
  52. package/lib/{index-DJzhcNDU.mjs → index-CHqEmT8z.mjs} +6 -6
  53. package/lib/{index-Bk7wdRtH.mjs → index-CMKVJZ8E.mjs} +3 -3
  54. package/lib/{index-DRTx-Ru8.mjs → index-CNbmckF9.mjs} +4 -4
  55. package/lib/{index-D1dHZqit.mjs → index-CU3qSQjR.mjs} +4 -4
  56. package/lib/{index-CjyrCdi_.mjs → index-CVjCpWVm.mjs} +1 -1
  57. package/lib/{index-BBtf8VGl.js → index-CYRY8C8f.js} +1 -1
  58. package/lib/{index-DfJLd65b.mjs → index-Cx7DnGQ7.mjs} +4 -4
  59. package/lib/{index-CdSy2Lfd.mjs → index-D4oa5qLu.mjs} +85 -62
  60. package/lib/{index-zKUpU-3R.mjs → index-D7DR5q91.mjs} +4 -4
  61. package/lib/{index-BH5gBrJu.mjs → index-D83yFXT3.mjs} +3 -3
  62. package/lib/{index-B6m0ovID.mjs → index-D8SeaoGs.mjs} +2 -2
  63. package/lib/{index-DGRaAUXo.mjs → index-D8l7OdtE.mjs} +2 -2
  64. package/lib/{index-Dbwiqljw.js → index-DETB2K9l.js} +1 -1
  65. package/lib/{index-abvwfKBf.js → index-DGfMxIjQ.js} +1 -1
  66. package/lib/{index-l_e-RUun.js → index-DLpTO2U3.js} +1 -1
  67. package/lib/{index-CokIAiMa.mjs → index-DX18kVfL.mjs} +4 -4
  68. package/lib/{index-dJMYtBle.mjs → index-DX6w1JtB.mjs} +4 -4
  69. package/lib/{index-B9L2kltl.mjs → index-DbMbSuyg.mjs} +4 -4
  70. package/lib/{index-DCPwTd_i.js → index-DfYaeaDv.js} +1 -1
  71. package/lib/{index-0t31FGKV.js → index-DjmghqSr.js} +1 -1
  72. package/lib/{index-UOSBfEgg.js → index-DlRC-hs-.js} +1 -1
  73. package/lib/{index-Cp5np38p.mjs → index-G7Dlm7ed.mjs} +1 -1
  74. package/lib/{index-Bp0NhDcb.js → index-Hyeca4Ym.js} +1 -1
  75. package/lib/{index-DVH-ZIP6.mjs → index-ROBBwabT.mjs} +4 -4
  76. package/lib/{index-CO9tmWap.js → index-WhcobQtR.js} +1 -1
  77. package/lib/{index-DrncQYMG.js → index-X-BikqCf.js} +1 -1
  78. package/lib/{index-BqGvvv6N.js → index-ZCZHbA1F.js} +1 -1
  79. package/lib/{index-Cofatf_w.js → index-isN8Fo1n.js} +1 -1
  80. package/lib/{index-B9gw1I6s.js → index-j8isX5f9.js} +1 -1
  81. package/lib/{index-CGLAoOXl.mjs → index-jlt17KkN.mjs} +4 -4
  82. package/lib/{index-BS1tjK_Z.mjs → index-mtuCwj6Z.mjs} +5 -5
  83. package/lib/{index-Bfw-brA6.js → index-oVIYJXdI.js} +1 -1
  84. package/lib/{index-CYap2RXm.js → index-tvG-rfJZ.js} +1 -1
  85. package/lib/{index-DvUq-nIQ.mjs → index-ybRLAtD8.mjs} +5 -5
  86. package/lib/{index.es-494n2GDU.js → index.es-B33YjOZu.js} +2 -2
  87. package/lib/{index.es-DnXnnX-i.mjs → index.es-BON8c55F.mjs} +4 -4
  88. package/lib/index.js +1 -1
  89. package/lib/index.mjs +1 -1
  90. package/lib/{libsodium-wrappers-9p7NdjLu.mjs → libsodium-wrappers-DTuXKVrZ.mjs} +1 -1
  91. package/lib/{libsodium-wrappers-Dechaffz.js → libsodium-wrappers-VihnPAqR.js} +1 -1
  92. package/lib/{sei-SWKTnPTF.mjs → sei-C6N03jzv.mjs} +2 -2
  93. package/lib/{sei-DORxBQd-.js → sei-DTeCXpXl.js} +1 -1
  94. package/lib/{solana-Bd9eRY8E.js → solana--YauUjmQ.js} +2 -2
  95. package/lib/{solana-T2pgCVfU.mjs → solana-BMm013WW.mjs} +6 -6
  96. package/lib/{solana-DvbMa7B_.mjs → solana-DdaraOHp.mjs} +3 -3
  97. package/lib/{solana-KhBV5LOd.js → solana-T3yS-Q_9.js} +1 -1
  98. package/lib/{solanaEmbed.esm-CnKFJhsj.js → solanaEmbed.esm-DMwXbxXO.js} +1 -1
  99. package/lib/{solanaEmbed.esm-8eZSo5K2.mjs → solanaEmbed.esm-D_lKLzGu.mjs} +2 -2
  100. package/lib/src/components/ManualAddressInput.d.ts.map +1 -1
  101. package/lib/src/routes/cosmosGateway/cosmosGateway.d.ts +2 -0
  102. package/lib/src/routes/cosmosGateway/cosmosGateway.d.ts.map +1 -1
  103. package/lib/src/routes/porticoBridge/porticoBridge.d.ts +2 -0
  104. package/lib/src/routes/porticoBridge/porticoBridge.d.ts.map +1 -1
  105. package/lib/src/routes/sdkv2/route.d.ts +1 -1
  106. package/lib/src/routes/sdkv2/route.d.ts.map +1 -1
  107. package/lib/src/routes/tbtc/tbtc.d.ts +2 -0
  108. package/lib/src/routes/tbtc/tbtc.d.ts.map +1 -1
  109. package/lib/{sui-DDu4a1uc.mjs → sui-Btvc4SGv.mjs} +4 -4
  110. package/lib/{sui-CjRGl9Gg.mjs → sui-CXyWZ2Gp.mjs} +1 -1
  111. package/lib/{sui-B382sZz0.js → sui-DWLiZoeB.js} +1 -1
  112. package/lib/{sui-DwH1wYGH.js → sui-DbQOBpeH.js} +2 -2
  113. package/lib/{unsignedTransaction-BbAfXtog.mjs → unsignedTransaction-CtPR6znR.mjs} +2 -2
  114. package/lib/{unsignedTransaction-mu6HJcHt.js → unsignedTransaction-DZq5iThY.js} +1 -1
  115. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";const U=require("./index-Tl7zYqHL.js"),De=require("./index-Bfw-brA6.js");function Mr(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function Nr(e,r){r||(r=e.reduce((o,b)=>o+b.length,0));const n=Mr(r);let c=0;for(const o of e)n.set(o,c),c+=o.length;return n}const pr={...De.identityBase,...De.base2,...De.base8,...De.base10,...De.base16,...De.base32,...De.base36,...De.base58,...De.base64,...De.base256emoji};function Br(e,r,n,c){return{name:e,prefix:r,encoder:{name:e,prefix:r,encode:n},decoder:{decode:c}}}const _r=Br("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),qt=Br("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=Mr(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}),Dr={utf8:_r,"utf-8":_r,hex:pr.base16,latin1:qt,ascii:qt,binary:qt,...pr};function Ft(e,r="utf8"){const n=Dr[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=Dr[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)}const kn={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"}},Wn=/"(?:_|\\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*:/,qn=/"(?: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*:/,Vn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Yn(e,r){if(e==="__proto__"||e==="constructor"&&r&&typeof r=="object"&&"prototype"in r){Xn(e);return}return r}function Xn(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Bt(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 c=n.toLowerCase();if(c==="true")return!0;if(c==="false")return!1;if(c==="undefined")return;if(c==="null")return null;if(c==="nan")return Number.NaN;if(c==="infinity")return Number.POSITIVE_INFINITY;if(c==="-infinity")return Number.NEGATIVE_INFINITY}if(!Vn.test(e)){if(r.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Wn.test(e)||qn.test(e)){if(r.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Yn)}return JSON.parse(e)}catch(c){if(r.strict)throw c;return e}}function Zn(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Te(e,...r){try{return Zn(e(...r))}catch(n){return Promise.reject(n)}}function Qn(e){const r=typeof e;return e===null||r!=="object"&&r!=="function"}function ei(e){const r=Object.getPrototypeOf(e);return!r||r.isPrototypeOf(Object)}function Ut(e){if(Qn(e))return String(e);if(ei(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 zr(){if(typeof U.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Xt="base64:";function ti(e){if(typeof e=="string")return e;zr();const r=U.dist.Buffer.from(e).toString("base64");return Xt+r}function ri(e){return typeof e!="string"||!e.startsWith(Xt)?e:(zr(),U.dist.Buffer.from(e.slice(Xt.length),"base64"))}function He(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function ni(...e){return He(e.join(":"))}function Dt(e){return e=He(e),e?e+":":""}const ii="memory",si=()=>{const e=new Map;return{name:ii,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 oi(e={}){const r={mounts:{"":e.driver||si()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=s=>{for(const u of r.mountpoints)if(s.startsWith(u))return{base:u,relativeKey:s.slice(u.length),driver:r.mounts[u]};return{base:"",relativeKey:s,driver:r.mounts[""]}},c=(s,u)=>r.mountpoints.filter(g=>g.startsWith(s)||u&&s.startsWith(g)).map(g=>({relativeBase:s.length>g.length?s.slice(g.length):void 0,mountpoint:g,driver:r.mounts[g]})),o=(s,u)=>{if(r.watching){u=He(u);for(const g of r.watchListeners)g(s,u)}},b=async()=>{if(!r.watching){r.watching=!0;for(const s in r.mounts)r.unwatch[s]=await xr(r.mounts[s],o,s)}},S=async()=>{if(r.watching){for(const s in r.unwatch)await r.unwatch[s]();r.unwatch={},r.watching=!1}},E=(s,u,g)=>{const m=new Map,w=v=>{let M=m.get(v.base);return M||(M={driver:v.driver,base:v.base,items:[]},m.set(v.base,M)),M};for(const v of s){const M=typeof v=="string",W=He(M?v:v.key),Y=M?void 0:v.value,N=M||!v.options?u:{...u,...v.options},Le=n(W);w(Le).items.push({key:W,value:Y,relativeKey:Le.relativeKey,options:N})}return Promise.all([...m.values()].map(v=>g(v))).then(v=>v.flat())},y={hasItem(s,u={}){s=He(s);const{relativeKey:g,driver:m}=n(s);return Te(m.hasItem,g,u)},getItem(s,u={}){s=He(s);const{relativeKey:g,driver:m}=n(s);return Te(m.getItem,g,u).then(w=>Bt(w))},getItems(s,u){return E(s,u,g=>g.driver.getItems?Te(g.driver.getItems,g.items.map(m=>({key:m.relativeKey,options:m.options})),u).then(m=>m.map(w=>({key:ni(g.base,w.key),value:Bt(w.value)}))):Promise.all(g.items.map(m=>Te(g.driver.getItem,m.relativeKey,m.options).then(w=>({key:m.key,value:Bt(w)})))))},getItemRaw(s,u={}){s=He(s);const{relativeKey:g,driver:m}=n(s);return m.getItemRaw?Te(m.getItemRaw,g,u):Te(m.getItem,g,u).then(w=>ri(w))},async setItem(s,u,g={}){if(u===void 0)return y.removeItem(s);s=He(s);const{relativeKey:m,driver:w}=n(s);w.setItem&&(await Te(w.setItem,m,Ut(u),g),w.watch||o("update",s))},async setItems(s,u){await E(s,u,async g=>{if(g.driver.setItems)return Te(g.driver.setItems,g.items.map(m=>({key:m.relativeKey,value:Ut(m.value),options:m.options})),u);g.driver.setItem&&await Promise.all(g.items.map(m=>Te(g.driver.setItem,m.relativeKey,Ut(m.value),m.options)))})},async setItemRaw(s,u,g={}){if(u===void 0)return y.removeItem(s,g);s=He(s);const{relativeKey:m,driver:w}=n(s);if(w.setItemRaw)await Te(w.setItemRaw,m,u,g);else if(w.setItem)await Te(w.setItem,m,ti(u),g);else return;w.watch||o("update",s)},async removeItem(s,u={}){typeof u=="boolean"&&(u={removeMeta:u}),s=He(s);const{relativeKey:g,driver:m}=n(s);m.removeItem&&(await Te(m.removeItem,g,u),(u.removeMeta||u.removeMata)&&await Te(m.removeItem,g+"$",u),m.watch||o("remove",s))},async getMeta(s,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),s=He(s);const{relativeKey:g,driver:m}=n(s),w=Object.create(null);if(m.getMeta&&Object.assign(w,await Te(m.getMeta,g,u)),!u.nativeOnly){const v=await Te(m.getItem,g+"$",u).then(M=>Bt(M));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(w,v))}return w},setMeta(s,u,g={}){return this.setItem(s+"$",u,g)},removeMeta(s,u={}){return this.removeItem(s+"$",u)},async getKeys(s,u={}){s=Dt(s);const g=c(s,!0);let m=[];const w=[];for(const v of g){const W=(await Te(v.driver.getKeys,v.relativeBase,u)).map(Y=>v.mountpoint+He(Y)).filter(Y=>!m.some(N=>Y.startsWith(N)));w.push(...W),m=[v.mountpoint,...m.filter(Y=>!Y.startsWith(v.mountpoint))]}return s?w.filter(v=>v.startsWith(s)&&!v.endsWith("$")):w.filter(v=>!v.endsWith("$"))},async clear(s,u={}){s=Dt(s),await Promise.all(c(s,!1).map(async g=>{if(g.driver.clear)return Te(g.driver.clear,g.relativeBase,u);if(g.driver.removeItem){const m=await g.driver.getKeys(g.relativeBase||"",u);return Promise.all(m.map(w=>g.driver.removeItem(w,u)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(s=>mr(s)))},async watch(s){return await b(),r.watchListeners.push(s),async()=>{r.watchListeners=r.watchListeners.filter(u=>u!==s),r.watchListeners.length===0&&await S()}},async unwatch(){r.watchListeners=[],await S()},mount(s,u){if(s=Dt(s),s&&r.mounts[s])throw new Error(`already mounted at ${s}`);return s&&(r.mountpoints.push(s),r.mountpoints.sort((g,m)=>m.length-g.length)),r.mounts[s]=u,r.watching&&Promise.resolve(xr(u,o,s)).then(g=>{r.unwatch[s]=g}).catch(console.error),y},async unmount(s,u=!0){s=Dt(s),!(!s||!r.mounts[s])&&(r.watching&&s in r.unwatch&&(r.unwatch[s](),delete r.unwatch[s]),u&&await mr(r.mounts[s]),r.mountpoints=r.mountpoints.filter(g=>g!==s),delete r.mounts[s])},getMount(s=""){s=He(s)+":";const u=n(s);return{driver:u.driver,base:u.base}},getMounts(s="",u={}){return s=He(s),c(s,u.parents).map(m=>({driver:m.driver,base:m.mountpoint}))}};return y}function xr(e,r,n){return e.watch?e.watch((c,o)=>r(c,n+o)):()=>{}}async function mr(e){typeof e.dispose=="function"&&await Te(e.dispose)}function dt(e){return new Promise((r,n)=>{e.oncomplete=e.onsuccess=()=>r(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ur(e,r){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(r);const c=dt(n);return(o,b)=>c.then(S=>b(S.transaction(r,o).objectStore(r)))}let Vt;function Tt(){return Vt||(Vt=Ur("keyval-store","keyval")),Vt}function fi(e,r=Tt()){return r("readonly",n=>dt(n.get(e)))}function ai(e,r,n=Tt()){return n("readwrite",c=>(c.put(r,e),dt(c.transaction)))}function ci(e,r=Tt()){return r("readwrite",n=>(n.delete(e),dt(n.transaction)))}function ui(e=Tt()){return e("readwrite",r=>(r.clear(),dt(r.transaction)))}function li(e,r){return e.openCursor().onsuccess=function(){this.result&&(r(this.result),this.result.continue())},dt(e.transaction)}function hi(e=Tt()){return e("readonly",r=>{if(r.getAllKeys)return dt(r.getAllKeys());const n=[];return li(r,c=>n.push(c.key)).then(()=>n)})}class di{}function bi(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var gi=yi;function yi(e,r,n){var c=n&&n.stringify||bi,o=1;if(typeof e=="object"&&e!==null){var b=r.length+o;if(b===1)return e;var S=new Array(b);S[0]=c(e);for(var E=1;E<b;E++)S[E]=c(r[E]);return S.join(" ")}if(typeof e!="string")return e;var y=r.length;if(y===0)return e;for(var s="",u=1-o,g=-1,m=e&&e.length||0,w=0;w<m;){if(e.charCodeAt(w)===37&&w+1<m){switch(g=g>-1?g:0,e.charCodeAt(w+1)){case 100:case 102:if(u>=y||r[u]==null)break;g<w&&(s+=e.slice(g,w)),s+=Number(r[u]),g=w+2,w++;break;case 105:if(u>=y||r[u]==null)break;g<w&&(s+=e.slice(g,w)),s+=Math.floor(Number(r[u])),g=w+2,w++;break;case 79:case 111:case 106:if(u>=y||r[u]===void 0)break;g<w&&(s+=e.slice(g,w));var v=typeof r[u];if(v==="string"){s+="'"+r[u]+"'",g=w+2,w++;break}if(v==="function"){s+=r[u].name||"<anonymous>",g=w+2,w++;break}s+=c(r[u]),g=w+2,w++;break;case 115:if(u>=y)break;g<w&&(s+=e.slice(g,w)),s+=String(r[u]),g=w+2,w++;break;case 37:g<w&&(s+=e.slice(g,w)),s+="%",g=w+2,w++,u--;break}++u}++w}return g===-1?e:(g<m&&(s+=e.slice(g)),s)}const vr=gi;var _t=Qe;const St=Ii().console||{},pi={mapHttpRequest:zt,mapHttpResponse:zt,wrapRequestSerializer:Yt,wrapResponseSerializer:Yt,wrapErrorSerializer:Yt,req:zt,res:zt,err:wi};function _i(e,r){return Array.isArray(e)?e.filter(function(c){return c!=="!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||St;e.browser.write&&(e.browser.asObject=!0);const c=e.serializers||{},o=_i(e.browser.serialize,c);let b=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(b=!1);const S=["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 E=e.level||"info",y=Object.create(n);y.log||(y.log=Ot),Object.defineProperty(y,"levelVal",{get:u}),Object.defineProperty(y,"level",{get:g,set:m});const s={transmit:r,serialize:o,asObject:e.browser.asObject,levels:S,timestamp:Ei(e)};y.levels=Qe.levels,y.level=E,y.setMaxListeners=y.getMaxListeners=y.emit=y.addListener=y.on=y.prependListener=y.once=y.prependOnceListener=y.removeListener=y.removeAllListeners=y.listeners=y.listenerCount=y.eventNames=y.write=y.flush=Ot,y.serializers=c,y._serialize=o,y._stdErrSerialize=b,y.child=w,r&&(y._logEvent=Zt());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function g(){return this._level}function m(v){if(v!=="silent"&&!this.levels.values[v])throw Error("unknown level "+v);this._level=v,yt(s,y,"error","log"),yt(s,y,"fatal","error"),yt(s,y,"warn","error"),yt(s,y,"info","log"),yt(s,y,"debug","log"),yt(s,y,"trace","log")}function w(v,M){if(!v)throw new Error("missing bindings for child Pino");M=M||{},o&&v.serializers&&(M.serializers=v.serializers);const W=M.serializers;if(o&&W){var Y=Object.assign({},c,W),N=e.browser.serialize===!0?Object.keys(Y):o;delete v.serializers,kt([v],N,Y,this._stdErrSerialize)}function Le(ge){this._childLevel=(ge._childLevel|0)+1,this.error=pt(ge,v,"error"),this.fatal=pt(ge,v,"fatal"),this.warn=pt(ge,v,"warn"),this.info=pt(ge,v,"info"),this.debug=pt(ge,v,"debug"),this.trace=pt(ge,v,"trace"),Y&&(this.serializers=Y,this._serialize=N),r&&(this._logEvent=Zt([].concat(ge._logEvent.bindings,v)))}return Le.prototype=this,new Le(this)}return y}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=pi;Qe.stdTimeFunctions=Object.assign({},{nullTime:Hr,epochTime:Kr,unixTime:Si,isoTime:Oi});function yt(e,r,n,c){const o=Object.getPrototypeOf(r);r[n]=r.levelVal>r.levels.values[n]?Ot:o[n]?o[n]:St[n]||St[c]||Ot,xi(e,r,n)}function xi(e,r,n){!e.transmit&&r[n]===Ot||(r[n]=function(c){return function(){const b=e.timestamp(),S=new Array(arguments.length),E=Object.getPrototypeOf&&Object.getPrototypeOf(this)===St?St:this;for(var y=0;y<S.length;y++)S[y]=arguments[y];if(e.serialize&&!e.asObject&&kt(S,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?c.call(E,mi(this,n,S,b)):c.apply(E,S),e.transmit){const s=e.transmit.level||r.level,u=Qe.levels.values[s],g=Qe.levels.values[n];if(g<u)return;vi(this,{ts:b,methodLevel:n,methodValue:g,transmitLevel:s,transmitValue:Qe.levels.values[e.transmit.level||r.level],send:e.transmit.send,val:r.levelVal},S)}}}(r[n]))}function mi(e,r,n,c){e._serialize&&kt(n,e._serialize,e.serializers,e._stdErrSerialize);const o=n.slice();let b=o[0];const S={};c&&(S.time=c),S.level=Qe.levels.values[r];let E=(e._childLevel|0)+1;if(E<1&&(E=1),b!==null&&typeof b=="object"){for(;E--&&typeof o[0]=="object";)Object.assign(S,o.shift());b=o.length?vr(o.shift(),o):void 0}else typeof b=="string"&&(b=vr(o.shift(),o));return b!==void 0&&(S.msg=b),S}function kt(e,r,n,c){for(const o in e)if(c&&e[o]instanceof Error)e[o]=Qe.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o]))for(const b in e[o])r&&r.indexOf(b)>-1&&b in n&&(e[o][b]=n[b](e[o][b]))}function pt(e,r,n){return function(){const c=new Array(1+arguments.length);c[0]=r;for(var o=1;o<c.length;o++)c[o]=arguments[o-1];return e[n].apply(this,c)}}function vi(e,r,n){const c=r.send,o=r.ts,b=r.methodLevel,S=r.methodValue,E=r.val,y=e._logEvent.bindings;kt(n,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=n.filter(function(s){return y.indexOf(s)===-1}),e._logEvent.level.label=b,e._logEvent.level.value=S,c(b,e._logEvent,E),e._logEvent=Zt(y)}function Zt(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function wi(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 Ei(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Hr:Kr}function zt(){return{}}function Yt(e){return e}function Ot(){}function Hr(){return!1}function Kr(){return Date.now()}function Si(){return Math.round(Date.now()/1e3)}function Oi(){return new Date(Date.now()).toISOString()}function Ii(){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 rr=U.getDefaultExportFromCjs(_t),Ti=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n);function wr(e){return typeof e=="string"?e:Ti(e)||""}const Li={level:"info"},Lt="custom_context",nr=1e3*1024;class Ai{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 Er{constructor(r){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=r,this.sizeInBytes=0}append(r){const n=new Ai(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 Gr{constructor(r,n=nr){this.level=r??"error",this.levelValue=_t.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=n,this.logs=new Er(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(r,n){n===_t.levels.values.error?console.error(r):n===_t.levels.values.warn?console.warn(r):n===_t.levels.values.debug?console.debug(r):n===_t.levels.values.trace?console.trace(r):console.log(r)}appendToLogs(r){this.logs.append(wr({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 Er(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(r){const n=this.getLogArray();return n.push(wr({extraMetadata:r})),new Blob(n,{type:"application/json"})}}class Ri{constructor(r,n=nr){this.baseChunkLogger=new Gr(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)),c=document.createElement("a");c.href=n,c.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(n)}}class Pi{constructor(r,n=nr){this.baseChunkLogger=new Gr(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 ji=Object.defineProperty,Ci=Object.defineProperties,Mi=Object.getOwnPropertyDescriptors,Sr=Object.getOwnPropertySymbols,Ni=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,Or=(e,r,n)=>r in e?ji(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Ht=(e,r)=>{for(var n in r||(r={}))Ni.call(r,n)&&Or(e,n,r[n]);if(Sr)for(var n of Sr(r))Bi.call(r,n)&&Or(e,n,r[n]);return e},Kt=(e,r)=>Ci(e,Mi(r));function Di(e){return Kt(Ht({},e),{level:(e==null?void 0:e.level)||Li.level})}function zi(e,r=Lt){return e[r]||""}function Ui(e,r,n=Lt){return e[n]=r,e}function $r(e,r=Lt){let n="";return typeof e.bindings>"u"?n=zi(e,r):n=e.bindings().context||"",n}function Hi(e,r,n=Lt){const c=$r(e,n);return c.trim()?`${c}/${r}`:r}function Ki(e,r,n=Lt){const c=Hi(e,r,n),o=e.child({context:c});return Ui(o,c,n)}function Gi(e){var r,n;const c=new Ri((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:rr(Kt(Ht({},e.opts),{level:"trace",browser:Kt(Ht({},(n=e.opts)==null?void 0:n.browser),{write:o=>c.write(o)})})),chunkLoggerController:c}}function $i(e){var r;const n=new Pi((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:rr(Kt(Ht({},e.opts),{level:"trace"}),n),chunkLoggerController:n}}function Fi(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?Gi(e):$i(e)}var ir={},Fr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=De.binary,n=De.wipe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var c=function(){function E(){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 E.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},E.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},E.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},E.prototype.update=function(y,s){if(s===void 0&&(s=y.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var u=0;if(this._bytesHashed+=s,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&s>0;)this._buffer[this._bufferLength++]=y[u++],s--;this._bufferLength===this.blockSize&&(b(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(s>=this.blockSize&&(u=b(this._tempHi,this._tempLo,this._stateHi,this._stateLo,y,u,s),s%=this.blockSize);s>0;)this._buffer[this._bufferLength++]=y[u++],s--;return this},E.prototype.finish=function(y){if(!this._finished){var s=this._bytesHashed,u=this._bufferLength,g=s/536870912|0,m=s<<3,w=s%128<112?128:256;this._buffer[u]=128;for(var v=u+1;v<w-8;v++)this._buffer[v]=0;r.writeUint32BE(g,this._buffer,w-8),r.writeUint32BE(m,this._buffer,w-4),b(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,w),this._finished=!0}for(var v=0;v<this.digestLength/8;v++)r.writeUint32BE(this._stateHi[v],y,v*8),r.writeUint32BE(this._stateLo[v],y,v*8+4);return this},E.prototype.digest=function(){var y=new Uint8Array(this.digestLength);return this.finish(y),y},E.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}},E.prototype.restoreState=function(y){return this._stateHi.set(y.stateHi),this._stateLo.set(y.stateLo),this._bufferLength=y.bufferLength,y.buffer&&this._buffer.set(y.buffer),this._bytesHashed=y.bytesHashed,this._finished=!1,this},E.prototype.cleanSavedState=function(y){n.wipe(y.stateHi),n.wipe(y.stateLo),y.buffer&&n.wipe(y.buffer),y.bufferLength=0,y.bytesHashed=0},E}();e.SHA512=c;var o=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 b(E,y,s,u,g,m,w){for(var v=s[0],M=s[1],W=s[2],Y=s[3],N=s[4],Le=s[5],ge=s[6],Ce=s[7],$=u[0],C=u[1],Me=u[2],et=u[3],ye=u[4],ke=u[5],Ke=u[6],Ve=u[7],x,_,X,le,A,O,I,L;w>=128;){for(var Ae=0;Ae<16;Ae++){var ne=8*Ae+m;E[Ae]=r.readUint32BE(g,ne),y[Ae]=r.readUint32BE(g,ne+4)}for(var Ae=0;Ae<80;Ae++){var xt=v,B=M,bt=W,d=Y,h=N,l=Le,t=ge,f=Ce,R=$,P=C,z=Me,H=et,D=ye,K=ke,Re=Ke,he=Ve;if(x=Ce,_=Ve,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=(N>>>14|ye<<18)^(N>>>18|ye<<14)^(ye>>>9|N<<23),_=(ye>>>14|N<<18)^(ye>>>18|N<<14)^(N>>>9|ye<<23),A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,x=N&Le^~N&ge,_=ye&ke^~ye&Ke,A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,x=o[Ae*2],_=o[Ae*2+1],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,x=E[Ae%16],_=y[Ae%16],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,X=I&65535|L<<16,le=A&65535|O<<16,x=X,_=le,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=(v>>>28|$<<4)^($>>>2|v<<30)^($>>>7|v<<25),_=($>>>28|v<<4)^(v>>>2|$<<30)^(v>>>7|$<<25),A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,x=v&M^v&W^M&W,_=$&C^$&Me^C&Me,A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,f=I&65535|L<<16,he=A&65535|O<<16,x=d,_=H,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=X,_=le,A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,d=I&65535|L<<16,H=A&65535|O<<16,M=xt,W=B,Y=bt,N=d,Le=h,ge=l,Ce=t,v=f,C=R,Me=P,et=z,ye=H,ke=D,Ke=K,Ve=Re,$=he,Ae%16===15)for(var ne=0;ne<16;ne++)x=E[ne],_=y[ne],A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=E[(ne+9)%16],_=y[(ne+9)%16],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,X=E[(ne+1)%16],le=y[(ne+1)%16],x=(X>>>1|le<<31)^(X>>>8|le<<24)^X>>>7,_=(le>>>1|X<<31)^(le>>>8|X<<24)^(le>>>7|X<<25),A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,X=E[(ne+14)%16],le=y[(ne+14)%16],x=(X>>>19|le<<13)^(le>>>29|X<<3)^X>>>6,_=(le>>>19|X<<13)^(X>>>29|le<<3)^(le>>>6|X<<26),A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,E[ne]=I&65535|L<<16,y[ne]=A&65535|O<<16}x=v,_=$,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[0],_=u[0],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[0]=v=I&65535|L<<16,u[0]=$=A&65535|O<<16,x=M,_=C,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[1],_=u[1],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[1]=M=I&65535|L<<16,u[1]=C=A&65535|O<<16,x=W,_=Me,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[2],_=u[2],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[2]=W=I&65535|L<<16,u[2]=Me=A&65535|O<<16,x=Y,_=et,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[3],_=u[3],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[3]=Y=I&65535|L<<16,u[3]=et=A&65535|O<<16,x=N,_=ye,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[4],_=u[4],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[4]=N=I&65535|L<<16,u[4]=ye=A&65535|O<<16,x=Le,_=ke,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[5],_=u[5],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[5]=Le=I&65535|L<<16,u[5]=ke=A&65535|O<<16,x=ge,_=Ke,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[6],_=u[6],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[6]=ge=I&65535|L<<16,u[6]=Ke=A&65535|O<<16,x=Ce,_=Ve,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[7],_=u[7],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[7]=Ce=I&65535|L<<16,u[7]=Ve=A&65535|O<<16,m+=128,w-=128}return m}function S(E){var y=new c;y.update(E);var s=y.digest();return y.clean(),s}e.hash=S})(Fr);(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=De.random,n=Fr,c=De.wipe;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function o(d){const h=new Float64Array(16);if(d)for(let l=0;l<d.length;l++)h[l]=d[l];return h}const b=new Uint8Array(32);b[0]=9;const S=o(),E=o([1]),y=o([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),s=o([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=o([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),g=o([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=o([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function w(d,h){for(let l=0;l<16;l++)d[l]=h[l]|0}function v(d){let h=1;for(let l=0;l<16;l++){let t=d[l]+h+65535;h=Math.floor(t/65536),d[l]=t-h*65536}d[0]+=h-1+37*(h-1)}function M(d,h,l){const t=~(l-1);for(let f=0;f<16;f++){const R=t&(d[f]^h[f]);d[f]^=R,h[f]^=R}}function W(d,h){const l=o(),t=o();for(let f=0;f<16;f++)t[f]=h[f];v(t),v(t),v(t);for(let f=0;f<2;f++){l[0]=t[0]-65517;for(let P=1;P<15;P++)l[P]=t[P]-65535-(l[P-1]>>16&1),l[P-1]&=65535;l[15]=t[15]-32767-(l[14]>>16&1);const R=l[15]>>16&1;l[14]&=65535,M(t,l,1-R)}for(let f=0;f<16;f++)d[2*f]=t[f]&255,d[2*f+1]=t[f]>>8}function Y(d,h){let l=0;for(let t=0;t<32;t++)l|=d[t]^h[t];return(1&l-1>>>8)-1}function N(d,h){const l=new Uint8Array(32),t=new Uint8Array(32);return W(l,d),W(t,h),Y(l,t)}function Le(d){const h=new Uint8Array(32);return W(h,d),h[0]&1}function ge(d,h){for(let l=0;l<16;l++)d[l]=h[2*l]+(h[2*l+1]<<8);d[15]&=32767}function Ce(d,h,l){for(let t=0;t<16;t++)d[t]=h[t]+l[t]}function $(d,h,l){for(let t=0;t<16;t++)d[t]=h[t]-l[t]}function C(d,h,l){let t,f,R=0,P=0,z=0,H=0,D=0,K=0,Re=0,he=0,Pe=0,pe=0,de=0,ie=0,re=0,Z=0,q=0,G=0,se=0,_e=0,F=0,Ne=0,ze=0,Ge=0,$e=0,Ue=0,Ye=0,Ze=0,st=0,Fe=0,ct=0,mt=0,At=0,oe=l[0],Q=l[1],fe=l[2],ae=l[3],ce=l[4],ee=l[5],xe=l[6],me=l[7],ve=l[8],we=l[9],Ee=l[10],be=l[11],ue=l[12],k=l[13],Se=l[14],Oe=l[15];t=h[0],R+=t*oe,P+=t*Q,z+=t*fe,H+=t*ae,D+=t*ce,K+=t*ee,Re+=t*xe,he+=t*me,Pe+=t*ve,pe+=t*we,de+=t*Ee,ie+=t*be,re+=t*ue,Z+=t*k,q+=t*Se,G+=t*Oe,t=h[1],P+=t*oe,z+=t*Q,H+=t*fe,D+=t*ae,K+=t*ce,Re+=t*ee,he+=t*xe,Pe+=t*me,pe+=t*ve,de+=t*we,ie+=t*Ee,re+=t*be,Z+=t*ue,q+=t*k,G+=t*Se,se+=t*Oe,t=h[2],z+=t*oe,H+=t*Q,D+=t*fe,K+=t*ae,Re+=t*ce,he+=t*ee,Pe+=t*xe,pe+=t*me,de+=t*ve,ie+=t*we,re+=t*Ee,Z+=t*be,q+=t*ue,G+=t*k,se+=t*Se,_e+=t*Oe,t=h[3],H+=t*oe,D+=t*Q,K+=t*fe,Re+=t*ae,he+=t*ce,Pe+=t*ee,pe+=t*xe,de+=t*me,ie+=t*ve,re+=t*we,Z+=t*Ee,q+=t*be,G+=t*ue,se+=t*k,_e+=t*Se,F+=t*Oe,t=h[4],D+=t*oe,K+=t*Q,Re+=t*fe,he+=t*ae,Pe+=t*ce,pe+=t*ee,de+=t*xe,ie+=t*me,re+=t*ve,Z+=t*we,q+=t*Ee,G+=t*be,se+=t*ue,_e+=t*k,F+=t*Se,Ne+=t*Oe,t=h[5],K+=t*oe,Re+=t*Q,he+=t*fe,Pe+=t*ae,pe+=t*ce,de+=t*ee,ie+=t*xe,re+=t*me,Z+=t*ve,q+=t*we,G+=t*Ee,se+=t*be,_e+=t*ue,F+=t*k,Ne+=t*Se,ze+=t*Oe,t=h[6],Re+=t*oe,he+=t*Q,Pe+=t*fe,pe+=t*ae,de+=t*ce,ie+=t*ee,re+=t*xe,Z+=t*me,q+=t*ve,G+=t*we,se+=t*Ee,_e+=t*be,F+=t*ue,Ne+=t*k,ze+=t*Se,Ge+=t*Oe,t=h[7],he+=t*oe,Pe+=t*Q,pe+=t*fe,de+=t*ae,ie+=t*ce,re+=t*ee,Z+=t*xe,q+=t*me,G+=t*ve,se+=t*we,_e+=t*Ee,F+=t*be,Ne+=t*ue,ze+=t*k,Ge+=t*Se,$e+=t*Oe,t=h[8],Pe+=t*oe,pe+=t*Q,de+=t*fe,ie+=t*ae,re+=t*ce,Z+=t*ee,q+=t*xe,G+=t*me,se+=t*ve,_e+=t*we,F+=t*Ee,Ne+=t*be,ze+=t*ue,Ge+=t*k,$e+=t*Se,Ue+=t*Oe,t=h[9],pe+=t*oe,de+=t*Q,ie+=t*fe,re+=t*ae,Z+=t*ce,q+=t*ee,G+=t*xe,se+=t*me,_e+=t*ve,F+=t*we,Ne+=t*Ee,ze+=t*be,Ge+=t*ue,$e+=t*k,Ue+=t*Se,Ye+=t*Oe,t=h[10],de+=t*oe,ie+=t*Q,re+=t*fe,Z+=t*ae,q+=t*ce,G+=t*ee,se+=t*xe,_e+=t*me,F+=t*ve,Ne+=t*we,ze+=t*Ee,Ge+=t*be,$e+=t*ue,Ue+=t*k,Ye+=t*Se,Ze+=t*Oe,t=h[11],ie+=t*oe,re+=t*Q,Z+=t*fe,q+=t*ae,G+=t*ce,se+=t*ee,_e+=t*xe,F+=t*me,Ne+=t*ve,ze+=t*we,Ge+=t*Ee,$e+=t*be,Ue+=t*ue,Ye+=t*k,Ze+=t*Se,st+=t*Oe,t=h[12],re+=t*oe,Z+=t*Q,q+=t*fe,G+=t*ae,se+=t*ce,_e+=t*ee,F+=t*xe,Ne+=t*me,ze+=t*ve,Ge+=t*we,$e+=t*Ee,Ue+=t*be,Ye+=t*ue,Ze+=t*k,st+=t*Se,Fe+=t*Oe,t=h[13],Z+=t*oe,q+=t*Q,G+=t*fe,se+=t*ae,_e+=t*ce,F+=t*ee,Ne+=t*xe,ze+=t*me,Ge+=t*ve,$e+=t*we,Ue+=t*Ee,Ye+=t*be,Ze+=t*ue,st+=t*k,Fe+=t*Se,ct+=t*Oe,t=h[14],q+=t*oe,G+=t*Q,se+=t*fe,_e+=t*ae,F+=t*ce,Ne+=t*ee,ze+=t*xe,Ge+=t*me,$e+=t*ve,Ue+=t*we,Ye+=t*Ee,Ze+=t*be,st+=t*ue,Fe+=t*k,ct+=t*Se,mt+=t*Oe,t=h[15],G+=t*oe,se+=t*Q,_e+=t*fe,F+=t*ae,Ne+=t*ce,ze+=t*ee,Ge+=t*xe,$e+=t*me,Ue+=t*ve,Ye+=t*we,Ze+=t*Ee,st+=t*be,Fe+=t*ue,ct+=t*k,mt+=t*Se,At+=t*Oe,R+=38*se,P+=38*_e,z+=38*F,H+=38*Ne,D+=38*ze,K+=38*Ge,Re+=38*$e,he+=38*Ue,Pe+=38*Ye,pe+=38*Ze,de+=38*st,ie+=38*Fe,re+=38*ct,Z+=38*mt,q+=38*At,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=z+f+65535,f=Math.floor(t/65536),z=t-f*65536,t=H+f+65535,f=Math.floor(t/65536),H=t-f*65536,t=D+f+65535,f=Math.floor(t/65536),D=t-f*65536,t=K+f+65535,f=Math.floor(t/65536),K=t-f*65536,t=Re+f+65535,f=Math.floor(t/65536),Re=t-f*65536,t=he+f+65535,f=Math.floor(t/65536),he=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=de+f+65535,f=Math.floor(t/65536),de=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=q+f+65535,f=Math.floor(t/65536),q=t-f*65536,t=G+f+65535,f=Math.floor(t/65536),G=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=z+f+65535,f=Math.floor(t/65536),z=t-f*65536,t=H+f+65535,f=Math.floor(t/65536),H=t-f*65536,t=D+f+65535,f=Math.floor(t/65536),D=t-f*65536,t=K+f+65535,f=Math.floor(t/65536),K=t-f*65536,t=Re+f+65535,f=Math.floor(t/65536),Re=t-f*65536,t=he+f+65535,f=Math.floor(t/65536),he=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=de+f+65535,f=Math.floor(t/65536),de=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=q+f+65535,f=Math.floor(t/65536),q=t-f*65536,t=G+f+65535,f=Math.floor(t/65536),G=t-f*65536,R+=f-1+37*(f-1),d[0]=R,d[1]=P,d[2]=z,d[3]=H,d[4]=D,d[5]=K,d[6]=Re,d[7]=he,d[8]=Pe,d[9]=pe,d[10]=de,d[11]=ie,d[12]=re,d[13]=Z,d[14]=q,d[15]=G}function Me(d,h){C(d,h,h)}function et(d,h){const l=o();let t;for(t=0;t<16;t++)l[t]=h[t];for(t=253;t>=0;t--)Me(l,l),t!==2&&t!==4&&C(l,l,h);for(t=0;t<16;t++)d[t]=l[t]}function ye(d,h){const l=o();let t;for(t=0;t<16;t++)l[t]=h[t];for(t=250;t>=0;t--)Me(l,l),t!==1&&C(l,l,h);for(t=0;t<16;t++)d[t]=l[t]}function ke(d,h){const l=o(),t=o(),f=o(),R=o(),P=o(),z=o(),H=o(),D=o(),K=o();$(l,d[1],d[0]),$(K,h[1],h[0]),C(l,l,K),Ce(t,d[0],d[1]),Ce(K,h[0],h[1]),C(t,t,K),C(f,d[3],h[3]),C(f,f,s),C(R,d[2],h[2]),Ce(R,R,R),$(P,t,l),$(z,R,f),Ce(H,R,f),Ce(D,t,l),C(d[0],P,z),C(d[1],D,H),C(d[2],H,z),C(d[3],P,D)}function Ke(d,h,l){for(let t=0;t<4;t++)M(d[t],h[t],l)}function Ve(d,h){const l=o(),t=o(),f=o();et(f,h[2]),C(l,h[0],f),C(t,h[1],f),W(d,t),d[31]^=Le(l)<<7}function x(d,h,l){w(d[0],S),w(d[1],E),w(d[2],E),w(d[3],S);for(let t=255;t>=0;--t){const f=l[t/8|0]>>(t&7)&1;Ke(d,h,f),ke(h,d),ke(d,d),Ke(d,h,f)}}function _(d,h){const l=[o(),o(),o(),o()];w(l[0],u),w(l[1],g),w(l[2],E),C(l[3],u,g),x(d,l,h)}function X(d){if(d.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const h=(0,n.hash)(d);h[0]&=248,h[31]&=127,h[31]|=64;const l=new Uint8Array(32),t=[o(),o(),o(),o()];_(t,h),Ve(l,t);const f=new Uint8Array(64);return f.set(d),f.set(l,32),{publicKey:l,secretKey:f}}e.generateKeyPairFromSeed=X;function le(d){const h=(0,r.randomBytes)(32,d),l=X(h);return(0,c.wipe)(h),l}e.generateKeyPair=le;function A(d){if(d.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(d.subarray(32))}e.extractPublicKeyFromSecretKey=A;const O=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 I(d,h){let l,t,f,R;for(t=63;t>=32;--t){for(l=0,f=t-32,R=t-12;f<R;++f)h[f]+=l-16*h[t]*O[f-(t-32)],l=Math.floor((h[f]+128)/256),h[f]-=l*256;h[f]+=l,h[t]=0}for(l=0,f=0;f<32;f++)h[f]+=l-(h[31]>>4)*O[f],l=h[f]>>8,h[f]&=255;for(f=0;f<32;f++)h[f]-=l*O[f];for(t=0;t<32;t++)h[t+1]+=h[t]>>8,d[t]=h[t]&255}function L(d){const h=new Float64Array(64);for(let l=0;l<64;l++)h[l]=d[l];for(let l=0;l<64;l++)d[l]=0;I(d,h)}function Ae(d,h){const l=new Float64Array(64),t=[o(),o(),o(),o()],f=(0,n.hash)(d.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 z=P.digest();P.clean(),L(z),_(t,z),Ve(R,t),P.reset(),P.update(R.subarray(0,32)),P.update(d.subarray(32)),P.update(h);const H=P.digest();L(H);for(let D=0;D<32;D++)l[D]=z[D];for(let D=0;D<32;D++)for(let K=0;K<32;K++)l[D+K]+=H[D]*f[K];return I(R.subarray(32),l),R}e.sign=Ae;function ne(d,h){const l=o(),t=o(),f=o(),R=o(),P=o(),z=o(),H=o();return w(d[2],E),ge(d[1],h),Me(f,d[1]),C(R,f,y),$(f,f,d[2]),Ce(R,d[2],R),Me(P,R),Me(z,P),C(H,z,P),C(l,H,f),C(l,l,R),ye(l,l),C(l,l,f),C(l,l,R),C(l,l,R),C(d[0],l,R),Me(t,d[0]),C(t,t,R),N(t,f)&&C(d[0],d[0],m),Me(t,d[0]),C(t,t,R),N(t,f)?-1:(Le(d[0])===h[31]>>7&&$(d[0],S,d[0]),C(d[3],d[0],d[1]),0)}function xt(d,h,l){const t=new Uint8Array(32),f=[o(),o(),o(),o()],R=[o(),o(),o(),o()];if(l.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(ne(R,d))return!1;const P=new n.SHA512;P.update(l.subarray(0,32)),P.update(d),P.update(h);const z=P.digest();return L(z),x(f,R,z),_(R,l.subarray(32)),ke(f,R),Ve(t,f),!Y(l,t)}e.verify=xt;function B(d){let h=[o(),o(),o(),o()];if(ne(h,d))throw new Error("Ed25519: invalid public key");let l=o(),t=o(),f=h[1];Ce(l,E,f),$(t,E,f),et(t,t),C(l,l,t);let R=new Uint8Array(32);return W(R,l),R}e.convertPublicKeyToX25519=B;function bt(d){const h=(0,n.hash)(d.subarray(0,32));h[0]&=248,h[31]&=127,h[31]|=64;const l=new Uint8Array(h.subarray(0,32));return(0,c.wipe)(h),l}e.convertSecretKeyToX25519=bt})(ir);const Ji="EdDSA",ki="JWT",Jr=".",kr="base64url",Wi="utf8",qi="utf8",Vi=":",Yi="did",Xi="key",Ir="base58btc",Zi="z",Qi="K36",es=32,ts=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n);function rs(e){return typeof e=="string"?e:ts(e)||""}function Gt(e){return Jt(Ft(rs(e),Wi),kr)}function Wr(e){const r=Ft(Qi,Ir),n=Zi+Jt(Nr([r,e]),Ir);return[Yi,Xi,n].join(Vi)}function ns(e){return Jt(e,kr)}function is(e){return Ft([Gt(e.header),Gt(e.payload)].join(Jr),qi)}function ss(e){return[Gt(e.header),Gt(e.payload),ns(e.signature)].join(Jr)}function os(e=De.random.randomBytes(es)){return ir.generateKeyPairFromSeed(e)}async function fs(e,r,n,c,o=De.cjs.fromMiliseconds(Date.now())){const b={alg:Ji,typ:ki},S=Wr(c.publicKey),E=o+n,y={iss:S,sub:e,aud:r,iat:o,exp:E},s=is({header:b,payload:y}),u=ir.sign(c.secretKey,s);return ss({header:b,payload:y,signature:u})}const as="PARSE_ERROR",cs="INVALID_REQUEST",us="METHOD_NOT_FOUND",ls="INVALID_PARAMS",qr="INTERNAL_ERROR",sr="SERVER_ERROR",hs=[-32700,-32600,-32601,-32602,-32603],Et={[as]:{code:-32700,message:"Parse error"},[cs]:{code:-32600,message:"Invalid Request"},[us]:{code:-32601,message:"Method not found"},[ls]:{code:-32602,message:"Invalid params"},[qr]:{code:-32603,message:"Internal error"},[sr]:{code:-32e3,message:"Server error"}},Vr=sr;function ds(e){return hs.includes(e)}function Tr(e){return Object.keys(Et).includes(e)?Et[e]:Et[Vr]}function bs(e){const r=Object.values(Et).find(n=>n.code===e);return r||Et[Vr]}function Yr(e,r,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${r}`):e}var Xr={};/*! *****************************************************************************
1
+ "use strict";const U=require("./index-C1oy9Lkm.js"),De=require("./index-oVIYJXdI.js");function Mr(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function Nr(e,r){r||(r=e.reduce((o,b)=>o+b.length,0));const n=Mr(r);let c=0;for(const o of e)n.set(o,c),c+=o.length;return n}const pr={...De.identityBase,...De.base2,...De.base8,...De.base10,...De.base16,...De.base32,...De.base36,...De.base58,...De.base64,...De.base256emoji};function Br(e,r,n,c){return{name:e,prefix:r,encoder:{name:e,prefix:r,encode:n},decoder:{decode:c}}}const _r=Br("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),qt=Br("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=Mr(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}),Dr={utf8:_r,"utf-8":_r,hex:pr.base16,latin1:qt,ascii:qt,binary:qt,...pr};function Ft(e,r="utf8"){const n=Dr[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=Dr[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)}const kn={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"}},Wn=/"(?:_|\\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*:/,qn=/"(?: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*:/,Vn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Yn(e,r){if(e==="__proto__"||e==="constructor"&&r&&typeof r=="object"&&"prototype"in r){Xn(e);return}return r}function Xn(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Bt(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 c=n.toLowerCase();if(c==="true")return!0;if(c==="false")return!1;if(c==="undefined")return;if(c==="null")return null;if(c==="nan")return Number.NaN;if(c==="infinity")return Number.POSITIVE_INFINITY;if(c==="-infinity")return Number.NEGATIVE_INFINITY}if(!Vn.test(e)){if(r.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Wn.test(e)||qn.test(e)){if(r.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Yn)}return JSON.parse(e)}catch(c){if(r.strict)throw c;return e}}function Zn(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Te(e,...r){try{return Zn(e(...r))}catch(n){return Promise.reject(n)}}function Qn(e){const r=typeof e;return e===null||r!=="object"&&r!=="function"}function ei(e){const r=Object.getPrototypeOf(e);return!r||r.isPrototypeOf(Object)}function Ut(e){if(Qn(e))return String(e);if(ei(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 zr(){if(typeof U.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Xt="base64:";function ti(e){if(typeof e=="string")return e;zr();const r=U.dist.Buffer.from(e).toString("base64");return Xt+r}function ri(e){return typeof e!="string"||!e.startsWith(Xt)?e:(zr(),U.dist.Buffer.from(e.slice(Xt.length),"base64"))}function He(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function ni(...e){return He(e.join(":"))}function Dt(e){return e=He(e),e?e+":":""}const ii="memory",si=()=>{const e=new Map;return{name:ii,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 oi(e={}){const r={mounts:{"":e.driver||si()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=s=>{for(const u of r.mountpoints)if(s.startsWith(u))return{base:u,relativeKey:s.slice(u.length),driver:r.mounts[u]};return{base:"",relativeKey:s,driver:r.mounts[""]}},c=(s,u)=>r.mountpoints.filter(g=>g.startsWith(s)||u&&s.startsWith(g)).map(g=>({relativeBase:s.length>g.length?s.slice(g.length):void 0,mountpoint:g,driver:r.mounts[g]})),o=(s,u)=>{if(r.watching){u=He(u);for(const g of r.watchListeners)g(s,u)}},b=async()=>{if(!r.watching){r.watching=!0;for(const s in r.mounts)r.unwatch[s]=await xr(r.mounts[s],o,s)}},S=async()=>{if(r.watching){for(const s in r.unwatch)await r.unwatch[s]();r.unwatch={},r.watching=!1}},E=(s,u,g)=>{const m=new Map,w=v=>{let M=m.get(v.base);return M||(M={driver:v.driver,base:v.base,items:[]},m.set(v.base,M)),M};for(const v of s){const M=typeof v=="string",W=He(M?v:v.key),Y=M?void 0:v.value,N=M||!v.options?u:{...u,...v.options},Le=n(W);w(Le).items.push({key:W,value:Y,relativeKey:Le.relativeKey,options:N})}return Promise.all([...m.values()].map(v=>g(v))).then(v=>v.flat())},y={hasItem(s,u={}){s=He(s);const{relativeKey:g,driver:m}=n(s);return Te(m.hasItem,g,u)},getItem(s,u={}){s=He(s);const{relativeKey:g,driver:m}=n(s);return Te(m.getItem,g,u).then(w=>Bt(w))},getItems(s,u){return E(s,u,g=>g.driver.getItems?Te(g.driver.getItems,g.items.map(m=>({key:m.relativeKey,options:m.options})),u).then(m=>m.map(w=>({key:ni(g.base,w.key),value:Bt(w.value)}))):Promise.all(g.items.map(m=>Te(g.driver.getItem,m.relativeKey,m.options).then(w=>({key:m.key,value:Bt(w)})))))},getItemRaw(s,u={}){s=He(s);const{relativeKey:g,driver:m}=n(s);return m.getItemRaw?Te(m.getItemRaw,g,u):Te(m.getItem,g,u).then(w=>ri(w))},async setItem(s,u,g={}){if(u===void 0)return y.removeItem(s);s=He(s);const{relativeKey:m,driver:w}=n(s);w.setItem&&(await Te(w.setItem,m,Ut(u),g),w.watch||o("update",s))},async setItems(s,u){await E(s,u,async g=>{if(g.driver.setItems)return Te(g.driver.setItems,g.items.map(m=>({key:m.relativeKey,value:Ut(m.value),options:m.options})),u);g.driver.setItem&&await Promise.all(g.items.map(m=>Te(g.driver.setItem,m.relativeKey,Ut(m.value),m.options)))})},async setItemRaw(s,u,g={}){if(u===void 0)return y.removeItem(s,g);s=He(s);const{relativeKey:m,driver:w}=n(s);if(w.setItemRaw)await Te(w.setItemRaw,m,u,g);else if(w.setItem)await Te(w.setItem,m,ti(u),g);else return;w.watch||o("update",s)},async removeItem(s,u={}){typeof u=="boolean"&&(u={removeMeta:u}),s=He(s);const{relativeKey:g,driver:m}=n(s);m.removeItem&&(await Te(m.removeItem,g,u),(u.removeMeta||u.removeMata)&&await Te(m.removeItem,g+"$",u),m.watch||o("remove",s))},async getMeta(s,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),s=He(s);const{relativeKey:g,driver:m}=n(s),w=Object.create(null);if(m.getMeta&&Object.assign(w,await Te(m.getMeta,g,u)),!u.nativeOnly){const v=await Te(m.getItem,g+"$",u).then(M=>Bt(M));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(w,v))}return w},setMeta(s,u,g={}){return this.setItem(s+"$",u,g)},removeMeta(s,u={}){return this.removeItem(s+"$",u)},async getKeys(s,u={}){s=Dt(s);const g=c(s,!0);let m=[];const w=[];for(const v of g){const W=(await Te(v.driver.getKeys,v.relativeBase,u)).map(Y=>v.mountpoint+He(Y)).filter(Y=>!m.some(N=>Y.startsWith(N)));w.push(...W),m=[v.mountpoint,...m.filter(Y=>!Y.startsWith(v.mountpoint))]}return s?w.filter(v=>v.startsWith(s)&&!v.endsWith("$")):w.filter(v=>!v.endsWith("$"))},async clear(s,u={}){s=Dt(s),await Promise.all(c(s,!1).map(async g=>{if(g.driver.clear)return Te(g.driver.clear,g.relativeBase,u);if(g.driver.removeItem){const m=await g.driver.getKeys(g.relativeBase||"",u);return Promise.all(m.map(w=>g.driver.removeItem(w,u)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(s=>mr(s)))},async watch(s){return await b(),r.watchListeners.push(s),async()=>{r.watchListeners=r.watchListeners.filter(u=>u!==s),r.watchListeners.length===0&&await S()}},async unwatch(){r.watchListeners=[],await S()},mount(s,u){if(s=Dt(s),s&&r.mounts[s])throw new Error(`already mounted at ${s}`);return s&&(r.mountpoints.push(s),r.mountpoints.sort((g,m)=>m.length-g.length)),r.mounts[s]=u,r.watching&&Promise.resolve(xr(u,o,s)).then(g=>{r.unwatch[s]=g}).catch(console.error),y},async unmount(s,u=!0){s=Dt(s),!(!s||!r.mounts[s])&&(r.watching&&s in r.unwatch&&(r.unwatch[s](),delete r.unwatch[s]),u&&await mr(r.mounts[s]),r.mountpoints=r.mountpoints.filter(g=>g!==s),delete r.mounts[s])},getMount(s=""){s=He(s)+":";const u=n(s);return{driver:u.driver,base:u.base}},getMounts(s="",u={}){return s=He(s),c(s,u.parents).map(m=>({driver:m.driver,base:m.mountpoint}))}};return y}function xr(e,r,n){return e.watch?e.watch((c,o)=>r(c,n+o)):()=>{}}async function mr(e){typeof e.dispose=="function"&&await Te(e.dispose)}function dt(e){return new Promise((r,n)=>{e.oncomplete=e.onsuccess=()=>r(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ur(e,r){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(r);const c=dt(n);return(o,b)=>c.then(S=>b(S.transaction(r,o).objectStore(r)))}let Vt;function Tt(){return Vt||(Vt=Ur("keyval-store","keyval")),Vt}function fi(e,r=Tt()){return r("readonly",n=>dt(n.get(e)))}function ai(e,r,n=Tt()){return n("readwrite",c=>(c.put(r,e),dt(c.transaction)))}function ci(e,r=Tt()){return r("readwrite",n=>(n.delete(e),dt(n.transaction)))}function ui(e=Tt()){return e("readwrite",r=>(r.clear(),dt(r.transaction)))}function li(e,r){return e.openCursor().onsuccess=function(){this.result&&(r(this.result),this.result.continue())},dt(e.transaction)}function hi(e=Tt()){return e("readonly",r=>{if(r.getAllKeys)return dt(r.getAllKeys());const n=[];return li(r,c=>n.push(c.key)).then(()=>n)})}class di{}function bi(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var gi=yi;function yi(e,r,n){var c=n&&n.stringify||bi,o=1;if(typeof e=="object"&&e!==null){var b=r.length+o;if(b===1)return e;var S=new Array(b);S[0]=c(e);for(var E=1;E<b;E++)S[E]=c(r[E]);return S.join(" ")}if(typeof e!="string")return e;var y=r.length;if(y===0)return e;for(var s="",u=1-o,g=-1,m=e&&e.length||0,w=0;w<m;){if(e.charCodeAt(w)===37&&w+1<m){switch(g=g>-1?g:0,e.charCodeAt(w+1)){case 100:case 102:if(u>=y||r[u]==null)break;g<w&&(s+=e.slice(g,w)),s+=Number(r[u]),g=w+2,w++;break;case 105:if(u>=y||r[u]==null)break;g<w&&(s+=e.slice(g,w)),s+=Math.floor(Number(r[u])),g=w+2,w++;break;case 79:case 111:case 106:if(u>=y||r[u]===void 0)break;g<w&&(s+=e.slice(g,w));var v=typeof r[u];if(v==="string"){s+="'"+r[u]+"'",g=w+2,w++;break}if(v==="function"){s+=r[u].name||"<anonymous>",g=w+2,w++;break}s+=c(r[u]),g=w+2,w++;break;case 115:if(u>=y)break;g<w&&(s+=e.slice(g,w)),s+=String(r[u]),g=w+2,w++;break;case 37:g<w&&(s+=e.slice(g,w)),s+="%",g=w+2,w++,u--;break}++u}++w}return g===-1?e:(g<m&&(s+=e.slice(g)),s)}const vr=gi;var _t=Qe;const St=Ii().console||{},pi={mapHttpRequest:zt,mapHttpResponse:zt,wrapRequestSerializer:Yt,wrapResponseSerializer:Yt,wrapErrorSerializer:Yt,req:zt,res:zt,err:wi};function _i(e,r){return Array.isArray(e)?e.filter(function(c){return c!=="!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||St;e.browser.write&&(e.browser.asObject=!0);const c=e.serializers||{},o=_i(e.browser.serialize,c);let b=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(b=!1);const S=["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 E=e.level||"info",y=Object.create(n);y.log||(y.log=Ot),Object.defineProperty(y,"levelVal",{get:u}),Object.defineProperty(y,"level",{get:g,set:m});const s={transmit:r,serialize:o,asObject:e.browser.asObject,levels:S,timestamp:Ei(e)};y.levels=Qe.levels,y.level=E,y.setMaxListeners=y.getMaxListeners=y.emit=y.addListener=y.on=y.prependListener=y.once=y.prependOnceListener=y.removeListener=y.removeAllListeners=y.listeners=y.listenerCount=y.eventNames=y.write=y.flush=Ot,y.serializers=c,y._serialize=o,y._stdErrSerialize=b,y.child=w,r&&(y._logEvent=Zt());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function g(){return this._level}function m(v){if(v!=="silent"&&!this.levels.values[v])throw Error("unknown level "+v);this._level=v,yt(s,y,"error","log"),yt(s,y,"fatal","error"),yt(s,y,"warn","error"),yt(s,y,"info","log"),yt(s,y,"debug","log"),yt(s,y,"trace","log")}function w(v,M){if(!v)throw new Error("missing bindings for child Pino");M=M||{},o&&v.serializers&&(M.serializers=v.serializers);const W=M.serializers;if(o&&W){var Y=Object.assign({},c,W),N=e.browser.serialize===!0?Object.keys(Y):o;delete v.serializers,kt([v],N,Y,this._stdErrSerialize)}function Le(ge){this._childLevel=(ge._childLevel|0)+1,this.error=pt(ge,v,"error"),this.fatal=pt(ge,v,"fatal"),this.warn=pt(ge,v,"warn"),this.info=pt(ge,v,"info"),this.debug=pt(ge,v,"debug"),this.trace=pt(ge,v,"trace"),Y&&(this.serializers=Y,this._serialize=N),r&&(this._logEvent=Zt([].concat(ge._logEvent.bindings,v)))}return Le.prototype=this,new Le(this)}return y}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=pi;Qe.stdTimeFunctions=Object.assign({},{nullTime:Hr,epochTime:Kr,unixTime:Si,isoTime:Oi});function yt(e,r,n,c){const o=Object.getPrototypeOf(r);r[n]=r.levelVal>r.levels.values[n]?Ot:o[n]?o[n]:St[n]||St[c]||Ot,xi(e,r,n)}function xi(e,r,n){!e.transmit&&r[n]===Ot||(r[n]=function(c){return function(){const b=e.timestamp(),S=new Array(arguments.length),E=Object.getPrototypeOf&&Object.getPrototypeOf(this)===St?St:this;for(var y=0;y<S.length;y++)S[y]=arguments[y];if(e.serialize&&!e.asObject&&kt(S,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?c.call(E,mi(this,n,S,b)):c.apply(E,S),e.transmit){const s=e.transmit.level||r.level,u=Qe.levels.values[s],g=Qe.levels.values[n];if(g<u)return;vi(this,{ts:b,methodLevel:n,methodValue:g,transmitLevel:s,transmitValue:Qe.levels.values[e.transmit.level||r.level],send:e.transmit.send,val:r.levelVal},S)}}}(r[n]))}function mi(e,r,n,c){e._serialize&&kt(n,e._serialize,e.serializers,e._stdErrSerialize);const o=n.slice();let b=o[0];const S={};c&&(S.time=c),S.level=Qe.levels.values[r];let E=(e._childLevel|0)+1;if(E<1&&(E=1),b!==null&&typeof b=="object"){for(;E--&&typeof o[0]=="object";)Object.assign(S,o.shift());b=o.length?vr(o.shift(),o):void 0}else typeof b=="string"&&(b=vr(o.shift(),o));return b!==void 0&&(S.msg=b),S}function kt(e,r,n,c){for(const o in e)if(c&&e[o]instanceof Error)e[o]=Qe.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o]))for(const b in e[o])r&&r.indexOf(b)>-1&&b in n&&(e[o][b]=n[b](e[o][b]))}function pt(e,r,n){return function(){const c=new Array(1+arguments.length);c[0]=r;for(var o=1;o<c.length;o++)c[o]=arguments[o-1];return e[n].apply(this,c)}}function vi(e,r,n){const c=r.send,o=r.ts,b=r.methodLevel,S=r.methodValue,E=r.val,y=e._logEvent.bindings;kt(n,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=n.filter(function(s){return y.indexOf(s)===-1}),e._logEvent.level.label=b,e._logEvent.level.value=S,c(b,e._logEvent,E),e._logEvent=Zt(y)}function Zt(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function wi(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 Ei(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Hr:Kr}function zt(){return{}}function Yt(e){return e}function Ot(){}function Hr(){return!1}function Kr(){return Date.now()}function Si(){return Math.round(Date.now()/1e3)}function Oi(){return new Date(Date.now()).toISOString()}function Ii(){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 rr=U.getDefaultExportFromCjs(_t),Ti=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n);function wr(e){return typeof e=="string"?e:Ti(e)||""}const Li={level:"info"},Lt="custom_context",nr=1e3*1024;class Ai{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 Er{constructor(r){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=r,this.sizeInBytes=0}append(r){const n=new Ai(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 Gr{constructor(r,n=nr){this.level=r??"error",this.levelValue=_t.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=n,this.logs=new Er(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(r,n){n===_t.levels.values.error?console.error(r):n===_t.levels.values.warn?console.warn(r):n===_t.levels.values.debug?console.debug(r):n===_t.levels.values.trace?console.trace(r):console.log(r)}appendToLogs(r){this.logs.append(wr({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 Er(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(r){const n=this.getLogArray();return n.push(wr({extraMetadata:r})),new Blob(n,{type:"application/json"})}}class Ri{constructor(r,n=nr){this.baseChunkLogger=new Gr(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)),c=document.createElement("a");c.href=n,c.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(n)}}class Pi{constructor(r,n=nr){this.baseChunkLogger=new Gr(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 ji=Object.defineProperty,Ci=Object.defineProperties,Mi=Object.getOwnPropertyDescriptors,Sr=Object.getOwnPropertySymbols,Ni=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,Or=(e,r,n)=>r in e?ji(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Ht=(e,r)=>{for(var n in r||(r={}))Ni.call(r,n)&&Or(e,n,r[n]);if(Sr)for(var n of Sr(r))Bi.call(r,n)&&Or(e,n,r[n]);return e},Kt=(e,r)=>Ci(e,Mi(r));function Di(e){return Kt(Ht({},e),{level:(e==null?void 0:e.level)||Li.level})}function zi(e,r=Lt){return e[r]||""}function Ui(e,r,n=Lt){return e[n]=r,e}function $r(e,r=Lt){let n="";return typeof e.bindings>"u"?n=zi(e,r):n=e.bindings().context||"",n}function Hi(e,r,n=Lt){const c=$r(e,n);return c.trim()?`${c}/${r}`:r}function Ki(e,r,n=Lt){const c=Hi(e,r,n),o=e.child({context:c});return Ui(o,c,n)}function Gi(e){var r,n;const c=new Ri((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:rr(Kt(Ht({},e.opts),{level:"trace",browser:Kt(Ht({},(n=e.opts)==null?void 0:n.browser),{write:o=>c.write(o)})})),chunkLoggerController:c}}function $i(e){var r;const n=new Pi((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:rr(Kt(Ht({},e.opts),{level:"trace"}),n),chunkLoggerController:n}}function Fi(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?Gi(e):$i(e)}var ir={},Fr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=De.binary,n=De.wipe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var c=function(){function E(){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 E.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},E.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},E.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},E.prototype.update=function(y,s){if(s===void 0&&(s=y.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var u=0;if(this._bytesHashed+=s,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&s>0;)this._buffer[this._bufferLength++]=y[u++],s--;this._bufferLength===this.blockSize&&(b(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(s>=this.blockSize&&(u=b(this._tempHi,this._tempLo,this._stateHi,this._stateLo,y,u,s),s%=this.blockSize);s>0;)this._buffer[this._bufferLength++]=y[u++],s--;return this},E.prototype.finish=function(y){if(!this._finished){var s=this._bytesHashed,u=this._bufferLength,g=s/536870912|0,m=s<<3,w=s%128<112?128:256;this._buffer[u]=128;for(var v=u+1;v<w-8;v++)this._buffer[v]=0;r.writeUint32BE(g,this._buffer,w-8),r.writeUint32BE(m,this._buffer,w-4),b(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,w),this._finished=!0}for(var v=0;v<this.digestLength/8;v++)r.writeUint32BE(this._stateHi[v],y,v*8),r.writeUint32BE(this._stateLo[v],y,v*8+4);return this},E.prototype.digest=function(){var y=new Uint8Array(this.digestLength);return this.finish(y),y},E.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}},E.prototype.restoreState=function(y){return this._stateHi.set(y.stateHi),this._stateLo.set(y.stateLo),this._bufferLength=y.bufferLength,y.buffer&&this._buffer.set(y.buffer),this._bytesHashed=y.bytesHashed,this._finished=!1,this},E.prototype.cleanSavedState=function(y){n.wipe(y.stateHi),n.wipe(y.stateLo),y.buffer&&n.wipe(y.buffer),y.bufferLength=0,y.bytesHashed=0},E}();e.SHA512=c;var o=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 b(E,y,s,u,g,m,w){for(var v=s[0],M=s[1],W=s[2],Y=s[3],N=s[4],Le=s[5],ge=s[6],Ce=s[7],$=u[0],C=u[1],Me=u[2],et=u[3],ye=u[4],ke=u[5],Ke=u[6],Ve=u[7],x,_,X,le,A,O,I,L;w>=128;){for(var Ae=0;Ae<16;Ae++){var ne=8*Ae+m;E[Ae]=r.readUint32BE(g,ne),y[Ae]=r.readUint32BE(g,ne+4)}for(var Ae=0;Ae<80;Ae++){var xt=v,B=M,bt=W,d=Y,h=N,l=Le,t=ge,f=Ce,R=$,P=C,z=Me,H=et,D=ye,K=ke,Re=Ke,he=Ve;if(x=Ce,_=Ve,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=(N>>>14|ye<<18)^(N>>>18|ye<<14)^(ye>>>9|N<<23),_=(ye>>>14|N<<18)^(ye>>>18|N<<14)^(N>>>9|ye<<23),A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,x=N&Le^~N&ge,_=ye&ke^~ye&Ke,A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,x=o[Ae*2],_=o[Ae*2+1],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,x=E[Ae%16],_=y[Ae%16],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,X=I&65535|L<<16,le=A&65535|O<<16,x=X,_=le,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=(v>>>28|$<<4)^($>>>2|v<<30)^($>>>7|v<<25),_=($>>>28|v<<4)^(v>>>2|$<<30)^(v>>>7|$<<25),A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,x=v&M^v&W^M&W,_=$&C^$&Me^C&Me,A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,f=I&65535|L<<16,he=A&65535|O<<16,x=d,_=H,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=X,_=le,A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,d=I&65535|L<<16,H=A&65535|O<<16,M=xt,W=B,Y=bt,N=d,Le=h,ge=l,Ce=t,v=f,C=R,Me=P,et=z,ye=H,ke=D,Ke=K,Ve=Re,$=he,Ae%16===15)for(var ne=0;ne<16;ne++)x=E[ne],_=y[ne],A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=E[(ne+9)%16],_=y[(ne+9)%16],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,X=E[(ne+1)%16],le=y[(ne+1)%16],x=(X>>>1|le<<31)^(X>>>8|le<<24)^X>>>7,_=(le>>>1|X<<31)^(le>>>8|X<<24)^(le>>>7|X<<25),A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,X=E[(ne+14)%16],le=y[(ne+14)%16],x=(X>>>19|le<<13)^(le>>>29|X<<3)^X>>>6,_=(le>>>19|X<<13)^(X>>>29|le<<3)^(le>>>6|X<<26),A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,E[ne]=I&65535|L<<16,y[ne]=A&65535|O<<16}x=v,_=$,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[0],_=u[0],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[0]=v=I&65535|L<<16,u[0]=$=A&65535|O<<16,x=M,_=C,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[1],_=u[1],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[1]=M=I&65535|L<<16,u[1]=C=A&65535|O<<16,x=W,_=Me,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[2],_=u[2],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[2]=W=I&65535|L<<16,u[2]=Me=A&65535|O<<16,x=Y,_=et,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[3],_=u[3],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[3]=Y=I&65535|L<<16,u[3]=et=A&65535|O<<16,x=N,_=ye,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[4],_=u[4],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[4]=N=I&65535|L<<16,u[4]=ye=A&65535|O<<16,x=Le,_=ke,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[5],_=u[5],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[5]=Le=I&65535|L<<16,u[5]=ke=A&65535|O<<16,x=ge,_=Ke,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[6],_=u[6],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[6]=ge=I&65535|L<<16,u[6]=Ke=A&65535|O<<16,x=Ce,_=Ve,A=_&65535,O=_>>>16,I=x&65535,L=x>>>16,x=s[7],_=u[7],A+=_&65535,O+=_>>>16,I+=x&65535,L+=x>>>16,O+=A>>>16,I+=O>>>16,L+=I>>>16,s[7]=Ce=I&65535|L<<16,u[7]=Ve=A&65535|O<<16,m+=128,w-=128}return m}function S(E){var y=new c;y.update(E);var s=y.digest();return y.clean(),s}e.hash=S})(Fr);(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=De.random,n=Fr,c=De.wipe;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function o(d){const h=new Float64Array(16);if(d)for(let l=0;l<d.length;l++)h[l]=d[l];return h}const b=new Uint8Array(32);b[0]=9;const S=o(),E=o([1]),y=o([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),s=o([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=o([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),g=o([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=o([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function w(d,h){for(let l=0;l<16;l++)d[l]=h[l]|0}function v(d){let h=1;for(let l=0;l<16;l++){let t=d[l]+h+65535;h=Math.floor(t/65536),d[l]=t-h*65536}d[0]+=h-1+37*(h-1)}function M(d,h,l){const t=~(l-1);for(let f=0;f<16;f++){const R=t&(d[f]^h[f]);d[f]^=R,h[f]^=R}}function W(d,h){const l=o(),t=o();for(let f=0;f<16;f++)t[f]=h[f];v(t),v(t),v(t);for(let f=0;f<2;f++){l[0]=t[0]-65517;for(let P=1;P<15;P++)l[P]=t[P]-65535-(l[P-1]>>16&1),l[P-1]&=65535;l[15]=t[15]-32767-(l[14]>>16&1);const R=l[15]>>16&1;l[14]&=65535,M(t,l,1-R)}for(let f=0;f<16;f++)d[2*f]=t[f]&255,d[2*f+1]=t[f]>>8}function Y(d,h){let l=0;for(let t=0;t<32;t++)l|=d[t]^h[t];return(1&l-1>>>8)-1}function N(d,h){const l=new Uint8Array(32),t=new Uint8Array(32);return W(l,d),W(t,h),Y(l,t)}function Le(d){const h=new Uint8Array(32);return W(h,d),h[0]&1}function ge(d,h){for(let l=0;l<16;l++)d[l]=h[2*l]+(h[2*l+1]<<8);d[15]&=32767}function Ce(d,h,l){for(let t=0;t<16;t++)d[t]=h[t]+l[t]}function $(d,h,l){for(let t=0;t<16;t++)d[t]=h[t]-l[t]}function C(d,h,l){let t,f,R=0,P=0,z=0,H=0,D=0,K=0,Re=0,he=0,Pe=0,pe=0,de=0,ie=0,re=0,Z=0,q=0,G=0,se=0,_e=0,F=0,Ne=0,ze=0,Ge=0,$e=0,Ue=0,Ye=0,Ze=0,st=0,Fe=0,ct=0,mt=0,At=0,oe=l[0],Q=l[1],fe=l[2],ae=l[3],ce=l[4],ee=l[5],xe=l[6],me=l[7],ve=l[8],we=l[9],Ee=l[10],be=l[11],ue=l[12],k=l[13],Se=l[14],Oe=l[15];t=h[0],R+=t*oe,P+=t*Q,z+=t*fe,H+=t*ae,D+=t*ce,K+=t*ee,Re+=t*xe,he+=t*me,Pe+=t*ve,pe+=t*we,de+=t*Ee,ie+=t*be,re+=t*ue,Z+=t*k,q+=t*Se,G+=t*Oe,t=h[1],P+=t*oe,z+=t*Q,H+=t*fe,D+=t*ae,K+=t*ce,Re+=t*ee,he+=t*xe,Pe+=t*me,pe+=t*ve,de+=t*we,ie+=t*Ee,re+=t*be,Z+=t*ue,q+=t*k,G+=t*Se,se+=t*Oe,t=h[2],z+=t*oe,H+=t*Q,D+=t*fe,K+=t*ae,Re+=t*ce,he+=t*ee,Pe+=t*xe,pe+=t*me,de+=t*ve,ie+=t*we,re+=t*Ee,Z+=t*be,q+=t*ue,G+=t*k,se+=t*Se,_e+=t*Oe,t=h[3],H+=t*oe,D+=t*Q,K+=t*fe,Re+=t*ae,he+=t*ce,Pe+=t*ee,pe+=t*xe,de+=t*me,ie+=t*ve,re+=t*we,Z+=t*Ee,q+=t*be,G+=t*ue,se+=t*k,_e+=t*Se,F+=t*Oe,t=h[4],D+=t*oe,K+=t*Q,Re+=t*fe,he+=t*ae,Pe+=t*ce,pe+=t*ee,de+=t*xe,ie+=t*me,re+=t*ve,Z+=t*we,q+=t*Ee,G+=t*be,se+=t*ue,_e+=t*k,F+=t*Se,Ne+=t*Oe,t=h[5],K+=t*oe,Re+=t*Q,he+=t*fe,Pe+=t*ae,pe+=t*ce,de+=t*ee,ie+=t*xe,re+=t*me,Z+=t*ve,q+=t*we,G+=t*Ee,se+=t*be,_e+=t*ue,F+=t*k,Ne+=t*Se,ze+=t*Oe,t=h[6],Re+=t*oe,he+=t*Q,Pe+=t*fe,pe+=t*ae,de+=t*ce,ie+=t*ee,re+=t*xe,Z+=t*me,q+=t*ve,G+=t*we,se+=t*Ee,_e+=t*be,F+=t*ue,Ne+=t*k,ze+=t*Se,Ge+=t*Oe,t=h[7],he+=t*oe,Pe+=t*Q,pe+=t*fe,de+=t*ae,ie+=t*ce,re+=t*ee,Z+=t*xe,q+=t*me,G+=t*ve,se+=t*we,_e+=t*Ee,F+=t*be,Ne+=t*ue,ze+=t*k,Ge+=t*Se,$e+=t*Oe,t=h[8],Pe+=t*oe,pe+=t*Q,de+=t*fe,ie+=t*ae,re+=t*ce,Z+=t*ee,q+=t*xe,G+=t*me,se+=t*ve,_e+=t*we,F+=t*Ee,Ne+=t*be,ze+=t*ue,Ge+=t*k,$e+=t*Se,Ue+=t*Oe,t=h[9],pe+=t*oe,de+=t*Q,ie+=t*fe,re+=t*ae,Z+=t*ce,q+=t*ee,G+=t*xe,se+=t*me,_e+=t*ve,F+=t*we,Ne+=t*Ee,ze+=t*be,Ge+=t*ue,$e+=t*k,Ue+=t*Se,Ye+=t*Oe,t=h[10],de+=t*oe,ie+=t*Q,re+=t*fe,Z+=t*ae,q+=t*ce,G+=t*ee,se+=t*xe,_e+=t*me,F+=t*ve,Ne+=t*we,ze+=t*Ee,Ge+=t*be,$e+=t*ue,Ue+=t*k,Ye+=t*Se,Ze+=t*Oe,t=h[11],ie+=t*oe,re+=t*Q,Z+=t*fe,q+=t*ae,G+=t*ce,se+=t*ee,_e+=t*xe,F+=t*me,Ne+=t*ve,ze+=t*we,Ge+=t*Ee,$e+=t*be,Ue+=t*ue,Ye+=t*k,Ze+=t*Se,st+=t*Oe,t=h[12],re+=t*oe,Z+=t*Q,q+=t*fe,G+=t*ae,se+=t*ce,_e+=t*ee,F+=t*xe,Ne+=t*me,ze+=t*ve,Ge+=t*we,$e+=t*Ee,Ue+=t*be,Ye+=t*ue,Ze+=t*k,st+=t*Se,Fe+=t*Oe,t=h[13],Z+=t*oe,q+=t*Q,G+=t*fe,se+=t*ae,_e+=t*ce,F+=t*ee,Ne+=t*xe,ze+=t*me,Ge+=t*ve,$e+=t*we,Ue+=t*Ee,Ye+=t*be,Ze+=t*ue,st+=t*k,Fe+=t*Se,ct+=t*Oe,t=h[14],q+=t*oe,G+=t*Q,se+=t*fe,_e+=t*ae,F+=t*ce,Ne+=t*ee,ze+=t*xe,Ge+=t*me,$e+=t*ve,Ue+=t*we,Ye+=t*Ee,Ze+=t*be,st+=t*ue,Fe+=t*k,ct+=t*Se,mt+=t*Oe,t=h[15],G+=t*oe,se+=t*Q,_e+=t*fe,F+=t*ae,Ne+=t*ce,ze+=t*ee,Ge+=t*xe,$e+=t*me,Ue+=t*ve,Ye+=t*we,Ze+=t*Ee,st+=t*be,Fe+=t*ue,ct+=t*k,mt+=t*Se,At+=t*Oe,R+=38*se,P+=38*_e,z+=38*F,H+=38*Ne,D+=38*ze,K+=38*Ge,Re+=38*$e,he+=38*Ue,Pe+=38*Ye,pe+=38*Ze,de+=38*st,ie+=38*Fe,re+=38*ct,Z+=38*mt,q+=38*At,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=z+f+65535,f=Math.floor(t/65536),z=t-f*65536,t=H+f+65535,f=Math.floor(t/65536),H=t-f*65536,t=D+f+65535,f=Math.floor(t/65536),D=t-f*65536,t=K+f+65535,f=Math.floor(t/65536),K=t-f*65536,t=Re+f+65535,f=Math.floor(t/65536),Re=t-f*65536,t=he+f+65535,f=Math.floor(t/65536),he=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=de+f+65535,f=Math.floor(t/65536),de=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=q+f+65535,f=Math.floor(t/65536),q=t-f*65536,t=G+f+65535,f=Math.floor(t/65536),G=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=z+f+65535,f=Math.floor(t/65536),z=t-f*65536,t=H+f+65535,f=Math.floor(t/65536),H=t-f*65536,t=D+f+65535,f=Math.floor(t/65536),D=t-f*65536,t=K+f+65535,f=Math.floor(t/65536),K=t-f*65536,t=Re+f+65535,f=Math.floor(t/65536),Re=t-f*65536,t=he+f+65535,f=Math.floor(t/65536),he=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=de+f+65535,f=Math.floor(t/65536),de=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=q+f+65535,f=Math.floor(t/65536),q=t-f*65536,t=G+f+65535,f=Math.floor(t/65536),G=t-f*65536,R+=f-1+37*(f-1),d[0]=R,d[1]=P,d[2]=z,d[3]=H,d[4]=D,d[5]=K,d[6]=Re,d[7]=he,d[8]=Pe,d[9]=pe,d[10]=de,d[11]=ie,d[12]=re,d[13]=Z,d[14]=q,d[15]=G}function Me(d,h){C(d,h,h)}function et(d,h){const l=o();let t;for(t=0;t<16;t++)l[t]=h[t];for(t=253;t>=0;t--)Me(l,l),t!==2&&t!==4&&C(l,l,h);for(t=0;t<16;t++)d[t]=l[t]}function ye(d,h){const l=o();let t;for(t=0;t<16;t++)l[t]=h[t];for(t=250;t>=0;t--)Me(l,l),t!==1&&C(l,l,h);for(t=0;t<16;t++)d[t]=l[t]}function ke(d,h){const l=o(),t=o(),f=o(),R=o(),P=o(),z=o(),H=o(),D=o(),K=o();$(l,d[1],d[0]),$(K,h[1],h[0]),C(l,l,K),Ce(t,d[0],d[1]),Ce(K,h[0],h[1]),C(t,t,K),C(f,d[3],h[3]),C(f,f,s),C(R,d[2],h[2]),Ce(R,R,R),$(P,t,l),$(z,R,f),Ce(H,R,f),Ce(D,t,l),C(d[0],P,z),C(d[1],D,H),C(d[2],H,z),C(d[3],P,D)}function Ke(d,h,l){for(let t=0;t<4;t++)M(d[t],h[t],l)}function Ve(d,h){const l=o(),t=o(),f=o();et(f,h[2]),C(l,h[0],f),C(t,h[1],f),W(d,t),d[31]^=Le(l)<<7}function x(d,h,l){w(d[0],S),w(d[1],E),w(d[2],E),w(d[3],S);for(let t=255;t>=0;--t){const f=l[t/8|0]>>(t&7)&1;Ke(d,h,f),ke(h,d),ke(d,d),Ke(d,h,f)}}function _(d,h){const l=[o(),o(),o(),o()];w(l[0],u),w(l[1],g),w(l[2],E),C(l[3],u,g),x(d,l,h)}function X(d){if(d.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const h=(0,n.hash)(d);h[0]&=248,h[31]&=127,h[31]|=64;const l=new Uint8Array(32),t=[o(),o(),o(),o()];_(t,h),Ve(l,t);const f=new Uint8Array(64);return f.set(d),f.set(l,32),{publicKey:l,secretKey:f}}e.generateKeyPairFromSeed=X;function le(d){const h=(0,r.randomBytes)(32,d),l=X(h);return(0,c.wipe)(h),l}e.generateKeyPair=le;function A(d){if(d.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(d.subarray(32))}e.extractPublicKeyFromSecretKey=A;const O=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 I(d,h){let l,t,f,R;for(t=63;t>=32;--t){for(l=0,f=t-32,R=t-12;f<R;++f)h[f]+=l-16*h[t]*O[f-(t-32)],l=Math.floor((h[f]+128)/256),h[f]-=l*256;h[f]+=l,h[t]=0}for(l=0,f=0;f<32;f++)h[f]+=l-(h[31]>>4)*O[f],l=h[f]>>8,h[f]&=255;for(f=0;f<32;f++)h[f]-=l*O[f];for(t=0;t<32;t++)h[t+1]+=h[t]>>8,d[t]=h[t]&255}function L(d){const h=new Float64Array(64);for(let l=0;l<64;l++)h[l]=d[l];for(let l=0;l<64;l++)d[l]=0;I(d,h)}function Ae(d,h){const l=new Float64Array(64),t=[o(),o(),o(),o()],f=(0,n.hash)(d.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 z=P.digest();P.clean(),L(z),_(t,z),Ve(R,t),P.reset(),P.update(R.subarray(0,32)),P.update(d.subarray(32)),P.update(h);const H=P.digest();L(H);for(let D=0;D<32;D++)l[D]=z[D];for(let D=0;D<32;D++)for(let K=0;K<32;K++)l[D+K]+=H[D]*f[K];return I(R.subarray(32),l),R}e.sign=Ae;function ne(d,h){const l=o(),t=o(),f=o(),R=o(),P=o(),z=o(),H=o();return w(d[2],E),ge(d[1],h),Me(f,d[1]),C(R,f,y),$(f,f,d[2]),Ce(R,d[2],R),Me(P,R),Me(z,P),C(H,z,P),C(l,H,f),C(l,l,R),ye(l,l),C(l,l,f),C(l,l,R),C(l,l,R),C(d[0],l,R),Me(t,d[0]),C(t,t,R),N(t,f)&&C(d[0],d[0],m),Me(t,d[0]),C(t,t,R),N(t,f)?-1:(Le(d[0])===h[31]>>7&&$(d[0],S,d[0]),C(d[3],d[0],d[1]),0)}function xt(d,h,l){const t=new Uint8Array(32),f=[o(),o(),o(),o()],R=[o(),o(),o(),o()];if(l.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(ne(R,d))return!1;const P=new n.SHA512;P.update(l.subarray(0,32)),P.update(d),P.update(h);const z=P.digest();return L(z),x(f,R,z),_(R,l.subarray(32)),ke(f,R),Ve(t,f),!Y(l,t)}e.verify=xt;function B(d){let h=[o(),o(),o(),o()];if(ne(h,d))throw new Error("Ed25519: invalid public key");let l=o(),t=o(),f=h[1];Ce(l,E,f),$(t,E,f),et(t,t),C(l,l,t);let R=new Uint8Array(32);return W(R,l),R}e.convertPublicKeyToX25519=B;function bt(d){const h=(0,n.hash)(d.subarray(0,32));h[0]&=248,h[31]&=127,h[31]|=64;const l=new Uint8Array(h.subarray(0,32));return(0,c.wipe)(h),l}e.convertSecretKeyToX25519=bt})(ir);const Ji="EdDSA",ki="JWT",Jr=".",kr="base64url",Wi="utf8",qi="utf8",Vi=":",Yi="did",Xi="key",Ir="base58btc",Zi="z",Qi="K36",es=32,ts=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n);function rs(e){return typeof e=="string"?e:ts(e)||""}function Gt(e){return Jt(Ft(rs(e),Wi),kr)}function Wr(e){const r=Ft(Qi,Ir),n=Zi+Jt(Nr([r,e]),Ir);return[Yi,Xi,n].join(Vi)}function ns(e){return Jt(e,kr)}function is(e){return Ft([Gt(e.header),Gt(e.payload)].join(Jr),qi)}function ss(e){return[Gt(e.header),Gt(e.payload),ns(e.signature)].join(Jr)}function os(e=De.random.randomBytes(es)){return ir.generateKeyPairFromSeed(e)}async function fs(e,r,n,c,o=De.cjs.fromMiliseconds(Date.now())){const b={alg:Ji,typ:ki},S=Wr(c.publicKey),E=o+n,y={iss:S,sub:e,aud:r,iat:o,exp:E},s=is({header:b,payload:y}),u=ir.sign(c.secretKey,s);return ss({header:b,payload:y,signature:u})}const as="PARSE_ERROR",cs="INVALID_REQUEST",us="METHOD_NOT_FOUND",ls="INVALID_PARAMS",qr="INTERNAL_ERROR",sr="SERVER_ERROR",hs=[-32700,-32600,-32601,-32602,-32603],Et={[as]:{code:-32700,message:"Parse error"},[cs]:{code:-32600,message:"Invalid Request"},[us]:{code:-32601,message:"Method not found"},[ls]:{code:-32602,message:"Invalid params"},[qr]:{code:-32603,message:"Internal error"},[sr]:{code:-32e3,message:"Server error"}},Vr=sr;function ds(e){return hs.includes(e)}function Tr(e){return Object.keys(Et).includes(e)?Et[e]:Et[Vr]}function bs(e){const r=Object.values(Et).find(n=>n.code===e);return r||Et[Vr]}function Yr(e,r,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${r}`):e}var Xr={};/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./evm-CNC7JHe1.js");class y extends e.BaseError{constructor({callbackSelector:r,cause:t,data:c,extraData:i,sender:u,urls:a}){var d;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(d=t.metaMessages)!=null&&d.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${e.getUrl(f)}`)],` Sender: ${u}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:r,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(r)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class b extends e.BaseError{constructor({sender:r,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function g(n,r){if(!e.isAddress(n))throw new e.InvalidAddressError({address:n});if(!e.isAddress(r))throw new e.InvalidAddressError({address:r});return n.toLowerCase()===r.toLowerCase()}const k="0x556f1830",p={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function E(n,{blockNumber:r,blockTag:t,data:c,to:i}){const{args:u}=e.decodeErrorResult({data:c,abi:[p]}),[a,d,f,s,o]=u;try{if(!g(i,a))throw new b({sender:a,to:i});const l=await h({data:f,sender:a,urls:d}),{data:m}=await e.call(n,{blockNumber:r,blockTag:t,data:e.concat([s,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[l,o])]),to:i});return m}catch(l){throw new y({callbackSelector:s,cause:l,data:c,extraData:o,sender:a,urls:d})}}async function h({data:n,sender:r,urls:t}){var i;let c=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],d=a.includes("{data}")?"GET":"POST",f=d==="POST"?{data:n,sender:r}:void 0;try{const s=await fetch(a.replace("{sender}",r).replace("{data}",n),{body:JSON.stringify(f),method:d});let o;if((i=s.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?o=(await s.json()).data:o=await s.text(),!s.ok){c=new e.HttpRequestError({body:f,details:o!=null&&o.error?e.stringify(o.error):s.statusText,headers:s.headers,status:s.status,url:a});continue}if(!e.isHex(o)){c=new w({result:o,url:a});continue}return o}catch(s){c=new e.HttpRequestError({body:f,details:s.message,url:a})}}throw c}exports.ccipFetch=h;exports.offchainLookup=E;exports.offchainLookupAbiItem=p;exports.offchainLookupSignature=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./evm-JNEgzI8_.js");class y extends e.BaseError{constructor({callbackSelector:r,cause:t,data:c,extraData:i,sender:u,urls:a}){var d;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(d=t.metaMessages)!=null&&d.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${e.getUrl(f)}`)],` Sender: ${u}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:r,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(r)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class b extends e.BaseError{constructor({sender:r,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function g(n,r){if(!e.isAddress(n))throw new e.InvalidAddressError({address:n});if(!e.isAddress(r))throw new e.InvalidAddressError({address:r});return n.toLowerCase()===r.toLowerCase()}const k="0x556f1830",p={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function E(n,{blockNumber:r,blockTag:t,data:c,to:i}){const{args:u}=e.decodeErrorResult({data:c,abi:[p]}),[a,d,f,s,o]=u;try{if(!g(i,a))throw new b({sender:a,to:i});const l=await h({data:f,sender:a,urls:d}),{data:m}=await e.call(n,{blockNumber:r,blockTag:t,data:e.concat([s,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[l,o])]),to:i});return m}catch(l){throw new y({callbackSelector:s,cause:l,data:c,extraData:o,sender:a,urls:d})}}async function h({data:n,sender:r,urls:t}){var i;let c=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],d=a.includes("{data}")?"GET":"POST",f=d==="POST"?{data:n,sender:r}:void 0;try{const s=await fetch(a.replace("{sender}",r).replace("{data}",n),{body:JSON.stringify(f),method:d});let o;if((i=s.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?o=(await s.json()).data:o=await s.text(),!s.ok){c=new e.HttpRequestError({body:f,details:o!=null&&o.error?e.stringify(o.error):s.statusText,headers:s.headers,status:s.status,url:a});continue}if(!e.isHex(o)){c=new w({result:o,url:a});continue}return o}catch(s){c=new e.HttpRequestError({body:f,details:s.message,url:a})}}throw c}exports.ccipFetch=h;exports.offchainLookup=E;exports.offchainLookupAbiItem=p;exports.offchainLookupSignature=k;
@@ -1,4 +1,4 @@
1
- import { B as l, g as w, s as y, i as p, I as h, d as g, c as k, a as O, e as L, H as m, b as E } from "./evm-CjvzIUCn.mjs";
1
+ import { B as l, g as w, s as y, i as p, I as h, d as g, c as k, a as O, e as L, H as m, b as E } from "./evm-Dd33ef5o.mjs";
2
2
  class x extends l {
3
3
  constructor({ callbackSelector: e, cause: a, data: o, extraData: c, sender: d, urls: r }) {
4
4
  var i;
@@ -1 +1 @@
1
- "use strict";var u=Object.defineProperty;var d=(o,t,i)=>t in o?u(o,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[t]=i;var e=(o,t,i)=>(d(o,typeof t!="symbol"?t+"":t,i),i);const n=require("./index-Tl7zYqHL.js");function f(o){return"getVersion"in o}const s={};function m(o,t,i){t in s||(s[t]={});const r=s[t];if(o in r)throw new Error(`Protocol ${o} for protocol ${t} has already registered`);s[t][o]=i}function w(o,t){const i=n.isChain(o)?n.chainToPlatform.get(o):o;return t in s?i in s[t]:!1}function l(o,t){if(t in s){const i=s[t];if(i&&o in i){const r=i[o];if(r)return r}}throw new Error(`No protocols registered for ${o}:${t}. This may be because the platform specific protocol implementation is not registered (by installing and importing it) or no implementation exists for this platform`)}const B=(o,t,i,r)=>l(o,t).fromRpc(i,r);class k{constructor(t,i){e(this,"network");e(this,"config");this.network=t,this.config=i}utils(){return this.constructor}getProtocol(t,i){return B(this.utils()._platform,t,i,this.config)}getProtocolInitializer(t){return l(this.utils()._platform,t)}async parseWormholeMessages(t,i,r){return(await this.getProtocol("WormholeCore",i)).parseTransaction(r)}}class P{constructor(t,i,r){e(this,"network");e(this,"chain");e(this,"config");e(this,"platform");e(this,"rpc");e(this,"protocols",new Map);e(this,"supportsWormholeCore",()=>this.supportsProtocol("WormholeCore"));e(this,"getWormholeCore",()=>this.getProtocol("WormholeCore"));e(this,"supportsTokenBridge",()=>this.supportsProtocol("TokenBridge"));e(this,"getTokenBridge",()=>this.getProtocol("TokenBridge"));e(this,"supportsAutomaticTokenBridge",()=>this.supportsProtocol("AutomaticTokenBridge"));e(this,"getAutomaticTokenBridge",()=>this.getProtocol("AutomaticTokenBridge"));e(this,"supportsCircleBridge",()=>this.supportsProtocol("CircleBridge"));e(this,"getCircleBridge",()=>this.getProtocol("CircleBridge"));e(this,"supportsAutomaticCircleBridge",()=>this.supportsProtocol("AutomaticCircleBridge"));e(this,"getAutomaticCircleBridge",()=>this.getProtocol("AutomaticCircleBridge"));e(this,"supportsIbcBridge",()=>this.supportsProtocol("IbcBridge"));e(this,"getIbcBridge",()=>this.getProtocol("IbcBridge"));e(this,"supportsPorticoBridge",()=>this.supportsProtocol("PorticoBridge"));e(this,"getPorticoBridge",()=>this.getProtocol("PorticoBridge"));this.config=i.config[t],this.platform=i,this.chain=this.config.key,this.network=this.config.network,this.rpc=r}getRpc(){return this.rpc=this.rpc?this.rpc:this.platform.getRpc(this.chain),this.rpc}async getDecimals(t){if(n.isNative(t))return this.config.nativeTokenDecimals;if(this.config.tokenMap){const i=n.canonicalAddress({chain:this.chain,address:t}),r=n.getTokenByAddress(this.network,this.chain,i);if(r)return r.decimals}return this.platform.utils().getDecimals(this.chain,await this.getRpc(),t)}async getBalance(t,i){return this.platform.utils().getBalance(this.chain,await this.getRpc(),t,i)}async getLatestBlock(){return this.platform.utils().getLatestBlock(await this.getRpc())}async getLatestFinalizedBlock(){return this.platform.utils().getLatestFinalizedBlock(await this.getRpc())}async parseTransaction(t){return this.platform.parseWormholeMessages(this.chain,await this.getRpc(),t)}async sendWait(t){return this.platform.utils().sendWait(this.chain,await this.getRpc(),t)}getToken(t){if(this.config.tokenMap&&t in this.config.tokenMap)return this.config.tokenMap[t]}async getNativeWrappedTokenId(){if(this.config.wrappedNative){const{address:i}=this.config.wrappedNative;return{chain:this.chain,address:n.toNative(this.chain,i)}}const t=await this.getTokenBridge();return{chain:this.chain,address:await t.getWrappedNative()}}async getTokenAccount(t,i){return{chain:this.chain,address:t}}supportsProtocol(t){return w(this.chain,t)}async getProtocol(t,i,r){if(!i&&this.protocols.has(t))return this.protocols.get(t);const c=i?{...this.config.contracts,...i}:this.config.contracts,h=r??await this.getRpc(),g=this.platform.getProtocolInitializer(t);let a;if(r){if(i)throw new Error("Custom contracts are currently not supported with custom rpc connection. Add the contracts to the base config.");a=await this.platform.getProtocol(t,h)}else if(f(g)){const p=await g.getVersion(h,c);a=new g(this.network,this.chain,h,c,p)}else a=new g(this.network,this.chain,h,c);return i||this.protocols.set(t,a),a}}exports.ChainContext=P;exports.PlatformContext=k;exports.registerProtocol=m;
1
+ "use strict";var u=Object.defineProperty;var d=(o,t,i)=>t in o?u(o,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[t]=i;var e=(o,t,i)=>(d(o,typeof t!="symbol"?t+"":t,i),i);const n=require("./index-C1oy9Lkm.js");function f(o){return"getVersion"in o}const s={};function m(o,t,i){t in s||(s[t]={});const r=s[t];if(o in r)throw new Error(`Protocol ${o} for protocol ${t} has already registered`);s[t][o]=i}function w(o,t){const i=n.isChain(o)?n.chainToPlatform.get(o):o;return t in s?i in s[t]:!1}function l(o,t){if(t in s){const i=s[t];if(i&&o in i){const r=i[o];if(r)return r}}throw new Error(`No protocols registered for ${o}:${t}. This may be because the platform specific protocol implementation is not registered (by installing and importing it) or no implementation exists for this platform`)}const B=(o,t,i,r)=>l(o,t).fromRpc(i,r);class k{constructor(t,i){e(this,"network");e(this,"config");this.network=t,this.config=i}utils(){return this.constructor}getProtocol(t,i){return B(this.utils()._platform,t,i,this.config)}getProtocolInitializer(t){return l(this.utils()._platform,t)}async parseWormholeMessages(t,i,r){return(await this.getProtocol("WormholeCore",i)).parseTransaction(r)}}class P{constructor(t,i,r){e(this,"network");e(this,"chain");e(this,"config");e(this,"platform");e(this,"rpc");e(this,"protocols",new Map);e(this,"supportsWormholeCore",()=>this.supportsProtocol("WormholeCore"));e(this,"getWormholeCore",()=>this.getProtocol("WormholeCore"));e(this,"supportsTokenBridge",()=>this.supportsProtocol("TokenBridge"));e(this,"getTokenBridge",()=>this.getProtocol("TokenBridge"));e(this,"supportsAutomaticTokenBridge",()=>this.supportsProtocol("AutomaticTokenBridge"));e(this,"getAutomaticTokenBridge",()=>this.getProtocol("AutomaticTokenBridge"));e(this,"supportsCircleBridge",()=>this.supportsProtocol("CircleBridge"));e(this,"getCircleBridge",()=>this.getProtocol("CircleBridge"));e(this,"supportsAutomaticCircleBridge",()=>this.supportsProtocol("AutomaticCircleBridge"));e(this,"getAutomaticCircleBridge",()=>this.getProtocol("AutomaticCircleBridge"));e(this,"supportsIbcBridge",()=>this.supportsProtocol("IbcBridge"));e(this,"getIbcBridge",()=>this.getProtocol("IbcBridge"));e(this,"supportsPorticoBridge",()=>this.supportsProtocol("PorticoBridge"));e(this,"getPorticoBridge",()=>this.getProtocol("PorticoBridge"));this.config=i.config[t],this.platform=i,this.chain=this.config.key,this.network=this.config.network,this.rpc=r}getRpc(){return this.rpc=this.rpc?this.rpc:this.platform.getRpc(this.chain),this.rpc}async getDecimals(t){if(n.isNative(t))return this.config.nativeTokenDecimals;if(this.config.tokenMap){const i=n.canonicalAddress({chain:this.chain,address:t}),r=n.getTokenByAddress(this.network,this.chain,i);if(r)return r.decimals}return this.platform.utils().getDecimals(this.chain,await this.getRpc(),t)}async getBalance(t,i){return this.platform.utils().getBalance(this.chain,await this.getRpc(),t,i)}async getLatestBlock(){return this.platform.utils().getLatestBlock(await this.getRpc())}async getLatestFinalizedBlock(){return this.platform.utils().getLatestFinalizedBlock(await this.getRpc())}async parseTransaction(t){return this.platform.parseWormholeMessages(this.chain,await this.getRpc(),t)}async sendWait(t){return this.platform.utils().sendWait(this.chain,await this.getRpc(),t)}getToken(t){if(this.config.tokenMap&&t in this.config.tokenMap)return this.config.tokenMap[t]}async getNativeWrappedTokenId(){if(this.config.wrappedNative){const{address:i}=this.config.wrappedNative;return{chain:this.chain,address:n.toNative(this.chain,i)}}const t=await this.getTokenBridge();return{chain:this.chain,address:await t.getWrappedNative()}}async getTokenAccount(t,i){return{chain:this.chain,address:t}}supportsProtocol(t){return w(this.chain,t)}async getProtocol(t,i,r){if(!i&&this.protocols.has(t))return this.protocols.get(t);const c=i?{...this.config.contracts,...i}:this.config.contracts,h=r??await this.getRpc(),g=this.platform.getProtocolInitializer(t);let a;if(r){if(i)throw new Error("Custom contracts are currently not supported with custom rpc connection. Add the contracts to the base config.");a=await this.platform.getProtocol(t,h)}else if(f(g)){const p=await g.getVersion(h,c);a=new g(this.network,this.chain,h,c,p)}else a=new g(this.network,this.chain,h,c);return i||this.protocols.set(t,a),a}}exports.ChainContext=P;exports.PlatformContext=k;exports.registerProtocol=m;
@@ -1,7 +1,7 @@
1
1
  var p = Object.defineProperty;
2
2
  var u = (o, t, i) => t in o ? p(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
3
3
  var e = (o, t, i) => (u(o, typeof t != "symbol" ? t + "" : t, i), i);
4
- import { bL as d, ay as f, az as m, bM as w, bN as B, bO as k } from "./index-CdSy2Lfd.mjs";
4
+ import { bL as d, ay as f, az as m, bM as w, bN as B, bO as k } from "./index-D4oa5qLu.mjs";
5
5
  function P(o) {
6
6
  return "getVersion" in o;
7
7
  }
@@ -1,9 +1,9 @@
1
1
  var J8 = Object.defineProperty;
2
2
  var Y8 = (e, a, d) => a in e ? J8(e, a, { enumerable: !0, configurable: !0, writable: !0, value: d }) : e[a] = d;
3
3
  var _1 = (e, a, d) => (Y8(e, typeof a != "symbol" ? a + "" : a, d), d);
4
- import { r as Ib, n as Z8, o as L, p as K8, u as Q8, q as Pb, s as p5, t as m5, v as V8, w as Nb, d as P, x as Qe, y as X8, W as e2, z as a2, c as Xd, e as lf, B as d2, A as c2, D as hf, E as f2, F as M1, _ as m, L as O, G as oa, S as b2, H as t2, I as r2, J as n2, K as x2, M as i2, O as o2, P as s2, Q as u2, R as g5, T as l2, U as h2, V as y5, X as p2, Y as m2, Z as g2, $ as yc, m as pf, a0 as y2 } from "./index-CdSy2Lfd.mjs";
5
- import { t as v2, s as Cd, G as Ma, R as w2, N as E2, g as v5, C as S2, I as A2, a as w5, k as I2 } from "./ens-validation.es6-CyEOHc9J.mjs";
6
- import { l as P2 } from "./libsodium-wrappers-9p7NdjLu.mjs";
4
+ import { r as Ib, n as Z8, o as L, p as K8, u as Q8, q as Pb, s as p5, t as m5, v as V8, w as Nb, d as P, x as Qe, y as X8, W as e2, z as a2, c as Xd, e as lf, B as d2, A as c2, D as hf, E as f2, F as M1, _ as m, L as O, G as oa, S as b2, H as t2, I as r2, J as n2, K as x2, M as i2, O as o2, P as s2, Q as u2, R as g5, T as l2, U as h2, V as y5, X as p2, Y as m2, Z as g2, $ as yc, m as pf, a0 as y2 } from "./index-D4oa5qLu.mjs";
5
+ import { t as v2, s as Cd, G as Ma, R as w2, N as E2, g as v5, C as S2, I as A2, a as w5, k as I2 } from "./ens-validation.es6-DQFhqeC0.mjs";
6
+ import { l as P2 } from "./libsodium-wrappers-DTuXKVrZ.mjs";
7
7
  const N2 = Ib().ec, T2 = new N2("secp256k1"), _2 = T2.curve;
8
8
  _2.n.constructor;
9
9
  var E5 = {};