@wormhole-foundation/wormhole-connect 2.1.0-beta.1-development → 2.1.0-beta.2-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 (92) hide show
  1. package/dist/assets/{ccip-j5QHovIT.js → ccip-DfI9A4kL.js} +1 -1
  2. package/dist/assets/{evm-B5I5ieRn.js → evm-CYICYl2d.js} +3 -3
  3. package/dist/assets/index-26ve8f2n.js +531 -0
  4. package/dist/assets/index-NqsKKz5-.js +14 -0
  5. package/dist/assets/index.es-CephYdxr.js +47 -0
  6. package/dist/assets/{solana-c_vE3Ye5.js → solana-DXbD7wpn.js} +2 -2
  7. package/dist/assets/{solanaEmbed.esm-Bx0ME0S1.js → solanaEmbed.esm-CcwIvLto.js} +10 -10
  8. package/dist/main.js +3 -3
  9. package/lib/{aptos-CzT6f7Ba.js → aptos-7G9wZkGW.js} +2 -2
  10. package/lib/{aptos-wFa1-xae.mjs → aptos-BlOWGpyT.mjs} +2 -2
  11. package/lib/{aptos-CqfHXKy7.js → aptos-CYxRBLR_.js} +1 -1
  12. package/lib/{aptos-DxhN-FI3.mjs → aptos-Ckopfy7I.mjs} +5 -5
  13. package/lib/{base64-C_XWimVd.js → base64-CFR5QWTY.js} +1 -1
  14. package/lib/{base64-L1vzz0KI.mjs → base64-HSuzVIKw.mjs} +1 -1
  15. package/lib/{ccip-z81HbzxN.mjs → ccip-Bntg_vPp.mjs} +1 -1
  16. package/lib/{ccip-D6aPw5Ue.js → ccip-CVUhxB0q.js} +1 -1
  17. package/lib/{chunk-IMTC3J2M-CazR2ogu.mjs → chunk-IMTC3J2M-BADDWO3l.mjs} +3 -3
  18. package/lib/{chunk-IMTC3J2M-WMj1Jt5m.js → chunk-IMTC3J2M-ByR5Yjf4.js} +1 -1
  19. package/lib/{events-D4Mv_WYU.js → events-jATx_JnD.js} +1 -1
  20. package/lib/{events-BrdIAbQL.mjs → events-lD3LhLH0.mjs} +1 -1
  21. package/lib/{evm-CB6zu7io.mjs → evm-BW0CHBCG.mjs} +5 -5
  22. package/lib/{evm-Fk4wBAda.js → evm-Bh1Y4eUx.js} +1 -1
  23. package/lib/{evm-CULALpUt.mjs → evm-ColKfWEz.mjs} +10 -6
  24. package/lib/{evm-BJL8RjTB.js → evm-z5yFHxM9.js} +3 -3
  25. package/lib/{index-D2y7My6x.mjs → index-2fBRXVP8.mjs} +2 -2
  26. package/lib/{index-Cuov-W4s.js → index-8-70GvMi.js} +1 -1
  27. package/lib/{index-Xy8XaqU-.js → index-8JCep4IW.js} +1 -1
  28. package/lib/{index-BTmEJpYG.mjs → index-B9GU1bLs.mjs} +1 -1
  29. package/lib/{index-CS3t6bxx.mjs → index-BXkdaYu_.mjs} +1 -1
  30. package/lib/{index-DEpSdwA-.mjs → index-BZ0W_BZS.mjs} +2 -2
  31. package/lib/{index-CtpCK8QC.js → index-BcdbCktu.js} +1 -1
  32. package/lib/{index-BnVRRJvv.js → index-BhexWYVn.js} +1 -1
  33. package/lib/{index-BT_eiQVC.js → index-C-OIv0gT.js} +1 -1
  34. package/lib/{index-CAqS4koK.js → index-C6WDEDwO.js} +1 -1
  35. package/lib/{index-BqaYMlOq.mjs → index-CAUvtNGE.mjs} +3 -3
  36. package/lib/{index-DpfI-2hT.mjs → index-CBxgME-2.mjs} +2 -2
  37. package/lib/{index-Dtg6idl8.js → index-CCUy1jes.js} +1 -1
  38. package/lib/{index-DGcrnWdu.mjs → index-CYBM2IeY.mjs} +13 -12
  39. package/lib/{index-DJJ3umH8.mjs → index-CcFpkXPM.mjs} +2 -2
  40. package/lib/{index-BqCducVx.mjs → index-CfnNi3Zd.mjs} +3 -3
  41. package/lib/{index-DdRe9fUB.mjs → index-Cl6LSKsg.mjs} +1 -1
  42. package/lib/{index-DtqIOAjg.mjs → index-CxQ-swIQ.mjs} +1 -1
  43. package/lib/index-Cxw9PIcl.js +531 -0
  44. package/lib/{index-CGdGYg5B.mjs → index-D0XcjaUl.mjs} +2 -2
  45. package/lib/{index-B9FwYN90.js → index-D7IcLxQc.js} +1 -1
  46. package/lib/index-DAzDpd7U.js +14 -0
  47. package/lib/{index-jC1hUxPJ.mjs → index-DB_r424l.mjs} +1 -1
  48. package/lib/{index-C_2eG0Va.mjs → index-DECw2aR6.mjs} +1 -1
  49. package/lib/{index-CuPOodtE.js → index-DGgQSMuG.js} +1 -1
  50. package/lib/{index-BsmdxKnE.mjs → index-DIAuhm70.mjs} +3008 -3525
  51. package/lib/{index-CuWt4RaJ.js → index-DOXMkFA4.js} +1 -1
  52. package/lib/{index-BGZONAdj.js → index-DQVQrflZ.js} +1 -1
  53. package/lib/{index-GM4m48QO.js → index-DUXnbpVg.js} +1 -1
  54. package/lib/{index-DUGwXho3.js → index-DZvLy2Dr.js} +3 -3
  55. package/lib/{index-BsYhqVq_.js → index-DjkMeATf.js} +1 -1
  56. package/lib/{index-C0MgLwy8.js → index-DleO04Ea.js} +1 -1
  57. package/lib/{index-HeldZ3mJ.mjs → index-InC6In6o.mjs} +2 -2
  58. package/lib/{index-CkUMgihl.js → index-V7kxzAZX.js} +1 -1
  59. package/lib/{index-B5TOuhBB.js → index-WLqZ1uO7.js} +1 -1
  60. package/lib/{index-Cf2BEUjb.mjs → index-gd_dleYk.mjs} +1 -1
  61. package/lib/{index-CayMgbM_.js → index-l0NqjNj9.js} +1 -1
  62. package/lib/{index-wAClTIQn.mjs → index-lEBTHIqm.mjs} +2 -2
  63. package/lib/{index-DsYAlD9Y.mjs → index-lHA40g0z.mjs} +2 -2
  64. package/lib/index-oPxOJfPK.mjs +3236 -0
  65. package/lib/{index-ChzkRsG0.js → index-rFhS51F6.js} +1 -1
  66. package/lib/{index-DXIpHh2N.mjs → index-y_DeeCWD.mjs} +4 -4
  67. package/lib/index.es-Doowrf9a.js +46 -0
  68. package/lib/index.es-YqKQxHG6.mjs +7725 -0
  69. package/lib/index.js +1 -1
  70. package/lib/index.mjs +1 -1
  71. package/lib/{signer-BBJR-S7u.mjs → signer-CfU9wW3f.mjs} +1 -1
  72. package/lib/{signer-D8m72nd4.js → signer-eoVHaZz7.js} +1 -1
  73. package/lib/{solana-DB5vwgKO.mjs → solana-CHUnEnef.mjs} +4 -4
  74. package/lib/{solana-tZZpsxE8.js → solana-C_d_AKET.js} +1 -1
  75. package/lib/solana-SFHXHGL2.js +1 -0
  76. package/lib/{solana-DdLCPKF2.mjs → solana-y-l38J4U.mjs} +5 -5
  77. package/lib/{solanaEmbed.esm-TpsYEDsw.js → solanaEmbed.esm-B4tNQ7S7.js} +10 -10
  78. package/lib/{solanaEmbed.esm-ANGjgiaN.mjs → solanaEmbed.esm-DVOHg5WI.mjs} +1559 -1560
  79. package/lib/{sui-BFNsLy1t.mjs → sui-1fbLRIUL.mjs} +5 -5
  80. package/lib/{sui-UELhAZj0.js → sui-BN1m6APK.js} +1 -1
  81. package/lib/{sui-DKw9LmTC.mjs → sui-D9frS9ki.mjs} +1 -1
  82. package/lib/{sui-D9F11hKw.js → sui-K20aVxqE.js} +2 -2
  83. package/package.json +5 -1
  84. package/dist/assets/index-BUd_4Lqz.js +0 -14
  85. package/dist/assets/index-Db_i6Hbk.js +0 -531
  86. package/dist/assets/index.es-BYwyqXqm.js +0 -47
  87. package/lib/index-5EBn2EJL.mjs +0 -2709
  88. package/lib/index-CYpOkqEl.js +0 -14
  89. package/lib/index-Cst2493l.js +0 -531
  90. package/lib/index.es-DG7BWZ8R.js +0 -46
  91. package/lib/index.es-IbuqEs8_.mjs +0 -8242
  92. package/lib/solana-521ACL4P.js +0 -1
@@ -1,14 +0,0 @@
1
- "use strict";const de=require("./index-BGZONAdj.js"),V=require("./index-DUGwXho3.js");function vn(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function co(e,t){t||(t=e.reduce((i,o)=>i+o.length,0));const r=vn(t);let n=0;for(const i of e)r.set(i,n),n+=i.length;return r}const $r={...de.identityBase,...de.base2,...de.base8,...de.base10,...de.base16,...de.base32,...de.base36,...de.base58,...de.base64,...de.base256emoji};function _n(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const Gr=_n("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Jt=_n("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=vn(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),xn={utf8:Gr,"utf-8":Gr,hex:$r.base16,latin1:Jt,ascii:Jt,binary:Jt,...$r};function fo(e,t="utf8"){const r=xn[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}function lo(e,t="utf8"){const r=xn[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}var kr=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))},ho=function(){function e(t,r,n){this.name=t,this.version=r,this.os=n,this.type="browser"}return e}(),bo=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=V.dist.process.platform}return e}(),po=function(){function e(t,r,n,i){this.name=t,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return e}(),go=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),yo=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),wo=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,mo=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Wr=3,vo=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",wo]],qr=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function _o(e){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new yo:typeof navigator<"u"?Eo(navigator.userAgent):Ao()}function xo(e){return e!==""&&vo.reduce(function(t,r){var n=r[0],i=r[1];if(t)return t;var o=i.exec(e);return!!o&&[n,o]},!1)}function Eo(e){var t=xo(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new go;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<Wr&&(i=kr(kr([],i,!0),So(Wr-i.length),!0)):i=[];var o=i.join("."),a=Fo(e),l=mo.exec(e);return l&&l[1]?new po(r,o,a,l[1]):new ho(r,o,a)}function Fo(e){for(var t=0,r=qr.length;t<r;t++){var n=qr[t],i=n[0],o=n[1],a=o.exec(e);if(a)return i}return null}function Ao(){var e=typeof V.dist.process<"u"&&V.dist.process.version;return e?new bo(V.dist.process.version.slice(1)):null}function So(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}const Bo={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"}},Oo=/"(?:_|\\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*:/,To=/"(?: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*:/,Co=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Io(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Ro(e);return}return t}function Ro(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Lo(e,t={}){if(typeof e!="string")return e;const r=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return r.slice(1,-1);if(r.length<=9){const n=r.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="undefined")return;if(n==="null")return null;if(n==="nan")return Number.NaN;if(n==="infinity")return Number.POSITIVE_INFINITY;if(n==="-infinity")return Number.NEGATIVE_INFINITY}if(!Co.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Oo.test(e)||To.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Io)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function ze(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function En(e,t){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);const n=ze(r);return(i,o)=>n.then(a=>o(a.transaction(t,i).objectStore(t)))}let Kt;function st(){return Kt||(Kt=En("keyval-store","keyval")),Kt}function jo(e,t=st()){return t("readonly",r=>ze(r.get(e)))}function Po(e,t,r=st()){return r("readwrite",n=>(n.put(t,e),ze(n.transaction)))}function No(e,t=st()){return t("readwrite",r=>(r.delete(e),ze(r.transaction)))}function Uo(e=st()){return e("readwrite",t=>(t.clear(),ze(t.transaction)))}function zo(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},ze(e.transaction)}function Do(e=st()){return e("readonly",t=>{if(t.getAllKeys)return ze(t.getAllKeys());const r=[];return zo(t,n=>r.push(n.key)).then(()=>r)})}class Mo{}function Ho(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var $o=Go;function Go(e,t,r){var n=r&&r.stringify||Ho,i=1;if(typeof e=="object"&&e!==null){var o=t.length+i;if(o===1)return e;var a=new Array(o);a[0]=n(e);for(var l=1;l<o;l++)a[l]=n(t[l]);return a.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var h="",f=1-i,b=-1,w=e&&e.length||0,g=0;g<w;){if(e.charCodeAt(g)===37&&g+1<w){switch(b=b>-1?b:0,e.charCodeAt(g+1)){case 100:case 102:if(f>=u||t[f]==null)break;b<g&&(h+=e.slice(b,g)),h+=Number(t[f]),b=g+2,g++;break;case 105:if(f>=u||t[f]==null)break;b<g&&(h+=e.slice(b,g)),h+=Math.floor(Number(t[f])),b=g+2,g++;break;case 79:case 111:case 106:if(f>=u||t[f]===void 0)break;b<g&&(h+=e.slice(b,g));var p=typeof t[f];if(p==="string"){h+="'"+t[f]+"'",b=g+2,g++;break}if(p==="function"){h+=t[f].name||"<anonymous>",b=g+2,g++;break}h+=n(t[f]),b=g+2,g++;break;case 115:if(f>=u)break;b<g&&(h+=e.slice(b,g)),h+=String(t[f]),b=g+2,g++;break;case 37:b<g&&(h+=e.slice(b,g)),h+="%",b=g+2,g++,f--;break}++f}++g}return b===-1?e:(b<w&&(h+=e.slice(b)),h)}const Vr=$o;var ke=we;const nt=Qo().console||{},ko={mapHttpRequest:Ft,mapHttpResponse:Ft,wrapRequestSerializer:Zt,wrapResponseSerializer:Zt,wrapErrorSerializer:Zt,req:Ft,res:Ft,err:Ko};function Wo(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function we(e){e=e||{},e.browser=e.browser||{};const t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||nt;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=Wo(e.browser.serialize,n);let o=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(o=!1);const a=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");const l=e.level||"info",u=Object.create(r);u.log||(u.log=it),Object.defineProperty(u,"levelVal",{get:f}),Object.defineProperty(u,"level",{get:b,set:w});const h={transmit:t,serialize:i,asObject:e.browser.asObject,levels:a,timestamp:Zo(e)};u.levels=we.levels,u.level=l,u.setMaxListeners=u.getMaxListeners=u.emit=u.addListener=u.on=u.prependListener=u.once=u.prependOnceListener=u.removeListener=u.removeAllListeners=u.listeners=u.listenerCount=u.eventNames=u.write=u.flush=it,u.serializers=n,u._serialize=i,u._stdErrSerialize=o,u.child=g,t&&(u._logEvent=or());function f(){return this.level==="silent"?1/0:this.levels.values[this.level]}function b(){return this._level}function w(p){if(p!=="silent"&&!this.levels.values[p])throw Error("unknown level "+p);this._level=p,He(h,u,"error","log"),He(h,u,"fatal","error"),He(h,u,"warn","error"),He(h,u,"info","log"),He(h,u,"debug","log"),He(h,u,"trace","log")}function g(p,_){if(!p)throw new Error("missing bindings for child Pino");_=_||{},i&&p.serializers&&(_.serializers=p.serializers);const R=_.serializers;if(i&&R){var j=Object.assign({},n,R),I=e.browser.serialize===!0?Object.keys(j):i;delete p.serializers,jt([p],I,j,this._stdErrSerialize)}function m(O){this._childLevel=(O._childLevel|0)+1,this.error=$e(O,p,"error"),this.fatal=$e(O,p,"fatal"),this.warn=$e(O,p,"warn"),this.info=$e(O,p,"info"),this.debug=$e(O,p,"debug"),this.trace=$e(O,p,"trace"),j&&(this.serializers=j,this._serialize=I),t&&(this._logEvent=or([].concat(O._logEvent.bindings,p)))}return m.prototype=this,new m(this)}return u}we.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"}};we.stdSerializers=ko;we.stdTimeFunctions=Object.assign({},{nullTime:Fn,epochTime:An,unixTime:Yo,isoTime:Xo});function He(e,t,r,n){const i=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?it:i[r]?i[r]:nt[r]||nt[n]||it,qo(e,t,r)}function qo(e,t,r){!e.transmit&&t[r]===it||(t[r]=function(n){return function(){const o=e.timestamp(),a=new Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===nt?nt:this;for(var u=0;u<a.length;u++)a[u]=arguments[u];if(e.serialize&&!e.asObject&&jt(a,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?n.call(l,Vo(this,r,a,o)):n.apply(l,a),e.transmit){const h=e.transmit.level||t.level,f=we.levels.values[h],b=we.levels.values[r];if(b<f)return;Jo(this,{ts:o,methodLevel:r,methodValue:b,transmitValue:we.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},a)}}}(t[r]))}function Vo(e,t,r,n){e._serialize&&jt(r,e._serialize,e.serializers,e._stdErrSerialize);const i=r.slice();let o=i[0];const a={};n&&(a.time=n),a.level=we.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),o!==null&&typeof o=="object"){for(;l--&&typeof i[0]=="object";)Object.assign(a,i.shift());o=i.length?Vr(i.shift(),i):void 0}else typeof o=="string"&&(o=Vr(i.shift(),i));return o!==void 0&&(a.msg=o),a}function jt(e,t,r,n){for(const i in e)if(n&&e[i]instanceof Error)e[i]=we.stdSerializers.err(e[i]);else if(typeof e[i]=="object"&&!Array.isArray(e[i]))for(const o in e[i])t&&t.indexOf(o)>-1&&o in r&&(e[i][o]=r[o](e[i][o]))}function $e(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return e[r].apply(this,n)}}function Jo(e,t,r){const n=t.send,i=t.ts,o=t.methodLevel,a=t.methodValue,l=t.val,u=e._logEvent.bindings;jt(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(h){return u.indexOf(h)===-1}),e._logEvent.level.label=o,e._logEvent.level.value=a,n(o,e._logEvent,l),e._logEvent=or(u)}function or(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Ko(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)t[r]===void 0&&(t[r]=e[r]);return t}function Zo(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Fn:An}function Ft(){return{}}function Zt(e){return e}function it(){}function Fn(){return!1}function An(){return Date.now()}function Yo(){return Math.round(Date.now()/1e3)}function Xo(){return new Date(Date.now()).toISOString()}function Qo(){function e(t){return typeof t<"u"&&t}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 br=V.getDefaultExportFromCjs(ke),es=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r);function Jr(e){return typeof e=="string"?e:es(e)||""}const ts={level:"info"},at="custom_context",pr=1e3*1024;class rs{constructor(t){this.nodeValue=t,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class Kr{constructor(t){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=t,this.sizeInBytes=0}append(t){const r=new rs(t);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${t} with size ${r.size}`);for(;this.size+r.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=r),this.tail=r):(this.head=r,this.tail=r),this.lengthInNodes++,this.sizeInBytes+=r.size}shift(){if(!this.head)return;const t=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=t.size}toArray(){const t=[];let r=this.head;for(;r!==null;)t.push(r.value),r=r.next;return t}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let t=this.head;return{next:()=>{if(!t)return{done:!0,value:null};const r=t.value;return t=t.next,{done:!1,value:r}}}}}class Sn{constructor(t,r=pr){this.level=t??"error",this.levelValue=ke.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new Kr(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(t,r){r===ke.levels.values.error?console.error(t):r===ke.levels.values.warn?console.warn(t):r===ke.levels.values.debug?console.debug(t):r===ke.levels.values.trace?console.trace(t):console.log(t)}appendToLogs(t){this.logs.append(Jr({timestamp:new Date().toISOString(),log:t}));const r=typeof t=="string"?JSON.parse(t).level:t.level;r>=this.levelValue&&this.forwardToConsole(t,r)}getLogs(){return this.logs}clearLogs(){this.logs=new Kr(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(t){const r=this.getLogArray();return r.push(Jr({extraMetadata:t})),new Blob(r,{type:"application/json"})}}class ns{constructor(t,r=pr){this.baseChunkLogger=new Sn(t,r)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}downloadLogsBlobInBrowser(t){const r=URL.createObjectURL(this.logsToBlob(t)),n=document.createElement("a");n.href=r,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}}class is{constructor(t,r=pr){this.baseChunkLogger=new Sn(t,r)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}}var os=Object.defineProperty,ss=Object.defineProperties,as=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertySymbols,us=Object.prototype.hasOwnProperty,cs=Object.prototype.propertyIsEnumerable,Yr=(e,t,r)=>t in e?os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tt=(e,t)=>{for(var r in t||(t={}))us.call(t,r)&&Yr(e,r,t[r]);if(Zr)for(var r of Zr(t))cs.call(t,r)&&Yr(e,r,t[r]);return e},Ct=(e,t)=>ss(e,as(t));function fs(e){return Ct(Tt({},e),{level:(e==null?void 0:e.level)||ts.level})}function ls(e,t=at){return e[t]||""}function hs(e,t,r=at){return e[r]=t,e}function Bn(e,t=at){let r="";return typeof e.bindings>"u"?r=ls(e,t):r=e.bindings().context||"",r}function ds(e,t,r=at){const n=Bn(e,r);return n.trim()?`${n}/${t}`:t}function bs(e,t,r=at){const n=ds(e,t,r),i=e.child({context:n});return hs(i,n,r)}function ps(e){var t,r;const n=new ns((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:br(Ct(Tt({},e.opts),{level:"trace",browser:Ct(Tt({},(r=e.opts)==null?void 0:r.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function gs(e){var t;const r=new is((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:br(Ct(Tt({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}function ys(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?ps(e):gs(e)}const ws=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),ms=e=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function vs(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return ms(e)}catch{return e}}function _s(e){return typeof e=="string"?e:ws(e)||""}function xs(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function On(e,...t){if(!xs(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Xr(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Es(e,t){On(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}const Ge=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Yt=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);function Fs(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function Tn(e){return typeof e=="string"&&(e=Fs(e)),On(e),e}class As{clone(){return this._cloneInto()}}function Ss(e){const t=n=>e().update(Tn(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Cn(e=32){if(Ge&&typeof Ge.getRandomValues=="function")return Ge.getRandomValues(new Uint8Array(e));if(Ge&&typeof Ge.randomBytes=="function")return Ge.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}function Bs(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(r>>i&o),l=Number(r&o),u=n?4:0,h=n?0:4;e.setUint32(t+u,a,n),e.setUint32(t+h,l,n)}class Os extends As{constructor(t,r,n,i){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Yt(this.buffer)}update(t){Xr(this);const{view:r,buffer:n,blockLen:i}=this;t=Tn(t);const o=t.length;for(let a=0;a<o;){const l=Math.min(i-this.pos,o-a);if(l===i){const u=Yt(t);for(;i<=o-a;a+=i)this.process(u,a);continue}n.set(t.subarray(a,a+l),this.pos),this.pos+=l,a+=l,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Xr(this),Es(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:o}=this;let{pos:a}=this;r[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(n,0),a=0);for(let b=a;b<i;b++)r[b]=0;Bs(n,i-8,BigInt(this.length*8),o),this.process(n,0);const l=Yt(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=u/4,f=this.get();if(h>f.length)throw new Error("_sha2: outputLen bigger than state");for(let b=0;b<h;b++)l.setUint32(4*b,f[b],o)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:o,destroyed:a,pos:l}=this;return t.length=i,t.pos=l,t.finished=o,t.destroyed=a,i%r&&t.buffer.set(n),t}}const At=BigInt(2**32-1),sr=BigInt(32);function In(e,t=!1){return t?{h:Number(e&At),l:Number(e>>sr&At)}:{h:Number(e>>sr&At)|0,l:Number(e&At)|0}}function Ts(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:a}=In(e[i],t);[r[i],n[i]]=[o,a]}return[r,n]}const Cs=(e,t)=>BigInt(e>>>0)<<sr|BigInt(t>>>0),Is=(e,t,r)=>e>>>r,Rs=(e,t,r)=>e<<32-r|t>>>r,Ls=(e,t,r)=>e>>>r|t<<32-r,js=(e,t,r)=>e<<32-r|t>>>r,Ps=(e,t,r)=>e<<64-r|t>>>r-32,Ns=(e,t,r)=>e>>>r-32|t<<64-r,Us=(e,t)=>t,zs=(e,t)=>e,Ds=(e,t,r)=>e<<r|t>>>32-r,Ms=(e,t,r)=>t<<r|e>>>32-r,Hs=(e,t,r)=>t<<r-32|e>>>64-r,$s=(e,t,r)=>e<<r-32|t>>>64-r;function Gs(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}const ks=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),Ws=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,qs=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),Vs=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,Js=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0),Ks=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0,B={fromBig:In,split:Ts,toBig:Cs,shrSH:Is,shrSL:Rs,rotrSH:Ls,rotrSL:js,rotrBH:Ps,rotrBL:Ns,rotr32H:Us,rotr32L:zs,rotlSH:Ds,rotlSL:Ms,rotlBH:Hs,rotlBL:$s,add:Gs,add3L:ks,add3H:Ws,add4L:qs,add4H:Vs,add5H:Ks,add5L:Js},[Zs,Ys]=B.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Te=new Uint32Array(80),Ce=new Uint32Array(80);class Xs extends Os{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:r,Bh:n,Bl:i,Ch:o,Cl:a,Dh:l,Dl:u,Eh:h,El:f,Fh:b,Fl:w,Gh:g,Gl:p,Hh:_,Hl:R}=this;return[t,r,n,i,o,a,l,u,h,f,b,w,g,p,_,R]}set(t,r,n,i,o,a,l,u,h,f,b,w,g,p,_,R){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=o|0,this.Cl=a|0,this.Dh=l|0,this.Dl=u|0,this.Eh=h|0,this.El=f|0,this.Fh=b|0,this.Fl=w|0,this.Gh=g|0,this.Gl=p|0,this.Hh=_|0,this.Hl=R|0}process(t,r){for(let m=0;m<16;m++,r+=4)Te[m]=t.getUint32(r),Ce[m]=t.getUint32(r+=4);for(let m=16;m<80;m++){const O=Te[m-15]|0,U=Ce[m-15]|0,$=B.rotrSH(O,U,1)^B.rotrSH(O,U,8)^B.shrSH(O,U,7),k=B.rotrSL(O,U,1)^B.rotrSL(O,U,8)^B.shrSL(O,U,7),z=Te[m-2]|0,W=Ce[m-2]|0,be=B.rotrSH(z,W,19)^B.rotrBH(z,W,61)^B.shrSH(z,W,6),pe=B.rotrSL(z,W,19)^B.rotrBL(z,W,61)^B.shrSL(z,W,6),ue=B.add4L(k,pe,Ce[m-7],Ce[m-16]),Ie=B.add4H(ue,$,be,Te[m-7],Te[m-16]);Te[m]=Ie|0,Ce[m]=ue|0}let{Ah:n,Al:i,Bh:o,Bl:a,Ch:l,Cl:u,Dh:h,Dl:f,Eh:b,El:w,Fh:g,Fl:p,Gh:_,Gl:R,Hh:j,Hl:I}=this;for(let m=0;m<80;m++){const O=B.rotrSH(b,w,14)^B.rotrSH(b,w,18)^B.rotrBH(b,w,41),U=B.rotrSL(b,w,14)^B.rotrSL(b,w,18)^B.rotrBL(b,w,41),$=b&g^~b&_,k=w&p^~w&R,z=B.add5L(I,U,k,Ys[m],Ce[m]),W=B.add5H(z,j,O,$,Zs[m],Te[m]),be=z|0,pe=B.rotrSH(n,i,28)^B.rotrBH(n,i,34)^B.rotrBH(n,i,39),ue=B.rotrSL(n,i,28)^B.rotrBL(n,i,34)^B.rotrBL(n,i,39),Ie=n&o^n&l^o&l,qe=i&a^i&u^a&u;j=_|0,I=R|0,_=g|0,R=p|0,g=b|0,p=w|0,{h:b,l:w}=B.add(h|0,f|0,W|0,be|0),h=l|0,f=u|0,l=o|0,u=a|0,o=n|0,a=i|0;const E=B.add3L(be,ue,qe);n=B.add3H(E,W,pe,Ie),i=E|0}({h:n,l:i}=B.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:o,l:a}=B.add(this.Bh|0,this.Bl|0,o|0,a|0),{h:l,l:u}=B.add(this.Ch|0,this.Cl|0,l|0,u|0),{h,l:f}=B.add(this.Dh|0,this.Dl|0,h|0,f|0),{h:b,l:w}=B.add(this.Eh|0,this.El|0,b|0,w|0),{h:g,l:p}=B.add(this.Fh|0,this.Fl|0,g|0,p|0),{h:_,l:R}=B.add(this.Gh|0,this.Gl|0,_|0,R|0),{h:j,l:I}=B.add(this.Hh|0,this.Hl|0,j|0,I|0),this.set(n,i,o,a,l,u,h,f,b,w,g,p,_,R,j,I)}roundClean(){Te.fill(0),Ce.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Qs=Ss(()=>new Xs);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const gr=BigInt(0),Rn=BigInt(1),ea=BigInt(2);function yr(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function wr(e){if(!yr(e))throw new Error("Uint8Array expected")}function Xt(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}const ta=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function mr(e){wr(e);let t="";for(let r=0;r<e.length;r++)t+=ta[e[r]];return t}function Ln(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?gr:BigInt("0x"+e)}const _e={_0:48,_9:57,A:65,F:70,a:97,f:102};function Qr(e){if(e>=_e._0&&e<=_e._9)return e-_e._0;if(e>=_e.A&&e<=_e.F)return e-(_e.A-10);if(e>=_e.a&&e<=_e.f)return e-(_e.a-10)}function jn(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let i=0,o=0;i<r;i++,o+=2){const a=Qr(e.charCodeAt(o)),l=Qr(e.charCodeAt(o+1));if(a===void 0||l===void 0){const u=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+u+'" at index '+o)}n[i]=a*16+l}return n}function ra(e){return Ln(mr(e))}function Ot(e){return wr(e),Ln(mr(Uint8Array.from(e).reverse()))}function Pn(e,t){return jn(e.toString(16).padStart(t*2,"0"))}function ar(e,t){return Pn(e,t).reverse()}function xe(e,t,r){let n;if(typeof t=="string")try{n=jn(t)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else if(yr(t))n=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(e+" of length "+r+" expected, got "+i);return n}function en(...e){let t=0;for(let n=0;n<e.length;n++){const i=e[n];wr(i),t+=i.length}const r=new Uint8Array(t);for(let n=0,i=0;n<e.length;n++){const o=e[n];r.set(o,i),i+=o.length}return r}const Qt=e=>typeof e=="bigint"&&gr<=e;function na(e,t,r){return Qt(e)&&Qt(t)&&Qt(r)&&t<=e&&e<r}function tt(e,t,r,n){if(!na(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function ia(e){let t;for(t=0;e>gr;e>>=Rn,t+=1);return t}const oa=e=>(ea<<BigInt(e-1))-Rn,sa={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||yr(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function vr(e,t,r={}){const n=(i,o,a)=>{const l=sa[o];if(typeof l!="function")throw new Error("invalid validator function");const u=e[i];if(!(a&&u===void 0)&&!l(u,e))throw new Error("param "+String(i)+" is invalid. Expected "+o+", got "+u)};for(const[i,o]of Object.entries(t))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return e}function tn(e){const t=new WeakMap;return(r,...n)=>{const i=t.get(r);if(i!==void 0)return i;const o=e(r,...n);return t.set(r,o),o}}const Y=BigInt(0),q=BigInt(1),Ue=BigInt(2),aa=BigInt(3),ur=BigInt(4),rn=BigInt(5),nn=BigInt(8);function K(e,t){const r=e%t;return r>=Y?r:t+r}function ua(e,t,r){if(t<Y)throw new Error("invalid exponent, negatives unsupported");if(r<=Y)throw new Error("invalid modulus");if(r===q)return Y;let n=q;for(;t>Y;)t&q&&(n=n*e%r),e=e*e%r,t>>=q;return n}function ye(e,t,r){let n=e;for(;t-- >Y;)n*=n,n%=r;return n}function on(e,t){if(e===Y)throw new Error("invert: expected non-zero number");if(t<=Y)throw new Error("invert: expected positive modulus, got "+t);let r=K(e,t),n=t,i=Y,o=q;for(;r!==Y;){const a=n/r,l=n%r,u=i-o*a;n=r,r=l,i=o,o=u}if(n!==q)throw new Error("invert: does not exist");return K(i,t)}function ca(e){const t=(e-q)/Ue;let r,n,i;for(r=e-q,n=0;r%Ue===Y;r/=Ue,n++);for(i=Ue;i<e&&ua(i,t,e)!==e-q;i++)if(i>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const a=(e+q)/ur;return function(l,u){const h=l.pow(u,a);if(!l.eql(l.sqr(h),u))throw new Error("Cannot find square root");return h}}const o=(r+q)/Ue;return function(a,l){if(a.pow(l,t)===a.neg(a.ONE))throw new Error("Cannot find square root");let u=n,h=a.pow(a.mul(a.ONE,i),r),f=a.pow(l,o),b=a.pow(l,r);for(;!a.eql(b,a.ONE);){if(a.eql(b,a.ZERO))return a.ZERO;let w=1;for(let p=a.sqr(b);w<u&&!a.eql(p,a.ONE);w++)p=a.sqr(p);const g=a.pow(h,q<<BigInt(u-w-1));h=a.sqr(g),f=a.mul(f,g),b=a.mul(b,h),u=w}return f}}function fa(e){if(e%ur===aa){const t=(e+q)/ur;return function(r,n){const i=r.pow(n,t);if(!r.eql(r.sqr(i),n))throw new Error("Cannot find square root");return i}}if(e%nn===rn){const t=(e-rn)/nn;return function(r,n){const i=r.mul(n,Ue),o=r.pow(i,t),a=r.mul(n,o),l=r.mul(r.mul(a,Ue),o),u=r.mul(a,r.sub(l,r.ONE));if(!r.eql(r.sqr(u),n))throw new Error("Cannot find square root");return u}}return ca(e)}const la=(e,t)=>(K(e,t)&q)===q,ha=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function da(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=ha.reduce((n,i)=>(n[i]="function",n),t);return vr(e,r)}function ba(e,t,r){if(r<Y)throw new Error("invalid exponent, negatives unsupported");if(r===Y)return e.ONE;if(r===q)return t;let n=e.ONE,i=t;for(;r>Y;)r&q&&(n=e.mul(n,i)),i=e.sqr(i),r>>=q;return n}function pa(e,t){const r=new Array(t.length),n=t.reduce((o,a,l)=>e.is0(a)?o:(r[l]=o,e.mul(o,a)),e.ONE),i=e.inv(n);return t.reduceRight((o,a,l)=>e.is0(a)?o:(r[l]=e.mul(o,r[l]),e.mul(o,a)),i),r}function Nn(e,t){const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Un(e,t,r=!1,n={}){if(e<=Y)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:i,nByteLength:o}=Nn(e,t);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const l=Object.freeze({ORDER:e,isLE:r,BITS:i,BYTES:o,MASK:oa(i),ZERO:Y,ONE:q,create:u=>K(u,e),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return Y<=u&&u<e},is0:u=>u===Y,isOdd:u=>(u&q)===q,neg:u=>K(-u,e),eql:(u,h)=>u===h,sqr:u=>K(u*u,e),add:(u,h)=>K(u+h,e),sub:(u,h)=>K(u-h,e),mul:(u,h)=>K(u*h,e),pow:(u,h)=>ba(l,u,h),div:(u,h)=>K(u*on(h,e),e),sqrN:u=>u*u,addN:(u,h)=>u+h,subN:(u,h)=>u-h,mulN:(u,h)=>u*h,inv:u=>on(u,e),sqrt:n.sqrt||(u=>(a||(a=fa(e)),a(l,u))),invertBatch:u=>pa(l,u),cmov:(u,h,f)=>f?h:u,toBytes:u=>r?ar(u,o):Pn(u,o),fromBytes:u=>{if(u.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+u.length);return r?Ot(u):ra(u)}});return Object.freeze(l)}const sn=BigInt(0),St=BigInt(1);function er(e,t){const r=t.negate();return e?r:t}function zn(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function tr(e,t){zn(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1);return{windows:r,windowSize:n}}function ga(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function ya(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const rr=new WeakMap,Dn=new WeakMap;function nr(e){return Dn.get(e)||1}function wa(e,t){return{constTimeNegate:er,hasPrecomputes(r){return nr(r)!==1},unsafeLadder(r,n,i=e.ZERO){let o=r;for(;n>sn;)n&St&&(i=i.add(o)),o=o.double(),n>>=St;return i},precomputeWindow(r,n){const{windows:i,windowSize:o}=tr(n,t),a=[];let l=r,u=l;for(let h=0;h<i;h++){u=l,a.push(u);for(let f=1;f<o;f++)u=u.add(l),a.push(u);l=u.double()}return a},wNAF(r,n,i){const{windows:o,windowSize:a}=tr(r,t);let l=e.ZERO,u=e.BASE;const h=BigInt(2**r-1),f=2**r,b=BigInt(r);for(let w=0;w<o;w++){const g=w*a;let p=Number(i&h);i>>=b,p>a&&(p-=f,i+=St);const _=g,R=g+Math.abs(p)-1,j=w%2!==0,I=p<0;p===0?u=u.add(er(j,n[_])):l=l.add(er(I,n[R]))}return{p:l,f:u}},wNAFUnsafe(r,n,i,o=e.ZERO){const{windows:a,windowSize:l}=tr(r,t),u=BigInt(2**r-1),h=2**r,f=BigInt(r);for(let b=0;b<a;b++){const w=b*l;if(i===sn)break;let g=Number(i&u);if(i>>=f,g>l&&(g-=h,i+=St),g===0)continue;let p=n[w+Math.abs(g)-1];g<0&&(p=p.negate()),o=o.add(p)}return o},getPrecomputes(r,n,i){let o=rr.get(n);return o||(o=this.precomputeWindow(n,r),r!==1&&rr.set(n,i(o))),o},wNAFCached(r,n,i){const o=nr(r);return this.wNAF(o,this.getPrecomputes(o,r,i),n)},wNAFCachedUnsafe(r,n,i,o){const a=nr(r);return a===1?this.unsafeLadder(r,n,o):this.wNAFUnsafe(a,this.getPrecomputes(a,r,i),n,o)},setWindowSize(r,n){zn(n,t),Dn.set(r,n),rr.delete(r)}}}function ma(e,t,r,n){if(ga(r,e),ya(n,t),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const i=e.ZERO,o=ia(BigInt(r.length)),a=o>12?o-3:o>4?o-2:o?2:1,l=(1<<a)-1,u=new Array(l+1).fill(i),h=Math.floor((t.BITS-1)/a)*a;let f=i;for(let b=h;b>=0;b-=a){u.fill(i);for(let g=0;g<n.length;g++){const p=n[g],_=Number(p>>BigInt(b)&BigInt(l));u[_]=u[_].add(r[g])}let w=i;for(let g=u.length-1,p=i;g>0;g--)p=p.add(u[g]),w=w.add(p);if(f=f.add(w),b!==0)for(let g=0;g<a;g++)f=f.double()}return f}function va(e){return da(e.Fp),vr(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Nn(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const he=BigInt(0),ne=BigInt(1),Bt=BigInt(2),_a=BigInt(8),xa={zip215:!0};function Ea(e){const t=va(e);return vr(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function Fa(e){const t=Ea(e),{Fp:r,n,prehash:i,hash:o,randomBytes:a,nByteLength:l,h:u}=t,h=Bt<<BigInt(l*8)-ne,f=r.create,b=Un(t.n,t.nBitLength),w=t.uvRatio||((E,y)=>{try{return{isValid:!0,value:r.sqrt(E*r.inv(y))}}catch{return{isValid:!1,value:he}}}),g=t.adjustScalarBytes||(E=>E),p=t.domain||((E,y,x)=>{if(Xt("phflag",x),y.length||x)throw new Error("Contexts/pre-hash are not supported");return E});function _(E,y){tt("coordinate "+E,y,he,h)}function R(E){if(!(E instanceof m))throw new Error("ExtendedPoint expected")}const j=tn((E,y)=>{const{ex:x,ey:F,ez:T}=E,C=E.is0();y==null&&(y=C?_a:r.inv(T));const L=f(x*y),D=f(F*y),P=f(T*y);if(C)return{x:he,y:ne};if(P!==ne)throw new Error("invZ was invalid");return{x:L,y:D}}),I=tn(E=>{const{a:y,d:x}=t;if(E.is0())throw new Error("bad point: ZERO");const{ex:F,ey:T,ez:C,et:L}=E,D=f(F*F),P=f(T*T),M=f(C*C),A=f(M*M),X=f(D*y),ce=f(M*f(X+P)),J=f(A+f(x*f(D*P)));if(ce!==J)throw new Error("bad point: equation left != right (1)");const re=f(F*T),fe=f(C*L);if(re!==fe)throw new Error("bad point: equation left != right (2)");return!0});class m{constructor(y,x,F,T){this.ex=y,this.ey=x,this.ez=F,this.et=T,_("x",y),_("y",x),_("z",F),_("t",T),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(y){if(y instanceof m)throw new Error("extended point not allowed");const{x,y:F}=y||{};return _("x",x),_("y",F),new m(x,F,ne,f(x*F))}static normalizeZ(y){const x=r.invertBatch(y.map(F=>F.ez));return y.map((F,T)=>F.toAffine(x[T])).map(m.fromAffine)}static msm(y,x){return ma(m,b,y,x)}_setWindowSize(y){$.setWindowSize(this,y)}assertValidity(){I(this)}equals(y){R(y);const{ex:x,ey:F,ez:T}=this,{ex:C,ey:L,ez:D}=y,P=f(x*D),M=f(C*T),A=f(F*D),X=f(L*T);return P===M&&A===X}is0(){return this.equals(m.ZERO)}negate(){return new m(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){const{a:y}=t,{ex:x,ey:F,ez:T}=this,C=f(x*x),L=f(F*F),D=f(Bt*f(T*T)),P=f(y*C),M=x+F,A=f(f(M*M)-C-L),X=P+L,ce=X-D,J=P-L,re=f(A*ce),fe=f(X*J),ge=f(A*J),Ae=f(ce*X);return new m(re,fe,Ae,ge)}add(y){R(y);const{a:x,d:F}=t,{ex:T,ey:C,ez:L,et:D}=this,{ex:P,ey:M,ez:A,et:X}=y;if(x===BigInt(-1)){const ct=f((C-T)*(M+P)),ft=f((C+T)*(M-P)),Ke=f(ft-ct);if(Ke===he)return this.double();const lt=f(L*Bt*X),ht=f(D*Bt*A),dt=ht+lt,bt=ft+ct,pt=ht-lt,De=f(dt*Ke),Ze=f(bt*pt),gt=f(dt*pt),oe=f(Ke*bt);return new m(De,Ze,oe,gt)}const ce=f(T*P),J=f(C*M),re=f(D*F*X),fe=f(L*A),ge=f((T+C)*(P+M)-ce-J),Ae=fe-re,Ve=fe+re,Je=f(J-x*ce),zt=f(ge*Ae),Dt=f(Ve*Je),Mt=f(ge*Je),Ht=f(Ae*Ve);return new m(zt,Dt,Ht,Mt)}subtract(y){return this.add(y.negate())}wNAF(y){return $.wNAFCached(this,y,m.normalizeZ)}multiply(y){const x=y;tt("scalar",x,ne,n);const{p:F,f:T}=this.wNAF(x);return m.normalizeZ([F,T])[0]}multiplyUnsafe(y,x=m.ZERO){const F=y;return tt("scalar",F,he,n),F===he?U:this.is0()||F===ne?this:$.wNAFCachedUnsafe(this,F,m.normalizeZ,x)}isSmallOrder(){return this.multiplyUnsafe(u).is0()}isTorsionFree(){return $.unsafeLadder(this,n).is0()}toAffine(y){return j(this,y)}clearCofactor(){const{h:y}=t;return y===ne?this:this.multiplyUnsafe(y)}static fromHex(y,x=!1){const{d:F,a:T}=t,C=r.BYTES;y=xe("pointHex",y,C),Xt("zip215",x);const L=y.slice(),D=y[C-1];L[C-1]=D&-129;const P=Ot(L),M=x?h:r.ORDER;tt("pointHex.y",P,he,M);const A=f(P*P),X=f(A-ne),ce=f(F*A-T);let{isValid:J,value:re}=w(X,ce);if(!J)throw new Error("Point.fromHex: invalid y coordinate");const fe=(re&ne)===ne,ge=(D&128)!==0;if(!x&&re===he&&ge)throw new Error("Point.fromHex: x=0 and x_0=1");return ge!==fe&&(re=f(-re)),m.fromAffine({x:re,y:P})}static fromPrivateKey(y){return W(y).point}toRawBytes(){const{x:y,y:x}=this.toAffine(),F=ar(x,r.BYTES);return F[F.length-1]|=y&ne?128:0,F}toHex(){return mr(this.toRawBytes())}}m.BASE=new m(t.Gx,t.Gy,ne,f(t.Gx*t.Gy)),m.ZERO=new m(he,ne,ne,he);const{BASE:O,ZERO:U}=m,$=wa(m,l*8);function k(E){return K(E,n)}function z(E){return k(Ot(E))}function W(E){const y=r.BYTES;E=xe("private key",E,y);const x=xe("hashed private key",o(E),2*y),F=g(x.slice(0,y)),T=x.slice(y,2*y),C=z(F),L=O.multiply(C),D=L.toRawBytes();return{head:F,prefix:T,scalar:C,point:L,pointBytes:D}}function be(E){return W(E).pointBytes}function pe(E=new Uint8Array,...y){const x=en(...y);return z(o(p(x,xe("context",E),!!i)))}function ue(E,y,x={}){E=xe("message",E),i&&(E=i(E));const{prefix:F,scalar:T,pointBytes:C}=W(y),L=pe(x.context,F,E),D=O.multiply(L).toRawBytes(),P=pe(x.context,D,C,E),M=k(L+P*T);tt("signature.s",M,he,n);const A=en(D,ar(M,r.BYTES));return xe("result",A,r.BYTES*2)}const Ie=xa;function qe(E,y,x,F=Ie){const{context:T,zip215:C}=F,L=r.BYTES;E=xe("signature",E,2*L),y=xe("message",y),x=xe("publicKey",x,L),C!==void 0&&Xt("zip215",C),i&&(y=i(y));const D=Ot(E.slice(L,2*L));let P,M,A;try{P=m.fromHex(x,C),M=m.fromHex(E.slice(0,L),C),A=O.multiplyUnsafe(D)}catch{return!1}if(!C&&P.isSmallOrder())return!1;const X=pe(T,M.toRawBytes(),P.toRawBytes(),y);return M.add(P.multiplyUnsafe(X)).subtract(A).clearCofactor().equals(m.ZERO)}return O._setWindowSize(8),{CURVE:t,getPublicKey:be,sign:ue,verify:qe,ExtendedPoint:m,utils:{getExtendedPublicKey:W,randomPrivateKey:()=>a(r.BYTES),precompute(E=8,y=m.BASE){return y._setWindowSize(E),y.multiply(BigInt(3)),y}}}}BigInt(0),BigInt(1);const _r=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),an=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const Aa=BigInt(1),un=BigInt(2);BigInt(3);const Sa=BigInt(5),Ba=BigInt(8);function Oa(e){const t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),o=_r,a=e*e%o*e%o,l=ye(a,un,o)*a%o,u=ye(l,Aa,o)*e%o,h=ye(u,Sa,o)*u%o,f=ye(h,t,o)*h%o,b=ye(f,r,o)*f%o,w=ye(b,n,o)*b%o,g=ye(w,i,o)*w%o,p=ye(g,i,o)*w%o,_=ye(p,t,o)*h%o;return{pow_p_5_8:ye(_,un,o)*e%o,b2:a}}function Ta(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function Ca(e,t){const r=_r,n=K(t*t*t,r),i=K(n*n*t,r),o=Oa(e*i).pow_p_5_8;let a=K(e*n*o,r);const l=K(t*a*a,r),u=a,h=K(a*an,r),f=l===e,b=l===K(-e,r),w=l===K(-e*an,r);return f&&(a=u),(b||w)&&(a=h),la(a,r)&&(a=K(-a,r)),{isValid:f||b,value:a}}const Ia=Un(_r,void 0,!0),Ra={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:Ia,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:Ba,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:Qs,randomBytes:Cn,adjustScalarBytes:Ta,uvRatio:Ca},Mn=Fa(Ra),La="EdDSA",ja="JWT",It=".",Pt="base64url",Hn="utf8",$n="utf8",Pa=":",Na="did",Ua="key",cn="base58btc",za="z",Da="K36",Ma=32;function xr(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Gn(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?xr(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function kn(e,t){t||(t=e.reduce((i,o)=>i+o.length,0));const r=Gn(t);let n=0;for(const i of e)r.set(i,n),n+=i.length;return xr(r)}function Ha(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),a=o.charCodeAt(0);if(r[a]!==255)throw new TypeError(o+" is ambiguous");r[a]=i}var l=e.length,u=e.charAt(0),h=Math.log(l)/Math.log(256),f=Math.log(256)/Math.log(l);function b(p){if(p instanceof Uint8Array||(ArrayBuffer.isView(p)?p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength):Array.isArray(p)&&(p=Uint8Array.from(p))),!(p instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(p.length===0)return"";for(var _=0,R=0,j=0,I=p.length;j!==I&&p[j]===0;)j++,_++;for(var m=(I-j)*f+1>>>0,O=new Uint8Array(m);j!==I;){for(var U=p[j],$=0,k=m-1;(U!==0||$<R)&&k!==-1;k--,$++)U+=256*O[k]>>>0,O[k]=U%l>>>0,U=U/l>>>0;if(U!==0)throw new Error("Non-zero carry");R=$,j++}for(var z=m-R;z!==m&&O[z]===0;)z++;for(var W=u.repeat(_);z<m;++z)W+=e.charAt(O[z]);return W}function w(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;var _=0;if(p[_]!==" "){for(var R=0,j=0;p[_]===u;)R++,_++;for(var I=(p.length-_)*h+1>>>0,m=new Uint8Array(I);p[_];){var O=r[p.charCodeAt(_)];if(O===255)return;for(var U=0,$=I-1;(O!==0||U<j)&&$!==-1;$--,U++)O+=l*m[$]>>>0,m[$]=O%256>>>0,O=O/256>>>0;if(O!==0)throw new Error("Non-zero carry");j=U,_++}if(p[_]!==" "){for(var k=I-j;k!==I&&m[k]===0;)k++;for(var z=new Uint8Array(R+(I-k)),W=R;k!==I;)z[W++]=m[k++];return z}}}function g(p){var _=w(p);if(_)return _;throw new Error(`Non-${t} character`)}return{encode:b,decodeUnsafe:w,decode:g}}var $a=Ha,Ga=$a;const Wn=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},ka=e=>new TextEncoder().encode(e),Wa=e=>new TextDecoder().decode(e);class qa{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Va{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return qn(this,t)}}class Ja{constructor(t){this.decoders=t}or(t){return qn(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const qn=(e,t)=>new Ja({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Ka{constructor(t,r,n,i){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new qa(t,r,n),this.decoder=new Va(t,r,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const Nt=({name:e,prefix:t,encode:r,decode:n})=>new Ka(e,t,r,n),ut=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=Ga(r,t);return Nt({prefix:e,name:t,encode:n,decode:o=>Wn(i(o))})},Za=(e,t,r,n)=>{const i={};for(let f=0;f<t.length;++f)i[t[f]]=f;let o=e.length;for(;e[o-1]==="=";)--o;const a=new Uint8Array(o*r/8|0);let l=0,u=0,h=0;for(let f=0;f<o;++f){const b=i[e[f]];if(b===void 0)throw new SyntaxError(`Non-${n} character`);u=u<<r|b,l+=r,l>=8&&(l-=8,a[h++]=255&u>>l)}if(l>=r||255&u<<8-l)throw new SyntaxError("Unexpected end of data");return a},Ya=(e,t,r)=>{const n=t[t.length-1]==="=",i=(1<<r)-1;let o="",a=0,l=0;for(let u=0;u<e.length;++u)for(l=l<<8|e[u],a+=8;a>r;)a-=r,o+=t[i&l>>a];if(a&&(o+=t[i&l<<r-a]),n)for(;o.length*r&7;)o+="=";return o},ee=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>Nt({prefix:t,name:e,encode(i){return Ya(i,n,r)},decode(i){return Za(i,n,r,e)}}),Xa=Nt({prefix:"\0",name:"identity",encode:e=>Wa(e),decode:e=>ka(e)});var Qa=Object.freeze({__proto__:null,identity:Xa});const eu=ee({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var tu=Object.freeze({__proto__:null,base2:eu});const ru=ee({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var nu=Object.freeze({__proto__:null,base8:ru});const iu=ut({prefix:"9",name:"base10",alphabet:"0123456789"});var ou=Object.freeze({__proto__:null,base10:iu});const su=ee({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),au=ee({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var uu=Object.freeze({__proto__:null,base16:su,base16upper:au});const cu=ee({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),fu=ee({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),lu=ee({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),hu=ee({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),du=ee({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),bu=ee({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),pu=ee({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),gu=ee({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),yu=ee({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var wu=Object.freeze({__proto__:null,base32:cu,base32upper:fu,base32pad:lu,base32padupper:hu,base32hex:du,base32hexupper:bu,base32hexpad:pu,base32hexpadupper:gu,base32z:yu});const mu=ut({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),vu=ut({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var _u=Object.freeze({__proto__:null,base36:mu,base36upper:vu});const xu=ut({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Eu=ut({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Fu=Object.freeze({__proto__:null,base58btc:xu,base58flickr:Eu});const Au=ee({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Su=ee({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Bu=ee({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ou=ee({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Tu=Object.freeze({__proto__:null,base64:Au,base64pad:Su,base64url:Bu,base64urlpad:Ou});const Vn=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Cu=Vn.reduce((e,t,r)=>(e[r]=t,e),[]),Iu=Vn.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function Ru(e){return e.reduce((t,r)=>(t+=Cu[r],t),"")}function Lu(e){const t=[];for(const r of e){const n=Iu[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const ju=Nt({prefix:"🚀",name:"base256emoji",encode:Ru,decode:Lu});var Pu=Object.freeze({__proto__:null,base256emoji:ju}),Nu=Jn,fn=128,Uu=-128,zu=Math.pow(2,31);function Jn(e,t,r){t=t||[],r=r||0;for(var n=r;e>=zu;)t[r++]=e&255|fn,e/=128;for(;e&Uu;)t[r++]=e&255|fn,e>>>=7;return t[r]=e|0,Jn.bytes=r-n+1,t}var Du=cr,Mu=128,ln=127;function cr(e,n){var r=0,n=n||0,i=0,o=n,a,l=e.length;do{if(o>=l)throw cr.bytes=0,new RangeError("Could not decode varint");a=e[o++],r+=i<28?(a&ln)<<i:(a&ln)*Math.pow(2,i),i+=7}while(a>=Mu);return cr.bytes=o-n,r}var Hu=Math.pow(2,7),$u=Math.pow(2,14),Gu=Math.pow(2,21),ku=Math.pow(2,28),Wu=Math.pow(2,35),qu=Math.pow(2,42),Vu=Math.pow(2,49),Ju=Math.pow(2,56),Ku=Math.pow(2,63),Zu=function(e){return e<Hu?1:e<$u?2:e<Gu?3:e<ku?4:e<Wu?5:e<qu?6:e<Vu?7:e<Ju?8:e<Ku?9:10},Yu={encode:Nu,decode:Du,encodingLength:Zu},Kn=Yu;const hn=(e,t,r=0)=>(Kn.encode(e,t,r),t),dn=e=>Kn.encodingLength(e),fr=(e,t)=>{const r=t.byteLength,n=dn(e),i=n+dn(r),o=new Uint8Array(i+r);return hn(e,o,0),hn(r,o,n),o.set(t,i),new Xu(e,r,t,o)};class Xu{constructor(t,r,n,i){this.code=t,this.size=r,this.digest=n,this.bytes=i}}const Zn=({name:e,code:t,encode:r})=>new Qu(e,t,r);class Qu{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?fr(this.code,r):r.then(n=>fr(this.code,n))}else throw Error("Unknown type, must be binary type")}}const Yn=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),ec=Zn({name:"sha2-256",code:18,encode:Yn("SHA-256")}),tc=Zn({name:"sha2-512",code:19,encode:Yn("SHA-512")});var rc=Object.freeze({__proto__:null,sha256:ec,sha512:tc});const Xn=0,nc="identity",Qn=Wn,ic=e=>fr(Xn,Qn(e)),oc={code:Xn,name:nc,encode:Qn,digest:ic};var sc=Object.freeze({__proto__:null,identity:oc});new TextEncoder,new TextDecoder;const bn={...Qa,...tu,...nu,...ou,...uu,...wu,..._u,...Fu,...Tu,...Pu};({...rc,...sc});function ei(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const pn=ei("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),ir=ei("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=Gn(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),ti={utf8:pn,"utf-8":pn,hex:bn.base16,latin1:ir,ascii:ir,binary:ir,...bn};function Ut(e,t="utf8"){const r=ti[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}function We(e,t="utf8"){const r=ti[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?xr(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}function gn(e){return vs(Ut(We(e,Pt),Hn))}function Rt(e){return Ut(We(_s(e),Hn),Pt)}function ri(e){const t=We(Da,cn),r=za+Ut(kn([t,e]),cn);return[Na,Ua,r].join(Pa)}function ac(e){return Ut(e,Pt)}function uc(e){return We(e,Pt)}function cc(e){return We([Rt(e.header),Rt(e.payload)].join(It),$n)}function fc(e){return[Rt(e.header),Rt(e.payload),ac(e.signature)].join(It)}function lc(e){const t=e.split(It),r=gn(t[0]),n=gn(t[1]),i=uc(t[2]),o=We(t.slice(0,2).join(It),$n);return{header:r,payload:n,signature:i,data:o}}function hc(e=Cn(Ma)){const t=Mn.getPublicKey(e);return{secretKey:kn([e,t]),publicKey:t}}async function dc(e,t,r,n,i=de.cjs.fromMiliseconds(Date.now())){const o={alg:La,typ:ja},a=ri(n.publicKey),l=i+r,u={iss:a,sub:e,aud:t,iat:i,exp:l},h=cc({header:o,payload:u}),f=Mn.sign(h,n.secretKey.slice(0,32));return fc({header:o,payload:u,signature:f})}const bc="PARSE_ERROR",pc="INVALID_REQUEST",gc="METHOD_NOT_FOUND",yc="INVALID_PARAMS",ni="INTERNAL_ERROR",Er="SERVER_ERROR",wc=[-32700,-32600,-32601,-32602,-32603],rt={[bc]:{code:-32700,message:"Parse error"},[pc]:{code:-32600,message:"Invalid Request"},[gc]:{code:-32601,message:"Method not found"},[yc]:{code:-32602,message:"Invalid params"},[ni]:{code:-32603,message:"Internal error"},[Er]:{code:-32e3,message:"Server error"}},ii=Er;function mc(e){return wc.includes(e)}function yn(e){return Object.keys(rt).includes(e)?rt[e]:rt[ii]}function vc(e){const t=Object.values(rt).find(r=>r.code===e);return t||rt[ii]}function _c(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var oi={};/*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */var lr=function(e,t){return lr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},lr(e,t)};function xc(e,t){lr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var hr=function(){return hr=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},hr.apply(this,arguments)};function Ec(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Fc(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function Ac(e,t){return function(r,n){t(r,n,e)}}function Sc(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Bc(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function l(f){try{h(n.next(f))}catch(b){a(b)}}function u(f){try{h(n.throw(f))}catch(b){a(b)}}function h(f){f.done?o(f.value):i(f.value).then(l,u)}h((n=n.apply(e,t||[])).next())})}function Oc(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(h){return function(f){return u([h,f])}}function u(h){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=h[0]&2?i.return:h[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,h[1])).done)return o;switch(i=0,o&&(h=[h[0]&2,o.value]),h[0]){case 0:case 1:o=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,i=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]<o[3])){r.label=h[1];break}if(h[0]===6&&r.label<o[1]){r.label=o[1],o=h;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(h);break}o[2]&&r.ops.pop(),r.trys.pop();continue}h=t.call(e,r)}catch(f){h=[6,f],i=0}finally{n=o=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function Tc(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}function Cc(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function dr(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function si(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){a={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Ic(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(si(arguments[t]));return e}function Rc(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],a=0,l=o.length;a<l;a++,i++)n[i]=o[a];return n}function ot(e){return this instanceof ot?(this.v=e,this):new ot(e)}function Lc(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(w){n[w]&&(i[w]=function(g){return new Promise(function(p,_){o.push([w,g,p,_])>1||l(w,g)})})}function l(w,g){try{u(n[w](g))}catch(p){b(o[0][3],p)}}function u(w){w.value instanceof ot?Promise.resolve(w.value.v).then(h,f):b(o[0][2],w)}function h(w){l("next",w)}function f(w){l("throw",w)}function b(w,g){w(g),o.shift(),o.length&&l(o[0][0],o[0][1])}}function jc(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(a){return(r=!r)?{value:ot(e[i](a)),done:i==="return"}:o?o(a):a}:o}}function Pc(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof dr=="function"?dr(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(l,u){a=e[o](a),i(l,u,a.done,a.value)})}}function i(o,a,l,u){Promise.resolve(u).then(function(h){o({value:h,done:l})},a)}}function Nc(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Uc(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function zc(e){return e&&e.__esModule?e:{default:e}}function Dc(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Mc(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const Hc=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return hr},__asyncDelegator:jc,__asyncGenerator:Lc,__asyncValues:Pc,__await:ot,__awaiter:Bc,__classPrivateFieldGet:Dc,__classPrivateFieldSet:Mc,__createBinding:Tc,__decorate:Fc,__exportStar:Cc,__extends:xc,__generator:Oc,__importDefault:zc,__importStar:Uc,__makeTemplateObject:Nc,__metadata:Sc,__param:Ac,__read:si,__rest:Ec,__spread:Ic,__spreadArrays:Rc,__values:dr},Symbol.toStringTag,{value:"Module"})),$c=V.getAugmentedNamespace(Hc);var Ee={},wn;function Gc(){if(wn)return Ee;wn=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.isBrowserCryptoAvailable=Ee.getSubtleCrypto=Ee.getBrowerCrypto=void 0;function e(){return(V.commonjsGlobal===null||V.commonjsGlobal===void 0?void 0:V.commonjsGlobal.crypto)||(V.commonjsGlobal===null||V.commonjsGlobal===void 0?void 0:V.commonjsGlobal.msCrypto)||{}}Ee.getBrowerCrypto=e;function t(){const n=e();return n.subtle||n.webkitSubtle}Ee.getSubtleCrypto=t;function r(){return!!e()&&!!t()}return Ee.isBrowserCryptoAvailable=r,Ee}var Fe={},mn;function kc(){if(mn)return Fe;mn=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.isBrowser=Fe.isNode=Fe.isReactNative=void 0;function e(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Fe.isReactNative=e;function t(){return typeof V.dist.process<"u"&&typeof V.dist.process.versions<"u"&&typeof V.dist.process.versions.node<"u"}Fe.isNode=t;function r(){return!e()&&!t()}return Fe.isBrowser=r,Fe}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=$c;t.__exportStar(Gc(),e),t.__exportStar(kc(),e)})(oi);function Fr(e=3){const t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function Wc(e=6){return BigInt(Fr(e))}function qc(e,t,r){return{id:r||Fr(),jsonrpc:"2.0",method:e,params:t}}function Vc(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Jc(e,t,r){return{id:e,jsonrpc:"2.0",error:Kc(t)}}function Kc(e,t){return typeof e>"u"?yn(ni):(typeof e=="string"&&(e=Object.assign(Object.assign({},yn(Er)),{message:e})),mc(e.code)&&(e=vc(e.code)),e)}class Zc{}class Yc extends Zc{constructor(){super()}}class Xc extends Yc{constructor(t){super()}}const Qc="^https?:",ef="^wss?:";function tf(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function ai(e,t){const r=tf(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function rf(e){return ai(e,Qc)}function nf(e){return ai(e,ef)}function of(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function ui(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function sf(e){return ui(e)&&"method"in e}function af(e){return ui(e)&&(ci(e)||fi(e))}function ci(e){return"result"in e}function fi(e){return"error"in e}var Lt={exports:{}};Lt.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,l="[object Arguments]",u="[object Array]",h="[object AsyncFunction]",f="[object Boolean]",b="[object Date]",w="[object Error]",g="[object Function]",p="[object GeneratorFunction]",_="[object Map]",R="[object Number]",j="[object Null]",I="[object Object]",m="[object Promise]",O="[object Proxy]",U="[object RegExp]",$="[object Set]",k="[object String]",z="[object Symbol]",W="[object Undefined]",be="[object WeakMap]",pe="[object ArrayBuffer]",ue="[object DataView]",Ie="[object Float32Array]",qe="[object Float64Array]",E="[object Int8Array]",y="[object Int16Array]",x="[object Int32Array]",F="[object Uint8Array]",T="[object Uint8ClampedArray]",C="[object Uint16Array]",L="[object Uint32Array]",D=/[\\^$.*+?()[\]{}|]/g,P=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,A={};A[Ie]=A[qe]=A[E]=A[y]=A[x]=A[F]=A[T]=A[C]=A[L]=!0,A[l]=A[u]=A[pe]=A[f]=A[ue]=A[b]=A[w]=A[g]=A[_]=A[R]=A[I]=A[U]=A[$]=A[k]=A[be]=!1;var X=typeof V.commonjsGlobal=="object"&&V.commonjsGlobal&&V.commonjsGlobal.Object===Object&&V.commonjsGlobal,ce=typeof self=="object"&&self&&self.Object===Object&&self,J=X||ce||Function("return this")(),re=t&&!t.nodeType&&t,fe=re&&!0&&e&&!e.nodeType&&e,ge=fe&&fe.exports===re,Ae=ge&&X.process,Ve=function(){try{return Ae&&Ae.binding&&Ae.binding("util")}catch{}}(),Je=Ve&&Ve.isTypedArray;function zt(s,c){for(var d=-1,v=s==null?0:s.length,N=0,S=[];++d<v;){var G=s[d];c(G,d,s)&&(S[N++]=G)}return S}function Dt(s,c){for(var d=-1,v=c.length,N=s.length;++d<v;)s[N+d]=c[d];return s}function Mt(s,c){for(var d=-1,v=s==null?0:s.length;++d<v;)if(c(s[d],d,s))return!0;return!1}function Ht(s,c){for(var d=-1,v=Array(s);++d<s;)v[d]=c(d);return v}function ct(s){return function(c){return s(c)}}function ft(s,c){return s.has(c)}function Ke(s,c){return s==null?void 0:s[c]}function lt(s){var c=-1,d=Array(s.size);return s.forEach(function(v,N){d[++c]=[N,v]}),d}function ht(s,c){return function(d){return s(c(d))}}function dt(s){var c=-1,d=Array(s.size);return s.forEach(function(v){d[++c]=v}),d}var bt=Array.prototype,pt=Function.prototype,De=Object.prototype,Ze=J["__core-js_shared__"],gt=pt.toString,oe=De.hasOwnProperty,Ar=function(){var s=/[^.]+$/.exec(Ze&&Ze.keys&&Ze.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),Sr=De.toString,li=RegExp("^"+gt.call(oe).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Br=ge?J.Buffer:void 0,yt=J.Symbol,Or=J.Uint8Array,Tr=De.propertyIsEnumerable,hi=bt.splice,Re=yt?yt.toStringTag:void 0,Cr=Object.getOwnPropertySymbols,di=Br?Br.isBuffer:void 0,bi=ht(Object.keys,Object),$t=Me(J,"DataView"),Ye=Me(J,"Map"),Gt=Me(J,"Promise"),kt=Me(J,"Set"),Wt=Me(J,"WeakMap"),Xe=Me(Object,"create"),pi=Pe($t),gi=Pe(Ye),yi=Pe(Gt),wi=Pe(kt),mi=Pe(Wt),Ir=yt?yt.prototype:void 0,qt=Ir?Ir.valueOf:void 0;function Le(s){var c=-1,d=s==null?0:s.length;for(this.clear();++c<d;){var v=s[c];this.set(v[0],v[1])}}function vi(){this.__data__=Xe?Xe(null):{},this.size=0}function _i(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}function xi(s){var c=this.__data__;if(Xe){var d=c[s];return d===n?void 0:d}return oe.call(c,s)?c[s]:void 0}function Ei(s){var c=this.__data__;return Xe?c[s]!==void 0:oe.call(c,s)}function Fi(s,c){var d=this.__data__;return this.size+=this.has(s)?0:1,d[s]=Xe&&c===void 0?n:c,this}Le.prototype.clear=vi,Le.prototype.delete=_i,Le.prototype.get=xi,Le.prototype.has=Ei,Le.prototype.set=Fi;function me(s){var c=-1,d=s==null?0:s.length;for(this.clear();++c<d;){var v=s[c];this.set(v[0],v[1])}}function Ai(){this.__data__=[],this.size=0}function Si(s){var c=this.__data__,d=mt(c,s);if(d<0)return!1;var v=c.length-1;return d==v?c.pop():hi.call(c,d,1),--this.size,!0}function Bi(s){var c=this.__data__,d=mt(c,s);return d<0?void 0:c[d][1]}function Oi(s){return mt(this.__data__,s)>-1}function Ti(s,c){var d=this.__data__,v=mt(d,s);return v<0?(++this.size,d.push([s,c])):d[v][1]=c,this}me.prototype.clear=Ai,me.prototype.delete=Si,me.prototype.get=Bi,me.prototype.has=Oi,me.prototype.set=Ti;function je(s){var c=-1,d=s==null?0:s.length;for(this.clear();++c<d;){var v=s[c];this.set(v[0],v[1])}}function Ci(){this.size=0,this.__data__={hash:new Le,map:new(Ye||me),string:new Le}}function Ii(s){var c=vt(this,s).delete(s);return this.size-=c?1:0,c}function Ri(s){return vt(this,s).get(s)}function Li(s){return vt(this,s).has(s)}function ji(s,c){var d=vt(this,s),v=d.size;return d.set(s,c),this.size+=d.size==v?0:1,this}je.prototype.clear=Ci,je.prototype.delete=Ii,je.prototype.get=Ri,je.prototype.has=Li,je.prototype.set=ji;function wt(s){var c=-1,d=s==null?0:s.length;for(this.__data__=new je;++c<d;)this.add(s[c])}function Pi(s){return this.__data__.set(s,n),this}function Ni(s){return this.__data__.has(s)}wt.prototype.add=wt.prototype.push=Pi,wt.prototype.has=Ni;function Se(s){var c=this.__data__=new me(s);this.size=c.size}function Ui(){this.__data__=new me,this.size=0}function zi(s){var c=this.__data__,d=c.delete(s);return this.size=c.size,d}function Di(s){return this.__data__.get(s)}function Mi(s){return this.__data__.has(s)}function Hi(s,c){var d=this.__data__;if(d instanceof me){var v=d.__data__;if(!Ye||v.length<r-1)return v.push([s,c]),this.size=++d.size,this;d=this.__data__=new je(v)}return d.set(s,c),this.size=d.size,this}Se.prototype.clear=Ui,Se.prototype.delete=zi,Se.prototype.get=Di,Se.prototype.has=Mi,Se.prototype.set=Hi;function $i(s,c){var d=_t(s),v=!d&&no(s),N=!d&&!v&&Vt(s),S=!d&&!v&&!N&&Mr(s),G=d||v||N||S,Z=G?Ht(s.length,String):[],Q=Z.length;for(var H in s)oe.call(s,H)&&!(G&&(H=="length"||N&&(H=="offset"||H=="parent")||S&&(H=="buffer"||H=="byteLength"||H=="byteOffset")||Xi(H,Q)))&&Z.push(H);return Z}function mt(s,c){for(var d=s.length;d--;)if(Nr(s[d][0],c))return d;return-1}function Gi(s,c,d){var v=c(s);return _t(s)?v:Dt(v,d(s))}function Qe(s){return s==null?s===void 0?W:j:Re&&Re in Object(s)?Zi(s):ro(s)}function Rr(s){return et(s)&&Qe(s)==l}function Lr(s,c,d,v,N){return s===c?!0:s==null||c==null||!et(s)&&!et(c)?s!==s&&c!==c:ki(s,c,d,v,Lr,N)}function ki(s,c,d,v,N,S){var G=_t(s),Z=_t(c),Q=G?u:Be(s),H=Z?u:Be(c);Q=Q==l?I:Q,H=H==l?I:H;var ie=Q==I,le=H==I,te=Q==H;if(te&&Vt(s)){if(!Vt(c))return!1;G=!0,ie=!1}if(te&&!ie)return S||(S=new Se),G||Mr(s)?jr(s,c,d,v,N,S):Ji(s,c,Q,d,v,N,S);if(!(d&i)){var se=ie&&oe.call(s,"__wrapped__"),ae=le&&oe.call(c,"__wrapped__");if(se||ae){var Oe=se?s.value():s,ve=ae?c.value():c;return S||(S=new Se),N(Oe,ve,d,v,S)}}return te?(S||(S=new Se),Ki(s,c,d,v,N,S)):!1}function Wi(s){if(!Dr(s)||eo(s))return!1;var c=Ur(s)?li:P;return c.test(Pe(s))}function qi(s){return et(s)&&zr(s.length)&&!!A[Qe(s)]}function Vi(s){if(!to(s))return bi(s);var c=[];for(var d in Object(s))oe.call(s,d)&&d!="constructor"&&c.push(d);return c}function jr(s,c,d,v,N,S){var G=d&i,Z=s.length,Q=c.length;if(Z!=Q&&!(G&&Q>Z))return!1;var H=S.get(s);if(H&&S.get(c))return H==c;var ie=-1,le=!0,te=d&o?new wt:void 0;for(S.set(s,c),S.set(c,s);++ie<Z;){var se=s[ie],ae=c[ie];if(v)var Oe=G?v(ae,se,ie,c,s,S):v(se,ae,ie,s,c,S);if(Oe!==void 0){if(Oe)continue;le=!1;break}if(te){if(!Mt(c,function(ve,Ne){if(!ft(te,Ne)&&(se===ve||N(se,ve,d,v,S)))return te.push(Ne)})){le=!1;break}}else if(!(se===ae||N(se,ae,d,v,S))){le=!1;break}}return S.delete(s),S.delete(c),le}function Ji(s,c,d,v,N,S,G){switch(d){case ue:if(s.byteLength!=c.byteLength||s.byteOffset!=c.byteOffset)return!1;s=s.buffer,c=c.buffer;case pe:return!(s.byteLength!=c.byteLength||!S(new Or(s),new Or(c)));case f:case b:case R:return Nr(+s,+c);case w:return s.name==c.name&&s.message==c.message;case U:case k:return s==c+"";case _:var Z=lt;case $:var Q=v&i;if(Z||(Z=dt),s.size!=c.size&&!Q)return!1;var H=G.get(s);if(H)return H==c;v|=o,G.set(s,c);var ie=jr(Z(s),Z(c),v,N,S,G);return G.delete(s),ie;case z:if(qt)return qt.call(s)==qt.call(c)}return!1}function Ki(s,c,d,v,N,S){var G=d&i,Z=Pr(s),Q=Z.length,H=Pr(c),ie=H.length;if(Q!=ie&&!G)return!1;for(var le=Q;le--;){var te=Z[le];if(!(G?te in c:oe.call(c,te)))return!1}var se=S.get(s);if(se&&S.get(c))return se==c;var ae=!0;S.set(s,c),S.set(c,s);for(var Oe=G;++le<Q;){te=Z[le];var ve=s[te],Ne=c[te];if(v)var Hr=G?v(Ne,ve,te,c,s,S):v(ve,Ne,te,s,c,S);if(!(Hr===void 0?ve===Ne||N(ve,Ne,d,v,S):Hr)){ae=!1;break}Oe||(Oe=te=="constructor")}if(ae&&!Oe){var xt=s.constructor,Et=c.constructor;xt!=Et&&"constructor"in s&&"constructor"in c&&!(typeof xt=="function"&&xt instanceof xt&&typeof Et=="function"&&Et instanceof Et)&&(ae=!1)}return S.delete(s),S.delete(c),ae}function Pr(s){return Gi(s,so,Yi)}function vt(s,c){var d=s.__data__;return Qi(c)?d[typeof c=="string"?"string":"hash"]:d.map}function Me(s,c){var d=Ke(s,c);return Wi(d)?d:void 0}function Zi(s){var c=oe.call(s,Re),d=s[Re];try{s[Re]=void 0;var v=!0}catch{}var N=Sr.call(s);return v&&(c?s[Re]=d:delete s[Re]),N}var Yi=Cr?function(s){return s==null?[]:(s=Object(s),zt(Cr(s),function(c){return Tr.call(s,c)}))}:ao,Be=Qe;($t&&Be(new $t(new ArrayBuffer(1)))!=ue||Ye&&Be(new Ye)!=_||Gt&&Be(Gt.resolve())!=m||kt&&Be(new kt)!=$||Wt&&Be(new Wt)!=be)&&(Be=function(s){var c=Qe(s),d=c==I?s.constructor:void 0,v=d?Pe(d):"";if(v)switch(v){case pi:return ue;case gi:return _;case yi:return m;case wi:return $;case mi:return be}return c});function Xi(s,c){return c=c??a,!!c&&(typeof s=="number"||M.test(s))&&s>-1&&s%1==0&&s<c}function Qi(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}function eo(s){return!!Ar&&Ar in s}function to(s){var c=s&&s.constructor,d=typeof c=="function"&&c.prototype||De;return s===d}function ro(s){return Sr.call(s)}function Pe(s){if(s!=null){try{return gt.call(s)}catch{}try{return s+""}catch{}}return""}function Nr(s,c){return s===c||s!==s&&c!==c}var no=Rr(function(){return arguments}())?Rr:function(s){return et(s)&&oe.call(s,"callee")&&!Tr.call(s,"callee")},_t=Array.isArray;function io(s){return s!=null&&zr(s.length)&&!Ur(s)}var Vt=di||uo;function oo(s,c){return Lr(s,c)}function Ur(s){if(!Dr(s))return!1;var c=Qe(s);return c==g||c==p||c==h||c==O}function zr(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=a}function Dr(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function et(s){return s!=null&&typeof s=="object"}var Mr=Je?ct(Je):qi;function so(s){return io(s)?$i(s):Vi(s)}function ao(){return[]}function uo(){return!1}e.exports=oo})(Lt,Lt.exports);var uf=Lt.exports;const cf=V.getDefaultExportFromCjs(uf);exports.A=ys;exports.C=Bo;exports.E=bs;exports.IEvents=Mo;exports.Po=hc;exports.Qe=ri;exports.Qo=dc;exports.Tt=br;exports._s=cf;exports.cjs=oi;exports.clear=Uo;exports.concat=co;exports.createStore=En;exports.del=No;exports.destr=Lo;exports.detect=_o;exports.formatJsonRpcError=Jc;exports.formatJsonRpcRequest=qc;exports.formatJsonRpcResult=Vc;exports.fromString=fo;exports.get=jo;exports.getBigIntRpcId=Wc;exports.isHttpUrl=rf;exports.isJsonRpcError=fi;exports.isJsonRpcRequest=sf;exports.isJsonRpcResponse=af;exports.isJsonRpcResult=ci;exports.isLocalhostUrl=of;exports.isWsUrl=nf;exports.k=fs;exports.keys=Do;exports.parseConnectionError=_c;exports.payloadId=Fr;exports.r=Xc;exports.set=Po;exports.sn=lc;exports.toString=lo;exports.y=Bn;