@wormhole-foundation/wormhole-connect 2.0.0-beta.0-development → 2.0.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 (126) hide show
  1. package/dist/assets/{aptos-gRn0txr9.js → aptos-CvRULtpx.js} +61 -61
  2. package/dist/assets/aptos-D4y7Fo3S.js +3 -0
  3. package/dist/assets/{chunk-OR6GFWLG-Ci0TYwIQ.js → chunk-OR6GFWLG-BZrmB1_W.js} +1 -1
  4. package/dist/assets/evm-K2ASlzX-.js +2 -0
  5. package/dist/assets/{index-CTtLxavV.js → index-AaqmNOLf.js} +1 -1
  6. package/dist/assets/index-BLpnEfNA.js +1 -0
  7. package/dist/assets/{index-DtASoatx.js → index-BTnVHgr_.js} +1 -1
  8. package/dist/assets/{index-Cf10mHc-.js → index-BpWlJX3r.js} +1 -1
  9. package/dist/assets/{index-DTCth0iO.js → index-C1mpuWJz.js} +1 -1
  10. package/dist/assets/{index-cfzEp_CP.js → index-C1yBHw3e.js} +1 -1
  11. package/dist/assets/{index-Dwk61kXP.js → index-CEjbqPmT.js} +1 -1
  12. package/dist/assets/{index-BZKNZDak.js → index-CZHHMApS.js} +1 -1
  13. package/dist/assets/{index-Cm_KjDDY.js → index-QLnl5sO1.js} +1 -1
  14. package/dist/assets/{index-D7CrUmY0.js → index-_NuAK6zi.js} +1 -1
  15. package/dist/assets/index-rryJGGTI.js +1 -0
  16. package/dist/assets/{signer-BaParnK7.js → signer-dWGaM-mu.js} +1 -1
  17. package/dist/assets/{solana-5w7FFw9J.js → solana-D2tTKYdq.js} +1 -1
  18. package/dist/assets/solana-UIzLk1Ne.js +2 -0
  19. package/dist/assets/{sui-DaosOePU.js → sui-DVNvuW-l.js} +4 -4
  20. package/dist/assets/unsignedTransaction-DsxtoHjl.js +1 -0
  21. package/dist/main.js +100 -100
  22. package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
  23. package/dist/src/config/testnet/tokens.d.ts.map +1 -1
  24. package/dist/src/config/utils.d.ts.map +1 -1
  25. package/dist/src/hooks/useWalletCompatibility.d.ts +14 -0
  26. package/dist/src/hooks/useWalletCompatibility.d.ts.map +1 -0
  27. package/dist/src/utils/index.d.ts +1 -1
  28. package/dist/src/utils/index.d.ts.map +1 -1
  29. package/dist/src/utils/wallet/aptos.d.ts.map +1 -1
  30. package/dist/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
  31. package/dist/src/views/v2/Bridge/index.d.ts.map +1 -1
  32. package/lib/{aptos-G95l4D5Y.mjs → aptos-B3TWiavl.mjs} +59 -57
  33. package/lib/aptos-DTHJQbIb.js +2 -0
  34. package/lib/{aptos-CAZnfR2B.js → aptos-Dbfuz96f.js} +9 -9
  35. package/lib/{aptos-VlcdOXIs.mjs → aptos-KMTKpvnn.mjs} +1229 -1228
  36. package/lib/{base64-DScLQWIJ.js → base64-Ci4lr2or.js} +1 -1
  37. package/lib/{base64-SRM73VOK.mjs → base64-D-sBGnCV.mjs} +1 -1
  38. package/lib/{ccip-CwCUSl64.js → ccip-CBfsTddJ.js} +1 -1
  39. package/lib/{ccip-ZQo50dYX.mjs → ccip-IV8wn7mX.mjs} +1 -1
  40. package/lib/{chunk-OR6GFWLG-oZZxBIBy.js → chunk-OR6GFWLG-CFPMvzOj.js} +5 -5
  41. package/lib/{chunk-OR6GFWLG-qW5dukvV.mjs → chunk-OR6GFWLG-m97dlZZV.mjs} +6 -3
  42. package/lib/{events-uBYsqfrl.js → events-CjPLRE-d.js} +1 -1
  43. package/lib/{events-Dgn4K9rN.mjs → events-Dtbo0st9.mjs} +1 -1
  44. package/lib/{evm-CgSzbeCb.js → evm-BFBdsLYZ.js} +3 -3
  45. package/lib/{evm-Cocl1Qx2.js → evm-DuCtpTHQ.js} +1 -1
  46. package/lib/{evm-D5LTDUcP.mjs → evm-JbOZ35C0.mjs} +5 -5
  47. package/lib/{evm-BM1jPLwl.mjs → evm-kkjU8AsQ.mjs} +6 -6
  48. package/lib/{index-DU3Jxks1.js → index-B0lJ-tdN.js} +1 -1
  49. package/lib/{index-CjYsC-nW.js → index-B1ELgSA6.js} +1 -1
  50. package/lib/{index-C9mu4l7o.mjs → index-B2h28IP4.mjs} +2 -2
  51. package/lib/{index-DXcVEr2U.mjs → index-B3CeIlMx.mjs} +25135 -25063
  52. package/lib/{index-xZ5vsuO7.js → index-B4_J2HAU.js} +1 -1
  53. package/lib/{index-i8-I-Kx6.mjs → index-BE5ihayy.mjs} +2 -2
  54. package/lib/{index-CXFBf2VR.mjs → index-BL5dRh07.mjs} +2 -2
  55. package/lib/{index-TdVwI_k_.js → index-BasVT8K7.js} +1 -1
  56. package/lib/{index-a-G25ciF.js → index-BdUX86K5.js} +1 -1
  57. package/lib/{index-BWgeRtvV.mjs → index-Bo9bOQTx.mjs} +1 -1
  58. package/lib/{index-C9_Xqcp_.mjs → index-BoYglZwX.mjs} +38 -38
  59. package/lib/{index-DgaACuCq.js → index-Br4OTc1S.js} +154 -154
  60. package/lib/{index-D8yrwfK5.mjs → index-CM5aJCsU.mjs} +3 -3
  61. package/lib/{index-BLwbqj4f.js → index-CS3m8qJT.js} +1 -1
  62. package/lib/{index-DZz_hUYe.mjs → index-CWSjFjhh.mjs} +48 -57
  63. package/lib/{index-tT8fg8Q5.mjs → index-CfVm24rf.mjs} +22 -22
  64. package/lib/{index-DaLPPso5.mjs → index-D2v_ZH9c.mjs} +2 -2
  65. package/lib/{index-BCi7GitD.mjs → index-D9NMKVsX.mjs} +2 -2
  66. package/lib/{index-DRZXoRVn.mjs → index-DCfPCVGM.mjs} +7 -7
  67. package/lib/{index-DuM5_evN.mjs → index-DFDFr1Hv.mjs} +8 -8
  68. package/lib/{index-B6JrPvDW.mjs → index-DL2KYGb2.mjs} +1 -1
  69. package/lib/{index-CZ8GDYHq.js → index-DLegUdzU.js} +1 -1
  70. package/lib/{index-Cu6RQt8e.js → index-DNNfs5Ot.js} +1 -1
  71. package/lib/{index-CCDkkZN6.js → index-DPlTznQs.js} +1 -1
  72. package/lib/index-DUrL3GHD.mjs +102 -0
  73. package/lib/{index-CoDv0EFX.mjs → index-DWTXe9yU.mjs} +4 -4
  74. package/lib/{index-CffsvCdp.js → index-DcKePNaA.js} +1 -1
  75. package/lib/{index-3VUjPBnj.js → index-DlMM2TKj.js} +1 -1
  76. package/lib/index-DmkA2z4q.js +1 -0
  77. package/lib/{index-JaS46BVB.js → index-DtJ3gwwu.js} +1 -1
  78. package/lib/{index-C_045fAm.js → index-Dy3WJQ-h.js} +1 -1
  79. package/lib/{index-DBJPUF0X.js → index-DzgnqJ7-.js} +1 -1
  80. package/lib/{index-aw5kQCwX.mjs → index-HF2DcpAR.mjs} +2 -2
  81. package/lib/{index-DPacNsBv.mjs → index-IbmfT3Tg.mjs} +5 -5
  82. package/lib/{index-DY59SYJT.mjs → index-MdL7XQBR.mjs} +1 -1
  83. package/lib/index-QzouONBY.js +1 -0
  84. package/lib/{index-BpHM17iv.js → index-SrHywpn-.js} +1 -1
  85. package/lib/{index-SzAoRhpC.js → index-gUz3Q8gE.js} +1 -1
  86. package/lib/{index-BERVkvac.js → index-pi5LLTZ3.js} +1 -1
  87. package/lib/{index-CusHYtsc.mjs → index-vlui53ey.mjs} +2 -2
  88. package/lib/{index.es-c-VQ7iU7.js → index.es-DFpbuPuY.js} +2 -2
  89. package/lib/{index.es-CfDkO3SA.mjs → index.es-SaEPft-i.mjs} +6 -6
  90. package/lib/index.js +1 -1
  91. package/lib/index.mjs +1 -1
  92. package/lib/{signer-Uy7DwUiY.js → signer-CeSFiipD.js} +1 -1
  93. package/lib/{signer-CsSNNgXY.mjs → signer-RSvbDa7c.mjs} +19 -19
  94. package/lib/solana-Bwjjv4LB.js +1 -0
  95. package/lib/{solana-D8Z8oyUb.mjs → solana-ClVJj67l.mjs} +4 -4
  96. package/lib/solana-DmG1qAvz.mjs +16 -0
  97. package/lib/{solana-CnbQnU0Q.js → solana-DwgjV-W7.js} +1 -1
  98. package/lib/{solanaEmbed.esm-CnTsBpfN.mjs → solanaEmbed.esm-Cu2iyuQy.mjs} +959 -959
  99. package/lib/{solanaEmbed.esm-BMN20IzZ.js → solanaEmbed.esm-DY919Dj0.js} +1 -1
  100. package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
  101. package/lib/src/config/testnet/tokens.d.ts.map +1 -1
  102. package/lib/src/config/utils.d.ts.map +1 -1
  103. package/lib/src/hooks/useWalletCompatibility.d.ts +14 -0
  104. package/lib/src/hooks/useWalletCompatibility.d.ts.map +1 -0
  105. package/lib/src/utils/index.d.ts +1 -1
  106. package/lib/src/utils/index.d.ts.map +1 -1
  107. package/lib/src/utils/wallet/aptos.d.ts.map +1 -1
  108. package/lib/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
  109. package/lib/src/views/v2/Bridge/index.d.ts.map +1 -1
  110. package/lib/{sui-CkzAXofi.js → sui-BzgBbOVR.js} +2 -2
  111. package/lib/{sui-a-MPtxai.js → sui-C0CqiXaB.js} +1 -1
  112. package/lib/{sui-0upbYB1a.mjs → sui-CIBoUTGj.mjs} +1 -1
  113. package/lib/{sui-Dl3Uvu88.mjs → sui-D1lxvss1.mjs} +5 -5
  114. package/lib/unsignedTransaction-BDOQhqcZ.mjs +16 -0
  115. package/lib/unsignedTransaction-C1YeEl4G.js +1 -0
  116. package/lib/{utf8-YN1IXfNg.mjs → utf8-BZ7GX1-B.mjs} +1 -1
  117. package/lib/{utf8-PS_55WKJ.js → utf8-CQNNfvVV.js} +1 -1
  118. package/package.json +18 -18
  119. package/dist/assets/aptos-Ycl2eNjD.js +0 -3
  120. package/dist/assets/evm-ETvgEF-D.js +0 -2
  121. package/dist/assets/index-_2IpGxfE.js +0 -1
  122. package/dist/assets/solana-u2eYUt3V.js +0 -2
  123. package/lib/aptos-Ck1Sf3c1.js +0 -2
  124. package/lib/index-BgSe6vZM.js +0 -1
  125. package/lib/solana-Doh_jgqw.mjs +0 -16
  126. package/lib/solana-M-G4laS9.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";const k=require("./index-DgaACuCq.js"),De=require("./index-CffsvCdp.js");function $n(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function Hn(e,n){n||(n=e.reduce((o,d)=>o+d.length,0));const r=$n(n);let f=0;for(const o of e)r.set(o,f),f+=o.length;return r}const vn={...De.identityBase,...De.base2,...De.base8,...De.base10,...De.base16,...De.base32,...De.base36,...De.base58,...De.base64,...De.base256emoji};function Gn(e,n,r,f){return{name:e,prefix:n,encoder:{name:e,prefix:n,encode:r},decoder:{decode:f}}}const Sn=Gn("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),qt=Gn("ascii","a",e=>{let n="a";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return n},e=>{e=e.substring(1);const n=$n(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}),Wn={utf8:Sn,"utf-8":Sn,hex:vn.base16,latin1:qt,ascii:qt,binary:qt,...vn};function ht(e,n="utf8"){const r=Wn[n];if(!r)throw new Error(`Unsupported encoding "${n}"`);return(n==="utf8"||n==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}function At(e,n="utf8"){const r=Wn[n];if(!r)throw new Error(`Unsupported encoding "${n}"`);return(n==="utf8"||n==="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 En=function(e,n,r){if(r||arguments.length===2)for(var f=0,o=n.length,d;f<o;f++)(d||!(f in n))&&(d||(d=Array.prototype.slice.call(n,0,f)),d[f]=n[f]);return e.concat(d||Array.prototype.slice.call(n))},qr=function(){function e(n,r,f){this.name=n,this.version=r,this.os=f,this.type="browser"}return e}(),Zr=function(){function e(n){this.version=n,this.type="node",this.name="node",this.os=k.dist.process.platform}return e}(),Qr=function(){function e(n,r,f,o){this.name=n,this.version=r,this.os=f,this.bot=o,this.type="bot-device"}return e}(),ei=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),ti=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),ni=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,ri=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,In=3,ii=[["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",ni]],On=[["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 si(e){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new ti:typeof navigator<"u"?ai(navigator.userAgent):ci()}function oi(e){return e!==""&&ii.reduce(function(n,r){var f=r[0],o=r[1];if(n)return n;var d=o.exec(e);return!!d&&[f,d]},!1)}function ai(e){var n=oi(e);if(!n)return null;var r=n[0],f=n[1];if(r==="searchbot")return new ei;var o=f[1]&&f[1].split(".").join("_").split("_").slice(0,3);o?o.length<In&&(o=En(En([],o,!0),ui(In-o.length),!0)):o=[];var d=o.join("."),E=fi(e),S=ri.exec(e);return S&&S[1]?new Qr(r,d,E,S[1]):new qr(r,d,E)}function fi(e){for(var n=0,r=On.length;n<r;n++){var f=On[n],o=f[0],d=f[1],E=d.exec(e);if(E)return o}return null}function ci(){var e=typeof k.dist.process<"u"&&k.dist.process.version;return e?new Zr(k.dist.process.version.slice(1)):null}function ui(e){for(var n=[],r=0;r<e;r++)n.push("0");return n}const li={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"}},di=/"(?:_|\\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*:/,hi=/"(?: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*:/,bi=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function gi(e,n){if(e==="__proto__"||e==="constructor"&&n&&typeof n=="object"&&"prototype"in n){yi(e);return}return n}function yi(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function zt(e,n={}){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 f=r.toLowerCase();if(f==="true")return!0;if(f==="false")return!1;if(f==="undefined")return;if(f==="null")return null;if(f==="nan")return Number.NaN;if(f==="infinity")return Number.POSITIVE_INFINITY;if(f==="-infinity")return Number.NEGATIVE_INFINITY}if(!bi.test(e)){if(n.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(di.test(e)||hi.test(e)){if(n.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,gi)}return JSON.parse(e)}catch(f){if(n.strict)throw f;return e}}function pi(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Te(e,...n){try{return pi(e(...n))}catch(r){return Promise.reject(r)}}function _i(e){const n=typeof e;return e===null||n!=="object"&&n!=="function"}function mi(e){const n=Object.getPrototypeOf(e);return!n||n.isPrototypeOf(Object)}function $t(e){if(_i(e))return String(e);if(mi(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON=="function")return $t(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const tn="base64:";function xi(e){return typeof e=="string"?e:tn+Si(e)}function wi(e){return typeof e!="string"||!e.startsWith(tn)?e:vi(e.slice(tn.length))}function vi(e){return globalThis.Buffer?k.dist.Buffer.from(e,"base64"):Uint8Array.from(globalThis.atob(e),n=>n.codePointAt(0))}function Si(e){return globalThis.Buffer?k.dist.Buffer.from(e).toString("base64"):globalThis.btoa(String.fromCodePoint(...e))}function Ue(e){var n;return e&&((n=e.split("?")[0])==null?void 0:n.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function Ei(...e){return Ue(e.join(":"))}function Kt(e){return e=Ue(e),e?e+":":""}const Ii="memory",Oi=()=>{const e=new Map;return{name:Ii,getInstance:()=>e,hasItem(n){return e.has(n)},getItem(n){return e.get(n)??null},getItemRaw(n){return e.get(n)??null},setItem(n,r){e.set(n,r)},setItemRaw(n,r){e.set(n,r)},removeItem(n){e.delete(n)},getKeys(){return[...e.keys()]},clear(){e.clear()},dispose(){e.clear()}}};function Ti(e={}){const n={mounts:{"":e.driver||Oi()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=s=>{for(const u of n.mountpoints)if(s.startsWith(u))return{base:u,relativeKey:s.slice(u.length),driver:n.mounts[u]};return{base:"",relativeKey:s,driver:n.mounts[""]}},f=(s,u)=>n.mountpoints.filter(y=>y.startsWith(s)||u&&s.startsWith(y)).map(y=>({relativeBase:s.length>y.length?s.slice(y.length):void 0,mountpoint:y,driver:n.mounts[y]})),o=(s,u)=>{if(n.watching){u=Ue(u);for(const y of n.watchListeners)y(s,u)}},d=async()=>{if(!n.watching){n.watching=!0;for(const s in n.mounts)n.unwatch[s]=await Tn(n.mounts[s],o,s)}},E=async()=>{if(n.watching){for(const s in n.unwatch)await n.unwatch[s]();n.unwatch={},n.watching=!1}},S=(s,u,y)=>{const v=new Map,w=x=>{let j=v.get(x.base);return j||(j={driver:x.driver,base:x.base,items:[]},v.set(x.base,j)),j};for(const x of s){const j=typeof x=="string",H=Ue(j?x:x.key),ue=j?void 0:x.value,M=j||!x.options?u:{...u,...x.options},Ae=r(H);w(Ae).items.push({key:H,value:ue,relativeKey:Ae.relativeKey,options:M})}return Promise.all([...v.values()].map(x=>y(x))).then(x=>x.flat())},g={hasItem(s,u={}){s=Ue(s);const{relativeKey:y,driver:v}=r(s);return Te(v.hasItem,y,u)},getItem(s,u={}){s=Ue(s);const{relativeKey:y,driver:v}=r(s);return Te(v.getItem,y,u).then(w=>zt(w))},getItems(s,u={}){return S(s,u,y=>y.driver.getItems?Te(y.driver.getItems,y.items.map(v=>({key:v.relativeKey,options:v.options})),u).then(v=>v.map(w=>({key:Ei(y.base,w.key),value:zt(w.value)}))):Promise.all(y.items.map(v=>Te(y.driver.getItem,v.relativeKey,v.options).then(w=>({key:v.key,value:zt(w)})))))},getItemRaw(s,u={}){s=Ue(s);const{relativeKey:y,driver:v}=r(s);return v.getItemRaw?Te(v.getItemRaw,y,u):Te(v.getItem,y,u).then(w=>wi(w))},async setItem(s,u,y={}){if(u===void 0)return g.removeItem(s);s=Ue(s);const{relativeKey:v,driver:w}=r(s);w.setItem&&(await Te(w.setItem,v,$t(u),y),w.watch||o("update",s))},async setItems(s,u){await S(s,u,async y=>{if(y.driver.setItems)return Te(y.driver.setItems,y.items.map(v=>({key:v.relativeKey,value:$t(v.value),options:v.options})),u);y.driver.setItem&&await Promise.all(y.items.map(v=>Te(y.driver.setItem,v.relativeKey,$t(v.value),v.options)))})},async setItemRaw(s,u,y={}){if(u===void 0)return g.removeItem(s,y);s=Ue(s);const{relativeKey:v,driver:w}=r(s);if(w.setItemRaw)await Te(w.setItemRaw,v,u,y);else if(w.setItem)await Te(w.setItem,v,xi(u),y);else return;w.watch||o("update",s)},async removeItem(s,u={}){typeof u=="boolean"&&(u={removeMeta:u}),s=Ue(s);const{relativeKey:y,driver:v}=r(s);v.removeItem&&(await Te(v.removeItem,y,u),(u.removeMeta||u.removeMata)&&await Te(v.removeItem,y+"$",u),v.watch||o("remove",s))},async getMeta(s,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),s=Ue(s);const{relativeKey:y,driver:v}=r(s),w=Object.create(null);if(v.getMeta&&Object.assign(w,await Te(v.getMeta,y,u)),!u.nativeOnly){const x=await Te(v.getItem,y+"$",u).then(j=>zt(j));x&&typeof x=="object"&&(typeof x.atime=="string"&&(x.atime=new Date(x.atime)),typeof x.mtime=="string"&&(x.mtime=new Date(x.mtime)),Object.assign(w,x))}return w},setMeta(s,u,y={}){return this.setItem(s+"$",u,y)},removeMeta(s,u={}){return this.removeItem(s+"$",u)},async getKeys(s,u={}){s=Kt(s);const y=f(s,!0);let v=[];const w=[];for(const x of y){const j=await Te(x.driver.getKeys,x.relativeBase,u);for(const H of j){const ue=x.mountpoint+Ue(H);v.some(M=>ue.startsWith(M))||w.push(ue)}v=[x.mountpoint,...v.filter(H=>!H.startsWith(x.mountpoint))]}return s?w.filter(x=>x.startsWith(s)&&x[x.length-1]!=="$"):w.filter(x=>x[x.length-1]!=="$")},async clear(s,u={}){s=Kt(s),await Promise.all(f(s,!1).map(async y=>{if(y.driver.clear)return Te(y.driver.clear,y.relativeBase,u);if(y.driver.removeItem){const v=await y.driver.getKeys(y.relativeBase||"",u);return Promise.all(v.map(w=>y.driver.removeItem(w,u)))}}))},async dispose(){await Promise.all(Object.values(n.mounts).map(s=>An(s)))},async watch(s){return await d(),n.watchListeners.push(s),async()=>{n.watchListeners=n.watchListeners.filter(u=>u!==s),n.watchListeners.length===0&&await E()}},async unwatch(){n.watchListeners=[],await E()},mount(s,u){if(s=Kt(s),s&&n.mounts[s])throw new Error(`already mounted at ${s}`);return s&&(n.mountpoints.push(s),n.mountpoints.sort((y,v)=>v.length-y.length)),n.mounts[s]=u,n.watching&&Promise.resolve(Tn(u,o,s)).then(y=>{n.unwatch[s]=y}).catch(console.error),g},async unmount(s,u=!0){var y,v;s=Kt(s),!(!s||!n.mounts[s])&&(n.watching&&s in n.unwatch&&((v=(y=n.unwatch)[s])==null||v.call(y),delete n.unwatch[s]),u&&await An(n.mounts[s]),n.mountpoints=n.mountpoints.filter(w=>w!==s),delete n.mounts[s])},getMount(s=""){s=Ue(s)+":";const u=r(s);return{driver:u.driver,base:u.base}},getMounts(s="",u={}){return s=Ue(s),f(s,u.parents).map(v=>({driver:v.driver,base:v.mountpoint}))},keys:(s,u={})=>g.getKeys(s,u),get:(s,u={})=>g.getItem(s,u),set:(s,u,y={})=>g.setItem(s,u,y),has:(s,u={})=>g.hasItem(s,u),del:(s,u={})=>g.removeItem(s,u),remove:(s,u={})=>g.removeItem(s,u)};return g}function Tn(e,n,r){return e.watch?e.watch((f,o)=>n(f,r+o)):()=>{}}async function An(e){typeof e.dispose=="function"&&await Te(e.dispose)}function bt(e){return new Promise((n,r)=>{e.oncomplete=e.onsuccess=()=>n(e.result),e.onabort=e.onerror=()=>r(e.error)})}function Fn(e,n){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(n);const f=bt(r);return(o,d)=>f.then(E=>d(E.transaction(n,o).objectStore(n)))}let Zt;function Lt(){return Zt||(Zt=Fn("keyval-store","keyval")),Zt}function Ln(e,n=Lt()){return n("readonly",r=>bt(r.get(e)))}function Ai(e,n,r=Lt()){return r("readwrite",f=>(f.put(n,e),bt(f.transaction)))}function Li(e,n=Lt()){return n("readwrite",r=>(r.delete(e),bt(r.transaction)))}function Ri(e=Lt()){return e("readwrite",n=>(n.clear(),bt(n.transaction)))}function Pi(e,n){return e.openCursor().onsuccess=function(){this.result&&(n(this.result),this.result.continue())},bt(e.transaction)}function Ci(e=Lt()){return e("readonly",n=>{if(n.getAllKeys)return bt(n.getAllKeys());const r=[];return Pi(n,f=>r.push(f.key)).then(()=>r)})}const Ni=e=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString()+"n":r),ji=e=>{const n=/([\[:])?(\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(n,'$1"$2n"$3');return JSON.parse(r,(f,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function Jn(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return ji(e)}catch{return e}}function kn(e){return typeof e=="string"?e:Ni(e)||""}const Mi="idb-keyval";var Bi=(e={})=>{const n=e.base&&e.base.length>0?`${e.base}:`:"",r=o=>n+o;let f;return e.dbName&&e.storeName&&(f=Fn(e.dbName,e.storeName)),{name:Mi,options:e,async hasItem(o){return!(typeof await Ln(r(o),f)>"u")},async getItem(o){return await Ln(r(o),f)??null},setItem(o,d){return Ai(r(o),d,f)},removeItem(o){return Li(r(o),f)},getKeys(){return Ci(f)},clear(){return Ri(f)}}};const Di="WALLET_CONNECT_V2_INDEXED_DB",zi="keyvaluestorage";let Ki=class{constructor(){this.indexedDb=Ti({driver:Bi({dbName:Di,storeName:zi})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(n=>[n.key,n.value])}async getItem(n){const r=await this.indexedDb.getItem(n);if(r!==null)return r}async setItem(n,r){await this.indexedDb.setItem(n,kn(r))}async removeItem(n){await this.indexedDb.removeItem(n)}};var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof k.dist.global<"u"?k.dist.global:typeof self<"u"?self:{},Ht={exports:{}};(function(){let e;function n(){}e=n,e.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},e.prototype.setItem=function(r,f){this[r]=String(f)},e.prototype.removeItem=function(r){delete this[r]},e.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(f){r[f]=void 0,delete r[f]})},e.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Qt<"u"&&Qt.localStorage?Ht.exports=Qt.localStorage:typeof window<"u"&&window.localStorage?Ht.exports=window.localStorage:Ht.exports=new n})();function Ui(e){var n;return[e[0],Jn((n=e[1])!=null?n:"")]}class $i{constructor(){this.localStorage=Ht.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Ui)}async getItem(n){const r=this.localStorage.getItem(n);if(r!==null)return Jn(r)}async setItem(n,r){this.localStorage.setItem(n,kn(r))}async removeItem(n){this.localStorage.removeItem(n)}}const Hi="wc_storage_version",Rn=1,Gi=async(e,n,r)=>{const f=Hi,o=await n.getItem(f);if(o&&o>=Rn){r(n);return}const d=await e.getKeys();if(!d.length){r(n);return}const E=[];for(;d.length;){const S=d.shift();if(!S)continue;const g=S.toLowerCase();if(g.includes("wc@")||g.includes("walletconnect")||g.includes("wc_")||g.includes("wallet_connect")){const s=await e.getItem(S);await n.setItem(S,s),E.push(S)}}await n.setItem(f,Rn),r(n),Wi(e,E)},Wi=async(e,n)=>{n.length&&n.forEach(async r=>{await e.removeItem(r)})};class Fi{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};const n=new $i;this.storage=n;try{const r=new Ki;Gi(n,r,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(n){return await this.initialize(),this.storage.getItem(n)}async setItem(n,r){return await this.initialize(),this.storage.setItem(n,r)}async removeItem(n){return await this.initialize(),this.storage.removeItem(n)}async initialize(){this.initialized||await new Promise(n=>{const r=setInterval(()=>{this.initialized&&(clearInterval(r),n())},20)})}}class Ji{}function ki(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Vi=Xi;function Xi(e,n,r){var f=r&&r.stringify||ki,o=1;if(typeof e=="object"&&e!==null){var d=n.length+o;if(d===1)return e;var E=new Array(d);E[0]=f(e);for(var S=1;S<d;S++)E[S]=f(n[S]);return E.join(" ")}if(typeof e!="string")return e;var g=n.length;if(g===0)return e;for(var s="",u=1-o,y=-1,v=e&&e.length||0,w=0;w<v;){if(e.charCodeAt(w)===37&&w+1<v){switch(y=y>-1?y:0,e.charCodeAt(w+1)){case 100:case 102:if(u>=g||n[u]==null)break;y<w&&(s+=e.slice(y,w)),s+=Number(n[u]),y=w+2,w++;break;case 105:if(u>=g||n[u]==null)break;y<w&&(s+=e.slice(y,w)),s+=Math.floor(Number(n[u])),y=w+2,w++;break;case 79:case 111:case 106:if(u>=g||n[u]===void 0)break;y<w&&(s+=e.slice(y,w));var x=typeof n[u];if(x==="string"){s+="'"+n[u]+"'",y=w+2,w++;break}if(x==="function"){s+=n[u].name||"<anonymous>",y=w+2,w++;break}s+=f(n[u]),y=w+2,w++;break;case 115:if(u>=g)break;y<w&&(s+=e.slice(y,w)),s+=String(n[u]),y=w+2,w++;break;case 37:y<w&&(s+=e.slice(y,w)),s+="%",y=w+2,w++,u--;break}++u}++w}return y===-1?e:(y<v&&(s+=e.slice(y)),s)}const Pn=Vi;var mt=Qe;const It=ss().console||{},Yi={mapHttpRequest:Ut,mapHttpResponse:Ut,wrapRequestSerializer:en,wrapResponseSerializer:en,wrapErrorSerializer:en,req:Ut,res:Ut,err:ts};function qi(e,n){return Array.isArray(e)?e.filter(function(f){return f!=="!stdSerializers.err"}):e===!0?Object.keys(n):!1}function Qe(e){e=e||{},e.browser=e.browser||{};const n=e.browser.transmit;if(n&&typeof n.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||It;e.browser.write&&(e.browser.asObject=!0);const f=e.serializers||{},o=qi(e.browser.serialize,f);let d=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(d=!1);const E=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");const S=e.level||"info",g=Object.create(r);g.log||(g.log=Ot),Object.defineProperty(g,"levelVal",{get:u}),Object.defineProperty(g,"level",{get:y,set:v});const s={transmit:n,serialize:o,asObject:e.browser.asObject,levels:E,timestamp:ns(e)};g.levels=Qe.levels,g.level=S,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=Ot,g.serializers=f,g._serialize=o,g._stdErrSerialize=d,g.child=w,n&&(g._logEvent=nn());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function y(){return this._level}function v(x){if(x!=="silent"&&!this.levels.values[x])throw Error("unknown level "+x);this._level=x,pt(s,g,"error","log"),pt(s,g,"fatal","error"),pt(s,g,"warn","error"),pt(s,g,"info","log"),pt(s,g,"debug","log"),pt(s,g,"trace","log")}function w(x,j){if(!x)throw new Error("missing bindings for child Pino");j=j||{},o&&x.serializers&&(j.serializers=x.serializers);const H=j.serializers;if(o&&H){var ue=Object.assign({},f,H),M=e.browser.serialize===!0?Object.keys(ue):o;delete x.serializers,Vt([x],M,ue,this._stdErrSerialize)}function Ae(ge){this._childLevel=(ge._childLevel|0)+1,this.error=_t(ge,x,"error"),this.fatal=_t(ge,x,"fatal"),this.warn=_t(ge,x,"warn"),this.info=_t(ge,x,"info"),this.debug=_t(ge,x,"debug"),this.trace=_t(ge,x,"trace"),ue&&(this.serializers=ue,this._serialize=M),n&&(this._logEvent=nn([].concat(ge._logEvent.bindings,x)))}return Ae.prototype=this,new Ae(this)}return g}Qe.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Qe.stdSerializers=Yi;Qe.stdTimeFunctions=Object.assign({},{nullTime:Vn,epochTime:Xn,unixTime:rs,isoTime:is});function pt(e,n,r,f){const o=Object.getPrototypeOf(n);n[r]=n.levelVal>n.levels.values[r]?Ot:o[r]?o[r]:It[r]||It[f]||Ot,Zi(e,n,r)}function Zi(e,n,r){!e.transmit&&n[r]===Ot||(n[r]=function(f){return function(){const d=e.timestamp(),E=new Array(arguments.length),S=Object.getPrototypeOf&&Object.getPrototypeOf(this)===It?It:this;for(var g=0;g<E.length;g++)E[g]=arguments[g];if(e.serialize&&!e.asObject&&Vt(E,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?f.call(S,Qi(this,r,E,d)):f.apply(S,E),e.transmit){const s=e.transmit.level||n.level,u=Qe.levels.values[s],y=Qe.levels.values[r];if(y<u)return;es(this,{ts:d,methodLevel:r,methodValue:y,transmitLevel:s,transmitValue:Qe.levels.values[e.transmit.level||n.level],send:e.transmit.send,val:n.levelVal},E)}}}(n[r]))}function Qi(e,n,r,f){e._serialize&&Vt(r,e._serialize,e.serializers,e._stdErrSerialize);const o=r.slice();let d=o[0];const E={};f&&(E.time=f),E.level=Qe.levels.values[n];let S=(e._childLevel|0)+1;if(S<1&&(S=1),d!==null&&typeof d=="object"){for(;S--&&typeof o[0]=="object";)Object.assign(E,o.shift());d=o.length?Pn(o.shift(),o):void 0}else typeof d=="string"&&(d=Pn(o.shift(),o));return d!==void 0&&(E.msg=d),E}function Vt(e,n,r,f){for(const o in e)if(f&&e[o]instanceof Error)e[o]=Qe.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o]))for(const d in e[o])n&&n.indexOf(d)>-1&&d in r&&(e[o][d]=r[d](e[o][d]))}function _t(e,n,r){return function(){const f=new Array(1+arguments.length);f[0]=n;for(var o=1;o<f.length;o++)f[o]=arguments[o-1];return e[r].apply(this,f)}}function es(e,n,r){const f=n.send,o=n.ts,d=n.methodLevel,E=n.methodValue,S=n.val,g=e._logEvent.bindings;Vt(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=r.filter(function(s){return g.indexOf(s)===-1}),e._logEvent.level.label=d,e._logEvent.level.value=E,f(d,e._logEvent,S),e._logEvent=nn(g)}function nn(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function ts(e){const n={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)n[r]===void 0&&(n[r]=e[r]);return n}function ns(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Vn:Xn}function Ut(){return{}}function en(e){return e}function Ot(){}function Vn(){return!1}function Xn(){return Date.now()}function rs(){return Math.round(Date.now()/1e3)}function is(){return new Date(Date.now()).toISOString()}function ss(){function e(n){return typeof n<"u"&&n}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 an=k.getDefaultExportFromCjs(mt),os=e=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString()+"n":r);function Cn(e){return typeof e=="string"?e:os(e)||""}const as={level:"info"},Rt="custom_context",fn=1e3*1024;class fs{constructor(n){this.nodeValue=n,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class Nn{constructor(n){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=n,this.sizeInBytes=0}append(n){const r=new fs(n);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${n} 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 n=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=n.size}toArray(){const n=[];let r=this.head;for(;r!==null;)n.push(r.value),r=r.next;return n}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let n=this.head;return{next:()=>{if(!n)return{done:!0,value:null};const r=n.value;return n=n.next,{done:!1,value:r}}}}}class Yn{constructor(n,r=fn){this.level=n??"error",this.levelValue=mt.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new Nn(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(n,r){r===mt.levels.values.error?console.error(n):r===mt.levels.values.warn?console.warn(n):r===mt.levels.values.debug?console.debug(n):r===mt.levels.values.trace?console.trace(n):console.log(n)}appendToLogs(n){this.logs.append(Cn({timestamp:new Date().toISOString(),log:n}));const r=typeof n=="string"?JSON.parse(n).level:n.level;r>=this.levelValue&&this.forwardToConsole(n,r)}getLogs(){return this.logs}clearLogs(){this.logs=new Nn(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(n){const r=this.getLogArray();return r.push(Cn({extraMetadata:n})),new Blob(r,{type:"application/json"})}}class cs{constructor(n,r=fn){this.baseChunkLogger=new Yn(n,r)}write(n){this.baseChunkLogger.appendToLogs(n)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(n){return this.baseChunkLogger.logsToBlob(n)}downloadLogsBlobInBrowser(n){const r=URL.createObjectURL(this.logsToBlob(n)),f=document.createElement("a");f.href=r,f.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(r)}}class us{constructor(n,r=fn){this.baseChunkLogger=new Yn(n,r)}write(n){this.baseChunkLogger.appendToLogs(n)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(n){return this.baseChunkLogger.logsToBlob(n)}}var ls=Object.defineProperty,ds=Object.defineProperties,hs=Object.getOwnPropertyDescriptors,jn=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable,Mn=(e,n,r)=>n in e?ls(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Gt=(e,n)=>{for(var r in n||(n={}))bs.call(n,r)&&Mn(e,r,n[r]);if(jn)for(var r of jn(n))gs.call(n,r)&&Mn(e,r,n[r]);return e},Wt=(e,n)=>ds(e,hs(n));function ys(e){return Wt(Gt({},e),{level:(e==null?void 0:e.level)||as.level})}function ps(e,n=Rt){return e[n]||""}function _s(e,n,r=Rt){return e[r]=n,e}function qn(e,n=Rt){let r="";return typeof e.bindings>"u"?r=ps(e,n):r=e.bindings().context||"",r}function ms(e,n,r=Rt){const f=qn(e,r);return f.trim()?`${f}/${n}`:n}function xs(e,n,r=Rt){const f=ms(e,n,r),o=e.child({context:f});return _s(o,f,r)}function ws(e){var n,r;const f=new cs((n=e.opts)==null?void 0:n.level,e.maxSizeInBytes);return{logger:an(Wt(Gt({},e.opts),{level:"trace",browser:Wt(Gt({},(r=e.opts)==null?void 0:r.browser),{write:o=>f.write(o)})})),chunkLoggerController:f}}function vs(e){var n;const r=new us((n=e.opts)==null?void 0:n.level,e.maxSizeInBytes);return{logger:an(Wt(Gt({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}function Ss(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?ws(e):vs(e)}var cn={},Zn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var n=De.binary,r=De.wipe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var f=function(){function S(){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 S.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},S.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},S.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},S.prototype.update=function(g,s){if(s===void 0&&(s=g.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++]=g[u++],s--;this._bufferLength===this.blockSize&&(d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(s>=this.blockSize&&(u=d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,g,u,s),s%=this.blockSize);s>0;)this._buffer[this._bufferLength++]=g[u++],s--;return this},S.prototype.finish=function(g){if(!this._finished){var s=this._bytesHashed,u=this._bufferLength,y=s/536870912|0,v=s<<3,w=s%128<112?128:256;this._buffer[u]=128;for(var x=u+1;x<w-8;x++)this._buffer[x]=0;n.writeUint32BE(y,this._buffer,w-8),n.writeUint32BE(v,this._buffer,w-4),d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,w),this._finished=!0}for(var x=0;x<this.digestLength/8;x++)n.writeUint32BE(this._stateHi[x],g,x*8),n.writeUint32BE(this._stateLo[x],g,x*8+4);return this},S.prototype.digest=function(){var g=new Uint8Array(this.digestLength);return this.finish(g),g},S.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}},S.prototype.restoreState=function(g){return this._stateHi.set(g.stateHi),this._stateLo.set(g.stateLo),this._bufferLength=g.bufferLength,g.buffer&&this._buffer.set(g.buffer),this._bytesHashed=g.bytesHashed,this._finished=!1,this},S.prototype.cleanSavedState=function(g){r.wipe(g.stateHi),r.wipe(g.stateLo),g.buffer&&r.wipe(g.buffer),g.bufferLength=0,g.bytesHashed=0},S}();e.SHA512=f;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 d(S,g,s,u,y,v,w){for(var x=s[0],j=s[1],H=s[2],ue=s[3],M=s[4],Ae=s[5],ge=s[6],Ne=s[7],G=u[0],N=u[1],je=u[2],et=u[3],ye=u[4],Je=u[5],$e=u[6],Xe=u[7],m,_,Y,le,L,I,O,A;w>=128;){for(var Le=0;Le<16;Le++){var ne=8*Le+v;S[Le]=n.readUint32BE(y,ne),g[Le]=n.readUint32BE(y,ne+4)}for(var Le=0;Le<80;Le++){var xt=x,B=j,gt=H,b=ue,h=M,l=Ae,t=ge,a=Ne,R=G,P=N,z=je,K=et,D=ye,U=Je,Re=$e,de=Xe;if(m=Ne,_=Xe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=(M>>>14|ye<<18)^(M>>>18|ye<<14)^(ye>>>9|M<<23),_=(ye>>>14|M<<18)^(ye>>>18|M<<14)^(M>>>9|ye<<23),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=M&Ae^~M&ge,_=ye&Je^~ye&$e,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=o[Le*2],_=o[Le*2+1],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=S[Le%16],_=g[Le%16],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,Y=O&65535|A<<16,le=L&65535|I<<16,m=Y,_=le,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=(x>>>28|G<<4)^(G>>>2|x<<30)^(G>>>7|x<<25),_=(G>>>28|x<<4)^(x>>>2|G<<30)^(x>>>7|G<<25),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=x&j^x&H^j&H,_=G&N^G&je^N&je,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,a=O&65535|A<<16,de=L&65535|I<<16,m=b,_=K,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=Y,_=le,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,b=O&65535|A<<16,K=L&65535|I<<16,j=xt,H=B,ue=gt,M=b,Ae=h,ge=l,Ne=t,x=a,N=R,je=P,et=z,ye=K,Je=D,$e=U,Xe=Re,G=de,Le%16===15)for(var ne=0;ne<16;ne++)m=S[ne],_=g[ne],L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=S[(ne+9)%16],_=g[(ne+9)%16],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,Y=S[(ne+1)%16],le=g[(ne+1)%16],m=(Y>>>1|le<<31)^(Y>>>8|le<<24)^Y>>>7,_=(le>>>1|Y<<31)^(le>>>8|Y<<24)^(le>>>7|Y<<25),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,Y=S[(ne+14)%16],le=g[(ne+14)%16],m=(Y>>>19|le<<13)^(le>>>29|Y<<3)^Y>>>6,_=(le>>>19|Y<<13)^(Y>>>29|le<<3)^(le>>>6|Y<<26),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,S[ne]=O&65535|A<<16,g[ne]=L&65535|I<<16}m=x,_=G,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[0],_=u[0],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[0]=x=O&65535|A<<16,u[0]=G=L&65535|I<<16,m=j,_=N,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[1],_=u[1],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[1]=j=O&65535|A<<16,u[1]=N=L&65535|I<<16,m=H,_=je,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[2],_=u[2],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[2]=H=O&65535|A<<16,u[2]=je=L&65535|I<<16,m=ue,_=et,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[3],_=u[3],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[3]=ue=O&65535|A<<16,u[3]=et=L&65535|I<<16,m=M,_=ye,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[4],_=u[4],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[4]=M=O&65535|A<<16,u[4]=ye=L&65535|I<<16,m=Ae,_=Je,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[5],_=u[5],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[5]=Ae=O&65535|A<<16,u[5]=Je=L&65535|I<<16,m=ge,_=$e,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[6],_=u[6],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[6]=ge=O&65535|A<<16,u[6]=$e=L&65535|I<<16,m=Ne,_=Xe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[7],_=u[7],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[7]=Ne=O&65535|A<<16,u[7]=Xe=L&65535|I<<16,v+=128,w-=128}return v}function E(S){var g=new f;g.update(S);var s=g.digest();return g.clean(),s}e.hash=E})(Zn);(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 n=De.random,r=Zn,f=De.wipe;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function o(b){const h=new Float64Array(16);if(b)for(let l=0;l<b.length;l++)h[l]=b[l];return h}const d=new Uint8Array(32);d[0]=9;const E=o(),S=o([1]),g=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]),y=o([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),v=o([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function w(b,h){for(let l=0;l<16;l++)b[l]=h[l]|0}function x(b){let h=1;for(let l=0;l<16;l++){let t=b[l]+h+65535;h=Math.floor(t/65536),b[l]=t-h*65536}b[0]+=h-1+37*(h-1)}function j(b,h,l){const t=~(l-1);for(let a=0;a<16;a++){const R=t&(b[a]^h[a]);b[a]^=R,h[a]^=R}}function H(b,h){const l=o(),t=o();for(let a=0;a<16;a++)t[a]=h[a];x(t),x(t),x(t);for(let a=0;a<2;a++){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,j(t,l,1-R)}for(let a=0;a<16;a++)b[2*a]=t[a]&255,b[2*a+1]=t[a]>>8}function ue(b,h){let l=0;for(let t=0;t<32;t++)l|=b[t]^h[t];return(1&l-1>>>8)-1}function M(b,h){const l=new Uint8Array(32),t=new Uint8Array(32);return H(l,b),H(t,h),ue(l,t)}function Ae(b){const h=new Uint8Array(32);return H(h,b),h[0]&1}function ge(b,h){for(let l=0;l<16;l++)b[l]=h[2*l]+(h[2*l+1]<<8);b[15]&=32767}function Ne(b,h,l){for(let t=0;t<16;t++)b[t]=h[t]+l[t]}function G(b,h,l){for(let t=0;t<16;t++)b[t]=h[t]-l[t]}function N(b,h,l){let t,a,R=0,P=0,z=0,K=0,D=0,U=0,Re=0,de=0,Pe=0,pe=0,he=0,re=0,te=0,q=0,V=0,$=0,ie=0,_e=0,W=0,Me=0,ze=0,He=0,Ge=0,Ke=0,Ye=0,Ze=0,st=0,We=0,ct=0,wt=0,Pt=0,se=l[0],Z=l[1],oe=l[2],ae=l[3],fe=l[4],Q=l[5],me=l[6],xe=l[7],we=l[8],ve=l[9],Se=l[10],be=l[11],ce=l[12],J=l[13],Ee=l[14],Ie=l[15];t=h[0],R+=t*se,P+=t*Z,z+=t*oe,K+=t*ae,D+=t*fe,U+=t*Q,Re+=t*me,de+=t*xe,Pe+=t*we,pe+=t*ve,he+=t*Se,re+=t*be,te+=t*ce,q+=t*J,V+=t*Ee,$+=t*Ie,t=h[1],P+=t*se,z+=t*Z,K+=t*oe,D+=t*ae,U+=t*fe,Re+=t*Q,de+=t*me,Pe+=t*xe,pe+=t*we,he+=t*ve,re+=t*Se,te+=t*be,q+=t*ce,V+=t*J,$+=t*Ee,ie+=t*Ie,t=h[2],z+=t*se,K+=t*Z,D+=t*oe,U+=t*ae,Re+=t*fe,de+=t*Q,Pe+=t*me,pe+=t*xe,he+=t*we,re+=t*ve,te+=t*Se,q+=t*be,V+=t*ce,$+=t*J,ie+=t*Ee,_e+=t*Ie,t=h[3],K+=t*se,D+=t*Z,U+=t*oe,Re+=t*ae,de+=t*fe,Pe+=t*Q,pe+=t*me,he+=t*xe,re+=t*we,te+=t*ve,q+=t*Se,V+=t*be,$+=t*ce,ie+=t*J,_e+=t*Ee,W+=t*Ie,t=h[4],D+=t*se,U+=t*Z,Re+=t*oe,de+=t*ae,Pe+=t*fe,pe+=t*Q,he+=t*me,re+=t*xe,te+=t*we,q+=t*ve,V+=t*Se,$+=t*be,ie+=t*ce,_e+=t*J,W+=t*Ee,Me+=t*Ie,t=h[5],U+=t*se,Re+=t*Z,de+=t*oe,Pe+=t*ae,pe+=t*fe,he+=t*Q,re+=t*me,te+=t*xe,q+=t*we,V+=t*ve,$+=t*Se,ie+=t*be,_e+=t*ce,W+=t*J,Me+=t*Ee,ze+=t*Ie,t=h[6],Re+=t*se,de+=t*Z,Pe+=t*oe,pe+=t*ae,he+=t*fe,re+=t*Q,te+=t*me,q+=t*xe,V+=t*we,$+=t*ve,ie+=t*Se,_e+=t*be,W+=t*ce,Me+=t*J,ze+=t*Ee,He+=t*Ie,t=h[7],de+=t*se,Pe+=t*Z,pe+=t*oe,he+=t*ae,re+=t*fe,te+=t*Q,q+=t*me,V+=t*xe,$+=t*we,ie+=t*ve,_e+=t*Se,W+=t*be,Me+=t*ce,ze+=t*J,He+=t*Ee,Ge+=t*Ie,t=h[8],Pe+=t*se,pe+=t*Z,he+=t*oe,re+=t*ae,te+=t*fe,q+=t*Q,V+=t*me,$+=t*xe,ie+=t*we,_e+=t*ve,W+=t*Se,Me+=t*be,ze+=t*ce,He+=t*J,Ge+=t*Ee,Ke+=t*Ie,t=h[9],pe+=t*se,he+=t*Z,re+=t*oe,te+=t*ae,q+=t*fe,V+=t*Q,$+=t*me,ie+=t*xe,_e+=t*we,W+=t*ve,Me+=t*Se,ze+=t*be,He+=t*ce,Ge+=t*J,Ke+=t*Ee,Ye+=t*Ie,t=h[10],he+=t*se,re+=t*Z,te+=t*oe,q+=t*ae,V+=t*fe,$+=t*Q,ie+=t*me,_e+=t*xe,W+=t*we,Me+=t*ve,ze+=t*Se,He+=t*be,Ge+=t*ce,Ke+=t*J,Ye+=t*Ee,Ze+=t*Ie,t=h[11],re+=t*se,te+=t*Z,q+=t*oe,V+=t*ae,$+=t*fe,ie+=t*Q,_e+=t*me,W+=t*xe,Me+=t*we,ze+=t*ve,He+=t*Se,Ge+=t*be,Ke+=t*ce,Ye+=t*J,Ze+=t*Ee,st+=t*Ie,t=h[12],te+=t*se,q+=t*Z,V+=t*oe,$+=t*ae,ie+=t*fe,_e+=t*Q,W+=t*me,Me+=t*xe,ze+=t*we,He+=t*ve,Ge+=t*Se,Ke+=t*be,Ye+=t*ce,Ze+=t*J,st+=t*Ee,We+=t*Ie,t=h[13],q+=t*se,V+=t*Z,$+=t*oe,ie+=t*ae,_e+=t*fe,W+=t*Q,Me+=t*me,ze+=t*xe,He+=t*we,Ge+=t*ve,Ke+=t*Se,Ye+=t*be,Ze+=t*ce,st+=t*J,We+=t*Ee,ct+=t*Ie,t=h[14],V+=t*se,$+=t*Z,ie+=t*oe,_e+=t*ae,W+=t*fe,Me+=t*Q,ze+=t*me,He+=t*xe,Ge+=t*we,Ke+=t*ve,Ye+=t*Se,Ze+=t*be,st+=t*ce,We+=t*J,ct+=t*Ee,wt+=t*Ie,t=h[15],$+=t*se,ie+=t*Z,_e+=t*oe,W+=t*ae,Me+=t*fe,ze+=t*Q,He+=t*me,Ge+=t*xe,Ke+=t*we,Ye+=t*ve,Ze+=t*Se,st+=t*be,We+=t*ce,ct+=t*J,wt+=t*Ee,Pt+=t*Ie,R+=38*ie,P+=38*_e,z+=38*W,K+=38*Me,D+=38*ze,U+=38*He,Re+=38*Ge,de+=38*Ke,Pe+=38*Ye,pe+=38*Ze,he+=38*st,re+=38*We,te+=38*ct,q+=38*wt,V+=38*Pt,a=1,t=R+a+65535,a=Math.floor(t/65536),R=t-a*65536,t=P+a+65535,a=Math.floor(t/65536),P=t-a*65536,t=z+a+65535,a=Math.floor(t/65536),z=t-a*65536,t=K+a+65535,a=Math.floor(t/65536),K=t-a*65536,t=D+a+65535,a=Math.floor(t/65536),D=t-a*65536,t=U+a+65535,a=Math.floor(t/65536),U=t-a*65536,t=Re+a+65535,a=Math.floor(t/65536),Re=t-a*65536,t=de+a+65535,a=Math.floor(t/65536),de=t-a*65536,t=Pe+a+65535,a=Math.floor(t/65536),Pe=t-a*65536,t=pe+a+65535,a=Math.floor(t/65536),pe=t-a*65536,t=he+a+65535,a=Math.floor(t/65536),he=t-a*65536,t=re+a+65535,a=Math.floor(t/65536),re=t-a*65536,t=te+a+65535,a=Math.floor(t/65536),te=t-a*65536,t=q+a+65535,a=Math.floor(t/65536),q=t-a*65536,t=V+a+65535,a=Math.floor(t/65536),V=t-a*65536,t=$+a+65535,a=Math.floor(t/65536),$=t-a*65536,R+=a-1+37*(a-1),a=1,t=R+a+65535,a=Math.floor(t/65536),R=t-a*65536,t=P+a+65535,a=Math.floor(t/65536),P=t-a*65536,t=z+a+65535,a=Math.floor(t/65536),z=t-a*65536,t=K+a+65535,a=Math.floor(t/65536),K=t-a*65536,t=D+a+65535,a=Math.floor(t/65536),D=t-a*65536,t=U+a+65535,a=Math.floor(t/65536),U=t-a*65536,t=Re+a+65535,a=Math.floor(t/65536),Re=t-a*65536,t=de+a+65535,a=Math.floor(t/65536),de=t-a*65536,t=Pe+a+65535,a=Math.floor(t/65536),Pe=t-a*65536,t=pe+a+65535,a=Math.floor(t/65536),pe=t-a*65536,t=he+a+65535,a=Math.floor(t/65536),he=t-a*65536,t=re+a+65535,a=Math.floor(t/65536),re=t-a*65536,t=te+a+65535,a=Math.floor(t/65536),te=t-a*65536,t=q+a+65535,a=Math.floor(t/65536),q=t-a*65536,t=V+a+65535,a=Math.floor(t/65536),V=t-a*65536,t=$+a+65535,a=Math.floor(t/65536),$=t-a*65536,R+=a-1+37*(a-1),b[0]=R,b[1]=P,b[2]=z,b[3]=K,b[4]=D,b[5]=U,b[6]=Re,b[7]=de,b[8]=Pe,b[9]=pe,b[10]=he,b[11]=re,b[12]=te,b[13]=q,b[14]=V,b[15]=$}function je(b,h){N(b,h,h)}function et(b,h){const l=o();let t;for(t=0;t<16;t++)l[t]=h[t];for(t=253;t>=0;t--)je(l,l),t!==2&&t!==4&&N(l,l,h);for(t=0;t<16;t++)b[t]=l[t]}function ye(b,h){const l=o();let t;for(t=0;t<16;t++)l[t]=h[t];for(t=250;t>=0;t--)je(l,l),t!==1&&N(l,l,h);for(t=0;t<16;t++)b[t]=l[t]}function Je(b,h){const l=o(),t=o(),a=o(),R=o(),P=o(),z=o(),K=o(),D=o(),U=o();G(l,b[1],b[0]),G(U,h[1],h[0]),N(l,l,U),Ne(t,b[0],b[1]),Ne(U,h[0],h[1]),N(t,t,U),N(a,b[3],h[3]),N(a,a,s),N(R,b[2],h[2]),Ne(R,R,R),G(P,t,l),G(z,R,a),Ne(K,R,a),Ne(D,t,l),N(b[0],P,z),N(b[1],D,K),N(b[2],K,z),N(b[3],P,D)}function $e(b,h,l){for(let t=0;t<4;t++)j(b[t],h[t],l)}function Xe(b,h){const l=o(),t=o(),a=o();et(a,h[2]),N(l,h[0],a),N(t,h[1],a),H(b,t),b[31]^=Ae(l)<<7}function m(b,h,l){w(b[0],E),w(b[1],S),w(b[2],S),w(b[3],E);for(let t=255;t>=0;--t){const a=l[t/8|0]>>(t&7)&1;$e(b,h,a),Je(h,b),Je(b,b),$e(b,h,a)}}function _(b,h){const l=[o(),o(),o(),o()];w(l[0],u),w(l[1],y),w(l[2],S),N(l[3],u,y),m(b,l,h)}function Y(b){if(b.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const h=(0,r.hash)(b);h[0]&=248,h[31]&=127,h[31]|=64;const l=new Uint8Array(32),t=[o(),o(),o(),o()];_(t,h),Xe(l,t);const a=new Uint8Array(64);return a.set(b),a.set(l,32),{publicKey:l,secretKey:a}}e.generateKeyPairFromSeed=Y;function le(b){const h=(0,n.randomBytes)(32,b),l=Y(h);return(0,f.wipe)(h),l}e.generateKeyPair=le;function L(b){if(b.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(b.subarray(32))}e.extractPublicKeyFromSecretKey=L;const I=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function O(b,h){let l,t,a,R;for(t=63;t>=32;--t){for(l=0,a=t-32,R=t-12;a<R;++a)h[a]+=l-16*h[t]*I[a-(t-32)],l=Math.floor((h[a]+128)/256),h[a]-=l*256;h[a]+=l,h[t]=0}for(l=0,a=0;a<32;a++)h[a]+=l-(h[31]>>4)*I[a],l=h[a]>>8,h[a]&=255;for(a=0;a<32;a++)h[a]-=l*I[a];for(t=0;t<32;t++)h[t+1]+=h[t]>>8,b[t]=h[t]&255}function A(b){const h=new Float64Array(64);for(let l=0;l<64;l++)h[l]=b[l];for(let l=0;l<64;l++)b[l]=0;O(b,h)}function Le(b,h){const l=new Float64Array(64),t=[o(),o(),o(),o()],a=(0,r.hash)(b.subarray(0,32));a[0]&=248,a[31]&=127,a[31]|=64;const R=new Uint8Array(64);R.set(a.subarray(32),32);const P=new r.SHA512;P.update(R.subarray(32)),P.update(h);const z=P.digest();P.clean(),A(z),_(t,z),Xe(R,t),P.reset(),P.update(R.subarray(0,32)),P.update(b.subarray(32)),P.update(h);const K=P.digest();A(K);for(let D=0;D<32;D++)l[D]=z[D];for(let D=0;D<32;D++)for(let U=0;U<32;U++)l[D+U]+=K[D]*a[U];return O(R.subarray(32),l),R}e.sign=Le;function ne(b,h){const l=o(),t=o(),a=o(),R=o(),P=o(),z=o(),K=o();return w(b[2],S),ge(b[1],h),je(a,b[1]),N(R,a,g),G(a,a,b[2]),Ne(R,b[2],R),je(P,R),je(z,P),N(K,z,P),N(l,K,a),N(l,l,R),ye(l,l),N(l,l,a),N(l,l,R),N(l,l,R),N(b[0],l,R),je(t,b[0]),N(t,t,R),M(t,a)&&N(b[0],b[0],v),je(t,b[0]),N(t,t,R),M(t,a)?-1:(Ae(b[0])===h[31]>>7&&G(b[0],E,b[0]),N(b[3],b[0],b[1]),0)}function xt(b,h,l){const t=new Uint8Array(32),a=[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,b))return!1;const P=new r.SHA512;P.update(l.subarray(0,32)),P.update(b),P.update(h);const z=P.digest();return A(z),m(a,R,z),_(R,l.subarray(32)),Je(a,R),Xe(t,a),!ue(l,t)}e.verify=xt;function B(b){let h=[o(),o(),o(),o()];if(ne(h,b))throw new Error("Ed25519: invalid public key");let l=o(),t=o(),a=h[1];Ne(l,S,a),G(t,S,a),et(t,t),N(l,l,t);let R=new Uint8Array(32);return H(R,l),R}e.convertPublicKeyToX25519=B;function gt(b){const h=(0,r.hash)(b.subarray(0,32));h[0]&=248,h[31]&=127,h[31]|=64;const l=new Uint8Array(h.subarray(0,32));return(0,f.wipe)(h),l}e.convertSecretKeyToX25519=gt})(cn);const Es="EdDSA",Is="JWT",Ft=".",Xt="base64url",Qn="utf8",er="utf8",Os=":",Ts="did",As="key",Bn="base58btc",Ls="z",Rs="K36",Ps=32,Cs=e=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString()+"n":r),Ns=e=>{const n=/([\[:])?(\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(n,'$1"$2n"$3');return JSON.parse(r,(f,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function js(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return Ns(e)}catch{return e}}function Ms(e){return typeof e=="string"?e:Cs(e)||""}function Dn(e){return js(At(ht(e,Xt),Qn))}function Jt(e){return At(ht(Ms(e),Qn),Xt)}function tr(e){const n=ht(Rs,Bn),r=Ls+At(Hn([n,e]),Bn);return[Ts,As,r].join(Os)}function Bs(e){return At(e,Xt)}function Ds(e){return ht(e,Xt)}function zs(e){return ht([Jt(e.header),Jt(e.payload)].join(Ft),er)}function Ks(e){return[Jt(e.header),Jt(e.payload),Bs(e.signature)].join(Ft)}function Us(e){const n=e.split(Ft),r=Dn(n[0]),f=Dn(n[1]),o=Ds(n[2]),d=ht(n.slice(0,2).join(Ft),er);return{header:r,payload:f,signature:o,data:d}}function $s(e=De.random.randomBytes(Ps)){return cn.generateKeyPairFromSeed(e)}async function Hs(e,n,r,f,o=De.cjs.fromMiliseconds(Date.now())){const d={alg:Es,typ:Is},E=tr(f.publicKey),S=o+r,g={iss:E,sub:e,aud:n,iat:o,exp:S},s=zs({header:d,payload:g}),u=cn.sign(f.secretKey,s);return Ks({header:d,payload:g,signature:u})}const Gs="PARSE_ERROR",Ws="INVALID_REQUEST",Fs="METHOD_NOT_FOUND",Js="INVALID_PARAMS",nr="INTERNAL_ERROR",un="SERVER_ERROR",ks=[-32700,-32600,-32601,-32602,-32603],Et={[Gs]:{code:-32700,message:"Parse error"},[Ws]:{code:-32600,message:"Invalid Request"},[Fs]:{code:-32601,message:"Method not found"},[Js]:{code:-32602,message:"Invalid params"},[nr]:{code:-32603,message:"Internal error"},[un]:{code:-32e3,message:"Server error"}},rr=un;function Vs(e){return ks.includes(e)}function zn(e){return Object.keys(Et).includes(e)?Et[e]:Et[rr]}function Xs(e){const n=Object.values(Et).find(r=>r.code===e);return n||Et[rr]}function Ys(e,n,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${n}`):e}var ir={};/*! *****************************************************************************
1
+ "use strict";const k=require("./index-Br4OTc1S.js"),De=require("./index-DcKePNaA.js");function $n(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function Hn(e,n){n||(n=e.reduce((o,d)=>o+d.length,0));const r=$n(n);let f=0;for(const o of e)r.set(o,f),f+=o.length;return r}const vn={...De.identityBase,...De.base2,...De.base8,...De.base10,...De.base16,...De.base32,...De.base36,...De.base58,...De.base64,...De.base256emoji};function Gn(e,n,r,f){return{name:e,prefix:n,encoder:{name:e,prefix:n,encode:r},decoder:{decode:f}}}const Sn=Gn("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),qt=Gn("ascii","a",e=>{let n="a";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return n},e=>{e=e.substring(1);const n=$n(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}),Wn={utf8:Sn,"utf-8":Sn,hex:vn.base16,latin1:qt,ascii:qt,binary:qt,...vn};function ht(e,n="utf8"){const r=Wn[n];if(!r)throw new Error(`Unsupported encoding "${n}"`);return(n==="utf8"||n==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}function At(e,n="utf8"){const r=Wn[n];if(!r)throw new Error(`Unsupported encoding "${n}"`);return(n==="utf8"||n==="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 En=function(e,n,r){if(r||arguments.length===2)for(var f=0,o=n.length,d;f<o;f++)(d||!(f in n))&&(d||(d=Array.prototype.slice.call(n,0,f)),d[f]=n[f]);return e.concat(d||Array.prototype.slice.call(n))},qr=function(){function e(n,r,f){this.name=n,this.version=r,this.os=f,this.type="browser"}return e}(),Zr=function(){function e(n){this.version=n,this.type="node",this.name="node",this.os=k.dist.process.platform}return e}(),Qr=function(){function e(n,r,f,o){this.name=n,this.version=r,this.os=f,this.bot=o,this.type="bot-device"}return e}(),ei=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),ti=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),ni=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,ri=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,In=3,ii=[["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",ni]],On=[["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 si(e){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new ti:typeof navigator<"u"?ai(navigator.userAgent):ci()}function oi(e){return e!==""&&ii.reduce(function(n,r){var f=r[0],o=r[1];if(n)return n;var d=o.exec(e);return!!d&&[f,d]},!1)}function ai(e){var n=oi(e);if(!n)return null;var r=n[0],f=n[1];if(r==="searchbot")return new ei;var o=f[1]&&f[1].split(".").join("_").split("_").slice(0,3);o?o.length<In&&(o=En(En([],o,!0),ui(In-o.length),!0)):o=[];var d=o.join("."),E=fi(e),S=ri.exec(e);return S&&S[1]?new Qr(r,d,E,S[1]):new qr(r,d,E)}function fi(e){for(var n=0,r=On.length;n<r;n++){var f=On[n],o=f[0],d=f[1],E=d.exec(e);if(E)return o}return null}function ci(){var e=typeof k.dist.process<"u"&&k.dist.process.version;return e?new Zr(k.dist.process.version.slice(1)):null}function ui(e){for(var n=[],r=0;r<e;r++)n.push("0");return n}const li={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"}},di=/"(?:_|\\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*:/,hi=/"(?: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*:/,bi=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function gi(e,n){if(e==="__proto__"||e==="constructor"&&n&&typeof n=="object"&&"prototype"in n){yi(e);return}return n}function yi(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function zt(e,n={}){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 f=r.toLowerCase();if(f==="true")return!0;if(f==="false")return!1;if(f==="undefined")return;if(f==="null")return null;if(f==="nan")return Number.NaN;if(f==="infinity")return Number.POSITIVE_INFINITY;if(f==="-infinity")return Number.NEGATIVE_INFINITY}if(!bi.test(e)){if(n.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(di.test(e)||hi.test(e)){if(n.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,gi)}return JSON.parse(e)}catch(f){if(n.strict)throw f;return e}}function pi(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Te(e,...n){try{return pi(e(...n))}catch(r){return Promise.reject(r)}}function _i(e){const n=typeof e;return e===null||n!=="object"&&n!=="function"}function mi(e){const n=Object.getPrototypeOf(e);return!n||n.isPrototypeOf(Object)}function $t(e){if(_i(e))return String(e);if(mi(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON=="function")return $t(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const tn="base64:";function xi(e){return typeof e=="string"?e:tn+Si(e)}function wi(e){return typeof e!="string"||!e.startsWith(tn)?e:vi(e.slice(tn.length))}function vi(e){return globalThis.Buffer?k.dist.Buffer.from(e,"base64"):Uint8Array.from(globalThis.atob(e),n=>n.codePointAt(0))}function Si(e){return globalThis.Buffer?k.dist.Buffer.from(e).toString("base64"):globalThis.btoa(String.fromCodePoint(...e))}function Ue(e){var n;return e&&((n=e.split("?")[0])==null?void 0:n.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function Ei(...e){return Ue(e.join(":"))}function Kt(e){return e=Ue(e),e?e+":":""}const Ii="memory",Oi=()=>{const e=new Map;return{name:Ii,getInstance:()=>e,hasItem(n){return e.has(n)},getItem(n){return e.get(n)??null},getItemRaw(n){return e.get(n)??null},setItem(n,r){e.set(n,r)},setItemRaw(n,r){e.set(n,r)},removeItem(n){e.delete(n)},getKeys(){return[...e.keys()]},clear(){e.clear()},dispose(){e.clear()}}};function Ti(e={}){const n={mounts:{"":e.driver||Oi()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=s=>{for(const u of n.mountpoints)if(s.startsWith(u))return{base:u,relativeKey:s.slice(u.length),driver:n.mounts[u]};return{base:"",relativeKey:s,driver:n.mounts[""]}},f=(s,u)=>n.mountpoints.filter(y=>y.startsWith(s)||u&&s.startsWith(y)).map(y=>({relativeBase:s.length>y.length?s.slice(y.length):void 0,mountpoint:y,driver:n.mounts[y]})),o=(s,u)=>{if(n.watching){u=Ue(u);for(const y of n.watchListeners)y(s,u)}},d=async()=>{if(!n.watching){n.watching=!0;for(const s in n.mounts)n.unwatch[s]=await Tn(n.mounts[s],o,s)}},E=async()=>{if(n.watching){for(const s in n.unwatch)await n.unwatch[s]();n.unwatch={},n.watching=!1}},S=(s,u,y)=>{const v=new Map,w=x=>{let j=v.get(x.base);return j||(j={driver:x.driver,base:x.base,items:[]},v.set(x.base,j)),j};for(const x of s){const j=typeof x=="string",H=Ue(j?x:x.key),ue=j?void 0:x.value,M=j||!x.options?u:{...u,...x.options},Ae=r(H);w(Ae).items.push({key:H,value:ue,relativeKey:Ae.relativeKey,options:M})}return Promise.all([...v.values()].map(x=>y(x))).then(x=>x.flat())},g={hasItem(s,u={}){s=Ue(s);const{relativeKey:y,driver:v}=r(s);return Te(v.hasItem,y,u)},getItem(s,u={}){s=Ue(s);const{relativeKey:y,driver:v}=r(s);return Te(v.getItem,y,u).then(w=>zt(w))},getItems(s,u={}){return S(s,u,y=>y.driver.getItems?Te(y.driver.getItems,y.items.map(v=>({key:v.relativeKey,options:v.options})),u).then(v=>v.map(w=>({key:Ei(y.base,w.key),value:zt(w.value)}))):Promise.all(y.items.map(v=>Te(y.driver.getItem,v.relativeKey,v.options).then(w=>({key:v.key,value:zt(w)})))))},getItemRaw(s,u={}){s=Ue(s);const{relativeKey:y,driver:v}=r(s);return v.getItemRaw?Te(v.getItemRaw,y,u):Te(v.getItem,y,u).then(w=>wi(w))},async setItem(s,u,y={}){if(u===void 0)return g.removeItem(s);s=Ue(s);const{relativeKey:v,driver:w}=r(s);w.setItem&&(await Te(w.setItem,v,$t(u),y),w.watch||o("update",s))},async setItems(s,u){await S(s,u,async y=>{if(y.driver.setItems)return Te(y.driver.setItems,y.items.map(v=>({key:v.relativeKey,value:$t(v.value),options:v.options})),u);y.driver.setItem&&await Promise.all(y.items.map(v=>Te(y.driver.setItem,v.relativeKey,$t(v.value),v.options)))})},async setItemRaw(s,u,y={}){if(u===void 0)return g.removeItem(s,y);s=Ue(s);const{relativeKey:v,driver:w}=r(s);if(w.setItemRaw)await Te(w.setItemRaw,v,u,y);else if(w.setItem)await Te(w.setItem,v,xi(u),y);else return;w.watch||o("update",s)},async removeItem(s,u={}){typeof u=="boolean"&&(u={removeMeta:u}),s=Ue(s);const{relativeKey:y,driver:v}=r(s);v.removeItem&&(await Te(v.removeItem,y,u),(u.removeMeta||u.removeMata)&&await Te(v.removeItem,y+"$",u),v.watch||o("remove",s))},async getMeta(s,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),s=Ue(s);const{relativeKey:y,driver:v}=r(s),w=Object.create(null);if(v.getMeta&&Object.assign(w,await Te(v.getMeta,y,u)),!u.nativeOnly){const x=await Te(v.getItem,y+"$",u).then(j=>zt(j));x&&typeof x=="object"&&(typeof x.atime=="string"&&(x.atime=new Date(x.atime)),typeof x.mtime=="string"&&(x.mtime=new Date(x.mtime)),Object.assign(w,x))}return w},setMeta(s,u,y={}){return this.setItem(s+"$",u,y)},removeMeta(s,u={}){return this.removeItem(s+"$",u)},async getKeys(s,u={}){s=Kt(s);const y=f(s,!0);let v=[];const w=[];for(const x of y){const j=await Te(x.driver.getKeys,x.relativeBase,u);for(const H of j){const ue=x.mountpoint+Ue(H);v.some(M=>ue.startsWith(M))||w.push(ue)}v=[x.mountpoint,...v.filter(H=>!H.startsWith(x.mountpoint))]}return s?w.filter(x=>x.startsWith(s)&&x[x.length-1]!=="$"):w.filter(x=>x[x.length-1]!=="$")},async clear(s,u={}){s=Kt(s),await Promise.all(f(s,!1).map(async y=>{if(y.driver.clear)return Te(y.driver.clear,y.relativeBase,u);if(y.driver.removeItem){const v=await y.driver.getKeys(y.relativeBase||"",u);return Promise.all(v.map(w=>y.driver.removeItem(w,u)))}}))},async dispose(){await Promise.all(Object.values(n.mounts).map(s=>An(s)))},async watch(s){return await d(),n.watchListeners.push(s),async()=>{n.watchListeners=n.watchListeners.filter(u=>u!==s),n.watchListeners.length===0&&await E()}},async unwatch(){n.watchListeners=[],await E()},mount(s,u){if(s=Kt(s),s&&n.mounts[s])throw new Error(`already mounted at ${s}`);return s&&(n.mountpoints.push(s),n.mountpoints.sort((y,v)=>v.length-y.length)),n.mounts[s]=u,n.watching&&Promise.resolve(Tn(u,o,s)).then(y=>{n.unwatch[s]=y}).catch(console.error),g},async unmount(s,u=!0){var y,v;s=Kt(s),!(!s||!n.mounts[s])&&(n.watching&&s in n.unwatch&&((v=(y=n.unwatch)[s])==null||v.call(y),delete n.unwatch[s]),u&&await An(n.mounts[s]),n.mountpoints=n.mountpoints.filter(w=>w!==s),delete n.mounts[s])},getMount(s=""){s=Ue(s)+":";const u=r(s);return{driver:u.driver,base:u.base}},getMounts(s="",u={}){return s=Ue(s),f(s,u.parents).map(v=>({driver:v.driver,base:v.mountpoint}))},keys:(s,u={})=>g.getKeys(s,u),get:(s,u={})=>g.getItem(s,u),set:(s,u,y={})=>g.setItem(s,u,y),has:(s,u={})=>g.hasItem(s,u),del:(s,u={})=>g.removeItem(s,u),remove:(s,u={})=>g.removeItem(s,u)};return g}function Tn(e,n,r){return e.watch?e.watch((f,o)=>n(f,r+o)):()=>{}}async function An(e){typeof e.dispose=="function"&&await Te(e.dispose)}function bt(e){return new Promise((n,r)=>{e.oncomplete=e.onsuccess=()=>n(e.result),e.onabort=e.onerror=()=>r(e.error)})}function Fn(e,n){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(n);const f=bt(r);return(o,d)=>f.then(E=>d(E.transaction(n,o).objectStore(n)))}let Zt;function Lt(){return Zt||(Zt=Fn("keyval-store","keyval")),Zt}function Ln(e,n=Lt()){return n("readonly",r=>bt(r.get(e)))}function Ai(e,n,r=Lt()){return r("readwrite",f=>(f.put(n,e),bt(f.transaction)))}function Li(e,n=Lt()){return n("readwrite",r=>(r.delete(e),bt(r.transaction)))}function Ri(e=Lt()){return e("readwrite",n=>(n.clear(),bt(n.transaction)))}function Pi(e,n){return e.openCursor().onsuccess=function(){this.result&&(n(this.result),this.result.continue())},bt(e.transaction)}function Ci(e=Lt()){return e("readonly",n=>{if(n.getAllKeys)return bt(n.getAllKeys());const r=[];return Pi(n,f=>r.push(f.key)).then(()=>r)})}const Ni=e=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString()+"n":r),ji=e=>{const n=/([\[:])?(\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(n,'$1"$2n"$3');return JSON.parse(r,(f,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function Jn(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return ji(e)}catch{return e}}function kn(e){return typeof e=="string"?e:Ni(e)||""}const Mi="idb-keyval";var Bi=(e={})=>{const n=e.base&&e.base.length>0?`${e.base}:`:"",r=o=>n+o;let f;return e.dbName&&e.storeName&&(f=Fn(e.dbName,e.storeName)),{name:Mi,options:e,async hasItem(o){return!(typeof await Ln(r(o),f)>"u")},async getItem(o){return await Ln(r(o),f)??null},setItem(o,d){return Ai(r(o),d,f)},removeItem(o){return Li(r(o),f)},getKeys(){return Ci(f)},clear(){return Ri(f)}}};const Di="WALLET_CONNECT_V2_INDEXED_DB",zi="keyvaluestorage";let Ki=class{constructor(){this.indexedDb=Ti({driver:Bi({dbName:Di,storeName:zi})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(n=>[n.key,n.value])}async getItem(n){const r=await this.indexedDb.getItem(n);if(r!==null)return r}async setItem(n,r){await this.indexedDb.setItem(n,kn(r))}async removeItem(n){await this.indexedDb.removeItem(n)}};var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof k.dist.global<"u"?k.dist.global:typeof self<"u"?self:{},Ht={exports:{}};(function(){let e;function n(){}e=n,e.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},e.prototype.setItem=function(r,f){this[r]=String(f)},e.prototype.removeItem=function(r){delete this[r]},e.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(f){r[f]=void 0,delete r[f]})},e.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Qt<"u"&&Qt.localStorage?Ht.exports=Qt.localStorage:typeof window<"u"&&window.localStorage?Ht.exports=window.localStorage:Ht.exports=new n})();function Ui(e){var n;return[e[0],Jn((n=e[1])!=null?n:"")]}class $i{constructor(){this.localStorage=Ht.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Ui)}async getItem(n){const r=this.localStorage.getItem(n);if(r!==null)return Jn(r)}async setItem(n,r){this.localStorage.setItem(n,kn(r))}async removeItem(n){this.localStorage.removeItem(n)}}const Hi="wc_storage_version",Rn=1,Gi=async(e,n,r)=>{const f=Hi,o=await n.getItem(f);if(o&&o>=Rn){r(n);return}const d=await e.getKeys();if(!d.length){r(n);return}const E=[];for(;d.length;){const S=d.shift();if(!S)continue;const g=S.toLowerCase();if(g.includes("wc@")||g.includes("walletconnect")||g.includes("wc_")||g.includes("wallet_connect")){const s=await e.getItem(S);await n.setItem(S,s),E.push(S)}}await n.setItem(f,Rn),r(n),Wi(e,E)},Wi=async(e,n)=>{n.length&&n.forEach(async r=>{await e.removeItem(r)})};class Fi{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};const n=new $i;this.storage=n;try{const r=new Ki;Gi(n,r,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(n){return await this.initialize(),this.storage.getItem(n)}async setItem(n,r){return await this.initialize(),this.storage.setItem(n,r)}async removeItem(n){return await this.initialize(),this.storage.removeItem(n)}async initialize(){this.initialized||await new Promise(n=>{const r=setInterval(()=>{this.initialized&&(clearInterval(r),n())},20)})}}class Ji{}function ki(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Vi=Xi;function Xi(e,n,r){var f=r&&r.stringify||ki,o=1;if(typeof e=="object"&&e!==null){var d=n.length+o;if(d===1)return e;var E=new Array(d);E[0]=f(e);for(var S=1;S<d;S++)E[S]=f(n[S]);return E.join(" ")}if(typeof e!="string")return e;var g=n.length;if(g===0)return e;for(var s="",u=1-o,y=-1,v=e&&e.length||0,w=0;w<v;){if(e.charCodeAt(w)===37&&w+1<v){switch(y=y>-1?y:0,e.charCodeAt(w+1)){case 100:case 102:if(u>=g||n[u]==null)break;y<w&&(s+=e.slice(y,w)),s+=Number(n[u]),y=w+2,w++;break;case 105:if(u>=g||n[u]==null)break;y<w&&(s+=e.slice(y,w)),s+=Math.floor(Number(n[u])),y=w+2,w++;break;case 79:case 111:case 106:if(u>=g||n[u]===void 0)break;y<w&&(s+=e.slice(y,w));var x=typeof n[u];if(x==="string"){s+="'"+n[u]+"'",y=w+2,w++;break}if(x==="function"){s+=n[u].name||"<anonymous>",y=w+2,w++;break}s+=f(n[u]),y=w+2,w++;break;case 115:if(u>=g)break;y<w&&(s+=e.slice(y,w)),s+=String(n[u]),y=w+2,w++;break;case 37:y<w&&(s+=e.slice(y,w)),s+="%",y=w+2,w++,u--;break}++u}++w}return y===-1?e:(y<v&&(s+=e.slice(y)),s)}const Pn=Vi;var mt=Qe;const It=ss().console||{},Yi={mapHttpRequest:Ut,mapHttpResponse:Ut,wrapRequestSerializer:en,wrapResponseSerializer:en,wrapErrorSerializer:en,req:Ut,res:Ut,err:ts};function qi(e,n){return Array.isArray(e)?e.filter(function(f){return f!=="!stdSerializers.err"}):e===!0?Object.keys(n):!1}function Qe(e){e=e||{},e.browser=e.browser||{};const n=e.browser.transmit;if(n&&typeof n.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||It;e.browser.write&&(e.browser.asObject=!0);const f=e.serializers||{},o=qi(e.browser.serialize,f);let d=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(d=!1);const E=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");const S=e.level||"info",g=Object.create(r);g.log||(g.log=Ot),Object.defineProperty(g,"levelVal",{get:u}),Object.defineProperty(g,"level",{get:y,set:v});const s={transmit:n,serialize:o,asObject:e.browser.asObject,levels:E,timestamp:ns(e)};g.levels=Qe.levels,g.level=S,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=Ot,g.serializers=f,g._serialize=o,g._stdErrSerialize=d,g.child=w,n&&(g._logEvent=nn());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function y(){return this._level}function v(x){if(x!=="silent"&&!this.levels.values[x])throw Error("unknown level "+x);this._level=x,pt(s,g,"error","log"),pt(s,g,"fatal","error"),pt(s,g,"warn","error"),pt(s,g,"info","log"),pt(s,g,"debug","log"),pt(s,g,"trace","log")}function w(x,j){if(!x)throw new Error("missing bindings for child Pino");j=j||{},o&&x.serializers&&(j.serializers=x.serializers);const H=j.serializers;if(o&&H){var ue=Object.assign({},f,H),M=e.browser.serialize===!0?Object.keys(ue):o;delete x.serializers,Vt([x],M,ue,this._stdErrSerialize)}function Ae(ge){this._childLevel=(ge._childLevel|0)+1,this.error=_t(ge,x,"error"),this.fatal=_t(ge,x,"fatal"),this.warn=_t(ge,x,"warn"),this.info=_t(ge,x,"info"),this.debug=_t(ge,x,"debug"),this.trace=_t(ge,x,"trace"),ue&&(this.serializers=ue,this._serialize=M),n&&(this._logEvent=nn([].concat(ge._logEvent.bindings,x)))}return Ae.prototype=this,new Ae(this)}return g}Qe.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Qe.stdSerializers=Yi;Qe.stdTimeFunctions=Object.assign({},{nullTime:Vn,epochTime:Xn,unixTime:rs,isoTime:is});function pt(e,n,r,f){const o=Object.getPrototypeOf(n);n[r]=n.levelVal>n.levels.values[r]?Ot:o[r]?o[r]:It[r]||It[f]||Ot,Zi(e,n,r)}function Zi(e,n,r){!e.transmit&&n[r]===Ot||(n[r]=function(f){return function(){const d=e.timestamp(),E=new Array(arguments.length),S=Object.getPrototypeOf&&Object.getPrototypeOf(this)===It?It:this;for(var g=0;g<E.length;g++)E[g]=arguments[g];if(e.serialize&&!e.asObject&&Vt(E,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?f.call(S,Qi(this,r,E,d)):f.apply(S,E),e.transmit){const s=e.transmit.level||n.level,u=Qe.levels.values[s],y=Qe.levels.values[r];if(y<u)return;es(this,{ts:d,methodLevel:r,methodValue:y,transmitLevel:s,transmitValue:Qe.levels.values[e.transmit.level||n.level],send:e.transmit.send,val:n.levelVal},E)}}}(n[r]))}function Qi(e,n,r,f){e._serialize&&Vt(r,e._serialize,e.serializers,e._stdErrSerialize);const o=r.slice();let d=o[0];const E={};f&&(E.time=f),E.level=Qe.levels.values[n];let S=(e._childLevel|0)+1;if(S<1&&(S=1),d!==null&&typeof d=="object"){for(;S--&&typeof o[0]=="object";)Object.assign(E,o.shift());d=o.length?Pn(o.shift(),o):void 0}else typeof d=="string"&&(d=Pn(o.shift(),o));return d!==void 0&&(E.msg=d),E}function Vt(e,n,r,f){for(const o in e)if(f&&e[o]instanceof Error)e[o]=Qe.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o]))for(const d in e[o])n&&n.indexOf(d)>-1&&d in r&&(e[o][d]=r[d](e[o][d]))}function _t(e,n,r){return function(){const f=new Array(1+arguments.length);f[0]=n;for(var o=1;o<f.length;o++)f[o]=arguments[o-1];return e[r].apply(this,f)}}function es(e,n,r){const f=n.send,o=n.ts,d=n.methodLevel,E=n.methodValue,S=n.val,g=e._logEvent.bindings;Vt(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=r.filter(function(s){return g.indexOf(s)===-1}),e._logEvent.level.label=d,e._logEvent.level.value=E,f(d,e._logEvent,S),e._logEvent=nn(g)}function nn(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function ts(e){const n={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)n[r]===void 0&&(n[r]=e[r]);return n}function ns(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Vn:Xn}function Ut(){return{}}function en(e){return e}function Ot(){}function Vn(){return!1}function Xn(){return Date.now()}function rs(){return Math.round(Date.now()/1e3)}function is(){return new Date(Date.now()).toISOString()}function ss(){function e(n){return typeof n<"u"&&n}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 an=k.getDefaultExportFromCjs(mt),os=e=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString()+"n":r);function Cn(e){return typeof e=="string"?e:os(e)||""}const as={level:"info"},Rt="custom_context",fn=1e3*1024;class fs{constructor(n){this.nodeValue=n,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class Nn{constructor(n){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=n,this.sizeInBytes=0}append(n){const r=new fs(n);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${n} 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 n=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=n.size}toArray(){const n=[];let r=this.head;for(;r!==null;)n.push(r.value),r=r.next;return n}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let n=this.head;return{next:()=>{if(!n)return{done:!0,value:null};const r=n.value;return n=n.next,{done:!1,value:r}}}}}class Yn{constructor(n,r=fn){this.level=n??"error",this.levelValue=mt.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new Nn(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(n,r){r===mt.levels.values.error?console.error(n):r===mt.levels.values.warn?console.warn(n):r===mt.levels.values.debug?console.debug(n):r===mt.levels.values.trace?console.trace(n):console.log(n)}appendToLogs(n){this.logs.append(Cn({timestamp:new Date().toISOString(),log:n}));const r=typeof n=="string"?JSON.parse(n).level:n.level;r>=this.levelValue&&this.forwardToConsole(n,r)}getLogs(){return this.logs}clearLogs(){this.logs=new Nn(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(n){const r=this.getLogArray();return r.push(Cn({extraMetadata:n})),new Blob(r,{type:"application/json"})}}class cs{constructor(n,r=fn){this.baseChunkLogger=new Yn(n,r)}write(n){this.baseChunkLogger.appendToLogs(n)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(n){return this.baseChunkLogger.logsToBlob(n)}downloadLogsBlobInBrowser(n){const r=URL.createObjectURL(this.logsToBlob(n)),f=document.createElement("a");f.href=r,f.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(r)}}class us{constructor(n,r=fn){this.baseChunkLogger=new Yn(n,r)}write(n){this.baseChunkLogger.appendToLogs(n)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(n){return this.baseChunkLogger.logsToBlob(n)}}var ls=Object.defineProperty,ds=Object.defineProperties,hs=Object.getOwnPropertyDescriptors,jn=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable,Mn=(e,n,r)=>n in e?ls(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Gt=(e,n)=>{for(var r in n||(n={}))bs.call(n,r)&&Mn(e,r,n[r]);if(jn)for(var r of jn(n))gs.call(n,r)&&Mn(e,r,n[r]);return e},Wt=(e,n)=>ds(e,hs(n));function ys(e){return Wt(Gt({},e),{level:(e==null?void 0:e.level)||as.level})}function ps(e,n=Rt){return e[n]||""}function _s(e,n,r=Rt){return e[r]=n,e}function qn(e,n=Rt){let r="";return typeof e.bindings>"u"?r=ps(e,n):r=e.bindings().context||"",r}function ms(e,n,r=Rt){const f=qn(e,r);return f.trim()?`${f}/${n}`:n}function xs(e,n,r=Rt){const f=ms(e,n,r),o=e.child({context:f});return _s(o,f,r)}function ws(e){var n,r;const f=new cs((n=e.opts)==null?void 0:n.level,e.maxSizeInBytes);return{logger:an(Wt(Gt({},e.opts),{level:"trace",browser:Wt(Gt({},(r=e.opts)==null?void 0:r.browser),{write:o=>f.write(o)})})),chunkLoggerController:f}}function vs(e){var n;const r=new us((n=e.opts)==null?void 0:n.level,e.maxSizeInBytes);return{logger:an(Wt(Gt({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}function Ss(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?ws(e):vs(e)}var cn={},Zn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var n=De.binary,r=De.wipe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var f=function(){function S(){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 S.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},S.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},S.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},S.prototype.update=function(g,s){if(s===void 0&&(s=g.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++]=g[u++],s--;this._bufferLength===this.blockSize&&(d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(s>=this.blockSize&&(u=d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,g,u,s),s%=this.blockSize);s>0;)this._buffer[this._bufferLength++]=g[u++],s--;return this},S.prototype.finish=function(g){if(!this._finished){var s=this._bytesHashed,u=this._bufferLength,y=s/536870912|0,v=s<<3,w=s%128<112?128:256;this._buffer[u]=128;for(var x=u+1;x<w-8;x++)this._buffer[x]=0;n.writeUint32BE(y,this._buffer,w-8),n.writeUint32BE(v,this._buffer,w-4),d(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,w),this._finished=!0}for(var x=0;x<this.digestLength/8;x++)n.writeUint32BE(this._stateHi[x],g,x*8),n.writeUint32BE(this._stateLo[x],g,x*8+4);return this},S.prototype.digest=function(){var g=new Uint8Array(this.digestLength);return this.finish(g),g},S.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}},S.prototype.restoreState=function(g){return this._stateHi.set(g.stateHi),this._stateLo.set(g.stateLo),this._bufferLength=g.bufferLength,g.buffer&&this._buffer.set(g.buffer),this._bytesHashed=g.bytesHashed,this._finished=!1,this},S.prototype.cleanSavedState=function(g){r.wipe(g.stateHi),r.wipe(g.stateLo),g.buffer&&r.wipe(g.buffer),g.bufferLength=0,g.bytesHashed=0},S}();e.SHA512=f;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 d(S,g,s,u,y,v,w){for(var x=s[0],j=s[1],H=s[2],ue=s[3],M=s[4],Ae=s[5],ge=s[6],Ne=s[7],G=u[0],N=u[1],je=u[2],et=u[3],ye=u[4],Je=u[5],$e=u[6],Xe=u[7],m,_,Y,le,L,I,O,A;w>=128;){for(var Le=0;Le<16;Le++){var ne=8*Le+v;S[Le]=n.readUint32BE(y,ne),g[Le]=n.readUint32BE(y,ne+4)}for(var Le=0;Le<80;Le++){var xt=x,B=j,gt=H,b=ue,h=M,l=Ae,t=ge,a=Ne,R=G,P=N,z=je,K=et,D=ye,U=Je,Re=$e,de=Xe;if(m=Ne,_=Xe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=(M>>>14|ye<<18)^(M>>>18|ye<<14)^(ye>>>9|M<<23),_=(ye>>>14|M<<18)^(ye>>>18|M<<14)^(M>>>9|ye<<23),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=M&Ae^~M&ge,_=ye&Je^~ye&$e,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=o[Le*2],_=o[Le*2+1],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=S[Le%16],_=g[Le%16],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,Y=O&65535|A<<16,le=L&65535|I<<16,m=Y,_=le,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=(x>>>28|G<<4)^(G>>>2|x<<30)^(G>>>7|x<<25),_=(G>>>28|x<<4)^(x>>>2|G<<30)^(x>>>7|G<<25),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,m=x&j^x&H^j&H,_=G&N^G&je^N&je,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,a=O&65535|A<<16,de=L&65535|I<<16,m=b,_=K,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=Y,_=le,L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,b=O&65535|A<<16,K=L&65535|I<<16,j=xt,H=B,ue=gt,M=b,Ae=h,ge=l,Ne=t,x=a,N=R,je=P,et=z,ye=K,Je=D,$e=U,Xe=Re,G=de,Le%16===15)for(var ne=0;ne<16;ne++)m=S[ne],_=g[ne],L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=S[(ne+9)%16],_=g[(ne+9)%16],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,Y=S[(ne+1)%16],le=g[(ne+1)%16],m=(Y>>>1|le<<31)^(Y>>>8|le<<24)^Y>>>7,_=(le>>>1|Y<<31)^(le>>>8|Y<<24)^(le>>>7|Y<<25),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,Y=S[(ne+14)%16],le=g[(ne+14)%16],m=(Y>>>19|le<<13)^(le>>>29|Y<<3)^Y>>>6,_=(le>>>19|Y<<13)^(Y>>>29|le<<3)^(le>>>6|Y<<26),L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,S[ne]=O&65535|A<<16,g[ne]=L&65535|I<<16}m=x,_=G,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[0],_=u[0],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[0]=x=O&65535|A<<16,u[0]=G=L&65535|I<<16,m=j,_=N,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[1],_=u[1],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[1]=j=O&65535|A<<16,u[1]=N=L&65535|I<<16,m=H,_=je,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[2],_=u[2],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[2]=H=O&65535|A<<16,u[2]=je=L&65535|I<<16,m=ue,_=et,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[3],_=u[3],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[3]=ue=O&65535|A<<16,u[3]=et=L&65535|I<<16,m=M,_=ye,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[4],_=u[4],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[4]=M=O&65535|A<<16,u[4]=ye=L&65535|I<<16,m=Ae,_=Je,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[5],_=u[5],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[5]=Ae=O&65535|A<<16,u[5]=Je=L&65535|I<<16,m=ge,_=$e,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[6],_=u[6],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[6]=ge=O&65535|A<<16,u[6]=$e=L&65535|I<<16,m=Ne,_=Xe,L=_&65535,I=_>>>16,O=m&65535,A=m>>>16,m=s[7],_=u[7],L+=_&65535,I+=_>>>16,O+=m&65535,A+=m>>>16,I+=L>>>16,O+=I>>>16,A+=O>>>16,s[7]=Ne=O&65535|A<<16,u[7]=Xe=L&65535|I<<16,v+=128,w-=128}return v}function E(S){var g=new f;g.update(S);var s=g.digest();return g.clean(),s}e.hash=E})(Zn);(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 n=De.random,r=Zn,f=De.wipe;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function o(b){const h=new Float64Array(16);if(b)for(let l=0;l<b.length;l++)h[l]=b[l];return h}const d=new Uint8Array(32);d[0]=9;const E=o(),S=o([1]),g=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]),y=o([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),v=o([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function w(b,h){for(let l=0;l<16;l++)b[l]=h[l]|0}function x(b){let h=1;for(let l=0;l<16;l++){let t=b[l]+h+65535;h=Math.floor(t/65536),b[l]=t-h*65536}b[0]+=h-1+37*(h-1)}function j(b,h,l){const t=~(l-1);for(let a=0;a<16;a++){const R=t&(b[a]^h[a]);b[a]^=R,h[a]^=R}}function H(b,h){const l=o(),t=o();for(let a=0;a<16;a++)t[a]=h[a];x(t),x(t),x(t);for(let a=0;a<2;a++){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,j(t,l,1-R)}for(let a=0;a<16;a++)b[2*a]=t[a]&255,b[2*a+1]=t[a]>>8}function ue(b,h){let l=0;for(let t=0;t<32;t++)l|=b[t]^h[t];return(1&l-1>>>8)-1}function M(b,h){const l=new Uint8Array(32),t=new Uint8Array(32);return H(l,b),H(t,h),ue(l,t)}function Ae(b){const h=new Uint8Array(32);return H(h,b),h[0]&1}function ge(b,h){for(let l=0;l<16;l++)b[l]=h[2*l]+(h[2*l+1]<<8);b[15]&=32767}function Ne(b,h,l){for(let t=0;t<16;t++)b[t]=h[t]+l[t]}function G(b,h,l){for(let t=0;t<16;t++)b[t]=h[t]-l[t]}function N(b,h,l){let t,a,R=0,P=0,z=0,K=0,D=0,U=0,Re=0,de=0,Pe=0,pe=0,he=0,re=0,te=0,q=0,V=0,$=0,ie=0,_e=0,W=0,Me=0,ze=0,He=0,Ge=0,Ke=0,Ye=0,Ze=0,st=0,We=0,ct=0,wt=0,Pt=0,se=l[0],Z=l[1],oe=l[2],ae=l[3],fe=l[4],Q=l[5],me=l[6],xe=l[7],we=l[8],ve=l[9],Se=l[10],be=l[11],ce=l[12],J=l[13],Ee=l[14],Ie=l[15];t=h[0],R+=t*se,P+=t*Z,z+=t*oe,K+=t*ae,D+=t*fe,U+=t*Q,Re+=t*me,de+=t*xe,Pe+=t*we,pe+=t*ve,he+=t*Se,re+=t*be,te+=t*ce,q+=t*J,V+=t*Ee,$+=t*Ie,t=h[1],P+=t*se,z+=t*Z,K+=t*oe,D+=t*ae,U+=t*fe,Re+=t*Q,de+=t*me,Pe+=t*xe,pe+=t*we,he+=t*ve,re+=t*Se,te+=t*be,q+=t*ce,V+=t*J,$+=t*Ee,ie+=t*Ie,t=h[2],z+=t*se,K+=t*Z,D+=t*oe,U+=t*ae,Re+=t*fe,de+=t*Q,Pe+=t*me,pe+=t*xe,he+=t*we,re+=t*ve,te+=t*Se,q+=t*be,V+=t*ce,$+=t*J,ie+=t*Ee,_e+=t*Ie,t=h[3],K+=t*se,D+=t*Z,U+=t*oe,Re+=t*ae,de+=t*fe,Pe+=t*Q,pe+=t*me,he+=t*xe,re+=t*we,te+=t*ve,q+=t*Se,V+=t*be,$+=t*ce,ie+=t*J,_e+=t*Ee,W+=t*Ie,t=h[4],D+=t*se,U+=t*Z,Re+=t*oe,de+=t*ae,Pe+=t*fe,pe+=t*Q,he+=t*me,re+=t*xe,te+=t*we,q+=t*ve,V+=t*Se,$+=t*be,ie+=t*ce,_e+=t*J,W+=t*Ee,Me+=t*Ie,t=h[5],U+=t*se,Re+=t*Z,de+=t*oe,Pe+=t*ae,pe+=t*fe,he+=t*Q,re+=t*me,te+=t*xe,q+=t*we,V+=t*ve,$+=t*Se,ie+=t*be,_e+=t*ce,W+=t*J,Me+=t*Ee,ze+=t*Ie,t=h[6],Re+=t*se,de+=t*Z,Pe+=t*oe,pe+=t*ae,he+=t*fe,re+=t*Q,te+=t*me,q+=t*xe,V+=t*we,$+=t*ve,ie+=t*Se,_e+=t*be,W+=t*ce,Me+=t*J,ze+=t*Ee,He+=t*Ie,t=h[7],de+=t*se,Pe+=t*Z,pe+=t*oe,he+=t*ae,re+=t*fe,te+=t*Q,q+=t*me,V+=t*xe,$+=t*we,ie+=t*ve,_e+=t*Se,W+=t*be,Me+=t*ce,ze+=t*J,He+=t*Ee,Ge+=t*Ie,t=h[8],Pe+=t*se,pe+=t*Z,he+=t*oe,re+=t*ae,te+=t*fe,q+=t*Q,V+=t*me,$+=t*xe,ie+=t*we,_e+=t*ve,W+=t*Se,Me+=t*be,ze+=t*ce,He+=t*J,Ge+=t*Ee,Ke+=t*Ie,t=h[9],pe+=t*se,he+=t*Z,re+=t*oe,te+=t*ae,q+=t*fe,V+=t*Q,$+=t*me,ie+=t*xe,_e+=t*we,W+=t*ve,Me+=t*Se,ze+=t*be,He+=t*ce,Ge+=t*J,Ke+=t*Ee,Ye+=t*Ie,t=h[10],he+=t*se,re+=t*Z,te+=t*oe,q+=t*ae,V+=t*fe,$+=t*Q,ie+=t*me,_e+=t*xe,W+=t*we,Me+=t*ve,ze+=t*Se,He+=t*be,Ge+=t*ce,Ke+=t*J,Ye+=t*Ee,Ze+=t*Ie,t=h[11],re+=t*se,te+=t*Z,q+=t*oe,V+=t*ae,$+=t*fe,ie+=t*Q,_e+=t*me,W+=t*xe,Me+=t*we,ze+=t*ve,He+=t*Se,Ge+=t*be,Ke+=t*ce,Ye+=t*J,Ze+=t*Ee,st+=t*Ie,t=h[12],te+=t*se,q+=t*Z,V+=t*oe,$+=t*ae,ie+=t*fe,_e+=t*Q,W+=t*me,Me+=t*xe,ze+=t*we,He+=t*ve,Ge+=t*Se,Ke+=t*be,Ye+=t*ce,Ze+=t*J,st+=t*Ee,We+=t*Ie,t=h[13],q+=t*se,V+=t*Z,$+=t*oe,ie+=t*ae,_e+=t*fe,W+=t*Q,Me+=t*me,ze+=t*xe,He+=t*we,Ge+=t*ve,Ke+=t*Se,Ye+=t*be,Ze+=t*ce,st+=t*J,We+=t*Ee,ct+=t*Ie,t=h[14],V+=t*se,$+=t*Z,ie+=t*oe,_e+=t*ae,W+=t*fe,Me+=t*Q,ze+=t*me,He+=t*xe,Ge+=t*we,Ke+=t*ve,Ye+=t*Se,Ze+=t*be,st+=t*ce,We+=t*J,ct+=t*Ee,wt+=t*Ie,t=h[15],$+=t*se,ie+=t*Z,_e+=t*oe,W+=t*ae,Me+=t*fe,ze+=t*Q,He+=t*me,Ge+=t*xe,Ke+=t*we,Ye+=t*ve,Ze+=t*Se,st+=t*be,We+=t*ce,ct+=t*J,wt+=t*Ee,Pt+=t*Ie,R+=38*ie,P+=38*_e,z+=38*W,K+=38*Me,D+=38*ze,U+=38*He,Re+=38*Ge,de+=38*Ke,Pe+=38*Ye,pe+=38*Ze,he+=38*st,re+=38*We,te+=38*ct,q+=38*wt,V+=38*Pt,a=1,t=R+a+65535,a=Math.floor(t/65536),R=t-a*65536,t=P+a+65535,a=Math.floor(t/65536),P=t-a*65536,t=z+a+65535,a=Math.floor(t/65536),z=t-a*65536,t=K+a+65535,a=Math.floor(t/65536),K=t-a*65536,t=D+a+65535,a=Math.floor(t/65536),D=t-a*65536,t=U+a+65535,a=Math.floor(t/65536),U=t-a*65536,t=Re+a+65535,a=Math.floor(t/65536),Re=t-a*65536,t=de+a+65535,a=Math.floor(t/65536),de=t-a*65536,t=Pe+a+65535,a=Math.floor(t/65536),Pe=t-a*65536,t=pe+a+65535,a=Math.floor(t/65536),pe=t-a*65536,t=he+a+65535,a=Math.floor(t/65536),he=t-a*65536,t=re+a+65535,a=Math.floor(t/65536),re=t-a*65536,t=te+a+65535,a=Math.floor(t/65536),te=t-a*65536,t=q+a+65535,a=Math.floor(t/65536),q=t-a*65536,t=V+a+65535,a=Math.floor(t/65536),V=t-a*65536,t=$+a+65535,a=Math.floor(t/65536),$=t-a*65536,R+=a-1+37*(a-1),a=1,t=R+a+65535,a=Math.floor(t/65536),R=t-a*65536,t=P+a+65535,a=Math.floor(t/65536),P=t-a*65536,t=z+a+65535,a=Math.floor(t/65536),z=t-a*65536,t=K+a+65535,a=Math.floor(t/65536),K=t-a*65536,t=D+a+65535,a=Math.floor(t/65536),D=t-a*65536,t=U+a+65535,a=Math.floor(t/65536),U=t-a*65536,t=Re+a+65535,a=Math.floor(t/65536),Re=t-a*65536,t=de+a+65535,a=Math.floor(t/65536),de=t-a*65536,t=Pe+a+65535,a=Math.floor(t/65536),Pe=t-a*65536,t=pe+a+65535,a=Math.floor(t/65536),pe=t-a*65536,t=he+a+65535,a=Math.floor(t/65536),he=t-a*65536,t=re+a+65535,a=Math.floor(t/65536),re=t-a*65536,t=te+a+65535,a=Math.floor(t/65536),te=t-a*65536,t=q+a+65535,a=Math.floor(t/65536),q=t-a*65536,t=V+a+65535,a=Math.floor(t/65536),V=t-a*65536,t=$+a+65535,a=Math.floor(t/65536),$=t-a*65536,R+=a-1+37*(a-1),b[0]=R,b[1]=P,b[2]=z,b[3]=K,b[4]=D,b[5]=U,b[6]=Re,b[7]=de,b[8]=Pe,b[9]=pe,b[10]=he,b[11]=re,b[12]=te,b[13]=q,b[14]=V,b[15]=$}function je(b,h){N(b,h,h)}function et(b,h){const l=o();let t;for(t=0;t<16;t++)l[t]=h[t];for(t=253;t>=0;t--)je(l,l),t!==2&&t!==4&&N(l,l,h);for(t=0;t<16;t++)b[t]=l[t]}function ye(b,h){const l=o();let t;for(t=0;t<16;t++)l[t]=h[t];for(t=250;t>=0;t--)je(l,l),t!==1&&N(l,l,h);for(t=0;t<16;t++)b[t]=l[t]}function Je(b,h){const l=o(),t=o(),a=o(),R=o(),P=o(),z=o(),K=o(),D=o(),U=o();G(l,b[1],b[0]),G(U,h[1],h[0]),N(l,l,U),Ne(t,b[0],b[1]),Ne(U,h[0],h[1]),N(t,t,U),N(a,b[3],h[3]),N(a,a,s),N(R,b[2],h[2]),Ne(R,R,R),G(P,t,l),G(z,R,a),Ne(K,R,a),Ne(D,t,l),N(b[0],P,z),N(b[1],D,K),N(b[2],K,z),N(b[3],P,D)}function $e(b,h,l){for(let t=0;t<4;t++)j(b[t],h[t],l)}function Xe(b,h){const l=o(),t=o(),a=o();et(a,h[2]),N(l,h[0],a),N(t,h[1],a),H(b,t),b[31]^=Ae(l)<<7}function m(b,h,l){w(b[0],E),w(b[1],S),w(b[2],S),w(b[3],E);for(let t=255;t>=0;--t){const a=l[t/8|0]>>(t&7)&1;$e(b,h,a),Je(h,b),Je(b,b),$e(b,h,a)}}function _(b,h){const l=[o(),o(),o(),o()];w(l[0],u),w(l[1],y),w(l[2],S),N(l[3],u,y),m(b,l,h)}function Y(b){if(b.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const h=(0,r.hash)(b);h[0]&=248,h[31]&=127,h[31]|=64;const l=new Uint8Array(32),t=[o(),o(),o(),o()];_(t,h),Xe(l,t);const a=new Uint8Array(64);return a.set(b),a.set(l,32),{publicKey:l,secretKey:a}}e.generateKeyPairFromSeed=Y;function le(b){const h=(0,n.randomBytes)(32,b),l=Y(h);return(0,f.wipe)(h),l}e.generateKeyPair=le;function L(b){if(b.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(b.subarray(32))}e.extractPublicKeyFromSecretKey=L;const I=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function O(b,h){let l,t,a,R;for(t=63;t>=32;--t){for(l=0,a=t-32,R=t-12;a<R;++a)h[a]+=l-16*h[t]*I[a-(t-32)],l=Math.floor((h[a]+128)/256),h[a]-=l*256;h[a]+=l,h[t]=0}for(l=0,a=0;a<32;a++)h[a]+=l-(h[31]>>4)*I[a],l=h[a]>>8,h[a]&=255;for(a=0;a<32;a++)h[a]-=l*I[a];for(t=0;t<32;t++)h[t+1]+=h[t]>>8,b[t]=h[t]&255}function A(b){const h=new Float64Array(64);for(let l=0;l<64;l++)h[l]=b[l];for(let l=0;l<64;l++)b[l]=0;O(b,h)}function Le(b,h){const l=new Float64Array(64),t=[o(),o(),o(),o()],a=(0,r.hash)(b.subarray(0,32));a[0]&=248,a[31]&=127,a[31]|=64;const R=new Uint8Array(64);R.set(a.subarray(32),32);const P=new r.SHA512;P.update(R.subarray(32)),P.update(h);const z=P.digest();P.clean(),A(z),_(t,z),Xe(R,t),P.reset(),P.update(R.subarray(0,32)),P.update(b.subarray(32)),P.update(h);const K=P.digest();A(K);for(let D=0;D<32;D++)l[D]=z[D];for(let D=0;D<32;D++)for(let U=0;U<32;U++)l[D+U]+=K[D]*a[U];return O(R.subarray(32),l),R}e.sign=Le;function ne(b,h){const l=o(),t=o(),a=o(),R=o(),P=o(),z=o(),K=o();return w(b[2],S),ge(b[1],h),je(a,b[1]),N(R,a,g),G(a,a,b[2]),Ne(R,b[2],R),je(P,R),je(z,P),N(K,z,P),N(l,K,a),N(l,l,R),ye(l,l),N(l,l,a),N(l,l,R),N(l,l,R),N(b[0],l,R),je(t,b[0]),N(t,t,R),M(t,a)&&N(b[0],b[0],v),je(t,b[0]),N(t,t,R),M(t,a)?-1:(Ae(b[0])===h[31]>>7&&G(b[0],E,b[0]),N(b[3],b[0],b[1]),0)}function xt(b,h,l){const t=new Uint8Array(32),a=[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,b))return!1;const P=new r.SHA512;P.update(l.subarray(0,32)),P.update(b),P.update(h);const z=P.digest();return A(z),m(a,R,z),_(R,l.subarray(32)),Je(a,R),Xe(t,a),!ue(l,t)}e.verify=xt;function B(b){let h=[o(),o(),o(),o()];if(ne(h,b))throw new Error("Ed25519: invalid public key");let l=o(),t=o(),a=h[1];Ne(l,S,a),G(t,S,a),et(t,t),N(l,l,t);let R=new Uint8Array(32);return H(R,l),R}e.convertPublicKeyToX25519=B;function gt(b){const h=(0,r.hash)(b.subarray(0,32));h[0]&=248,h[31]&=127,h[31]|=64;const l=new Uint8Array(h.subarray(0,32));return(0,f.wipe)(h),l}e.convertSecretKeyToX25519=gt})(cn);const Es="EdDSA",Is="JWT",Ft=".",Xt="base64url",Qn="utf8",er="utf8",Os=":",Ts="did",As="key",Bn="base58btc",Ls="z",Rs="K36",Ps=32,Cs=e=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString()+"n":r),Ns=e=>{const n=/([\[:])?(\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(n,'$1"$2n"$3');return JSON.parse(r,(f,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function js(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return Ns(e)}catch{return e}}function Ms(e){return typeof e=="string"?e:Cs(e)||""}function Dn(e){return js(At(ht(e,Xt),Qn))}function Jt(e){return At(ht(Ms(e),Qn),Xt)}function tr(e){const n=ht(Rs,Bn),r=Ls+At(Hn([n,e]),Bn);return[Ts,As,r].join(Os)}function Bs(e){return At(e,Xt)}function Ds(e){return ht(e,Xt)}function zs(e){return ht([Jt(e.header),Jt(e.payload)].join(Ft),er)}function Ks(e){return[Jt(e.header),Jt(e.payload),Bs(e.signature)].join(Ft)}function Us(e){const n=e.split(Ft),r=Dn(n[0]),f=Dn(n[1]),o=Ds(n[2]),d=ht(n.slice(0,2).join(Ft),er);return{header:r,payload:f,signature:o,data:d}}function $s(e=De.random.randomBytes(Ps)){return cn.generateKeyPairFromSeed(e)}async function Hs(e,n,r,f,o=De.cjs.fromMiliseconds(Date.now())){const d={alg:Es,typ:Is},E=tr(f.publicKey),S=o+r,g={iss:E,sub:e,aud:n,iat:o,exp:S},s=zs({header:d,payload:g}),u=cn.sign(f.secretKey,s);return Ks({header:d,payload:g,signature:u})}const Gs="PARSE_ERROR",Ws="INVALID_REQUEST",Fs="METHOD_NOT_FOUND",Js="INVALID_PARAMS",nr="INTERNAL_ERROR",un="SERVER_ERROR",ks=[-32700,-32600,-32601,-32602,-32603],Et={[Gs]:{code:-32700,message:"Parse error"},[Ws]:{code:-32600,message:"Invalid Request"},[Fs]:{code:-32601,message:"Method not found"},[Js]:{code:-32602,message:"Invalid params"},[nr]:{code:-32603,message:"Internal error"},[un]:{code:-32e3,message:"Server error"}},rr=un;function Vs(e){return ks.includes(e)}function zn(e){return Object.keys(Et).includes(e)?Et[e]:Et[rr]}function Xs(e){const n=Object.values(Et).find(r=>r.code===e);return n||Et[rr]}function Ys(e,n,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${n}`):e}var ir={};/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,8 +1,8 @@
1
1
  var h = Object.defineProperty;
2
2
  var d = (a, e, t) => e in a ? h(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
3
  var o = (a, e, t) => d(a, typeof e != "symbol" ? e + "" : e, t);
4
- import { b4 as m, bz as w, ca as g, s as p, bh as u } from "./index-DXcVEr2U.mjs";
5
- import { A as l } from "./aptos-G95l4D5Y.mjs";
4
+ import { b4 as m, bz as w, ca as g, r as p, bh as u } from "./index-B3CeIlMx.mjs";
5
+ import { A as l } from "./aptos-B3TWiavl.mjs";
6
6
  class i {
7
7
  constructor(e, t, r, s) {
8
8
  o(this, "network");
@@ -1,9 +1,9 @@
1
- import { cC as Dc, X as x, cn as oo, aB as Fc, Y as ao, c3 as C, ad as Lc, ah as qc } from "./index-DXcVEr2U.mjs";
1
+ import { cD as Dc, V as x, co as oo, aA as Fc, X as ao, c3 as C, ac as Lc, ag as qc } from "./index-B3CeIlMx.mjs";
2
2
  import { d as Uc } from "./dijkstra-BZM-8g-B.mjs";
3
- import { e as Ae, s as co } from "./events-Dgn4K9rN.mjs";
4
- import { c as E, b as Oe, s as $r, x as lo, r as Mr, H as Bc, a as uo } from "./index-DY59SYJT.mjs";
5
- import { r as zc, a as ot, g as at, i as be, b as kr, I as ht, f as pe, t as ne, c as ei, z as _i, d as Kc, C as jc, e as In, h as Vc, j as Wc, k as Li, p as Hc, _ as Jc, E as te, y as ce, l as qi, A as Gc, m as Yc, n as xn, o as Qc, s as Xc, T as ho, q as Ui, u as Bi, v as $e, w as et } from "./index-i8-I-Kx6.mjs";
6
- import { t as ti, k as fo, c as Zc, s as po, a as fe, b as go, L as el, d as Dt, m as tl, e as ri, g as rl, j as Pn } from "./utf8-YN1IXfNg.mjs";
3
+ import { e as Ae, s as co } from "./events-Dtbo0st9.mjs";
4
+ import { c as E, b as Oe, s as $r, x as lo, r as Mr, H as Bc, a as uo } from "./index-MdL7XQBR.mjs";
5
+ import { r as zc, a as ot, g as at, i as be, b as kr, I as ht, f as pe, t as ne, c as ei, z as _i, d as Kc, C as jc, e as In, h as Vc, j as Wc, k as Li, p as Hc, _ as Jc, E as te, y as ce, l as qi, A as Gc, m as Yc, n as xn, o as Qc, s as Xc, T as ho, q as Ui, u as Bi, v as $e, w as et } from "./index-BE5ihayy.mjs";
6
+ import { t as ti, k as fo, c as Zc, s as po, a as fe, b as go, L as el, d as Dt, m as tl, e as ri, g as rl, j as Pn } from "./utf8-BZ7GX1-B.mjs";
7
7
  const il = `Ethereum Signed Message:
8
8
  `;
9
9
  function mo(r) {
@@ -1,4 +1,4 @@
1
- import { cD as Ot, Y as Tt, cu as Nt, cE as Mt, cn as Ft } from "./index-DXcVEr2U.mjs";
1
+ import { cE as Ot, X as Tt, cv as Nt, cF as Mt, co as Ft } from "./index-B3CeIlMx.mjs";
2
2
  function Lt(e, r) {
3
3
  for (var n = 0; n < r.length; n++) {
4
4
  const i = r[n];
@@ -0,0 +1 @@
1
+ "use strict";var v=Object.defineProperty;var y=(b,e,t)=>e in b?v(b,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):b[e]=t;var i=(b,e,t)=>y(b,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./chunk-OR6GFWLG-CFPMvzOj.js"),c=require("./index-Br4OTc1S.js"),k=require("./aptos-DTHJQbIb.js"),x=require("./unsignedTransaction-C1YeEl4G.js"),M=[["Mainnet",{depositForBurn:"0xa11ceb0b0700000a0701000802080e031614042a04052e30075e870108e5014000000001000201030004000001050701000100060b0001070304010801020805060108010309080900010002010205060c030e05050208000b010108020108020105010b0101090003060c0b01010900030108000004060c08000e0501030e66756e6769626c655f6173736574066f626a656374167072696d6172795f66756e6769626c655f73746f72650f746f6b656e5f6d657373656e6765720d46756e6769626c654173736574064f626a656374084d6574616461746111616464726573735f746f5f6f626a656374087769746864726177106465706f7369745f666f725f6275726e00000000000000000000000000000000000000000000000000000000000000019bce6734f7b63e835108e3bd8c36743d4709fe435f44791918801d0989640a9d0000010f0b0438000c060a000b060b0138010c050b000b050b020b0311020102",handleReceiveMessage:"0xa11ceb0b0700000a0601000402040403080c051416072a53087d40000001010002000000030203000101040304000103060c0a020a020003060c060a02060a020108000101136d6573736167655f7472616e736d69747465720f746f6b656e5f6d657373656e67657207526563656970740f726563656976655f6d6573736167651668616e646c655f726563656976655f6d657373616765177e17751820e4b4371873ca8c30279be63bdea63b88ed0f2239c2eea10f17729bce6734f7b63e835108e3bd8c36743d4709fe435f44791918801d0989640a9d000001070b000e010e02110011010102"}],["Testnet",{depositForBurn:"0xa11ceb0b0700000a0701000802080e031614042a04052e30075e870108e5014000000001000201030004000001050701000100060b0001070304010801020805060108010309080900010002010205060c030e05050208000b010108020108020105010b0101090003060c0b01010900030108000004060c08000e0501030e66756e6769626c655f6173736574066f626a656374167072696d6172795f66756e6769626c655f73746f72650f746f6b656e5f6d657373656e6765720d46756e6769626c654173736574064f626a656374084d6574616461746111616464726573735f746f5f6f626a656374087769746864726177106465706f7369745f666f725f6275726e00000000000000000000000000000000000000000000000000000000000000015f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b90000010f0b0438000c060a000b060b0138010c050b000b050b020b0311020102",handleReceiveMessage:"0xa11ceb0b0700000a0601000402040403080c051416072a53087d40000001010002000000030203000101040304000103060c0a020a020003060c060a02060a020108000101136d6573736167655f7472616e736d69747465720f746f6b656e5f6d657373656e67657207526563656970740f726563656976655f6d6573736167651668616e646c655f726563656976655f6d657373616765081e86cebf457a0c6004f35bd648a2794698f52e0dde09a48619dcd3d4cc23d95f9b937419dda90aa06c1836b7847f65bbbe3f1217567758dc2488be31a477b9000001070b000e010e02110011010102"}]],u=c.constMap(M,[0,1]);class h{constructor(e,t,n,s){i(this,"network");i(this,"chain");i(this,"provider");i(this,"contracts");i(this,"usdcId");i(this,"tokenMessengerId");i(this,"messageTransmitterId");i(this,"moveScripts");var a,f,o;if(this.network=e,this.chain=t,this.provider=n,this.contracts=s,e==="Devnet")throw new Error("CircleBridge not supported on Devnet");const r=c.usdcContract.get(this.network,this.chain);if(!r)throw new Error(`No USDC contract configured for network=${this.network} chain=${this.chain}`);if(!((a=s.cctp)!=null&&a.tokenMessenger))throw new Error(`Circle Token Messenger contract for domain ${t} not found`);if(!((f=s.cctp)!=null&&f.messageTransmitter))throw new Error(`Circle Message Transmitter contract for domain ${t} not found`);if(!u.has(e))throw new Error("No Aptos CCTP move scripts found");this.usdcId=r,this.tokenMessengerId=(o=s.cctp)==null?void 0:o.tokenMessenger,this.messageTransmitterId=s.cctp.messageTransmitter,this.moveScripts=u.get(e)}async*transfer(e,t,n){const s=new d.y$2(c.circleChainId.get(this.network,t.chain)),r=d.l.from(this.usdcId),a=d.l.from(t.address.toUniversalAddress().toUint8Array()),f=[new d.m(n),s,a,r],o={bytecode:this.moveScripts.depositForBurn,functionArguments:f};yield this.createUnsignedTx(o,"Aptos.CircleBridge.Transfer")}async isTransferCompleted(e){const t=new d.y$2(e.sourceDomain).bcsToBytes(),n=new d.m(e.nonce).bcsToBytes(),s=c.keccak_256(new Uint8Array([...t,45,...n])),r=c.hex.encode(s);return(await this.provider.view({payload:{function:`${this.messageTransmitterId}::message_transmitter::is_nonce_used`,functionArguments:[r]}}))[0]}async*redeem(e,t,n){const s=[d.t$4.U8(c.CircleBridge.serialize(t)),d.t$4.U8(c.hex.decode(n))],r={bytecode:this.moveScripts.handleReceiveMessage,functionArguments:s};yield this.createUnsignedTx(r,"Aptos.CircleBridge.Redeem")}async parseTransactionDetails(e){var g;const t=await this.provider.getTransactionByHash({transactionHash:e}),n=this.messageTransmitterId.replace(/^0x0+/,"0x"),s=(g=t.events)==null?void 0:g.find(C=>C.type===`${n}::message_transmitter::MessageSent`);if(!s)throw new Error("No MessageSent event found");const r=c.hex.decode(s.data.message),[a,f]=c.CircleBridge.deserialize(r),{payload:o}=a,p=o.messageSender,l=o.mintRecipient,m=c.toCircleChain(this.network,a.sourceDomain),w=c.toCircleChain(this.network,a.destinationDomain),T={chain:m,address:o.burnToken};return{from:{chain:m,address:p},to:{chain:w,address:l},token:T,amount:o.amount,message:a,id:{hash:f}}}static async fromRpc(e,t){const[n,s]=await k.AptosPlatform.chainFromRpc(e),r=t[s];if(r.network!==n)throw new Error(`Network mismatch: ${r.network} != ${n}`);return new h(n,s,e,r.contracts)}createUnsignedTx(e,t,n=!1){return new x.AptosUnsignedTransaction(e,this.network,this.chain,t,n)}}c.registerProtocol("Aptos","CircleBridge",h);exports.AptosCircleBridge=h;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-3VUjPBnj.js"),kr=require("./dijkstra-CtFxn7S9.js"),Mr=require("./index-DgaACuCq.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-DlMM2TKj.js"),kr=require("./dijkstra-CtFxn7S9.js"),Mr=require("./index-Br4OTc1S.js");/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- "use strict";var Tr=Object.defineProperty;var vr=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var F=(e,t,r)=>vr(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./index-DgaACuCq.js"),ke=require("./sui-CkzAXofi.js"),Er=require("./unsignedTransaction-DzSLsK-p.js");class xr extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...a}=t,{path:o}=t,u=o.length===0?i:`At path: ${o.join(".")} -- ${i}`;super(s??u),s!=null&&(this.cause=u),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function jr(e){return z(e)&&typeof e[Symbol.iterator]=="function"}function z(e){return typeof e=="object"&&e!=null}function V(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Ir(e){const{done:t,value:r}=e.next();return t?void 0:r}function Or(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:a}=r,{refinement:o,message:u=`Expected a value of type \`${a}\`${o?` with refinement \`${o}\``:""}, but received: \`${V(n)}\``}=e;return{value:n,type:a,refinement:o,key:i[i.length-1],path:i,branch:s,...e,message:u}}function*Nt(e,t,r,n){jr(e)||(e=[e]);for(const i of e){const s=Or(i,t,r,n);s&&(yield s)}}function*at(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,o={path:n,branch:i};if(s&&(e=t.coercer(e,o),a&&t.type!=="type"&&z(t.schema)&&z(e)&&!Array.isArray(e)))for(const d in e)t.schema[d]===void 0&&delete e[d];let u="valid";for(const d of t.validator(e,o))d.explanation=r.message,u="not_valid",yield[d,void 0];for(let[d,l,g]of t.entries(e,o)){const m=at(l,g,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,l],coerce:s,mask:a,message:r.message});for(const p of m)p[0]?(u=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):s&&(l=p[1],d===void 0?e=l:e instanceof Map?e.set(d,l):e instanceof Set?e.add(l):z(e)&&(l!==void 0||d in e)&&(e[d]=l))}if(u!=="not_valid")for(const d of t.refiner(e,o))d.explanation=r.message,u="not_refined",yield[d,void 0];u==="valid"&&(yield[void 0,e])}class Y{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:a=u=>u,entries:o=function*(){}}=t;this.type=r,this.schema=n,this.entries=o,this.coercer=a,i?this.validator=(u,d)=>{const l=i(u,d);return Nt(l,d,this,u)}:this.validator=()=>[],s?this.refiner=(u,d)=>{const l=s(u,d);return Nt(l,d,this,u)}:this.refiner=()=>[]}assert(t,r){return Qe(t,this,r)}create(t,r){return Gt(t,this,r)}is(t){return N(t,this)}mask(t,r){return Ft(t,this,r)}validate(t,r={}){return xe(t,this,r)}}function Qe(e,t,r){const n=xe(e,t,{message:r});if(n[0])throw n[0]}function Gt(e,t,r){const n=xe(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Ft(e,t,r){const n=xe(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function N(e,t){return!xe(e,t)[0]}function xe(e,t,r={}){const n=at(e,t,r),i=Ir(n);return i[0]?[new xr(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function be(...e){const t=e[0].type==="type",r=e.map(i=>i.schema),n=Object.assign({},...r);return t?kr(n):h(n)}function P(e,t){return new Y({type:e,schema:null,validator:t})}function et(){return P("any",()=>!0)}function v(e){return new Y({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${V(t)}`}})}function Ar(){return P("bigint",e=>typeof e=="bigint")}function U(){return P("boolean",e=>typeof e=="boolean")}function Z(){return P("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${V(e)}`)}function b(e){const t=V(e),r=typeof e;return new Y({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${V(n)}`}})}function Lt(){return P("never",()=>!1)}function O(e){return new Y({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function de(){return P("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${V(e)}`)}function h(e){const t=e?Object.keys(e):[],r=Lt();return new Y({type:"object",schema:e||null,*entries(n){if(e&&z(n)){const i=new Set(Object.keys(n));for(const s of t)i.delete(s),yield[s,n[s],e[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return z(n)||`Expected an object, but received: ${V(n)}`},coercer(n){return z(n)?{...n}:n}})}function w(e){return new Y({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function X(e,t){return new Y({type:"record",schema:null,*entries(r){if(z(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return z(r)||`Expected an object, but received: ${V(r)}`}})}function f(){return P("string",e=>typeof e=="string"||`Expected a string, but received: ${V(e)}`)}function Kt(e){const t=Lt();return new Y({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${V(r)}`}})}function kr(e){const t=Object.keys(e);return new Y({type:"type",schema:e,*entries(r){if(z(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return z(r)||`Expected an object, but received: ${V(r)}`},coercer(r){return z(r)?{...r}:r}})}function k(e){const t=e.map(r=>r.type).join(" | ");return new Y({type:"union",schema:null,coercer(r){for(const n of e){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of e){const[...a]=at(r,s,n),[o]=a;if(o[0])for(const[u]of a)u&&i.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${V(r)}`,...i]}})}function Wt(){return P("unknown",()=>!0)}const ot=k([h({AddressOwner:f()}),h({ObjectOwner:f()}),h({Shared:h({initial_shared_version:O(f())})}),b("Immutable")]);P("SuiJsonValue",()=>!0);const _r=k([h({u32:f()}),h({u64:f()}),h({f64:f()})]);h({attributes:X(f(),O(_r)),featureFlags:X(f(),U()),maxSupportedProtocolVersion:f(),minSupportedProtocolVersion:f(),protocolVersion:f()});k([f(),b("package")]);const ae=h({digest:f(),objectId:f(),version:k([de(),f(),Ar()])});h({owner:ot,reference:ae});h({objectId:f(),sequenceNumber:f()});h({payment:v(ae),owner:f(),price:f(),budget:f()});const Cr=be(ae,h({type:f(),owner:ot,previousTransaction:f()})),$r=X(f(),et()),Mr=X(f(),Wt()),Ur=h({type:f(),fields:$r,hasPublicTransfer:U()}),Br=h({disassembled:Mr}),Rr=k([be(Ur,h({dataType:b("moveObject")})),be(Br,h({dataType:b("package")}))]),Nr=h({type:f(),hasPublicTransfer:U(),version:f(),bcsBytes:f()}),Pr=h({id:f(),moduleMap:X(f(),f())}),Dr=k([be(Nr,h({dataType:b("moveObject")})),be(Pr,h({dataType:b("package")}))]);BigInt(1e9);const Jt=h({code:f(),error:w(f()),object_id:w(f()),parent_object_id:w(f()),version:w(f()),digest:w(f())}),zr=h({data:O(w(X(f(),f()))),error:O(w(Jt))}),Vr=k([zr,w(X(f(),f()))]),Ht=h({objectId:f(),version:f(),digest:f(),type:O(w(f())),content:O(w(Rr)),bcs:O(w(Dr)),owner:O(w(ot)),previousTransaction:O(w(f())),storageRebate:O(w(f())),display:O(w(Vr))});h({showType:O(w(U())),showContent:O(w(U())),showBcs:O(w(U())),showOwner:O(w(U())),showPreviousTransaction:O(w(U())),showStorageRebate:O(w(U())),showDisplay:O(w(U()))});k([b("Exists"),b("notExists"),b("Deleted")]);v(Cr);const Gr=h({data:O(w(Ht)),error:O(w(Jt))});function Fr(e){return e.data}function Lr(e){if(e.error&&"object_id"in e.error&&"version"in e.error&&"digest"in e.error){const t=e.error;return{objectId:t.object_id,version:t.version,digest:t.digest}}}function Pt(e){if("reference"in e)return e.reference;const t=Fr(e);return t?{objectId:t.objectId,version:t.version,digest:t.digest}:Lr(e)}h({objectId:f(),atCheckpoint:w(de())});h({data:v(Gr),nextCursor:w(O(f())),hasNextPage:U()});k([h({details:Ht,status:b("VersionFound")}),h({details:f(),status:b("ObjectNotExists")}),h({details:ae,status:b("ObjectDeleted")}),h({details:Kt([f(),de()]),status:b("VersionNotFound")}),h({details:h({asked_version:de(),latest_version:de(),object_id:f()}),status:b("VersionTooHigh")})]);const Kr=k([f(),h({Object:f()})]);v(Kr);const Wr=h({address:f(),name:f()}),Jr=k([b("Private"),b("Public"),b("Friend")]),ct=h({abilities:v(f())}),Hr=h({constraints:ct,isPhantom:U()}),Xr=h({TypeParameter:de()}),Ke=Kt([h({module:f(),package:f(),function:f()}),f()]);h({rank3Days:v(Ke),rank7Days:v(Ke),rank30Days:v(Ke)});function Xt(e){if(!e)return!1;if(typeof e=="string"||N(e,Xr)||qt(e))return!0;if(typeof e!="object")return!1;const t=e;return!!(N(t.Reference,he)||N(t.MutableReference,he)||N(t.Vector,he))}const he=P("SuiMoveNormalizedType",Xt);function qt(e){if(!e||typeof e!="object")return!1;const t=e;if(!t.Struct||typeof t.Struct!="object")return!1;const r=t.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>Xt(n)))}P("SuiMoveNormalizedStructType",qt);const qr=h({visibility:Jr,isEntry:U(),typeParameters:v(ct),parameters:v(he),return:v(he)}),Zr=h({name:f(),type:he}),Yr=h({abilities:ct,typeParameters:v(Hr),fields:v(Zr)}),Qr=h({fileFormatVersion:de(),address:f(),name:f(),friends:v(Wr),structs:X(f(),Yr),exposedFunctions:X(f(),qr)});X(f(),Qr);function tt(e){return typeof e=="object"&&"MutableReference"in e?e.MutableReference:void 0}function Zt(e){return typeof e=="object"&&"Reference"in e?e.Reference:void 0}function ut(e){if(typeof e=="object"&&"Struct"in e)return e;const t=Zt(e),r=tt(e);if(typeof t=="object"&&"Struct"in t)return t;if(typeof r=="object"&&"Struct"in r)return r}function en(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),s=i.charCodeAt(0);if(t[s]!==255)throw new TypeError(i+" is ambiguous");t[s]=n}var a=e.length,o=e.charAt(0),u=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function l(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 y=0,S=0,E=0,A=p.length;E!==A&&p[E]===0;)E++,y++;for(var _=(A-E)*d+1>>>0,D=new Uint8Array(_);E!==A;){for(var q=p[E],ie=0,G=_-1;(q!==0||ie<S)&&G!==-1;G--,ie++)q+=256*D[G]>>>0,D[G]=q%a>>>0,q=q/a>>>0;if(q!==0)throw new Error("Non-zero carry");S=ie,E++}for(var Q=_-S;Q!==_&&D[Q]===0;)Q++;for(var Ae=o.repeat(y);Q<_;++Q)Ae+=e.charAt(D[Q]);return Ae}function g(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;for(var y=0,S=0,E=0;p[y]===o;)S++,y++;for(var A=(p.length-y)*u+1>>>0,_=new Uint8Array(A);p[y];){var D=t[p.charCodeAt(y)];if(D===255)return;for(var q=0,ie=A-1;(D!==0||q<E)&&ie!==-1;ie--,q++)D+=a*_[ie]>>>0,_[ie]=D%256>>>0,D=D/256>>>0;if(D!==0)throw new Error("Non-zero carry");E=q,y++}for(var G=A-E;G!==A&&_[G]===0;)G++;for(var Q=new Uint8Array(S+(A-G)),Ae=S;G!==A;)Q[Ae++]=_[G++];return Q}function m(p){var y=g(p);if(y)return y;throw new Error("Non-base"+a+" character")}return{encode:l,decodeUnsafe:g,decode:m}}var tn=en;const rn=tn,nn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var sn=rn(nn);const Yt=K.getDefaultExportFromCjs(sn),je=e=>Yt.encode(e),dt=e=>Yt.decode(e);function oe(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}const We=8192;function Ie(e){if(e.length<We)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=We){const n=e.slice(r,r+We);t+=String.fromCharCode(...n)}return btoa(t)}function Fe(e){var i;const t=e.startsWith("0x")?e.slice(2):e,n=((i=(t.length%2===0?t:`0${t}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function Oe(e){return e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),"")}function ft(e){let t=[],r=0;if(e===0)return[0];for(;e>0;)t[r]=e&127,(e>>=7)&&(t[r]|=128),r+=1;return t}function an(e){let t=0,r=0,n=0;for(;;){let i=e[n];if(n+=1,t|=(i&127)<<r,!(i&128))break;r+=7}return{value:t,length:n}}class Qt{constructor(t){this.bytePosition=0,this.dataView=new DataView(t.buffer)}shift(t){return this.bytePosition+=t,this}read8(){let t=this.dataView.getUint8(this.bytePosition);return this.shift(1),t}read16(){let t=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),t}read32(){let t=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),t}read64(){let t=this.read32(),n=this.read32().toString(16)+t.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let t=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+t.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let t=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+t.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(t){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,t);return this.shift(t),n}readULEB(){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t),{value:n,length:i}=an(r);return this.shift(i),n}readVec(t){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(t(this,i,r));return n}}function on(e,t){switch(t){case"base58":return je(e);case"base64":return Ie(e);case"hex":return Oe(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function cn(e,t){switch(t){case"base58":return dt(e);case"base64":return oe(e);case"hex":return Fe(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function er(e,t=["<",">"]){const[r,n]=t,i=[];let s="",a=0;for(let o=0;o<e.length;o++){const u=e[o];if(u===r&&a++,u===n&&a--,a===0&&u===","){i.push(s.trim()),s="";continue}s+=u}return i.push(s.trim()),i}class tr{constructor({size:t=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=t,this.maxSize=r||t,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(t))}ensureSizeOrGrow(t){const r=this.bytePosition+t;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(t){return this.bytePosition+=t,this}write8(t){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(t)),this.shift(1)}write16(t){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(t),!0),this.shift(2)}write32(t){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(t),!0),this.shift(4)}write64(t){return Je(BigInt(t),8).forEach(r=>this.write8(r)),this}write128(t){return Je(BigInt(t),16).forEach(r=>this.write8(r)),this}write256(t){return Je(BigInt(t),32).forEach(r=>this.write8(r)),this}writeULEB(t){return ft(t).forEach(r=>this.write8(r)),this}writeVec(t,r){return this.writeULEB(t.length),Array.from(t).forEach((n,i)=>r(this,n,i,t.length)),this}*[Symbol.iterator](){for(let t=0;t<this.bytePosition;t++)yield this.dataView.getUint8(t);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(t){return on(this.toBytes(),t)}}function Je(e,t){let r=new Uint8Array(t),n=0;for(;e>0;)r[n]=Number(e%BigInt(256)),e=e/BigInt(256),n+=1;return r}var rr=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},W=(e,t,r)=>(rr(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Pe=(e,t,r,n)=>(rr(e,t,"write to private field"),t.set(e,r),r),le,pe,Me,se;const nr=class{constructor(e){Ne(this,le,void 0),Ne(this,pe,void 0),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),Pe(this,le,e.write),Pe(this,pe,e.serialize??((t,r)=>{const n=new tr({size:this.serializedSize(t)??void 0,...r});return W(this,le).call(this,t,n),n.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),W(this,le).call(this,e,t)}serialize(e,t){return this.validate(e),new un(this,W(this,pe).call(this,e,t))}parse(e){const t=new Qt(e);return this.read(t)}transform({name:e,input:t,output:r}){return new nr({name:e??this.name,read:n=>r(this.read(n)),write:(n,i)=>W(this,le).call(this,t(n),i),serializedSize:n=>this.serializedSize(t(n)),serialize:(n,i)=>W(this,pe).call(this,t(n),i),validate:n=>this.validate(t(n))})}};let J=nr;le=new WeakMap;pe=new WeakMap;const ir=Symbol.for("@mysten/serialized-bcs");function lt(e){return!!e&&typeof e=="object"&&e[ir]===!0}class un{constructor(t,r){Ne(this,Me,void 0),Ne(this,se,void 0),Pe(this,Me,t),Pe(this,se,r)}get[ir](){return!0}toBytes(){return W(this,se)}toHex(){return Oe(W(this,se))}toBase64(){return Ie(W(this,se))}toBase58(){return je(W(this,se))}parse(){return W(this,Me).parse(W(this,se))}}Me=new WeakMap;se=new WeakMap;function De({size:e,...t}){return new J({...t,serializedSize:()=>e})}function He({readMethod:e,writeMethod:t,...r}){return De({...r,read:n=>n[e](),write:(n,i)=>i[t](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function Xe({readMethod:e,writeMethod:t,...r}){return De({...r,read:n=>n[e](),write:(n,i)=>i[t](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function dn({serialize:e,...t}){const r=new J({...t,serialize:e,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function fn({toBytes:e,fromBytes:t,...r}){return new J({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return t(s)},write:(n,i)=>{const s=e(n);i.writeULEB(s.length);for(let a=0;a<s.length;a++)i.write8(s[a])},serialize:n=>{const i=e(n),s=ft(i.length),a=new Uint8Array(s.length+i.length);return a.set(s,0),a.set(i,s.length),a},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function ln(e){let t=null;function r(){return t||(t=e()),t}return new J({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const c={u8(e){return He({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...e})},u16(e){return He({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...e})},u32(e){return He({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e})},u64(e){return Xe({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e})},u128(e){return Xe({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e})},u256(e){return Xe({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e})},bool(e){return De({name:"bool",size:1,read:t=>t.read8()===1,write:(t,r)=>r.write8(t?1:0),...e,validate:t=>{var r;if((r=e==null?void 0:e.validate)==null||r.call(e,t),typeof t!="boolean")throw new TypeError(`Expected boolean, found ${typeof t}`)}})},uleb128(e){return dn({name:"uleb128",read:t=>t.readULEB(),serialize:t=>Uint8Array.from(ft(t)),...e})},bytes(e,t){return De({name:`bytes[${e}]`,size:e,read:r=>r.readBytes(e),write:(r,n)=>{for(let i=0;i<e;i++)n.write8(r[i]??0)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}})},string(e){return fn({name:"string",toBytes:t=>new TextEncoder().encode(t),fromBytes:t=>new TextDecoder().decode(t),...e})},fixedArray(e,t,r){return new J({name:`${t.name}[${e}]`,read:n=>{const i=new Array(e);for(let s=0;s<e;s++)i[s]=t.read(n);return i},write:(n,i)=>{for(const s of n)t.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==e)throw new TypeError(`Expected array of length ${e}, found ${n.length}`)}})},option(e){return c.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:t=>t==null?{None:!0}:{Some:t},output:t=>"Some"in t?t.Some:null})},vector(e,t){return new J({name:`vector<${e.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=e.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)e.write(i,n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(e,t){return new J({name:`(${e.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<e.length;i++){const s=e[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of e)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<e.length;i++)e[i].write(r[i],n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}})},struct(e,t,r){const n=Object.entries(t);return new J({name:e,serializedSize:i=>{let s=0;for(const[a,o]of n){const u=o.serializedSize(i[a]);if(u==null)return null;s+=u}return s},read:i=>{const s={};for(const[a,o]of n)s[a]=o.read(i);return s},write:(i,s)=>{for(const[a,o]of n)o.write(i[a],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(e,t,r){const n=Object.entries(t);return new J({name:e,read:i=>{const s=i.readULEB(),[a,o]=n[s];return{[a]:(o==null?void 0:o.read(i))??!0}},write:(i,s)=>{const[a,o]=Object.entries(i)[0];for(let u=0;u<n.length;u++){const[d,l]=n[u];if(d===a){s.writeULEB(u),l==null||l.write(o,s);return}}},...r,validate:i=>{var o;if((o=r==null?void 0:r.validate)==null||o.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[a]=s;if(!Object.hasOwn(t,a))throw new TypeError(`Invalid enum variant ${a}`)}})},map(e,t){return c.vector(c.tuple([e,t])).transform({name:`Map<${e.name}, ${t.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(e,t){return(...r)=>t(...r).transform({name:`${t.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(e){return ln(e)}},hn=32,me=class{constructor(e){if(this.types=new Map,this.counter=0,e instanceof me){this.schema=e.schema,this.types=new Map(e.types);return}if(this.schema=e,this.registerAddressType(me.ADDRESS,e.addressLength,e.addressEncoding),this.registerVectorType(e.vectorType),e.types&&e.types.structs)for(let t of Object.keys(e.types.structs))this.registerStructType(t,e.types.structs[t]);if(e.types&&e.types.enums)for(let t of Object.keys(e.types.enums))this.registerEnumType(t,e.types.enums[t]);if(e.types&&e.types.aliases)for(let t of Object.keys(e.types.aliases))this.registerAlias(t,e.types.aliases[t]);e.withPrimitives!==!1&&gn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(e,t,r){if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).encode(this,t,r,i)}if(typeof e=="object"){const n=this.tempKey();return new me(this).registerStructType(n,e).ser(n,t,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
1
+ "use strict";var Tr=Object.defineProperty;var vr=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var F=(e,t,r)=>vr(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./index-Br4OTc1S.js"),ke=require("./sui-BzgBbOVR.js"),Er=require("./unsignedTransaction-DzSLsK-p.js");class xr extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...a}=t,{path:o}=t,u=o.length===0?i:`At path: ${o.join(".")} -- ${i}`;super(s??u),s!=null&&(this.cause=u),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function jr(e){return z(e)&&typeof e[Symbol.iterator]=="function"}function z(e){return typeof e=="object"&&e!=null}function V(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Ir(e){const{done:t,value:r}=e.next();return t?void 0:r}function Or(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:a}=r,{refinement:o,message:u=`Expected a value of type \`${a}\`${o?` with refinement \`${o}\``:""}, but received: \`${V(n)}\``}=e;return{value:n,type:a,refinement:o,key:i[i.length-1],path:i,branch:s,...e,message:u}}function*Nt(e,t,r,n){jr(e)||(e=[e]);for(const i of e){const s=Or(i,t,r,n);s&&(yield s)}}function*at(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,o={path:n,branch:i};if(s&&(e=t.coercer(e,o),a&&t.type!=="type"&&z(t.schema)&&z(e)&&!Array.isArray(e)))for(const d in e)t.schema[d]===void 0&&delete e[d];let u="valid";for(const d of t.validator(e,o))d.explanation=r.message,u="not_valid",yield[d,void 0];for(let[d,l,g]of t.entries(e,o)){const m=at(l,g,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,l],coerce:s,mask:a,message:r.message});for(const p of m)p[0]?(u=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):s&&(l=p[1],d===void 0?e=l:e instanceof Map?e.set(d,l):e instanceof Set?e.add(l):z(e)&&(l!==void 0||d in e)&&(e[d]=l))}if(u!=="not_valid")for(const d of t.refiner(e,o))d.explanation=r.message,u="not_refined",yield[d,void 0];u==="valid"&&(yield[void 0,e])}class Y{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:a=u=>u,entries:o=function*(){}}=t;this.type=r,this.schema=n,this.entries=o,this.coercer=a,i?this.validator=(u,d)=>{const l=i(u,d);return Nt(l,d,this,u)}:this.validator=()=>[],s?this.refiner=(u,d)=>{const l=s(u,d);return Nt(l,d,this,u)}:this.refiner=()=>[]}assert(t,r){return Qe(t,this,r)}create(t,r){return Gt(t,this,r)}is(t){return N(t,this)}mask(t,r){return Ft(t,this,r)}validate(t,r={}){return xe(t,this,r)}}function Qe(e,t,r){const n=xe(e,t,{message:r});if(n[0])throw n[0]}function Gt(e,t,r){const n=xe(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Ft(e,t,r){const n=xe(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function N(e,t){return!xe(e,t)[0]}function xe(e,t,r={}){const n=at(e,t,r),i=Ir(n);return i[0]?[new xr(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function be(...e){const t=e[0].type==="type",r=e.map(i=>i.schema),n=Object.assign({},...r);return t?kr(n):h(n)}function P(e,t){return new Y({type:e,schema:null,validator:t})}function et(){return P("any",()=>!0)}function v(e){return new Y({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${V(t)}`}})}function Ar(){return P("bigint",e=>typeof e=="bigint")}function U(){return P("boolean",e=>typeof e=="boolean")}function Z(){return P("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${V(e)}`)}function b(e){const t=V(e),r=typeof e;return new Y({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${V(n)}`}})}function Lt(){return P("never",()=>!1)}function O(e){return new Y({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function de(){return P("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${V(e)}`)}function h(e){const t=e?Object.keys(e):[],r=Lt();return new Y({type:"object",schema:e||null,*entries(n){if(e&&z(n)){const i=new Set(Object.keys(n));for(const s of t)i.delete(s),yield[s,n[s],e[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return z(n)||`Expected an object, but received: ${V(n)}`},coercer(n){return z(n)?{...n}:n}})}function w(e){return new Y({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function X(e,t){return new Y({type:"record",schema:null,*entries(r){if(z(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return z(r)||`Expected an object, but received: ${V(r)}`}})}function f(){return P("string",e=>typeof e=="string"||`Expected a string, but received: ${V(e)}`)}function Kt(e){const t=Lt();return new Y({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${V(r)}`}})}function kr(e){const t=Object.keys(e);return new Y({type:"type",schema:e,*entries(r){if(z(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return z(r)||`Expected an object, but received: ${V(r)}`},coercer(r){return z(r)?{...r}:r}})}function k(e){const t=e.map(r=>r.type).join(" | ");return new Y({type:"union",schema:null,coercer(r){for(const n of e){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of e){const[...a]=at(r,s,n),[o]=a;if(o[0])for(const[u]of a)u&&i.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${V(r)}`,...i]}})}function Wt(){return P("unknown",()=>!0)}const ot=k([h({AddressOwner:f()}),h({ObjectOwner:f()}),h({Shared:h({initial_shared_version:O(f())})}),b("Immutable")]);P("SuiJsonValue",()=>!0);const _r=k([h({u32:f()}),h({u64:f()}),h({f64:f()})]);h({attributes:X(f(),O(_r)),featureFlags:X(f(),U()),maxSupportedProtocolVersion:f(),minSupportedProtocolVersion:f(),protocolVersion:f()});k([f(),b("package")]);const ae=h({digest:f(),objectId:f(),version:k([de(),f(),Ar()])});h({owner:ot,reference:ae});h({objectId:f(),sequenceNumber:f()});h({payment:v(ae),owner:f(),price:f(),budget:f()});const Cr=be(ae,h({type:f(),owner:ot,previousTransaction:f()})),$r=X(f(),et()),Mr=X(f(),Wt()),Ur=h({type:f(),fields:$r,hasPublicTransfer:U()}),Br=h({disassembled:Mr}),Rr=k([be(Ur,h({dataType:b("moveObject")})),be(Br,h({dataType:b("package")}))]),Nr=h({type:f(),hasPublicTransfer:U(),version:f(),bcsBytes:f()}),Pr=h({id:f(),moduleMap:X(f(),f())}),Dr=k([be(Nr,h({dataType:b("moveObject")})),be(Pr,h({dataType:b("package")}))]);BigInt(1e9);const Jt=h({code:f(),error:w(f()),object_id:w(f()),parent_object_id:w(f()),version:w(f()),digest:w(f())}),zr=h({data:O(w(X(f(),f()))),error:O(w(Jt))}),Vr=k([zr,w(X(f(),f()))]),Ht=h({objectId:f(),version:f(),digest:f(),type:O(w(f())),content:O(w(Rr)),bcs:O(w(Dr)),owner:O(w(ot)),previousTransaction:O(w(f())),storageRebate:O(w(f())),display:O(w(Vr))});h({showType:O(w(U())),showContent:O(w(U())),showBcs:O(w(U())),showOwner:O(w(U())),showPreviousTransaction:O(w(U())),showStorageRebate:O(w(U())),showDisplay:O(w(U()))});k([b("Exists"),b("notExists"),b("Deleted")]);v(Cr);const Gr=h({data:O(w(Ht)),error:O(w(Jt))});function Fr(e){return e.data}function Lr(e){if(e.error&&"object_id"in e.error&&"version"in e.error&&"digest"in e.error){const t=e.error;return{objectId:t.object_id,version:t.version,digest:t.digest}}}function Pt(e){if("reference"in e)return e.reference;const t=Fr(e);return t?{objectId:t.objectId,version:t.version,digest:t.digest}:Lr(e)}h({objectId:f(),atCheckpoint:w(de())});h({data:v(Gr),nextCursor:w(O(f())),hasNextPage:U()});k([h({details:Ht,status:b("VersionFound")}),h({details:f(),status:b("ObjectNotExists")}),h({details:ae,status:b("ObjectDeleted")}),h({details:Kt([f(),de()]),status:b("VersionNotFound")}),h({details:h({asked_version:de(),latest_version:de(),object_id:f()}),status:b("VersionTooHigh")})]);const Kr=k([f(),h({Object:f()})]);v(Kr);const Wr=h({address:f(),name:f()}),Jr=k([b("Private"),b("Public"),b("Friend")]),ct=h({abilities:v(f())}),Hr=h({constraints:ct,isPhantom:U()}),Xr=h({TypeParameter:de()}),Ke=Kt([h({module:f(),package:f(),function:f()}),f()]);h({rank3Days:v(Ke),rank7Days:v(Ke),rank30Days:v(Ke)});function Xt(e){if(!e)return!1;if(typeof e=="string"||N(e,Xr)||qt(e))return!0;if(typeof e!="object")return!1;const t=e;return!!(N(t.Reference,he)||N(t.MutableReference,he)||N(t.Vector,he))}const he=P("SuiMoveNormalizedType",Xt);function qt(e){if(!e||typeof e!="object")return!1;const t=e;if(!t.Struct||typeof t.Struct!="object")return!1;const r=t.Struct;return!(typeof r.address!="string"||typeof r.module!="string"||typeof r.name!="string"||!Array.isArray(r.typeArguments)||!r.typeArguments.every(n=>Xt(n)))}P("SuiMoveNormalizedStructType",qt);const qr=h({visibility:Jr,isEntry:U(),typeParameters:v(ct),parameters:v(he),return:v(he)}),Zr=h({name:f(),type:he}),Yr=h({abilities:ct,typeParameters:v(Hr),fields:v(Zr)}),Qr=h({fileFormatVersion:de(),address:f(),name:f(),friends:v(Wr),structs:X(f(),Yr),exposedFunctions:X(f(),qr)});X(f(),Qr);function tt(e){return typeof e=="object"&&"MutableReference"in e?e.MutableReference:void 0}function Zt(e){return typeof e=="object"&&"Reference"in e?e.Reference:void 0}function ut(e){if(typeof e=="object"&&"Struct"in e)return e;const t=Zt(e),r=tt(e);if(typeof t=="object"&&"Struct"in t)return t;if(typeof r=="object"&&"Struct"in r)return r}function en(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),s=i.charCodeAt(0);if(t[s]!==255)throw new TypeError(i+" is ambiguous");t[s]=n}var a=e.length,o=e.charAt(0),u=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function l(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 y=0,S=0,E=0,A=p.length;E!==A&&p[E]===0;)E++,y++;for(var _=(A-E)*d+1>>>0,D=new Uint8Array(_);E!==A;){for(var q=p[E],ie=0,G=_-1;(q!==0||ie<S)&&G!==-1;G--,ie++)q+=256*D[G]>>>0,D[G]=q%a>>>0,q=q/a>>>0;if(q!==0)throw new Error("Non-zero carry");S=ie,E++}for(var Q=_-S;Q!==_&&D[Q]===0;)Q++;for(var Ae=o.repeat(y);Q<_;++Q)Ae+=e.charAt(D[Q]);return Ae}function g(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;for(var y=0,S=0,E=0;p[y]===o;)S++,y++;for(var A=(p.length-y)*u+1>>>0,_=new Uint8Array(A);p[y];){var D=t[p.charCodeAt(y)];if(D===255)return;for(var q=0,ie=A-1;(D!==0||q<E)&&ie!==-1;ie--,q++)D+=a*_[ie]>>>0,_[ie]=D%256>>>0,D=D/256>>>0;if(D!==0)throw new Error("Non-zero carry");E=q,y++}for(var G=A-E;G!==A&&_[G]===0;)G++;for(var Q=new Uint8Array(S+(A-G)),Ae=S;G!==A;)Q[Ae++]=_[G++];return Q}function m(p){var y=g(p);if(y)return y;throw new Error("Non-base"+a+" character")}return{encode:l,decodeUnsafe:g,decode:m}}var tn=en;const rn=tn,nn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var sn=rn(nn);const Yt=K.getDefaultExportFromCjs(sn),je=e=>Yt.encode(e),dt=e=>Yt.decode(e);function oe(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}const We=8192;function Ie(e){if(e.length<We)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=We){const n=e.slice(r,r+We);t+=String.fromCharCode(...n)}return btoa(t)}function Fe(e){var i;const t=e.startsWith("0x")?e.slice(2):e,n=((i=(t.length%2===0?t:`0${t}}`).match(/.{2}/g))==null?void 0:i.map(s=>parseInt(s,16)))??[];return Uint8Array.from(n)}function Oe(e){return e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),"")}function ft(e){let t=[],r=0;if(e===0)return[0];for(;e>0;)t[r]=e&127,(e>>=7)&&(t[r]|=128),r+=1;return t}function an(e){let t=0,r=0,n=0;for(;;){let i=e[n];if(n+=1,t|=(i&127)<<r,!(i&128))break;r+=7}return{value:t,length:n}}class Qt{constructor(t){this.bytePosition=0,this.dataView=new DataView(t.buffer)}shift(t){return this.bytePosition+=t,this}read8(){let t=this.dataView.getUint8(this.bytePosition);return this.shift(1),t}read16(){let t=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),t}read32(){let t=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),t}read64(){let t=this.read32(),n=this.read32().toString(16)+t.toString(16).padStart(8,"0");return BigInt("0x"+n).toString(10)}read128(){let t=BigInt(this.read64()),n=BigInt(this.read64()).toString(16)+t.toString(16).padStart(16,"0");return BigInt("0x"+n).toString(10)}read256(){let t=BigInt(this.read128()),n=BigInt(this.read128()).toString(16)+t.toString(16).padStart(32,"0");return BigInt("0x"+n).toString(10)}readBytes(t){let r=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,r,t);return this.shift(t),n}readULEB(){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t),{value:n,length:i}=an(r);return this.shift(i),n}readVec(t){let r=this.readULEB(),n=[];for(let i=0;i<r;i++)n.push(t(this,i,r));return n}}function on(e,t){switch(t){case"base58":return je(e);case"base64":return Ie(e);case"hex":return Oe(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function cn(e,t){switch(t){case"base58":return dt(e);case"base64":return oe(e);case"hex":return Fe(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function er(e,t=["<",">"]){const[r,n]=t,i=[];let s="",a=0;for(let o=0;o<e.length;o++){const u=e[o];if(u===r&&a++,u===n&&a--,a===0&&u===","){i.push(s.trim()),s="";continue}s+=u}return i.push(s.trim()),i}class tr{constructor({size:t=1024,maxSize:r,allocateSize:n=1024}={}){this.bytePosition=0,this.size=t,this.maxSize=r||t,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(t))}ensureSizeOrGrow(t){const r=this.bytePosition+t;if(r>this.size){const n=Math.min(this.maxSize,this.size+this.allocateSize);if(r>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${r}`);this.size=n;const i=new ArrayBuffer(this.size);new Uint8Array(i).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(i)}}shift(t){return this.bytePosition+=t,this}write8(t){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(t)),this.shift(1)}write16(t){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(t),!0),this.shift(2)}write32(t){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(t),!0),this.shift(4)}write64(t){return Je(BigInt(t),8).forEach(r=>this.write8(r)),this}write128(t){return Je(BigInt(t),16).forEach(r=>this.write8(r)),this}write256(t){return Je(BigInt(t),32).forEach(r=>this.write8(r)),this}writeULEB(t){return ft(t).forEach(r=>this.write8(r)),this}writeVec(t,r){return this.writeULEB(t.length),Array.from(t).forEach((n,i)=>r(this,n,i,t.length)),this}*[Symbol.iterator](){for(let t=0;t<this.bytePosition;t++)yield this.dataView.getUint8(t);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(t){return on(this.toBytes(),t)}}function Je(e,t){let r=new Uint8Array(t),n=0;for(;e>0;)r[n]=Number(e%BigInt(256)),e=e/BigInt(256),n+=1;return r}var rr=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},W=(e,t,r)=>(rr(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Pe=(e,t,r,n)=>(rr(e,t,"write to private field"),t.set(e,r),r),le,pe,Me,se;const nr=class{constructor(e){Ne(this,le,void 0),Ne(this,pe,void 0),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),Pe(this,le,e.write),Pe(this,pe,e.serialize??((t,r)=>{const n=new tr({size:this.serializedSize(t)??void 0,...r});return W(this,le).call(this,t,n),n.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),W(this,le).call(this,e,t)}serialize(e,t){return this.validate(e),new un(this,W(this,pe).call(this,e,t))}parse(e){const t=new Qt(e);return this.read(t)}transform({name:e,input:t,output:r}){return new nr({name:e??this.name,read:n=>r(this.read(n)),write:(n,i)=>W(this,le).call(this,t(n),i),serializedSize:n=>this.serializedSize(t(n)),serialize:(n,i)=>W(this,pe).call(this,t(n),i),validate:n=>this.validate(t(n))})}};let J=nr;le=new WeakMap;pe=new WeakMap;const ir=Symbol.for("@mysten/serialized-bcs");function lt(e){return!!e&&typeof e=="object"&&e[ir]===!0}class un{constructor(t,r){Ne(this,Me,void 0),Ne(this,se,void 0),Pe(this,Me,t),Pe(this,se,r)}get[ir](){return!0}toBytes(){return W(this,se)}toHex(){return Oe(W(this,se))}toBase64(){return Ie(W(this,se))}toBase58(){return je(W(this,se))}parse(){return W(this,Me).parse(W(this,se))}}Me=new WeakMap;se=new WeakMap;function De({size:e,...t}){return new J({...t,serializedSize:()=>e})}function He({readMethod:e,writeMethod:t,...r}){return De({...r,read:n=>n[e](),write:(n,i)=>i[t](n),validate:n=>{var i;if(n<0||n>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${n}. Expected value in range 0-${r.maxValue}`);(i=r.validate)==null||i.call(r,n)}})}function Xe({readMethod:e,writeMethod:t,...r}){return De({...r,read:n=>n[e](),write:(n,i)=>i[t](BigInt(n)),validate:n=>{var s;const i=BigInt(n);if(i<0||i>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${i}. Expected value in range 0-${r.maxValue}`);(s=r.validate)==null||s.call(r,i)}})}function dn({serialize:e,...t}){const r=new J({...t,serialize:e,write:(n,i)=>{for(const s of r.serialize(n).toBytes())i.write8(s)}});return r}function fn({toBytes:e,fromBytes:t,...r}){return new J({...r,read:n=>{const i=n.readULEB(),s=n.readBytes(i);return t(s)},write:(n,i)=>{const s=e(n);i.writeULEB(s.length);for(let a=0;a<s.length;a++)i.write8(s[a])},serialize:n=>{const i=e(n),s=ft(i.length),a=new Uint8Array(s.length+i.length);return a.set(s,0),a.set(i,s.length),a},validate:n=>{var i;if(typeof n!="string")throw new TypeError(`Invalid ${r.name} value: ${n}. Expected string`);(i=r.validate)==null||i.call(r,n)}})}function ln(e){let t=null;function r(){return t||(t=e()),t}return new J({name:"lazy",read:n=>r().read(n),serializedSize:n=>r().serializedSize(n),write:(n,i)=>r().write(n,i),serialize:(n,i)=>r().serialize(n,i).toBytes()})}const c={u8(e){return He({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...e})},u16(e){return He({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...e})},u32(e){return He({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e})},u64(e){return Xe({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e})},u128(e){return Xe({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e})},u256(e){return Xe({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e})},bool(e){return De({name:"bool",size:1,read:t=>t.read8()===1,write:(t,r)=>r.write8(t?1:0),...e,validate:t=>{var r;if((r=e==null?void 0:e.validate)==null||r.call(e,t),typeof t!="boolean")throw new TypeError(`Expected boolean, found ${typeof t}`)}})},uleb128(e){return dn({name:"uleb128",read:t=>t.readULEB(),serialize:t=>Uint8Array.from(ft(t)),...e})},bytes(e,t){return De({name:`bytes[${e}]`,size:e,read:r=>r.readBytes(e),write:(r,n)=>{for(let i=0;i<e;i++)n.write8(r[i]??0)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}})},string(e){return fn({name:"string",toBytes:t=>new TextEncoder().encode(t),fromBytes:t=>new TextDecoder().decode(t),...e})},fixedArray(e,t,r){return new J({name:`${t.name}[${e}]`,read:n=>{const i=new Array(e);for(let s=0;s<e;s++)i[s]=t.read(n);return i},write:(n,i)=>{for(const s of n)t.write(s,i)},...r,validate:n=>{var i;if((i=r==null?void 0:r.validate)==null||i.call(r,n),!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==e)throw new TypeError(`Expected array of length ${e}, found ${n.length}`)}})},option(e){return c.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:t=>t==null?{None:!0}:{Some:t},output:t=>"Some"in t?t.Some:null})},vector(e,t){return new J({name:`vector<${e.name}>`,read:r=>{const n=r.readULEB(),i=new Array(n);for(let s=0;s<n;s++)i[s]=e.read(r);return i},write:(r,n)=>{n.writeULEB(r.length);for(const i of r)e.write(i,n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`)}})},tuple(e,t){return new J({name:`(${e.map(r=>r.name).join(", ")})`,serializedSize:r=>{let n=0;for(let i=0;i<e.length;i++){const s=e[i].serializedSize(r[i]);if(s==null)return null;n+=s}return n},read:r=>{const n=[];for(const i of e)n.push(i.read(r));return n},write:(r,n)=>{for(let i=0;i<e.length;i++)e[i].write(r[i],n)},...t,validate:r=>{var n;if((n=t==null?void 0:t.validate)==null||n.call(t,r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}})},struct(e,t,r){const n=Object.entries(t);return new J({name:e,serializedSize:i=>{let s=0;for(const[a,o]of n){const u=o.serializedSize(i[a]);if(u==null)return null;s+=u}return s},read:i=>{const s={};for(const[a,o]of n)s[a]=o.read(i);return s},write:(i,s)=>{for(const[a,o]of n)o.write(i[a],s)},...r,validate:i=>{var s;if((s=r==null?void 0:r.validate)==null||s.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})},enum(e,t,r){const n=Object.entries(t);return new J({name:e,read:i=>{const s=i.readULEB(),[a,o]=n[s];return{[a]:(o==null?void 0:o.read(i))??!0}},write:(i,s)=>{const[a,o]=Object.entries(i)[0];for(let u=0;u<n.length;u++){const[d,l]=n[u];if(d===a){s.writeULEB(u),l==null||l.write(o,s);return}}},...r,validate:i=>{var o;if((o=r==null?void 0:r.validate)==null||o.call(r,i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`);const s=Object.keys(i);if(s.length!==1)throw new TypeError(`Expected object with one key, found ${s.length}`);const[a]=s;if(!Object.hasOwn(t,a))throw new TypeError(`Invalid enum variant ${a}`)}})},map(e,t){return c.vector(c.tuple([e,t])).transform({name:`Map<${e.name}, ${t.name}>`,input:r=>[...r.entries()],output:r=>{const n=new Map;for(const[i,s]of r)n.set(i,s);return n}})},generic(e,t){return(...r)=>t(...r).transform({name:`${t.name}<${r.map(n=>n.name).join(", ")}>`,input:n=>n,output:n=>n})},lazy(e){return ln(e)}},hn=32,me=class{constructor(e){if(this.types=new Map,this.counter=0,e instanceof me){this.schema=e.schema,this.types=new Map(e.types);return}if(this.schema=e,this.registerAddressType(me.ADDRESS,e.addressLength,e.addressEncoding),this.registerVectorType(e.vectorType),e.types&&e.types.structs)for(let t of Object.keys(e.types.structs))this.registerStructType(t,e.types.structs[t]);if(e.types&&e.types.enums)for(let t of Object.keys(e.types.enums))this.registerEnumType(t,e.types.enums[t]);if(e.types&&e.types.aliases)for(let t of Object.keys(e.types.aliases))this.registerAlias(t,e.types.aliases[t]);e.withPrimitives!==!1&&gn(this)}tempKey(){return`bcs-struct-${++this.counter}`}ser(e,t,r){if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).encode(this,t,r,i)}if(typeof e=="object"){const n=this.tempKey();return new me(this).registerStructType(n,e).ser(n,t,r)}throw new Error(`Incorrect type passed into the '.ser()' function.
2
2
  ${JSON.stringify(e)}`)}de(e,t,r){if(typeof t=="string")if(r)t=cn(t,r);else throw new Error("To pass a string to `bcs.de`, specify encoding");if(typeof e=="string"||Array.isArray(e)){const{name:n,params:i}=this.parseTypeName(e);return this.getTypeInterface(n).decode(this,t,i)}if(typeof e=="object"){const n=new me(this),i=this.tempKey();return n.registerStructType(i,e).de(i,t,r)}throw new Error(`Incorrect type passed into the '.de()' function.
3
3
  ${JSON.stringify(e)}`)}hasType(e){return this.types.has(e)}registerAlias(e,t){return this.types.set(e,t),this}registerType(e,t,r,n=()=>!0){const{name:i,params:s}=this.parseTypeName(e);return this.types.set(i,{encode(a,o,u,d){const l=s.reduce((g,m,p)=>Object.assign(g,{[m]:d[p]}),{});return this._encodeRaw.call(a,new tr(u),o,d,l)},decode(a,o,u){const d=s.reduce((l,g,m)=>Object.assign(l,{[g]:u[m]}),{});return this._decodeRaw.call(a,new Qt(o),u,d)},_encodeRaw(a,o,u,d){if(n(o))return t.call(this,a,o,u,d);throw new Error(`Validation failed for type ${i}, data: ${o}`)},_decodeRaw(a,o,u){return r.call(this,a,o,u)}}),this}registerBcsType(e,t){return this.registerType(e,(r,n,i)=>{const s=i.map(a=>new J({name:String(a),write:(o,u)=>{const{name:d,params:l}=this.parseTypeName(a),g=this.getTypeInterface(d),m=l.reduce((p,y,S)=>Object.assign(p,{[y]:i[S]}),{});return g._encodeRaw.call(this,u,o,l,m)},read:()=>{throw new Error("Not implemented")}}));return t(...s).write(n,r),r},(r,n)=>{const i=n.map(s=>new J({name:String(s),write:(a,o)=>{throw new Error("Not implemented")},read:a=>{const{name:o,params:u}=this.parseTypeName(s),d=this.getTypeInterface(o),l=u.reduce((g,m,p)=>Object.assign(g,{[m]:n[p]}),{});return d._decodeRaw.call(this,a,u,l)}}));return t(...i).read(r)}),this}registerAddressType(e,t,r="hex"){switch(r){case"base64":return this.registerType(e,function(i,s){return oe(s).reduce((a,o)=>a.write8(o),i)},function(i){return Ie(i.readBytes(t))});case"hex":return this.registerType(e,function(i,s){return Fe(s).reduce((a,o)=>a.write8(o),i)},function(i){return Oe(i.readBytes(t))});default:throw new Error("Unsupported encoding! Use either hex or base64")}}registerVectorType(e){let{name:t,params:r}=this.parseTypeName(e);if(r.length>1)throw new Error("Vector can have only one type parameter; got "+t);return this.registerType(e,function(i,s,a,o){return i.writeVec(s,(u,d)=>{let l=a[0];if(!l)throw new Error(`Incorrect number of type parameters passed a to vector '${e}'`);let{name:g,params:m}=this.parseTypeName(l);if(this.hasType(g))return this.getTypeInterface(g)._encodeRaw.call(this,u,d,m,o);if(!(g in o))throw new Error(`Unable to find a matching type definition for ${g} in vector; make sure you passed a generic`);let{name:p,params:y}=this.parseTypeName(o[g]);return this.getTypeInterface(p)._encodeRaw.call(this,u,d,y,o)})},function(i,s,a){return i.readVec(o=>{let u=s[0];if(!u)throw new Error(`Incorrect number of type parameters passed to a vector '${e}'`);let{name:d,params:l}=this.parseTypeName(u);if(this.hasType(d))return this.getTypeInterface(d)._decodeRaw.call(this,o,l,a);if(!(d in a))throw new Error(`Unable to find a matching type definition for ${d} in vector; make sure you passed a generic`);let{name:g,params:m}=this.parseTypeName(a[d]);return this.getTypeInterface(g)._decodeRaw.call(this,o,m,a)})})}registerStructType(e,t){for(let a in t){let o=this.tempKey(),u=t[a];!Array.isArray(u)&&typeof u!="string"&&(t[a]=o,this.registerStructType(o,u))}let r=Object.freeze(t),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(e);return this.registerType(e,function(o,u,d,l){if(!u||u.constructor!==Object)throw new Error(`Expected ${i} to be an Object, got: ${u}`);if(d.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${d.length}`);for(let g of n){if(!(g in u))throw new Error(`Struct ${i} requires field ${g}:${r[g]}`);const{name:m,params:p}=this.parseTypeName(r[g]);if(!s.includes(m))this.getTypeInterface(m)._encodeRaw.call(this,o,u[g],p,l);else{const y=s.indexOf(m);let{name:S,params:E}=this.parseTypeName(d[y]);if(this.hasType(S)){this.getTypeInterface(S)._encodeRaw.call(this,o,u[g],E,l);continue}if(!(S in l))throw new Error(`Unable to find a matching type definition for ${S} in ${i}; make sure you passed a generic`);let{name:A,params:_}=this.parseTypeName(l[S]);this.getTypeInterface(A)._encodeRaw.call(this,o,u[g],_,l)}}return o},function(o,u,d){if(u.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${u.length}`);let l={};for(let g of n){const{name:m,params:p}=this.parseTypeName(r[g]);if(!s.includes(m))l[g]=this.getTypeInterface(m)._decodeRaw.call(this,o,p,d);else{const y=s.indexOf(m);let{name:S,params:E}=this.parseTypeName(u[y]);if(this.hasType(S)){l[g]=this.getTypeInterface(S)._decodeRaw.call(this,o,E,d);continue}if(!(S in d))throw new Error(`Unable to find a matching type definition for ${S} in ${i}; make sure you passed a generic`);let{name:A,params:_}=this.parseTypeName(d[S]);l[g]=this.getTypeInterface(A)._decodeRaw.call(this,o,_,d)}}return l})}registerEnumType(e,t){for(let a in t){let o=this.tempKey(),u=t[a];u!==null&&!Array.isArray(u)&&typeof u!="string"&&(t[a]=o,this.registerStructType(o,u))}let r=Object.freeze(t),n=Object.keys(r),{name:i,params:s}=this.parseTypeName(e);return this.registerType(e,function(o,u,d,l){if(!u)throw new Error(`Unable to write enum "${i}", missing data.
4
4
  Received: "${u}"`);if(typeof u!="object")throw new Error(`Incorrect data passed into enum "${i}", expected object with properties: "${n.join(" | ")}".
@@ -1 +1 @@
1
- "use strict";const e=require("./index-DgaACuCq.js");function I(n,t,o,s){e.ahash(n);const a=e.checkOpts({dkLen:32,asyncTick:10},s),{c:d,dkLen:i,asyncTick:r}=a;if(e.anumber(d),e.anumber(i),e.anumber(r),d<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=e.toBytes(t),u=e.toBytes(o),f=new Uint8Array(i),p=e.hmac.create(n,l),c=p._cloneInto().update(u);return{c:d,dkLen:i,asyncTick:r,DK:f,PRF:p,PRFSalt:c}}function L(n,t,o,s,a){return n.destroy(),t.destroy(),s&&s.destroy(),a.fill(0),o}function g(n,t,o,s){const{c:a,dkLen:d,DK:i,PRF:r,PRFSalt:l}=I(n,t,o,s);let u;const f=new Uint8Array(4),p=e.createView(f),c=new Uint8Array(r.outputLen);for(let w=1,y=0;y<d;w++,y+=r.outputLen){const m=i.subarray(y,y+r.outputLen);p.setInt32(0,w,!1),(u=l._cloneInto(u)).update(f).digestInto(c),m.set(c.subarray(0,m.length));for(let h=1;h<a;h++){r._cloneInto(u).update(c).digestInto(c);for(let k=0;k<m.length;k++)m[k]^=c[k]}}return L(r,l,i,u,c)}/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */function b(n){if(typeof n!="string")throw new TypeError("invalid mnemonic type: "+typeof n);return n.normalize("NFKD")}function F(n){const t=b(n),o=t.split(" ");if(![12,15,18,21,24].includes(o.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:o}}const S=n=>b("mnemonic"+n);function T(n,t=""){return g(e.sha512,F(n).nfkd,S(t),{c:2048,dkLen:64})}exports.mnemonicToSeedSync=T;
1
+ "use strict";const e=require("./index-Br4OTc1S.js");function I(n,t,o,s){e.ahash(n);const a=e.checkOpts({dkLen:32,asyncTick:10},s),{c:d,dkLen:i,asyncTick:r}=a;if(e.anumber(d),e.anumber(i),e.anumber(r),d<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=e.toBytes(t),u=e.toBytes(o),f=new Uint8Array(i),p=e.hmac.create(n,l),c=p._cloneInto().update(u);return{c:d,dkLen:i,asyncTick:r,DK:f,PRF:p,PRFSalt:c}}function L(n,t,o,s,a){return n.destroy(),t.destroy(),s&&s.destroy(),a.fill(0),o}function g(n,t,o,s){const{c:a,dkLen:d,DK:i,PRF:r,PRFSalt:l}=I(n,t,o,s);let u;const f=new Uint8Array(4),p=e.createView(f),c=new Uint8Array(r.outputLen);for(let w=1,y=0;y<d;w++,y+=r.outputLen){const m=i.subarray(y,y+r.outputLen);p.setInt32(0,w,!1),(u=l._cloneInto(u)).update(f).digestInto(c),m.set(c.subarray(0,m.length));for(let h=1;h<a;h++){r._cloneInto(u).update(c).digestInto(c);for(let k=0;k<m.length;k++)m[k]^=c[k]}}return L(r,l,i,u,c)}/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */function b(n){if(typeof n!="string")throw new TypeError("invalid mnemonic type: "+typeof n);return n.normalize("NFKD")}function F(n){const t=b(n),o=t.split(" ");if(![12,15,18,21,24].includes(o.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:o}}const S=n=>b("mnemonic"+n);function T(n,t=""){return g(e.sha512,F(n).nfkd,S(t),{c:2048,dkLen:64})}exports.mnemonicToSeedSync=T;
@@ -1,6 +1,6 @@
1
- import { n as _e, s as ct, T as N, o as re, R as Dr, a as C, t as H, p as K, y as fe } from "./index-BWgeRtvV.mjs";
1
+ import { n as _e, s as ct, T as N, o as re, R as Dr, a as C, t as H, p as K, y as fe } from "./index-Bo9bOQTx.mjs";
2
2
  import { d as Ur } from "./dijkstra-BZM-8g-B.mjs";
3
- import { X as Wr } from "./index-DXcVEr2U.mjs";
3
+ import { V as Wr } from "./index-B3CeIlMx.mjs";
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2019 Google LLC