@wormhole-foundation/wormhole-connect 0.3.22-beta.6-development → 0.3.23-beta.0-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.
- package/dist/assets/{ccip-kFE7Egv7.js → ccip-BOQxYwA4.js} +1 -1
- package/dist/assets/cosmos-DpJHRy9R.js +38 -0
- package/dist/assets/{cosmwasm-K-vi4me_.js → cosmwasm-Dngp91th.js} +3 -3
- package/dist/assets/{ens-validation.es6-BaHGKtnQ.js → ens-validation.es6-DY5iRcEw.js} +1 -1
- package/dist/assets/{evm-DyQ3Up1i.js → evm-CXBiqSp9.js} +26 -26
- package/dist/assets/{index-Dqd4pSig.js → index-BhecnthD.js} +1 -1
- package/dist/assets/{index-EkdPNlSn.js → index-BphOrDO3.js} +1 -1
- package/dist/assets/index-BqmJ5ps2.js +3 -0
- package/dist/assets/{index-6ERMnMWg.js → index-CX56YBaw.js} +1 -1
- package/dist/assets/{index-Ci7BRqEw.js → index-DBB96cBs.js} +2 -2
- package/dist/assets/{index-BC4s7rDX.js → index-DwWFp7_d.js} +1 -1
- package/dist/assets/{index.es-BnzPN21S.js → index.es-BWLyUn8A.js} +2 -2
- package/dist/assets/{solana-D0TX7DHf.js → solana-C3hk0iY4.js} +2 -2
- package/dist/assets/{solanaEmbed.esm-CBOtlgbY.js → solanaEmbed.esm-Bzvc2Yau.js} +1 -1
- package/dist/assets/{unsignedTransaction-CWlZwFZw.js → unsignedTransaction-DhgJ038I.js} +1 -1
- package/dist/main.js +9 -9
- package/dist/src/utils/wallet/evm.d.ts.map +1 -1
- package/lib/{algorand-DjUTtqxk.mjs → algorand-kK-8oojN.mjs} +4 -4
- package/lib/{algorand-BgVfTPrs.js → algorand-mZNvVCps.js} +1 -1
- package/lib/{aptos-xxNUHC8o.mjs → aptos-C8ttM75J.mjs} +4 -4
- package/lib/{aptos-JOeRwo7r.js → aptos-CfDDJUg1.js} +2 -2
- package/lib/{aptos-CVVZJ32U.js → aptos-Dct_m6Gg.js} +1 -1
- package/lib/{aptos-BmyHkXb6.mjs → aptos-DgRBytsM.mjs} +1 -1
- package/lib/{browser-B_2ji4LP.mjs → browser-Bf0arMap.mjs} +2 -2
- package/lib/{browser-EzqecQNA.js → browser-DVTB-WO0.js} +1 -1
- package/lib/{browser-ponyfill-yx2re7P5.mjs → browser-ponyfill-BBGnYIgf.mjs} +1 -1
- package/lib/{browser-ponyfill-DH_DuJjr.js → browser-ponyfill-CtGm2L9z.js} +1 -1
- package/lib/{ccip-B2atrHiU.js → ccip-BQ7Z_goB.js} +1 -1
- package/lib/{ccip-JjlhOiF-.mjs → ccip-DzflCjUZ.mjs} +1 -1
- package/lib/{chain-BE2gm6l5.mjs → chain-D1Ms6bPc.mjs} +1 -1
- package/lib/{chain-Ck_2P-B0.js → chain-HMnpkrbl.js} +1 -1
- package/lib/{cosmos-BqA6T2gQ.mjs → cosmos-BIzn30Lo.mjs} +6 -6
- package/lib/cosmos-DFeWBfwa.js +38 -0
- package/lib/{cosmwasm-dpMbVaHd.mjs → cosmwasm-CYZkMUNw.mjs} +6 -6
- package/lib/{cosmwasm-D8-LmG14.js → cosmwasm-Cw-jZjyR.js} +2 -2
- package/lib/{create-CONoHCNu.js → create-BjUw-7kj.js} +1 -1
- package/lib/{create-NSzn0Mjd.mjs → create-D7KM2TbJ.mjs} +1 -1
- package/lib/{ens-validation.es6-DQMHfHaf.js → ens-validation.es6-CSendvHo.js} +1 -1
- package/lib/{ens-validation.es6-SwNVNlnL.mjs → ens-validation.es6-CtTsD9-1.mjs} +2 -2
- package/lib/{evm-BzbkH6iw.mjs → evm-2ARfiEbk.mjs} +6 -6
- package/lib/{evm-DQDZ6407.js → evm-CyCIXNVR.js} +22 -22
- package/lib/{evm-D7ExbjR0.mjs → evm-WeYh1CwH.mjs} +1588 -1596
- package/lib/{evm-CNyEgAvC.js → evm-vq8ExBtp.js} +2 -2
- package/lib/{index-BRY7PwCe.mjs → index-4Diyx7dk.mjs} +3 -3
- package/lib/{index-CHDQPgcS.mjs → index-6g1GFCCq.mjs} +2 -2
- package/lib/{index-Dz2gv_XI.mjs → index-9ZdnzH2d.mjs} +5 -5
- package/lib/{index-DzX0K2kv.js → index-B1oIabF3.js} +1 -1
- package/lib/{index-BiJV97Xz.js → index-B3xO-Vlp.js} +1 -1
- package/lib/{index-BG34ZjNr.mjs → index-B4Wo5ciI.mjs} +4 -4
- package/lib/{index-NS46gHyL.js → index-B9iI7y0N.js} +1 -1
- package/lib/{index-uwGV-Vn3.js → index-BC9O3q0O.js} +1 -1
- package/lib/{index-eFtXd025.mjs → index-BFLX4WxO.mjs} +4 -4
- package/lib/{index-gM7Zj76T.js → index-BPsT8R1K.js} +1 -1
- package/lib/{index-7ZAqkUlU.mjs → index-BSAsS8RD.mjs} +1 -1
- package/lib/{index-CD_ekrEI.mjs → index-BYDoWQJF.mjs} +4 -4
- package/lib/{index-XH2z1iXX.mjs → index-BaO4Z093.mjs} +3 -3
- package/lib/{index-Bd6oWjRV.mjs → index-BeO_qTcl.mjs} +2 -2
- package/lib/{index-wj32vNhH.js → index-BhOoVwl8.js} +1 -1
- package/lib/{index-DvQrjwKV.mjs → index-BtObdPhn.mjs} +4 -4
- package/lib/{index-DW-MTqZy.mjs → index-BzX2BW_O.mjs} +4 -4
- package/lib/{index-BgYENi3t.js → index-C2c8vR42.js} +1 -1
- package/lib/{index-6ZiA60gP.js → index-C2oD47lT.js} +1 -1
- package/lib/{index-DQR7qDM7.mjs → index-C6mDtHMX.mjs} +86 -88
- package/lib/{index-hyVeTz05.js → index-C9SlTWZB.js} +1 -1
- package/lib/{index-BYInpg-j.js → index-CHc9Fnxq.js} +1 -1
- package/lib/{index-Dh1gwYHK.js → index-CIbWgDdT.js} +1 -1
- package/lib/{index-ClJ9xKH_.js → index-CJWNAIq4.js} +1 -1
- package/lib/{index-SL51oRv6.mjs → index-CK0z65I9.mjs} +4 -4
- package/lib/{index-BNxdQt8p.js → index-CMB6PdWJ.js} +1 -1
- package/lib/{index-BozvRZRr.mjs → index-CMxa7eqf.mjs} +5 -5
- package/lib/{index-CeTuOmVc.mjs → index-CNSXR9tB.mjs} +5 -5
- package/lib/{index-BCRhQQj3.mjs → index-CV1VV-zJ.mjs} +3 -3
- package/lib/{index-B3EOWCDT.js → index-CxrhBQyI.js} +1 -1
- package/lib/{index-BS-5mncz.mjs → index-CyGeUScn.mjs} +5 -5
- package/lib/index-D5ZI8OQ5.js +3 -0
- package/lib/{index-DsuNqUD-.mjs → index-DAY2C3ja.mjs} +4 -4
- package/lib/{index-Ci2ZLtDV.js → index-DHPvJyI7.js} +1 -1
- package/lib/{index-THgGZbp0.js → index-DMbFl-Wn.js} +1 -1
- package/lib/{index-DkLEkXih.mjs → index-DVFnDDyZ.mjs} +4 -4
- package/lib/{index-DuiRxqsN.js → index-DjAqAqeU.js} +1 -1
- package/lib/{index-9m7TBK6v.mjs → index-EqiiaA9-.mjs} +4 -4
- package/lib/{index-BRSYiZGo.js → index-GooDQIzI.js} +1 -1
- package/lib/{index-BtH96J3O.mjs → index-IQlvm76i.mjs} +72 -72
- package/lib/{index-iNOxku8i.js → index-Jgr_mZ4Y.js} +1 -1
- package/lib/{index-D4hS9TeC.js → index-L9bSVF77.js} +1 -1
- package/lib/{index-Rl2MOwgU.mjs → index-f8fcieOQ.mjs} +4 -4
- package/lib/{index-C7tR7eyI.js → index-k5MpmioF.js} +1 -1
- package/lib/{index-_YUXIUK8.js → index-nxd7L_DD.js} +1 -1
- package/lib/{index-GGqf7rB-.mjs → index-qsqnFs3a.mjs} +2 -2
- package/lib/{index-Dh6Zmu7D.js → index-rtZ91I3M.js} +8 -8
- package/lib/{index-Fv3-CE1p.mjs → index-yG0Rs8Eb.mjs} +2 -2
- package/lib/{index.es-CKpdDKzf.mjs → index.es-CEImaU7l.mjs} +5 -5
- package/lib/{index.es-Bj1J4jCu.js → index.es-gwZvea5f.js} +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{libsodium-wrappers-Dta7f8ar.js → libsodium-wrappers-Bez_KKB1.js} +1 -1
- package/lib/{libsodium-wrappers-B_H4aRTY.mjs → libsodium-wrappers-Cz0uCBox.mjs} +1 -1
- package/lib/{sei-UDsMKtbc.mjs → sei-BYR1KxHW.mjs} +2 -2
- package/lib/{sei-DGdkVzbE.js → sei-BrTMqCke.js} +1 -1
- package/lib/{solana-CkviJVw5.js → solana-0RqhvUa1.js} +1 -1
- package/lib/{solana-DPaJOryR.mjs → solana-BLtdLKKq.mjs} +3 -3
- package/lib/{solana-C9YVHn-W.mjs → solana-CRbkLsWk.mjs} +6 -6
- package/lib/{solana-BZhGAwx6.js → solana-D3NR_tHO.js} +2 -2
- package/lib/{solanaEmbed.esm-DnssMltk.mjs → solanaEmbed.esm-CaR2Md_k.mjs} +2 -2
- package/lib/{solanaEmbed.esm-C0UDKbGU.js → solanaEmbed.esm-E-eNJK6U.js} +1 -1
- package/lib/src/utils/wallet/evm.d.ts.map +1 -1
- package/lib/{sui-8btJKilJ.mjs → sui-BZ_uS8zP.mjs} +1 -1
- package/lib/{sui-c83-J_ow.js → sui-CErMMm5A.js} +2 -2
- package/lib/{sui-CUfyUGKk.mjs → sui-DeoYmh3N.mjs} +4 -4
- package/lib/{sui-6-wJdSqv.js → sui-T81Wy4dP.js} +1 -1
- package/lib/{unsignedTransaction-CWjweDuU.js → unsignedTransaction-DCa77QzH.js} +1 -1
- package/lib/{unsignedTransaction-C293HA6V.mjs → unsignedTransaction-DJSAg3zT.mjs} +2 -2
- package/package.json +1 -1
- package/dist/assets/cosmos-BUbSl2Zd.js +0 -38
- package/dist/assets/index-5a-xin_S.js +0 -3
- package/lib/cosmos-arjQyma2.js +0 -38
- package/lib/index-CgyVAtoK.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const B=require("./index-Dh6Zmu7D.js"),De=require("./index-BRSYiZGo.js");function Br(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function $r(e,r){r||(r=e.reduce((s,h)=>s+h.length,0));const n=Br(r);let c=0;for(const s of e)n.set(s,c),c+=s.length;return n}const mr={...De.identityBase,...De.base2,...De.base8,...De.base10,...De.base16,...De.base32,...De.base36,...De.base58,...De.base64,...De.base256emoji};function Kr(e,r,n,c){return{name:e,prefix:r,encoder:{name:e,prefix:r,encode:n},decoder:{decode:c}}}const xr=Kr("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),qt=Kr("ascii","a",e=>{let r="a";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return r},e=>{e=e.substring(1);const r=Br(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}),Ur={utf8:xr,"utf-8":xr,hex:mr.base16,latin1:qt,ascii:qt,binary:qt,...mr};function Jt(e,r="utf8"){const n=Ur[r];if(!n)throw new Error(`Unsupported encoding "${r}"`);return(r==="utf8"||r==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):n.decoder.decode(`${n.prefix}${e}`)}function kt(e,r="utf8"){const n=Ur[r];if(!n)throw new Error(`Unsupported encoding "${r}"`);return(r==="utf8"||r==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):n.encoder.encode(e).substring(1)}const Zn={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"}},Qn=/"(?:_|\\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*:/,ei=/"(?: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*:/,ti=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function ri(e,r){if(e==="__proto__"||e==="constructor"&&r&&typeof r=="object"&&"prototype"in r){ni(e);return}return r}function ni(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function zt(e,r={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const c=n.toLowerCase();if(c==="true")return!0;if(c==="false")return!1;if(c==="undefined")return;if(c==="null")return null;if(c==="nan")return Number.NaN;if(c==="infinity")return Number.POSITIVE_INFINITY;if(c==="-infinity")return Number.NEGATIVE_INFINITY}if(!ti.test(e)){if(r.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Qn.test(e)||ei.test(e)){if(r.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,ri)}return JSON.parse(e)}catch(c){if(r.strict)throw c;return e}}function ii(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Te(e,...r){try{return ii(e(...r))}catch(n){return Promise.reject(n)}}function si(e){const r=typeof e;return e===null||r!=="object"&&r!=="function"}function oi(e){const r=Object.getPrototypeOf(e);return!r||r.isPrototypeOf(Object)}function $t(e){if(si(e))return String(e);if(oi(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON=="function")return $t(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function Hr(){if(typeof B.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Qt="base64:";function ai(e){if(typeof e=="string")return e;Hr();const r=B.dist.Buffer.from(e).toString("base64");return Qt+r}function fi(e){return typeof e!="string"||!e.startsWith(Qt)?e:(Hr(),B.dist.Buffer.from(e.slice(Qt.length),"base64"))}function Ke(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function ci(...e){return Ke(e.join(":"))}function Dt(e){return e=Ke(e),e?e+":":""}const ui="memory",li=()=>{const e=new Map;return{name:ui,options:{},hasItem(r){return e.has(r)},getItem(r){return e.get(r)??null},getItemRaw(r){return e.get(r)??null},setItem(r,n){e.set(r,n)},setItemRaw(r,n){e.set(r,n)},removeItem(r){e.delete(r)},getKeys(){return Array.from(e.keys())},clear(){e.clear()},dispose(){e.clear()}}};function hi(e={}){const r={mounts:{"":e.driver||li()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=o=>{for(const u of r.mountpoints)if(o.startsWith(u))return{base:u,relativeKey:o.slice(u.length),driver:r.mounts[u]};return{base:"",relativeKey:o,driver:r.mounts[""]}},c=(o,u)=>r.mountpoints.filter(y=>y.startsWith(o)||u&&o.startsWith(y)).map(y=>({relativeBase:o.length>y.length?o.slice(y.length):void 0,mountpoint:y,driver:r.mounts[y]})),s=(o,u)=>{if(r.watching){u=Ke(u);for(const y of r.watchListeners)y(o,u)}},h=async()=>{if(!r.watching){r.watching=!0;for(const o in r.mounts)r.unwatch[o]=await wr(r.mounts[o],s,o)}},E=async()=>{if(r.watching){for(const o in r.unwatch)await r.unwatch[o]();r.unwatch={},r.watching=!1}},x=(o,u,y)=>{const w=new Map,S=v=>{let N=w.get(v.base);return N||(N={driver:v.driver,base:v.base,items:[]},w.set(v.base,N)),N};for(const v of o){const N=typeof v=="string",W=Ke(N?v:v.key),X=N?void 0:v.value,M=N||!v.options?u:{...u,...v.options},Le=n(W);S(Le).items.push({key:W,value:X,relativeKey:Le.relativeKey,options:M})}return Promise.all([...w.values()].map(v=>y(v))).then(v=>v.flat())},g={hasItem(o,u={}){o=Ke(o);const{relativeKey:y,driver:w}=n(o);return Te(w.hasItem,y,u)},getItem(o,u={}){o=Ke(o);const{relativeKey:y,driver:w}=n(o);return Te(w.getItem,y,u).then(S=>zt(S))},getItems(o,u){return x(o,u,y=>y.driver.getItems?Te(y.driver.getItems,y.items.map(w=>({key:w.relativeKey,options:w.options})),u).then(w=>w.map(S=>({key:ci(y.base,S.key),value:zt(S.value)}))):Promise.all(y.items.map(w=>Te(y.driver.getItem,w.relativeKey,w.options).then(S=>({key:w.key,value:zt(S)})))))},getItemRaw(o,u={}){o=Ke(o);const{relativeKey:y,driver:w}=n(o);return w.getItemRaw?Te(w.getItemRaw,y,u):Te(w.getItem,y,u).then(S=>fi(S))},async setItem(o,u,y={}){if(u===void 0)return g.removeItem(o);o=Ke(o);const{relativeKey:w,driver:S}=n(o);S.setItem&&(await Te(S.setItem,w,$t(u),y),S.watch||s("update",o))},async setItems(o,u){await x(o,u,async y=>{if(y.driver.setItems)return Te(y.driver.setItems,y.items.map(w=>({key:w.relativeKey,value:$t(w.value),options:w.options})),u);y.driver.setItem&&await Promise.all(y.items.map(w=>Te(y.driver.setItem,w.relativeKey,$t(w.value),w.options)))})},async setItemRaw(o,u,y={}){if(u===void 0)return g.removeItem(o,y);o=Ke(o);const{relativeKey:w,driver:S}=n(o);if(S.setItemRaw)await Te(S.setItemRaw,w,u,y);else if(S.setItem)await Te(S.setItem,w,ai(u),y);else return;S.watch||s("update",o)},async removeItem(o,u={}){typeof u=="boolean"&&(u={removeMeta:u}),o=Ke(o);const{relativeKey:y,driver:w}=n(o);w.removeItem&&(await Te(w.removeItem,y,u),(u.removeMeta||u.removeMata)&&await Te(w.removeItem,y+"$",u),w.watch||s("remove",o))},async getMeta(o,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),o=Ke(o);const{relativeKey:y,driver:w}=n(o),S=Object.create(null);if(w.getMeta&&Object.assign(S,await Te(w.getMeta,y,u)),!u.nativeOnly){const v=await Te(w.getItem,y+"$",u).then(N=>zt(N));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(S,v))}return S},setMeta(o,u,y={}){return this.setItem(o+"$",u,y)},removeMeta(o,u={}){return this.removeItem(o+"$",u)},async getKeys(o,u={}){o=Dt(o);const y=c(o,!0);let w=[];const S=[];for(const v of y){const W=(await Te(v.driver.getKeys,v.relativeBase,u)).map(X=>v.mountpoint+Ke(X)).filter(X=>!w.some(M=>X.startsWith(M)));S.push(...W),w=[v.mountpoint,...w.filter(X=>!X.startsWith(v.mountpoint))]}return o?S.filter(v=>v.startsWith(o)&&!v.endsWith("$")):S.filter(v=>!v.endsWith("$"))},async clear(o,u={}){o=Dt(o),await Promise.all(c(o,!1).map(async y=>{if(y.driver.clear)return Te(y.driver.clear,y.relativeBase,u);if(y.driver.removeItem){const w=await y.driver.getKeys(y.relativeBase||"",u);return Promise.all(w.map(S=>y.driver.removeItem(S,u)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(o=>vr(o)))},async watch(o){return await h(),r.watchListeners.push(o),async()=>{r.watchListeners=r.watchListeners.filter(u=>u!==o),r.watchListeners.length===0&&await E()}},async unwatch(){r.watchListeners=[],await E()},mount(o,u){if(o=Dt(o),o&&r.mounts[o])throw new Error(`already mounted at ${o}`);return o&&(r.mountpoints.push(o),r.mountpoints.sort((y,w)=>w.length-y.length)),r.mounts[o]=u,r.watching&&Promise.resolve(wr(u,s,o)).then(y=>{r.unwatch[o]=y}).catch(console.error),g},async unmount(o,u=!0){o=Dt(o),!(!o||!r.mounts[o])&&(r.watching&&o in r.unwatch&&(r.unwatch[o](),delete r.unwatch[o]),u&&await vr(r.mounts[o]),r.mountpoints=r.mountpoints.filter(y=>y!==o),delete r.mounts[o])},getMount(o=""){o=Ke(o)+":";const u=n(o);return{driver:u.driver,base:u.base}},getMounts(o="",u={}){return o=Ke(o),c(o,u.parents).map(w=>({driver:w.driver,base:w.mountpoint}))}};return g}function wr(e,r,n){return e.watch?e.watch((c,s)=>r(c,n+s)):()=>{}}async function vr(e){typeof e.dispose=="function"&&await Te(e.dispose)}function dt(e){return new Promise((r,n)=>{e.oncomplete=e.onsuccess=()=>r(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Gr(e,r){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(r);const c=dt(n);return(s,h)=>c.then(E=>h(E.transaction(r,s).objectStore(r)))}let Xt;function Tt(){return Xt||(Xt=Gr("keyval-store","keyval")),Xt}function Sr(e,r=Tt()){return r("readonly",n=>dt(n.get(e)))}function di(e,r,n=Tt()){return n("readwrite",c=>(c.put(r,e),dt(c.transaction)))}function bi(e,r=Tt()){return r("readwrite",n=>(n.delete(e),dt(n.transaction)))}function gi(e=Tt()){return e("readwrite",r=>(r.clear(),dt(r.transaction)))}function yi(e,r){return e.openCursor().onsuccess=function(){this.result&&(r(this.result),this.result.continue())},dt(e.transaction)}function pi(e=Tt()){return e("readonly",r=>{if(r.getAllKeys)return dt(r.getAllKeys());const n=[];return yi(r,c=>n.push(c.key)).then(()=>n)})}const _i=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n),mi=e=>{const r=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,n=e.replace(r,'$1"$2n"$3');return JSON.parse(n,(c,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Fr(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return mi(e)}catch{return e}}function Jr(e){return typeof e=="string"?e:_i(e)||""}const xi="idb-keyval";var wi=(e={})=>{const r=e.base&&e.base.length>0?`${e.base}:`:"",n=s=>r+s;let c;return e.dbName&&e.storeName&&(c=Gr(e.dbName,e.storeName)),{name:xi,options:e,async hasItem(s){return!(typeof await Sr(n(s),c)>"u")},async getItem(s){return await Sr(n(s),c)??null},setItem(s,h){return di(n(s),h,c)},removeItem(s){return bi(n(s),c)},getKeys(){return pi(c)},clear(){return gi(c)}}};const vi="WALLET_CONNECT_V2_INDEXED_DB",Si="keyvaluestorage";let Ei=class{constructor(){this.indexedDb=hi({driver:wi({dbName:vi,storeName:Si})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(r=>[r.key,r.value])}async getItem(r){const n=await this.indexedDb.getItem(r);if(n!==null)return n}async setItem(r,n){await this.indexedDb.setItem(r,Jr(n))}async removeItem(r){await this.indexedDb.removeItem(r)}};var Yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof B.dist.global<"u"?B.dist.global:typeof self<"u"?self:{},Kt={exports:{}};(function(){let e;function r(){}e=r,e.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},e.prototype.setItem=function(n,c){this[n]=String(c)},e.prototype.removeItem=function(n){delete this[n]},e.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(c){n[c]=void 0,delete n[c]})},e.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Yt<"u"&&Yt.localStorage?Kt.exports=Yt.localStorage:typeof window<"u"&&window.localStorage?Kt.exports=window.localStorage:Kt.exports=new r})();function Ii(e){var r;return[e[0],Fr((r=e[1])!=null?r:"")]}class Oi{constructor(){this.localStorage=Kt.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Ii)}async getItem(r){const n=this.localStorage.getItem(r);if(n!==null)return Fr(n)}async setItem(r,n){this.localStorage.setItem(r,Jr(n))}async removeItem(r){this.localStorage.removeItem(r)}}const Ti="wc_storage_version",Er=1,Li=async(e,r,n)=>{const c=Ti,s=await r.getItem(c);if(s&&s>=Er){n(r);return}const h=await e.getKeys();if(!h.length){n(r);return}const E=[];for(;h.length;){const x=h.shift();if(!x)continue;const g=x.toLowerCase();if(g.includes("wc@")||g.includes("walletconnect")||g.includes("wc_")||g.includes("wallet_connect")){const o=await e.getItem(x);await r.setItem(x,o),E.push(x)}}await r.setItem(c,Er),n(r),Ai(e,E)},Ai=async(e,r)=>{r.length&&r.forEach(async n=>{await e.removeItem(n)})};let Ri=class{constructor(){this.initialized=!1,this.setInitialized=n=>{this.storage=n,this.initialized=!0};const r=new Oi;this.storage=r;try{const n=new Ei;Li(r,n,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(r){return await this.initialize(),this.storage.getItem(r)}async setItem(r,n){return await this.initialize(),this.storage.setItem(r,n)}async removeItem(r){return await this.initialize(),this.storage.removeItem(r)}async initialize(){this.initialized||await new Promise(r=>{const n=setInterval(()=>{this.initialized&&(clearInterval(n),r())},20)})}};class Pi{}function ji(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Ci=Ni;function Ni(e,r,n){var c=n&&n.stringify||ji,s=1;if(typeof e=="object"&&e!==null){var h=r.length+s;if(h===1)return e;var E=new Array(h);E[0]=c(e);for(var x=1;x<h;x++)E[x]=c(r[x]);return E.join(" ")}if(typeof e!="string")return e;var g=r.length;if(g===0)return e;for(var o="",u=1-s,y=-1,w=e&&e.length||0,S=0;S<w;){if(e.charCodeAt(S)===37&&S+1<w){switch(y=y>-1?y:0,e.charCodeAt(S+1)){case 100:case 102:if(u>=g||r[u]==null)break;y<S&&(o+=e.slice(y,S)),o+=Number(r[u]),y=S+2,S++;break;case 105:if(u>=g||r[u]==null)break;y<S&&(o+=e.slice(y,S)),o+=Math.floor(Number(r[u])),y=S+2,S++;break;case 79:case 111:case 106:if(u>=g||r[u]===void 0)break;y<S&&(o+=e.slice(y,S));var v=typeof r[u];if(v==="string"){o+="'"+r[u]+"'",y=S+2,S++;break}if(v==="function"){o+=r[u].name||"<anonymous>",y=S+2,S++;break}o+=c(r[u]),y=S+2,S++;break;case 115:if(u>=g)break;y<S&&(o+=e.slice(y,S)),o+=String(r[u]),y=S+2,S++;break;case 37:y<S&&(o+=e.slice(y,S)),o+="%",y=S+2,S++,u--;break}++u}++S}return y===-1?e:(y<w&&(o+=e.slice(y)),o)}const Ir=Ci;var _t=Qe;const Et=Fi().console||{},Mi={mapHttpRequest:Bt,mapHttpResponse:Bt,wrapRequestSerializer:Zt,wrapResponseSerializer:Zt,wrapErrorSerializer:Zt,req:Bt,res:Bt,err:Ki};function zi(e,r){return Array.isArray(e)?e.filter(function(c){return c!=="!stdSerializers.err"}):e===!0?Object.keys(r):!1}function Qe(e){e=e||{},e.browser=e.browser||{};const r=e.browser.transmit;if(r&&typeof r.send!="function")throw Error("pino: transmit option must have a send function");const n=e.browser.write||Et;e.browser.write&&(e.browser.asObject=!0);const c=e.serializers||{},s=zi(e.browser.serialize,c);let h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);const E=["error","fatal","warn","info","debug","trace"];typeof n=="function"&&(n.error=n.fatal=n.warn=n.info=n.debug=n.trace=n),e.enabled===!1&&(e.level="silent");const x=e.level||"info",g=Object.create(n);g.log||(g.log=It),Object.defineProperty(g,"levelVal",{get:u}),Object.defineProperty(g,"level",{get:y,set:w});const o={transmit:r,serialize:s,asObject:e.browser.asObject,levels:E,timestamp:Ui(e)};g.levels=Qe.levels,g.level=x,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=It,g.serializers=c,g._serialize=s,g._stdErrSerialize=h,g.child=S,r&&(g._logEvent=er());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function y(){return this._level}function w(v){if(v!=="silent"&&!this.levels.values[v])throw Error("unknown level "+v);this._level=v,yt(o,g,"error","log"),yt(o,g,"fatal","error"),yt(o,g,"warn","error"),yt(o,g,"info","log"),yt(o,g,"debug","log"),yt(o,g,"trace","log")}function S(v,N){if(!v)throw new Error("missing bindings for child Pino");N=N||{},s&&v.serializers&&(N.serializers=v.serializers);const W=N.serializers;if(s&&W){var X=Object.assign({},c,W),M=e.browser.serialize===!0?Object.keys(X):s;delete v.serializers,Wt([v],M,X,this._stdErrSerialize)}function Le(ge){this._childLevel=(ge._childLevel|0)+1,this.error=pt(ge,v,"error"),this.fatal=pt(ge,v,"fatal"),this.warn=pt(ge,v,"warn"),this.info=pt(ge,v,"info"),this.debug=pt(ge,v,"debug"),this.trace=pt(ge,v,"trace"),X&&(this.serializers=X,this._serialize=M),r&&(this._logEvent=er([].concat(ge._logEvent.bindings,v)))}return Le.prototype=this,new Le(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=Mi;Qe.stdTimeFunctions=Object.assign({},{nullTime:kr,epochTime:Wr,unixTime:Hi,isoTime:Gi});function yt(e,r,n,c){const s=Object.getPrototypeOf(r);r[n]=r.levelVal>r.levels.values[n]?It:s[n]?s[n]:Et[n]||Et[c]||It,Di(e,r,n)}function Di(e,r,n){!e.transmit&&r[n]===It||(r[n]=function(c){return function(){const h=e.timestamp(),E=new Array(arguments.length),x=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Et?Et:this;for(var g=0;g<E.length;g++)E[g]=arguments[g];if(e.serialize&&!e.asObject&&Wt(E,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?c.call(x,Bi(this,n,E,h)):c.apply(x,E),e.transmit){const o=e.transmit.level||r.level,u=Qe.levels.values[o],y=Qe.levels.values[n];if(y<u)return;$i(this,{ts:h,methodLevel:n,methodValue:y,transmitLevel:o,transmitValue:Qe.levels.values[e.transmit.level||r.level],send:e.transmit.send,val:r.levelVal},E)}}}(r[n]))}function Bi(e,r,n,c){e._serialize&&Wt(n,e._serialize,e.serializers,e._stdErrSerialize);const s=n.slice();let h=s[0];const E={};c&&(E.time=c),E.level=Qe.levels.values[r];let x=(e._childLevel|0)+1;if(x<1&&(x=1),h!==null&&typeof h=="object"){for(;x--&&typeof s[0]=="object";)Object.assign(E,s.shift());h=s.length?Ir(s.shift(),s):void 0}else typeof h=="string"&&(h=Ir(s.shift(),s));return h!==void 0&&(E.msg=h),E}function Wt(e,r,n,c){for(const s in e)if(c&&e[s]instanceof Error)e[s]=Qe.stdSerializers.err(e[s]);else if(typeof e[s]=="object"&&!Array.isArray(e[s]))for(const h in e[s])r&&r.indexOf(h)>-1&&h in n&&(e[s][h]=n[h](e[s][h]))}function pt(e,r,n){return function(){const c=new Array(1+arguments.length);c[0]=r;for(var s=1;s<c.length;s++)c[s]=arguments[s-1];return e[n].apply(this,c)}}function $i(e,r,n){const c=r.send,s=r.ts,h=r.methodLevel,E=r.methodValue,x=r.val,g=e._logEvent.bindings;Wt(n,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=s,e._logEvent.messages=n.filter(function(o){return g.indexOf(o)===-1}),e._logEvent.level.label=h,e._logEvent.level.value=E,c(h,e._logEvent,x),e._logEvent=er(g)}function er(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Ki(e){const r={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)r[n]===void 0&&(r[n]=e[n]);return r}function Ui(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?kr:Wr}function Bt(){return{}}function Zt(e){return e}function It(){}function kr(){return!1}function Wr(){return Date.now()}function Hi(){return Math.round(Date.now()/1e3)}function Gi(){return new Date(Date.now()).toISOString()}function Fi(){function e(r){return typeof r<"u"&&r}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}const ir=B.getDefaultExportFromCjs(_t),Ji=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n);function Or(e){return typeof e=="string"?e:Ji(e)||""}const ki={level:"info"},Lt="custom_context",sr=1e3*1024;class Wi{constructor(r){this.nodeValue=r,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class Tr{constructor(r){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=r,this.sizeInBytes=0}append(r){const n=new Wi(r);if(n.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${r} with size ${n.size}`);for(;this.size+n.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=n),this.tail=n):(this.head=n,this.tail=n),this.lengthInNodes++,this.sizeInBytes+=n.size}shift(){if(!this.head)return;const r=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=r.size}toArray(){const r=[];let n=this.head;for(;n!==null;)r.push(n.value),n=n.next;return r}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let r=this.head;return{next:()=>{if(!r)return{done:!0,value:null};const n=r.value;return r=r.next,{done:!1,value:n}}}}}class Vr{constructor(r,n=sr){this.level=r??"error",this.levelValue=_t.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=n,this.logs=new Tr(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(r,n){n===_t.levels.values.error?console.error(r):n===_t.levels.values.warn?console.warn(r):n===_t.levels.values.debug?console.debug(r):n===_t.levels.values.trace?console.trace(r):console.log(r)}appendToLogs(r){this.logs.append(Or({timestamp:new Date().toISOString(),log:r}));const n=typeof r=="string"?JSON.parse(r).level:r.level;n>=this.levelValue&&this.forwardToConsole(r,n)}getLogs(){return this.logs}clearLogs(){this.logs=new Tr(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(r){const n=this.getLogArray();return n.push(Or({extraMetadata:r})),new Blob(n,{type:"application/json"})}}class Vi{constructor(r,n=sr){this.baseChunkLogger=new Vr(r,n)}write(r){this.baseChunkLogger.appendToLogs(r)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(r){return this.baseChunkLogger.logsToBlob(r)}downloadLogsBlobInBrowser(r){const n=URL.createObjectURL(this.logsToBlob(r)),c=document.createElement("a");c.href=n,c.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(n)}}class qi{constructor(r,n=sr){this.baseChunkLogger=new Vr(r,n)}write(r){this.baseChunkLogger.appendToLogs(r)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(r){return this.baseChunkLogger.logsToBlob(r)}}var Xi=Object.defineProperty,Yi=Object.defineProperties,Zi=Object.getOwnPropertyDescriptors,Lr=Object.getOwnPropertySymbols,Qi=Object.prototype.hasOwnProperty,es=Object.prototype.propertyIsEnumerable,Ar=(e,r,n)=>r in e?Xi(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Ut=(e,r)=>{for(var n in r||(r={}))Qi.call(r,n)&&Ar(e,n,r[n]);if(Lr)for(var n of Lr(r))es.call(r,n)&&Ar(e,n,r[n]);return e},Ht=(e,r)=>Yi(e,Zi(r));function ts(e){return Ht(Ut({},e),{level:(e==null?void 0:e.level)||ki.level})}function rs(e,r=Lt){return e[r]||""}function ns(e,r,n=Lt){return e[n]=r,e}function qr(e,r=Lt){let n="";return typeof e.bindings>"u"?n=rs(e,r):n=e.bindings().context||"",n}function is(e,r,n=Lt){const c=qr(e,n);return c.trim()?`${c}/${r}`:r}function ss(e,r,n=Lt){const c=is(e,r,n),s=e.child({context:c});return ns(s,c,n)}function os(e){var r,n;const c=new Vi((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:ir(Ht(Ut({},e.opts),{level:"trace",browser:Ht(Ut({},(n=e.opts)==null?void 0:n.browser),{write:s=>c.write(s)})})),chunkLoggerController:c}}function as(e){var r;const n=new qi((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:ir(Ht(Ut({},e.opts),{level:"trace"}),n),chunkLoggerController:n}}function fs(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?os(e):as(e)}var or={},Xr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=De.binary,n=De.wipe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var c=function(){function x(){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 x.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},x.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},x.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},x.prototype.update=function(g,o){if(o===void 0&&(o=g.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var u=0;if(this._bytesHashed+=o,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&o>0;)this._buffer[this._bufferLength++]=g[u++],o--;this._bufferLength===this.blockSize&&(h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(o>=this.blockSize&&(u=h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,g,u,o),o%=this.blockSize);o>0;)this._buffer[this._bufferLength++]=g[u++],o--;return this},x.prototype.finish=function(g){if(!this._finished){var o=this._bytesHashed,u=this._bufferLength,y=o/536870912|0,w=o<<3,S=o%128<112?128:256;this._buffer[u]=128;for(var v=u+1;v<S-8;v++)this._buffer[v]=0;r.writeUint32BE(y,this._buffer,S-8),r.writeUint32BE(w,this._buffer,S-4),h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,S),this._finished=!0}for(var v=0;v<this.digestLength/8;v++)r.writeUint32BE(this._stateHi[v],g,v*8),r.writeUint32BE(this._stateLo[v],g,v*8+4);return this},x.prototype.digest=function(){var g=new Uint8Array(this.digestLength);return this.finish(g),g},x.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}},x.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},x.prototype.cleanSavedState=function(g){n.wipe(g.stateHi),n.wipe(g.stateLo),g.buffer&&n.wipe(g.buffer),g.bufferLength=0,g.bytesHashed=0},x}();e.SHA512=c;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function h(x,g,o,u,y,w,S){for(var v=o[0],N=o[1],W=o[2],X=o[3],M=o[4],Le=o[5],ge=o[6],Ce=o[7],G=u[0],C=u[1],Ne=u[2],et=u[3],ye=u[4],ke=u[5],Ue=u[6],qe=u[7],m,_,Y,le,A,I,O,L;S>=128;){for(var Ae=0;Ae<16;Ae++){var ne=8*Ae+w;x[Ae]=r.readUint32BE(y,ne),g[Ae]=r.readUint32BE(y,ne+4)}for(var Ae=0;Ae<80;Ae++){var mt=v,z=N,bt=W,b=X,d=M,l=Le,t=ge,a=Ce,R=G,P=C,$=Ne,K=et,D=ye,U=ke,Re=Ue,he=qe;if(m=Ce,_=qe,A=_&65535,I=_>>>16,O=m&65535,L=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),A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,m=M&Le^~M&ge,_=ye&ke^~ye&Ue,A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,m=s[Ae*2],_=s[Ae*2+1],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,m=x[Ae%16],_=g[Ae%16],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,Y=O&65535|L<<16,le=A&65535|I<<16,m=Y,_=le,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=(v>>>28|G<<4)^(G>>>2|v<<30)^(G>>>7|v<<25),_=(G>>>28|v<<4)^(v>>>2|G<<30)^(v>>>7|G<<25),A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,m=v&N^v&W^N&W,_=G&C^G&Ne^C&Ne,A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,a=O&65535|L<<16,he=A&65535|I<<16,m=b,_=K,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=Y,_=le,A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,b=O&65535|L<<16,K=A&65535|I<<16,N=mt,W=z,X=bt,M=b,Le=d,ge=l,Ce=t,v=a,C=R,Ne=P,et=$,ye=K,ke=D,Ue=U,qe=Re,G=he,Ae%16===15)for(var ne=0;ne<16;ne++)m=x[ne],_=g[ne],A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=x[(ne+9)%16],_=g[(ne+9)%16],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,Y=x[(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),A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,Y=x[(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),A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,x[ne]=O&65535|L<<16,g[ne]=A&65535|I<<16}m=v,_=G,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[0],_=u[0],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[0]=v=O&65535|L<<16,u[0]=G=A&65535|I<<16,m=N,_=C,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[1],_=u[1],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[1]=N=O&65535|L<<16,u[1]=C=A&65535|I<<16,m=W,_=Ne,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[2],_=u[2],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[2]=W=O&65535|L<<16,u[2]=Ne=A&65535|I<<16,m=X,_=et,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[3],_=u[3],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[3]=X=O&65535|L<<16,u[3]=et=A&65535|I<<16,m=M,_=ye,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[4],_=u[4],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[4]=M=O&65535|L<<16,u[4]=ye=A&65535|I<<16,m=Le,_=ke,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[5],_=u[5],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[5]=Le=O&65535|L<<16,u[5]=ke=A&65535|I<<16,m=ge,_=Ue,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[6],_=u[6],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[6]=ge=O&65535|L<<16,u[6]=Ue=A&65535|I<<16,m=Ce,_=qe,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[7],_=u[7],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[7]=Ce=O&65535|L<<16,u[7]=qe=A&65535|I<<16,w+=128,S-=128}return w}function E(x){var g=new c;g.update(x);var o=g.digest();return g.clean(),o}e.hash=E})(Xr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const r=De.random,n=Xr,c=De.wipe;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function s(b){const d=new Float64Array(16);if(b)for(let l=0;l<b.length;l++)d[l]=b[l];return d}const h=new Uint8Array(32);h[0]=9;const E=s(),x=s([1]),g=s([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),o=s([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=s([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=s([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),w=s([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function S(b,d){for(let l=0;l<16;l++)b[l]=d[l]|0}function v(b){let d=1;for(let l=0;l<16;l++){let t=b[l]+d+65535;d=Math.floor(t/65536),b[l]=t-d*65536}b[0]+=d-1+37*(d-1)}function N(b,d,l){const t=~(l-1);for(let a=0;a<16;a++){const R=t&(b[a]^d[a]);b[a]^=R,d[a]^=R}}function W(b,d){const l=s(),t=s();for(let a=0;a<16;a++)t[a]=d[a];v(t),v(t),v(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,N(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 X(b,d){let l=0;for(let t=0;t<32;t++)l|=b[t]^d[t];return(1&l-1>>>8)-1}function M(b,d){const l=new Uint8Array(32),t=new Uint8Array(32);return W(l,b),W(t,d),X(l,t)}function Le(b){const d=new Uint8Array(32);return W(d,b),d[0]&1}function ge(b,d){for(let l=0;l<16;l++)b[l]=d[2*l]+(d[2*l+1]<<8);b[15]&=32767}function Ce(b,d,l){for(let t=0;t<16;t++)b[t]=d[t]+l[t]}function G(b,d,l){for(let t=0;t<16;t++)b[t]=d[t]-l[t]}function C(b,d,l){let t,a,R=0,P=0,$=0,K=0,D=0,U=0,Re=0,he=0,Pe=0,pe=0,de=0,ie=0,re=0,Z=0,V=0,H=0,se=0,_e=0,F=0,Me=0,Be=0,He=0,Ge=0,$e=0,Xe=0,Ze=0,st=0,Fe=0,ct=0,xt=0,At=0,oe=l[0],Q=l[1],ae=l[2],fe=l[3],ce=l[4],ee=l[5],me=l[6],xe=l[7],we=l[8],ve=l[9],Se=l[10],be=l[11],ue=l[12],k=l[13],Ee=l[14],Ie=l[15];t=d[0],R+=t*oe,P+=t*Q,$+=t*ae,K+=t*fe,D+=t*ce,U+=t*ee,Re+=t*me,he+=t*xe,Pe+=t*we,pe+=t*ve,de+=t*Se,ie+=t*be,re+=t*ue,Z+=t*k,V+=t*Ee,H+=t*Ie,t=d[1],P+=t*oe,$+=t*Q,K+=t*ae,D+=t*fe,U+=t*ce,Re+=t*ee,he+=t*me,Pe+=t*xe,pe+=t*we,de+=t*ve,ie+=t*Se,re+=t*be,Z+=t*ue,V+=t*k,H+=t*Ee,se+=t*Ie,t=d[2],$+=t*oe,K+=t*Q,D+=t*ae,U+=t*fe,Re+=t*ce,he+=t*ee,Pe+=t*me,pe+=t*xe,de+=t*we,ie+=t*ve,re+=t*Se,Z+=t*be,V+=t*ue,H+=t*k,se+=t*Ee,_e+=t*Ie,t=d[3],K+=t*oe,D+=t*Q,U+=t*ae,Re+=t*fe,he+=t*ce,Pe+=t*ee,pe+=t*me,de+=t*xe,ie+=t*we,re+=t*ve,Z+=t*Se,V+=t*be,H+=t*ue,se+=t*k,_e+=t*Ee,F+=t*Ie,t=d[4],D+=t*oe,U+=t*Q,Re+=t*ae,he+=t*fe,Pe+=t*ce,pe+=t*ee,de+=t*me,ie+=t*xe,re+=t*we,Z+=t*ve,V+=t*Se,H+=t*be,se+=t*ue,_e+=t*k,F+=t*Ee,Me+=t*Ie,t=d[5],U+=t*oe,Re+=t*Q,he+=t*ae,Pe+=t*fe,pe+=t*ce,de+=t*ee,ie+=t*me,re+=t*xe,Z+=t*we,V+=t*ve,H+=t*Se,se+=t*be,_e+=t*ue,F+=t*k,Me+=t*Ee,Be+=t*Ie,t=d[6],Re+=t*oe,he+=t*Q,Pe+=t*ae,pe+=t*fe,de+=t*ce,ie+=t*ee,re+=t*me,Z+=t*xe,V+=t*we,H+=t*ve,se+=t*Se,_e+=t*be,F+=t*ue,Me+=t*k,Be+=t*Ee,He+=t*Ie,t=d[7],he+=t*oe,Pe+=t*Q,pe+=t*ae,de+=t*fe,ie+=t*ce,re+=t*ee,Z+=t*me,V+=t*xe,H+=t*we,se+=t*ve,_e+=t*Se,F+=t*be,Me+=t*ue,Be+=t*k,He+=t*Ee,Ge+=t*Ie,t=d[8],Pe+=t*oe,pe+=t*Q,de+=t*ae,ie+=t*fe,re+=t*ce,Z+=t*ee,V+=t*me,H+=t*xe,se+=t*we,_e+=t*ve,F+=t*Se,Me+=t*be,Be+=t*ue,He+=t*k,Ge+=t*Ee,$e+=t*Ie,t=d[9],pe+=t*oe,de+=t*Q,ie+=t*ae,re+=t*fe,Z+=t*ce,V+=t*ee,H+=t*me,se+=t*xe,_e+=t*we,F+=t*ve,Me+=t*Se,Be+=t*be,He+=t*ue,Ge+=t*k,$e+=t*Ee,Xe+=t*Ie,t=d[10],de+=t*oe,ie+=t*Q,re+=t*ae,Z+=t*fe,V+=t*ce,H+=t*ee,se+=t*me,_e+=t*xe,F+=t*we,Me+=t*ve,Be+=t*Se,He+=t*be,Ge+=t*ue,$e+=t*k,Xe+=t*Ee,Ze+=t*Ie,t=d[11],ie+=t*oe,re+=t*Q,Z+=t*ae,V+=t*fe,H+=t*ce,se+=t*ee,_e+=t*me,F+=t*xe,Me+=t*we,Be+=t*ve,He+=t*Se,Ge+=t*be,$e+=t*ue,Xe+=t*k,Ze+=t*Ee,st+=t*Ie,t=d[12],re+=t*oe,Z+=t*Q,V+=t*ae,H+=t*fe,se+=t*ce,_e+=t*ee,F+=t*me,Me+=t*xe,Be+=t*we,He+=t*ve,Ge+=t*Se,$e+=t*be,Xe+=t*ue,Ze+=t*k,st+=t*Ee,Fe+=t*Ie,t=d[13],Z+=t*oe,V+=t*Q,H+=t*ae,se+=t*fe,_e+=t*ce,F+=t*ee,Me+=t*me,Be+=t*xe,He+=t*we,Ge+=t*ve,$e+=t*Se,Xe+=t*be,Ze+=t*ue,st+=t*k,Fe+=t*Ee,ct+=t*Ie,t=d[14],V+=t*oe,H+=t*Q,se+=t*ae,_e+=t*fe,F+=t*ce,Me+=t*ee,Be+=t*me,He+=t*xe,Ge+=t*we,$e+=t*ve,Xe+=t*Se,Ze+=t*be,st+=t*ue,Fe+=t*k,ct+=t*Ee,xt+=t*Ie,t=d[15],H+=t*oe,se+=t*Q,_e+=t*ae,F+=t*fe,Me+=t*ce,Be+=t*ee,He+=t*me,Ge+=t*xe,$e+=t*we,Xe+=t*ve,Ze+=t*Se,st+=t*be,Fe+=t*ue,ct+=t*k,xt+=t*Ee,At+=t*Ie,R+=38*se,P+=38*_e,$+=38*F,K+=38*Me,D+=38*Be,U+=38*He,Re+=38*Ge,he+=38*$e,Pe+=38*Xe,pe+=38*Ze,de+=38*st,ie+=38*Fe,re+=38*ct,Z+=38*xt,V+=38*At,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=$+a+65535,a=Math.floor(t/65536),$=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=he+a+65535,a=Math.floor(t/65536),he=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=de+a+65535,a=Math.floor(t/65536),de=t-a*65536,t=ie+a+65535,a=Math.floor(t/65536),ie=t-a*65536,t=re+a+65535,a=Math.floor(t/65536),re=t-a*65536,t=Z+a+65535,a=Math.floor(t/65536),Z=t-a*65536,t=V+a+65535,a=Math.floor(t/65536),V=t-a*65536,t=H+a+65535,a=Math.floor(t/65536),H=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=$+a+65535,a=Math.floor(t/65536),$=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=he+a+65535,a=Math.floor(t/65536),he=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=de+a+65535,a=Math.floor(t/65536),de=t-a*65536,t=ie+a+65535,a=Math.floor(t/65536),ie=t-a*65536,t=re+a+65535,a=Math.floor(t/65536),re=t-a*65536,t=Z+a+65535,a=Math.floor(t/65536),Z=t-a*65536,t=V+a+65535,a=Math.floor(t/65536),V=t-a*65536,t=H+a+65535,a=Math.floor(t/65536),H=t-a*65536,R+=a-1+37*(a-1),b[0]=R,b[1]=P,b[2]=$,b[3]=K,b[4]=D,b[5]=U,b[6]=Re,b[7]=he,b[8]=Pe,b[9]=pe,b[10]=de,b[11]=ie,b[12]=re,b[13]=Z,b[14]=V,b[15]=H}function Ne(b,d){C(b,d,d)}function et(b,d){const l=s();let t;for(t=0;t<16;t++)l[t]=d[t];for(t=253;t>=0;t--)Ne(l,l),t!==2&&t!==4&&C(l,l,d);for(t=0;t<16;t++)b[t]=l[t]}function ye(b,d){const l=s();let t;for(t=0;t<16;t++)l[t]=d[t];for(t=250;t>=0;t--)Ne(l,l),t!==1&&C(l,l,d);for(t=0;t<16;t++)b[t]=l[t]}function ke(b,d){const l=s(),t=s(),a=s(),R=s(),P=s(),$=s(),K=s(),D=s(),U=s();G(l,b[1],b[0]),G(U,d[1],d[0]),C(l,l,U),Ce(t,b[0],b[1]),Ce(U,d[0],d[1]),C(t,t,U),C(a,b[3],d[3]),C(a,a,o),C(R,b[2],d[2]),Ce(R,R,R),G(P,t,l),G($,R,a),Ce(K,R,a),Ce(D,t,l),C(b[0],P,$),C(b[1],D,K),C(b[2],K,$),C(b[3],P,D)}function Ue(b,d,l){for(let t=0;t<4;t++)N(b[t],d[t],l)}function qe(b,d){const l=s(),t=s(),a=s();et(a,d[2]),C(l,d[0],a),C(t,d[1],a),W(b,t),b[31]^=Le(l)<<7}function m(b,d,l){S(b[0],E),S(b[1],x),S(b[2],x),S(b[3],E);for(let t=255;t>=0;--t){const a=l[t/8|0]>>(t&7)&1;Ue(b,d,a),ke(d,b),ke(b,b),Ue(b,d,a)}}function _(b,d){const l=[s(),s(),s(),s()];S(l[0],u),S(l[1],y),S(l[2],x),C(l[3],u,y),m(b,l,d)}function Y(b){if(b.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const d=(0,n.hash)(b);d[0]&=248,d[31]&=127,d[31]|=64;const l=new Uint8Array(32),t=[s(),s(),s(),s()];_(t,d),qe(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 d=(0,r.randomBytes)(32,b),l=Y(d);return(0,c.wipe)(d),l}e.generateKeyPair=le;function A(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=A;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,d){let l,t,a,R;for(t=63;t>=32;--t){for(l=0,a=t-32,R=t-12;a<R;++a)d[a]+=l-16*d[t]*I[a-(t-32)],l=Math.floor((d[a]+128)/256),d[a]-=l*256;d[a]+=l,d[t]=0}for(l=0,a=0;a<32;a++)d[a]+=l-(d[31]>>4)*I[a],l=d[a]>>8,d[a]&=255;for(a=0;a<32;a++)d[a]-=l*I[a];for(t=0;t<32;t++)d[t+1]+=d[t]>>8,b[t]=d[t]&255}function L(b){const d=new Float64Array(64);for(let l=0;l<64;l++)d[l]=b[l];for(let l=0;l<64;l++)b[l]=0;O(b,d)}function Ae(b,d){const l=new Float64Array(64),t=[s(),s(),s(),s()],a=(0,n.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 n.SHA512;P.update(R.subarray(32)),P.update(d);const $=P.digest();P.clean(),L($),_(t,$),qe(R,t),P.reset(),P.update(R.subarray(0,32)),P.update(b.subarray(32)),P.update(d);const K=P.digest();L(K);for(let D=0;D<32;D++)l[D]=$[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=Ae;function ne(b,d){const l=s(),t=s(),a=s(),R=s(),P=s(),$=s(),K=s();return S(b[2],x),ge(b[1],d),Ne(a,b[1]),C(R,a,g),G(a,a,b[2]),Ce(R,b[2],R),Ne(P,R),Ne($,P),C(K,$,P),C(l,K,a),C(l,l,R),ye(l,l),C(l,l,a),C(l,l,R),C(l,l,R),C(b[0],l,R),Ne(t,b[0]),C(t,t,R),M(t,a)&&C(b[0],b[0],w),Ne(t,b[0]),C(t,t,R),M(t,a)?-1:(Le(b[0])===d[31]>>7&&G(b[0],E,b[0]),C(b[3],b[0],b[1]),0)}function mt(b,d,l){const t=new Uint8Array(32),a=[s(),s(),s(),s()],R=[s(),s(),s(),s()];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 n.SHA512;P.update(l.subarray(0,32)),P.update(b),P.update(d);const $=P.digest();return L($),m(a,R,$),_(R,l.subarray(32)),ke(a,R),qe(t,a),!X(l,t)}e.verify=mt;function z(b){let d=[s(),s(),s(),s()];if(ne(d,b))throw new Error("Ed25519: invalid public key");let l=s(),t=s(),a=d[1];Ce(l,x,a),G(t,x,a),et(t,t),C(l,l,t);let R=new Uint8Array(32);return W(R,l),R}e.convertPublicKeyToX25519=z;function bt(b){const d=(0,n.hash)(b.subarray(0,32));d[0]&=248,d[31]&=127,d[31]|=64;const l=new Uint8Array(d.subarray(0,32));return(0,c.wipe)(d),l}e.convertSecretKeyToX25519=bt})(or);const cs="EdDSA",us="JWT",Yr=".",Zr="base64url",ls="utf8",hs="utf8",ds=":",bs="did",gs="key",Rr="base58btc",ys="z",ps="K36",_s=32,ms=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n);function xs(e){return typeof e=="string"?e:ms(e)||""}function Gt(e){return kt(Jt(xs(e),ls),Zr)}function Qr(e){const r=Jt(ps,Rr),n=ys+kt($r([r,e]),Rr);return[bs,gs,n].join(ds)}function ws(e){return kt(e,Zr)}function vs(e){return Jt([Gt(e.header),Gt(e.payload)].join(Yr),hs)}function Ss(e){return[Gt(e.header),Gt(e.payload),ws(e.signature)].join(Yr)}function Es(e=De.random.randomBytes(_s)){return or.generateKeyPairFromSeed(e)}async function Is(e,r,n,c,s=De.cjs.fromMiliseconds(Date.now())){const h={alg:cs,typ:us},E=Qr(c.publicKey),x=s+n,g={iss:E,sub:e,aud:r,iat:s,exp:x},o=vs({header:h,payload:g}),u=or.sign(c.secretKey,o);return Ss({header:h,payload:g,signature:u})}const Os="PARSE_ERROR",Ts="INVALID_REQUEST",Ls="METHOD_NOT_FOUND",As="INVALID_PARAMS",en="INTERNAL_ERROR",ar="SERVER_ERROR",Rs=[-32700,-32600,-32601,-32602,-32603],St={[Os]:{code:-32700,message:"Parse error"},[Ts]:{code:-32600,message:"Invalid Request"},[Ls]:{code:-32601,message:"Method not found"},[As]:{code:-32602,message:"Invalid params"},[en]:{code:-32603,message:"Internal error"},[ar]:{code:-32e3,message:"Server error"}},tn=ar;function Ps(e){return Rs.includes(e)}function Pr(e){return Object.keys(St).includes(e)?St[e]:St[tn]}function js(e){const r=Object.values(St).find(n=>n.code===e);return r||St[tn]}function rn(e,r,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${r}`):e}var nn={};/*! *****************************************************************************
|
|
1
|
+
"use strict";const B=require("./index-rtZ91I3M.js"),De=require("./index-GooDQIzI.js");function Br(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function $r(e,r){r||(r=e.reduce((s,h)=>s+h.length,0));const n=Br(r);let c=0;for(const s of e)n.set(s,c),c+=s.length;return n}const mr={...De.identityBase,...De.base2,...De.base8,...De.base10,...De.base16,...De.base32,...De.base36,...De.base58,...De.base64,...De.base256emoji};function Kr(e,r,n,c){return{name:e,prefix:r,encoder:{name:e,prefix:r,encode:n},decoder:{decode:c}}}const xr=Kr("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),qt=Kr("ascii","a",e=>{let r="a";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return r},e=>{e=e.substring(1);const r=Br(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}),Ur={utf8:xr,"utf-8":xr,hex:mr.base16,latin1:qt,ascii:qt,binary:qt,...mr};function Jt(e,r="utf8"){const n=Ur[r];if(!n)throw new Error(`Unsupported encoding "${r}"`);return(r==="utf8"||r==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):n.decoder.decode(`${n.prefix}${e}`)}function kt(e,r="utf8"){const n=Ur[r];if(!n)throw new Error(`Unsupported encoding "${r}"`);return(r==="utf8"||r==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):n.encoder.encode(e).substring(1)}const Zn={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"}},Qn=/"(?:_|\\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*:/,ei=/"(?: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*:/,ti=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function ri(e,r){if(e==="__proto__"||e==="constructor"&&r&&typeof r=="object"&&"prototype"in r){ni(e);return}return r}function ni(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function zt(e,r={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const c=n.toLowerCase();if(c==="true")return!0;if(c==="false")return!1;if(c==="undefined")return;if(c==="null")return null;if(c==="nan")return Number.NaN;if(c==="infinity")return Number.POSITIVE_INFINITY;if(c==="-infinity")return Number.NEGATIVE_INFINITY}if(!ti.test(e)){if(r.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Qn.test(e)||ei.test(e)){if(r.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,ri)}return JSON.parse(e)}catch(c){if(r.strict)throw c;return e}}function ii(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Te(e,...r){try{return ii(e(...r))}catch(n){return Promise.reject(n)}}function si(e){const r=typeof e;return e===null||r!=="object"&&r!=="function"}function oi(e){const r=Object.getPrototypeOf(e);return!r||r.isPrototypeOf(Object)}function $t(e){if(si(e))return String(e);if(oi(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON=="function")return $t(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function Hr(){if(typeof B.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Qt="base64:";function ai(e){if(typeof e=="string")return e;Hr();const r=B.dist.Buffer.from(e).toString("base64");return Qt+r}function fi(e){return typeof e!="string"||!e.startsWith(Qt)?e:(Hr(),B.dist.Buffer.from(e.slice(Qt.length),"base64"))}function Ke(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function ci(...e){return Ke(e.join(":"))}function Dt(e){return e=Ke(e),e?e+":":""}const ui="memory",li=()=>{const e=new Map;return{name:ui,options:{},hasItem(r){return e.has(r)},getItem(r){return e.get(r)??null},getItemRaw(r){return e.get(r)??null},setItem(r,n){e.set(r,n)},setItemRaw(r,n){e.set(r,n)},removeItem(r){e.delete(r)},getKeys(){return Array.from(e.keys())},clear(){e.clear()},dispose(){e.clear()}}};function hi(e={}){const r={mounts:{"":e.driver||li()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=o=>{for(const u of r.mountpoints)if(o.startsWith(u))return{base:u,relativeKey:o.slice(u.length),driver:r.mounts[u]};return{base:"",relativeKey:o,driver:r.mounts[""]}},c=(o,u)=>r.mountpoints.filter(y=>y.startsWith(o)||u&&o.startsWith(y)).map(y=>({relativeBase:o.length>y.length?o.slice(y.length):void 0,mountpoint:y,driver:r.mounts[y]})),s=(o,u)=>{if(r.watching){u=Ke(u);for(const y of r.watchListeners)y(o,u)}},h=async()=>{if(!r.watching){r.watching=!0;for(const o in r.mounts)r.unwatch[o]=await wr(r.mounts[o],s,o)}},E=async()=>{if(r.watching){for(const o in r.unwatch)await r.unwatch[o]();r.unwatch={},r.watching=!1}},x=(o,u,y)=>{const w=new Map,S=v=>{let N=w.get(v.base);return N||(N={driver:v.driver,base:v.base,items:[]},w.set(v.base,N)),N};for(const v of o){const N=typeof v=="string",W=Ke(N?v:v.key),X=N?void 0:v.value,M=N||!v.options?u:{...u,...v.options},Le=n(W);S(Le).items.push({key:W,value:X,relativeKey:Le.relativeKey,options:M})}return Promise.all([...w.values()].map(v=>y(v))).then(v=>v.flat())},g={hasItem(o,u={}){o=Ke(o);const{relativeKey:y,driver:w}=n(o);return Te(w.hasItem,y,u)},getItem(o,u={}){o=Ke(o);const{relativeKey:y,driver:w}=n(o);return Te(w.getItem,y,u).then(S=>zt(S))},getItems(o,u){return x(o,u,y=>y.driver.getItems?Te(y.driver.getItems,y.items.map(w=>({key:w.relativeKey,options:w.options})),u).then(w=>w.map(S=>({key:ci(y.base,S.key),value:zt(S.value)}))):Promise.all(y.items.map(w=>Te(y.driver.getItem,w.relativeKey,w.options).then(S=>({key:w.key,value:zt(S)})))))},getItemRaw(o,u={}){o=Ke(o);const{relativeKey:y,driver:w}=n(o);return w.getItemRaw?Te(w.getItemRaw,y,u):Te(w.getItem,y,u).then(S=>fi(S))},async setItem(o,u,y={}){if(u===void 0)return g.removeItem(o);o=Ke(o);const{relativeKey:w,driver:S}=n(o);S.setItem&&(await Te(S.setItem,w,$t(u),y),S.watch||s("update",o))},async setItems(o,u){await x(o,u,async y=>{if(y.driver.setItems)return Te(y.driver.setItems,y.items.map(w=>({key:w.relativeKey,value:$t(w.value),options:w.options})),u);y.driver.setItem&&await Promise.all(y.items.map(w=>Te(y.driver.setItem,w.relativeKey,$t(w.value),w.options)))})},async setItemRaw(o,u,y={}){if(u===void 0)return g.removeItem(o,y);o=Ke(o);const{relativeKey:w,driver:S}=n(o);if(S.setItemRaw)await Te(S.setItemRaw,w,u,y);else if(S.setItem)await Te(S.setItem,w,ai(u),y);else return;S.watch||s("update",o)},async removeItem(o,u={}){typeof u=="boolean"&&(u={removeMeta:u}),o=Ke(o);const{relativeKey:y,driver:w}=n(o);w.removeItem&&(await Te(w.removeItem,y,u),(u.removeMeta||u.removeMata)&&await Te(w.removeItem,y+"$",u),w.watch||s("remove",o))},async getMeta(o,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),o=Ke(o);const{relativeKey:y,driver:w}=n(o),S=Object.create(null);if(w.getMeta&&Object.assign(S,await Te(w.getMeta,y,u)),!u.nativeOnly){const v=await Te(w.getItem,y+"$",u).then(N=>zt(N));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(S,v))}return S},setMeta(o,u,y={}){return this.setItem(o+"$",u,y)},removeMeta(o,u={}){return this.removeItem(o+"$",u)},async getKeys(o,u={}){o=Dt(o);const y=c(o,!0);let w=[];const S=[];for(const v of y){const W=(await Te(v.driver.getKeys,v.relativeBase,u)).map(X=>v.mountpoint+Ke(X)).filter(X=>!w.some(M=>X.startsWith(M)));S.push(...W),w=[v.mountpoint,...w.filter(X=>!X.startsWith(v.mountpoint))]}return o?S.filter(v=>v.startsWith(o)&&!v.endsWith("$")):S.filter(v=>!v.endsWith("$"))},async clear(o,u={}){o=Dt(o),await Promise.all(c(o,!1).map(async y=>{if(y.driver.clear)return Te(y.driver.clear,y.relativeBase,u);if(y.driver.removeItem){const w=await y.driver.getKeys(y.relativeBase||"",u);return Promise.all(w.map(S=>y.driver.removeItem(S,u)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(o=>vr(o)))},async watch(o){return await h(),r.watchListeners.push(o),async()=>{r.watchListeners=r.watchListeners.filter(u=>u!==o),r.watchListeners.length===0&&await E()}},async unwatch(){r.watchListeners=[],await E()},mount(o,u){if(o=Dt(o),o&&r.mounts[o])throw new Error(`already mounted at ${o}`);return o&&(r.mountpoints.push(o),r.mountpoints.sort((y,w)=>w.length-y.length)),r.mounts[o]=u,r.watching&&Promise.resolve(wr(u,s,o)).then(y=>{r.unwatch[o]=y}).catch(console.error),g},async unmount(o,u=!0){o=Dt(o),!(!o||!r.mounts[o])&&(r.watching&&o in r.unwatch&&(r.unwatch[o](),delete r.unwatch[o]),u&&await vr(r.mounts[o]),r.mountpoints=r.mountpoints.filter(y=>y!==o),delete r.mounts[o])},getMount(o=""){o=Ke(o)+":";const u=n(o);return{driver:u.driver,base:u.base}},getMounts(o="",u={}){return o=Ke(o),c(o,u.parents).map(w=>({driver:w.driver,base:w.mountpoint}))}};return g}function wr(e,r,n){return e.watch?e.watch((c,s)=>r(c,n+s)):()=>{}}async function vr(e){typeof e.dispose=="function"&&await Te(e.dispose)}function dt(e){return new Promise((r,n)=>{e.oncomplete=e.onsuccess=()=>r(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Gr(e,r){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(r);const c=dt(n);return(s,h)=>c.then(E=>h(E.transaction(r,s).objectStore(r)))}let Xt;function Tt(){return Xt||(Xt=Gr("keyval-store","keyval")),Xt}function Sr(e,r=Tt()){return r("readonly",n=>dt(n.get(e)))}function di(e,r,n=Tt()){return n("readwrite",c=>(c.put(r,e),dt(c.transaction)))}function bi(e,r=Tt()){return r("readwrite",n=>(n.delete(e),dt(n.transaction)))}function gi(e=Tt()){return e("readwrite",r=>(r.clear(),dt(r.transaction)))}function yi(e,r){return e.openCursor().onsuccess=function(){this.result&&(r(this.result),this.result.continue())},dt(e.transaction)}function pi(e=Tt()){return e("readonly",r=>{if(r.getAllKeys)return dt(r.getAllKeys());const n=[];return yi(r,c=>n.push(c.key)).then(()=>n)})}const _i=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n),mi=e=>{const r=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,n=e.replace(r,'$1"$2n"$3');return JSON.parse(n,(c,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Fr(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return mi(e)}catch{return e}}function Jr(e){return typeof e=="string"?e:_i(e)||""}const xi="idb-keyval";var wi=(e={})=>{const r=e.base&&e.base.length>0?`${e.base}:`:"",n=s=>r+s;let c;return e.dbName&&e.storeName&&(c=Gr(e.dbName,e.storeName)),{name:xi,options:e,async hasItem(s){return!(typeof await Sr(n(s),c)>"u")},async getItem(s){return await Sr(n(s),c)??null},setItem(s,h){return di(n(s),h,c)},removeItem(s){return bi(n(s),c)},getKeys(){return pi(c)},clear(){return gi(c)}}};const vi="WALLET_CONNECT_V2_INDEXED_DB",Si="keyvaluestorage";let Ei=class{constructor(){this.indexedDb=hi({driver:wi({dbName:vi,storeName:Si})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(r=>[r.key,r.value])}async getItem(r){const n=await this.indexedDb.getItem(r);if(n!==null)return n}async setItem(r,n){await this.indexedDb.setItem(r,Jr(n))}async removeItem(r){await this.indexedDb.removeItem(r)}};var Yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof B.dist.global<"u"?B.dist.global:typeof self<"u"?self:{},Kt={exports:{}};(function(){let e;function r(){}e=r,e.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},e.prototype.setItem=function(n,c){this[n]=String(c)},e.prototype.removeItem=function(n){delete this[n]},e.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(c){n[c]=void 0,delete n[c]})},e.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Yt<"u"&&Yt.localStorage?Kt.exports=Yt.localStorage:typeof window<"u"&&window.localStorage?Kt.exports=window.localStorage:Kt.exports=new r})();function Ii(e){var r;return[e[0],Fr((r=e[1])!=null?r:"")]}class Oi{constructor(){this.localStorage=Kt.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Ii)}async getItem(r){const n=this.localStorage.getItem(r);if(n!==null)return Fr(n)}async setItem(r,n){this.localStorage.setItem(r,Jr(n))}async removeItem(r){this.localStorage.removeItem(r)}}const Ti="wc_storage_version",Er=1,Li=async(e,r,n)=>{const c=Ti,s=await r.getItem(c);if(s&&s>=Er){n(r);return}const h=await e.getKeys();if(!h.length){n(r);return}const E=[];for(;h.length;){const x=h.shift();if(!x)continue;const g=x.toLowerCase();if(g.includes("wc@")||g.includes("walletconnect")||g.includes("wc_")||g.includes("wallet_connect")){const o=await e.getItem(x);await r.setItem(x,o),E.push(x)}}await r.setItem(c,Er),n(r),Ai(e,E)},Ai=async(e,r)=>{r.length&&r.forEach(async n=>{await e.removeItem(n)})};let Ri=class{constructor(){this.initialized=!1,this.setInitialized=n=>{this.storage=n,this.initialized=!0};const r=new Oi;this.storage=r;try{const n=new Ei;Li(r,n,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(r){return await this.initialize(),this.storage.getItem(r)}async setItem(r,n){return await this.initialize(),this.storage.setItem(r,n)}async removeItem(r){return await this.initialize(),this.storage.removeItem(r)}async initialize(){this.initialized||await new Promise(r=>{const n=setInterval(()=>{this.initialized&&(clearInterval(n),r())},20)})}};class Pi{}function ji(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Ci=Ni;function Ni(e,r,n){var c=n&&n.stringify||ji,s=1;if(typeof e=="object"&&e!==null){var h=r.length+s;if(h===1)return e;var E=new Array(h);E[0]=c(e);for(var x=1;x<h;x++)E[x]=c(r[x]);return E.join(" ")}if(typeof e!="string")return e;var g=r.length;if(g===0)return e;for(var o="",u=1-s,y=-1,w=e&&e.length||0,S=0;S<w;){if(e.charCodeAt(S)===37&&S+1<w){switch(y=y>-1?y:0,e.charCodeAt(S+1)){case 100:case 102:if(u>=g||r[u]==null)break;y<S&&(o+=e.slice(y,S)),o+=Number(r[u]),y=S+2,S++;break;case 105:if(u>=g||r[u]==null)break;y<S&&(o+=e.slice(y,S)),o+=Math.floor(Number(r[u])),y=S+2,S++;break;case 79:case 111:case 106:if(u>=g||r[u]===void 0)break;y<S&&(o+=e.slice(y,S));var v=typeof r[u];if(v==="string"){o+="'"+r[u]+"'",y=S+2,S++;break}if(v==="function"){o+=r[u].name||"<anonymous>",y=S+2,S++;break}o+=c(r[u]),y=S+2,S++;break;case 115:if(u>=g)break;y<S&&(o+=e.slice(y,S)),o+=String(r[u]),y=S+2,S++;break;case 37:y<S&&(o+=e.slice(y,S)),o+="%",y=S+2,S++,u--;break}++u}++S}return y===-1?e:(y<w&&(o+=e.slice(y)),o)}const Ir=Ci;var _t=Qe;const Et=Fi().console||{},Mi={mapHttpRequest:Bt,mapHttpResponse:Bt,wrapRequestSerializer:Zt,wrapResponseSerializer:Zt,wrapErrorSerializer:Zt,req:Bt,res:Bt,err:Ki};function zi(e,r){return Array.isArray(e)?e.filter(function(c){return c!=="!stdSerializers.err"}):e===!0?Object.keys(r):!1}function Qe(e){e=e||{},e.browser=e.browser||{};const r=e.browser.transmit;if(r&&typeof r.send!="function")throw Error("pino: transmit option must have a send function");const n=e.browser.write||Et;e.browser.write&&(e.browser.asObject=!0);const c=e.serializers||{},s=zi(e.browser.serialize,c);let h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);const E=["error","fatal","warn","info","debug","trace"];typeof n=="function"&&(n.error=n.fatal=n.warn=n.info=n.debug=n.trace=n),e.enabled===!1&&(e.level="silent");const x=e.level||"info",g=Object.create(n);g.log||(g.log=It),Object.defineProperty(g,"levelVal",{get:u}),Object.defineProperty(g,"level",{get:y,set:w});const o={transmit:r,serialize:s,asObject:e.browser.asObject,levels:E,timestamp:Ui(e)};g.levels=Qe.levels,g.level=x,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=It,g.serializers=c,g._serialize=s,g._stdErrSerialize=h,g.child=S,r&&(g._logEvent=er());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function y(){return this._level}function w(v){if(v!=="silent"&&!this.levels.values[v])throw Error("unknown level "+v);this._level=v,yt(o,g,"error","log"),yt(o,g,"fatal","error"),yt(o,g,"warn","error"),yt(o,g,"info","log"),yt(o,g,"debug","log"),yt(o,g,"trace","log")}function S(v,N){if(!v)throw new Error("missing bindings for child Pino");N=N||{},s&&v.serializers&&(N.serializers=v.serializers);const W=N.serializers;if(s&&W){var X=Object.assign({},c,W),M=e.browser.serialize===!0?Object.keys(X):s;delete v.serializers,Wt([v],M,X,this._stdErrSerialize)}function Le(ge){this._childLevel=(ge._childLevel|0)+1,this.error=pt(ge,v,"error"),this.fatal=pt(ge,v,"fatal"),this.warn=pt(ge,v,"warn"),this.info=pt(ge,v,"info"),this.debug=pt(ge,v,"debug"),this.trace=pt(ge,v,"trace"),X&&(this.serializers=X,this._serialize=M),r&&(this._logEvent=er([].concat(ge._logEvent.bindings,v)))}return Le.prototype=this,new Le(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=Mi;Qe.stdTimeFunctions=Object.assign({},{nullTime:kr,epochTime:Wr,unixTime:Hi,isoTime:Gi});function yt(e,r,n,c){const s=Object.getPrototypeOf(r);r[n]=r.levelVal>r.levels.values[n]?It:s[n]?s[n]:Et[n]||Et[c]||It,Di(e,r,n)}function Di(e,r,n){!e.transmit&&r[n]===It||(r[n]=function(c){return function(){const h=e.timestamp(),E=new Array(arguments.length),x=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Et?Et:this;for(var g=0;g<E.length;g++)E[g]=arguments[g];if(e.serialize&&!e.asObject&&Wt(E,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?c.call(x,Bi(this,n,E,h)):c.apply(x,E),e.transmit){const o=e.transmit.level||r.level,u=Qe.levels.values[o],y=Qe.levels.values[n];if(y<u)return;$i(this,{ts:h,methodLevel:n,methodValue:y,transmitLevel:o,transmitValue:Qe.levels.values[e.transmit.level||r.level],send:e.transmit.send,val:r.levelVal},E)}}}(r[n]))}function Bi(e,r,n,c){e._serialize&&Wt(n,e._serialize,e.serializers,e._stdErrSerialize);const s=n.slice();let h=s[0];const E={};c&&(E.time=c),E.level=Qe.levels.values[r];let x=(e._childLevel|0)+1;if(x<1&&(x=1),h!==null&&typeof h=="object"){for(;x--&&typeof s[0]=="object";)Object.assign(E,s.shift());h=s.length?Ir(s.shift(),s):void 0}else typeof h=="string"&&(h=Ir(s.shift(),s));return h!==void 0&&(E.msg=h),E}function Wt(e,r,n,c){for(const s in e)if(c&&e[s]instanceof Error)e[s]=Qe.stdSerializers.err(e[s]);else if(typeof e[s]=="object"&&!Array.isArray(e[s]))for(const h in e[s])r&&r.indexOf(h)>-1&&h in n&&(e[s][h]=n[h](e[s][h]))}function pt(e,r,n){return function(){const c=new Array(1+arguments.length);c[0]=r;for(var s=1;s<c.length;s++)c[s]=arguments[s-1];return e[n].apply(this,c)}}function $i(e,r,n){const c=r.send,s=r.ts,h=r.methodLevel,E=r.methodValue,x=r.val,g=e._logEvent.bindings;Wt(n,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=s,e._logEvent.messages=n.filter(function(o){return g.indexOf(o)===-1}),e._logEvent.level.label=h,e._logEvent.level.value=E,c(h,e._logEvent,x),e._logEvent=er(g)}function er(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Ki(e){const r={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)r[n]===void 0&&(r[n]=e[n]);return r}function Ui(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?kr:Wr}function Bt(){return{}}function Zt(e){return e}function It(){}function kr(){return!1}function Wr(){return Date.now()}function Hi(){return Math.round(Date.now()/1e3)}function Gi(){return new Date(Date.now()).toISOString()}function Fi(){function e(r){return typeof r<"u"&&r}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}const ir=B.getDefaultExportFromCjs(_t),Ji=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n);function Or(e){return typeof e=="string"?e:Ji(e)||""}const ki={level:"info"},Lt="custom_context",sr=1e3*1024;class Wi{constructor(r){this.nodeValue=r,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class Tr{constructor(r){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=r,this.sizeInBytes=0}append(r){const n=new Wi(r);if(n.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${r} with size ${n.size}`);for(;this.size+n.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=n),this.tail=n):(this.head=n,this.tail=n),this.lengthInNodes++,this.sizeInBytes+=n.size}shift(){if(!this.head)return;const r=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=r.size}toArray(){const r=[];let n=this.head;for(;n!==null;)r.push(n.value),n=n.next;return r}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let r=this.head;return{next:()=>{if(!r)return{done:!0,value:null};const n=r.value;return r=r.next,{done:!1,value:n}}}}}class Vr{constructor(r,n=sr){this.level=r??"error",this.levelValue=_t.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=n,this.logs=new Tr(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(r,n){n===_t.levels.values.error?console.error(r):n===_t.levels.values.warn?console.warn(r):n===_t.levels.values.debug?console.debug(r):n===_t.levels.values.trace?console.trace(r):console.log(r)}appendToLogs(r){this.logs.append(Or({timestamp:new Date().toISOString(),log:r}));const n=typeof r=="string"?JSON.parse(r).level:r.level;n>=this.levelValue&&this.forwardToConsole(r,n)}getLogs(){return this.logs}clearLogs(){this.logs=new Tr(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(r){const n=this.getLogArray();return n.push(Or({extraMetadata:r})),new Blob(n,{type:"application/json"})}}class Vi{constructor(r,n=sr){this.baseChunkLogger=new Vr(r,n)}write(r){this.baseChunkLogger.appendToLogs(r)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(r){return this.baseChunkLogger.logsToBlob(r)}downloadLogsBlobInBrowser(r){const n=URL.createObjectURL(this.logsToBlob(r)),c=document.createElement("a");c.href=n,c.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(n)}}class qi{constructor(r,n=sr){this.baseChunkLogger=new Vr(r,n)}write(r){this.baseChunkLogger.appendToLogs(r)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(r){return this.baseChunkLogger.logsToBlob(r)}}var Xi=Object.defineProperty,Yi=Object.defineProperties,Zi=Object.getOwnPropertyDescriptors,Lr=Object.getOwnPropertySymbols,Qi=Object.prototype.hasOwnProperty,es=Object.prototype.propertyIsEnumerable,Ar=(e,r,n)=>r in e?Xi(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Ut=(e,r)=>{for(var n in r||(r={}))Qi.call(r,n)&&Ar(e,n,r[n]);if(Lr)for(var n of Lr(r))es.call(r,n)&&Ar(e,n,r[n]);return e},Ht=(e,r)=>Yi(e,Zi(r));function ts(e){return Ht(Ut({},e),{level:(e==null?void 0:e.level)||ki.level})}function rs(e,r=Lt){return e[r]||""}function ns(e,r,n=Lt){return e[n]=r,e}function qr(e,r=Lt){let n="";return typeof e.bindings>"u"?n=rs(e,r):n=e.bindings().context||"",n}function is(e,r,n=Lt){const c=qr(e,n);return c.trim()?`${c}/${r}`:r}function ss(e,r,n=Lt){const c=is(e,r,n),s=e.child({context:c});return ns(s,c,n)}function os(e){var r,n;const c=new Vi((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:ir(Ht(Ut({},e.opts),{level:"trace",browser:Ht(Ut({},(n=e.opts)==null?void 0:n.browser),{write:s=>c.write(s)})})),chunkLoggerController:c}}function as(e){var r;const n=new qi((r=e.opts)==null?void 0:r.level,e.maxSizeInBytes);return{logger:ir(Ht(Ut({},e.opts),{level:"trace"}),n),chunkLoggerController:n}}function fs(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?os(e):as(e)}var or={},Xr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=De.binary,n=De.wipe;e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var c=function(){function x(){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 x.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},x.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},x.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},x.prototype.update=function(g,o){if(o===void 0&&(o=g.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var u=0;if(this._bytesHashed+=o,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&o>0;)this._buffer[this._bufferLength++]=g[u++],o--;this._bufferLength===this.blockSize&&(h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(o>=this.blockSize&&(u=h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,g,u,o),o%=this.blockSize);o>0;)this._buffer[this._bufferLength++]=g[u++],o--;return this},x.prototype.finish=function(g){if(!this._finished){var o=this._bytesHashed,u=this._bufferLength,y=o/536870912|0,w=o<<3,S=o%128<112?128:256;this._buffer[u]=128;for(var v=u+1;v<S-8;v++)this._buffer[v]=0;r.writeUint32BE(y,this._buffer,S-8),r.writeUint32BE(w,this._buffer,S-4),h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,S),this._finished=!0}for(var v=0;v<this.digestLength/8;v++)r.writeUint32BE(this._stateHi[v],g,v*8),r.writeUint32BE(this._stateLo[v],g,v*8+4);return this},x.prototype.digest=function(){var g=new Uint8Array(this.digestLength);return this.finish(g),g},x.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}},x.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},x.prototype.cleanSavedState=function(g){n.wipe(g.stateHi),n.wipe(g.stateLo),g.buffer&&n.wipe(g.buffer),g.bufferLength=0,g.bytesHashed=0},x}();e.SHA512=c;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function h(x,g,o,u,y,w,S){for(var v=o[0],N=o[1],W=o[2],X=o[3],M=o[4],Le=o[5],ge=o[6],Ce=o[7],G=u[0],C=u[1],Ne=u[2],et=u[3],ye=u[4],ke=u[5],Ue=u[6],qe=u[7],m,_,Y,le,A,I,O,L;S>=128;){for(var Ae=0;Ae<16;Ae++){var ne=8*Ae+w;x[Ae]=r.readUint32BE(y,ne),g[Ae]=r.readUint32BE(y,ne+4)}for(var Ae=0;Ae<80;Ae++){var mt=v,z=N,bt=W,b=X,d=M,l=Le,t=ge,a=Ce,R=G,P=C,$=Ne,K=et,D=ye,U=ke,Re=Ue,he=qe;if(m=Ce,_=qe,A=_&65535,I=_>>>16,O=m&65535,L=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),A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,m=M&Le^~M&ge,_=ye&ke^~ye&Ue,A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,m=s[Ae*2],_=s[Ae*2+1],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,m=x[Ae%16],_=g[Ae%16],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,Y=O&65535|L<<16,le=A&65535|I<<16,m=Y,_=le,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=(v>>>28|G<<4)^(G>>>2|v<<30)^(G>>>7|v<<25),_=(G>>>28|v<<4)^(v>>>2|G<<30)^(v>>>7|G<<25),A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,m=v&N^v&W^N&W,_=G&C^G&Ne^C&Ne,A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,a=O&65535|L<<16,he=A&65535|I<<16,m=b,_=K,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=Y,_=le,A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,b=O&65535|L<<16,K=A&65535|I<<16,N=mt,W=z,X=bt,M=b,Le=d,ge=l,Ce=t,v=a,C=R,Ne=P,et=$,ye=K,ke=D,Ue=U,qe=Re,G=he,Ae%16===15)for(var ne=0;ne<16;ne++)m=x[ne],_=g[ne],A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=x[(ne+9)%16],_=g[(ne+9)%16],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,Y=x[(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),A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,Y=x[(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),A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,x[ne]=O&65535|L<<16,g[ne]=A&65535|I<<16}m=v,_=G,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[0],_=u[0],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[0]=v=O&65535|L<<16,u[0]=G=A&65535|I<<16,m=N,_=C,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[1],_=u[1],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[1]=N=O&65535|L<<16,u[1]=C=A&65535|I<<16,m=W,_=Ne,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[2],_=u[2],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[2]=W=O&65535|L<<16,u[2]=Ne=A&65535|I<<16,m=X,_=et,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[3],_=u[3],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[3]=X=O&65535|L<<16,u[3]=et=A&65535|I<<16,m=M,_=ye,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[4],_=u[4],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[4]=M=O&65535|L<<16,u[4]=ye=A&65535|I<<16,m=Le,_=ke,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[5],_=u[5],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[5]=Le=O&65535|L<<16,u[5]=ke=A&65535|I<<16,m=ge,_=Ue,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[6],_=u[6],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[6]=ge=O&65535|L<<16,u[6]=Ue=A&65535|I<<16,m=Ce,_=qe,A=_&65535,I=_>>>16,O=m&65535,L=m>>>16,m=o[7],_=u[7],A+=_&65535,I+=_>>>16,O+=m&65535,L+=m>>>16,I+=A>>>16,O+=I>>>16,L+=O>>>16,o[7]=Ce=O&65535|L<<16,u[7]=qe=A&65535|I<<16,w+=128,S-=128}return w}function E(x){var g=new c;g.update(x);var o=g.digest();return g.clean(),o}e.hash=E})(Xr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const r=De.random,n=Xr,c=De.wipe;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function s(b){const d=new Float64Array(16);if(b)for(let l=0;l<b.length;l++)d[l]=b[l];return d}const h=new Uint8Array(32);h[0]=9;const E=s(),x=s([1]),g=s([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),o=s([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=s([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=s([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),w=s([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function S(b,d){for(let l=0;l<16;l++)b[l]=d[l]|0}function v(b){let d=1;for(let l=0;l<16;l++){let t=b[l]+d+65535;d=Math.floor(t/65536),b[l]=t-d*65536}b[0]+=d-1+37*(d-1)}function N(b,d,l){const t=~(l-1);for(let a=0;a<16;a++){const R=t&(b[a]^d[a]);b[a]^=R,d[a]^=R}}function W(b,d){const l=s(),t=s();for(let a=0;a<16;a++)t[a]=d[a];v(t),v(t),v(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,N(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 X(b,d){let l=0;for(let t=0;t<32;t++)l|=b[t]^d[t];return(1&l-1>>>8)-1}function M(b,d){const l=new Uint8Array(32),t=new Uint8Array(32);return W(l,b),W(t,d),X(l,t)}function Le(b){const d=new Uint8Array(32);return W(d,b),d[0]&1}function ge(b,d){for(let l=0;l<16;l++)b[l]=d[2*l]+(d[2*l+1]<<8);b[15]&=32767}function Ce(b,d,l){for(let t=0;t<16;t++)b[t]=d[t]+l[t]}function G(b,d,l){for(let t=0;t<16;t++)b[t]=d[t]-l[t]}function C(b,d,l){let t,a,R=0,P=0,$=0,K=0,D=0,U=0,Re=0,he=0,Pe=0,pe=0,de=0,ie=0,re=0,Z=0,V=0,H=0,se=0,_e=0,F=0,Me=0,Be=0,He=0,Ge=0,$e=0,Xe=0,Ze=0,st=0,Fe=0,ct=0,xt=0,At=0,oe=l[0],Q=l[1],ae=l[2],fe=l[3],ce=l[4],ee=l[5],me=l[6],xe=l[7],we=l[8],ve=l[9],Se=l[10],be=l[11],ue=l[12],k=l[13],Ee=l[14],Ie=l[15];t=d[0],R+=t*oe,P+=t*Q,$+=t*ae,K+=t*fe,D+=t*ce,U+=t*ee,Re+=t*me,he+=t*xe,Pe+=t*we,pe+=t*ve,de+=t*Se,ie+=t*be,re+=t*ue,Z+=t*k,V+=t*Ee,H+=t*Ie,t=d[1],P+=t*oe,$+=t*Q,K+=t*ae,D+=t*fe,U+=t*ce,Re+=t*ee,he+=t*me,Pe+=t*xe,pe+=t*we,de+=t*ve,ie+=t*Se,re+=t*be,Z+=t*ue,V+=t*k,H+=t*Ee,se+=t*Ie,t=d[2],$+=t*oe,K+=t*Q,D+=t*ae,U+=t*fe,Re+=t*ce,he+=t*ee,Pe+=t*me,pe+=t*xe,de+=t*we,ie+=t*ve,re+=t*Se,Z+=t*be,V+=t*ue,H+=t*k,se+=t*Ee,_e+=t*Ie,t=d[3],K+=t*oe,D+=t*Q,U+=t*ae,Re+=t*fe,he+=t*ce,Pe+=t*ee,pe+=t*me,de+=t*xe,ie+=t*we,re+=t*ve,Z+=t*Se,V+=t*be,H+=t*ue,se+=t*k,_e+=t*Ee,F+=t*Ie,t=d[4],D+=t*oe,U+=t*Q,Re+=t*ae,he+=t*fe,Pe+=t*ce,pe+=t*ee,de+=t*me,ie+=t*xe,re+=t*we,Z+=t*ve,V+=t*Se,H+=t*be,se+=t*ue,_e+=t*k,F+=t*Ee,Me+=t*Ie,t=d[5],U+=t*oe,Re+=t*Q,he+=t*ae,Pe+=t*fe,pe+=t*ce,de+=t*ee,ie+=t*me,re+=t*xe,Z+=t*we,V+=t*ve,H+=t*Se,se+=t*be,_e+=t*ue,F+=t*k,Me+=t*Ee,Be+=t*Ie,t=d[6],Re+=t*oe,he+=t*Q,Pe+=t*ae,pe+=t*fe,de+=t*ce,ie+=t*ee,re+=t*me,Z+=t*xe,V+=t*we,H+=t*ve,se+=t*Se,_e+=t*be,F+=t*ue,Me+=t*k,Be+=t*Ee,He+=t*Ie,t=d[7],he+=t*oe,Pe+=t*Q,pe+=t*ae,de+=t*fe,ie+=t*ce,re+=t*ee,Z+=t*me,V+=t*xe,H+=t*we,se+=t*ve,_e+=t*Se,F+=t*be,Me+=t*ue,Be+=t*k,He+=t*Ee,Ge+=t*Ie,t=d[8],Pe+=t*oe,pe+=t*Q,de+=t*ae,ie+=t*fe,re+=t*ce,Z+=t*ee,V+=t*me,H+=t*xe,se+=t*we,_e+=t*ve,F+=t*Se,Me+=t*be,Be+=t*ue,He+=t*k,Ge+=t*Ee,$e+=t*Ie,t=d[9],pe+=t*oe,de+=t*Q,ie+=t*ae,re+=t*fe,Z+=t*ce,V+=t*ee,H+=t*me,se+=t*xe,_e+=t*we,F+=t*ve,Me+=t*Se,Be+=t*be,He+=t*ue,Ge+=t*k,$e+=t*Ee,Xe+=t*Ie,t=d[10],de+=t*oe,ie+=t*Q,re+=t*ae,Z+=t*fe,V+=t*ce,H+=t*ee,se+=t*me,_e+=t*xe,F+=t*we,Me+=t*ve,Be+=t*Se,He+=t*be,Ge+=t*ue,$e+=t*k,Xe+=t*Ee,Ze+=t*Ie,t=d[11],ie+=t*oe,re+=t*Q,Z+=t*ae,V+=t*fe,H+=t*ce,se+=t*ee,_e+=t*me,F+=t*xe,Me+=t*we,Be+=t*ve,He+=t*Se,Ge+=t*be,$e+=t*ue,Xe+=t*k,Ze+=t*Ee,st+=t*Ie,t=d[12],re+=t*oe,Z+=t*Q,V+=t*ae,H+=t*fe,se+=t*ce,_e+=t*ee,F+=t*me,Me+=t*xe,Be+=t*we,He+=t*ve,Ge+=t*Se,$e+=t*be,Xe+=t*ue,Ze+=t*k,st+=t*Ee,Fe+=t*Ie,t=d[13],Z+=t*oe,V+=t*Q,H+=t*ae,se+=t*fe,_e+=t*ce,F+=t*ee,Me+=t*me,Be+=t*xe,He+=t*we,Ge+=t*ve,$e+=t*Se,Xe+=t*be,Ze+=t*ue,st+=t*k,Fe+=t*Ee,ct+=t*Ie,t=d[14],V+=t*oe,H+=t*Q,se+=t*ae,_e+=t*fe,F+=t*ce,Me+=t*ee,Be+=t*me,He+=t*xe,Ge+=t*we,$e+=t*ve,Xe+=t*Se,Ze+=t*be,st+=t*ue,Fe+=t*k,ct+=t*Ee,xt+=t*Ie,t=d[15],H+=t*oe,se+=t*Q,_e+=t*ae,F+=t*fe,Me+=t*ce,Be+=t*ee,He+=t*me,Ge+=t*xe,$e+=t*we,Xe+=t*ve,Ze+=t*Se,st+=t*be,Fe+=t*ue,ct+=t*k,xt+=t*Ee,At+=t*Ie,R+=38*se,P+=38*_e,$+=38*F,K+=38*Me,D+=38*Be,U+=38*He,Re+=38*Ge,he+=38*$e,Pe+=38*Xe,pe+=38*Ze,de+=38*st,ie+=38*Fe,re+=38*ct,Z+=38*xt,V+=38*At,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=$+a+65535,a=Math.floor(t/65536),$=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=he+a+65535,a=Math.floor(t/65536),he=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=de+a+65535,a=Math.floor(t/65536),de=t-a*65536,t=ie+a+65535,a=Math.floor(t/65536),ie=t-a*65536,t=re+a+65535,a=Math.floor(t/65536),re=t-a*65536,t=Z+a+65535,a=Math.floor(t/65536),Z=t-a*65536,t=V+a+65535,a=Math.floor(t/65536),V=t-a*65536,t=H+a+65535,a=Math.floor(t/65536),H=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=$+a+65535,a=Math.floor(t/65536),$=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=he+a+65535,a=Math.floor(t/65536),he=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=de+a+65535,a=Math.floor(t/65536),de=t-a*65536,t=ie+a+65535,a=Math.floor(t/65536),ie=t-a*65536,t=re+a+65535,a=Math.floor(t/65536),re=t-a*65536,t=Z+a+65535,a=Math.floor(t/65536),Z=t-a*65536,t=V+a+65535,a=Math.floor(t/65536),V=t-a*65536,t=H+a+65535,a=Math.floor(t/65536),H=t-a*65536,R+=a-1+37*(a-1),b[0]=R,b[1]=P,b[2]=$,b[3]=K,b[4]=D,b[5]=U,b[6]=Re,b[7]=he,b[8]=Pe,b[9]=pe,b[10]=de,b[11]=ie,b[12]=re,b[13]=Z,b[14]=V,b[15]=H}function Ne(b,d){C(b,d,d)}function et(b,d){const l=s();let t;for(t=0;t<16;t++)l[t]=d[t];for(t=253;t>=0;t--)Ne(l,l),t!==2&&t!==4&&C(l,l,d);for(t=0;t<16;t++)b[t]=l[t]}function ye(b,d){const l=s();let t;for(t=0;t<16;t++)l[t]=d[t];for(t=250;t>=0;t--)Ne(l,l),t!==1&&C(l,l,d);for(t=0;t<16;t++)b[t]=l[t]}function ke(b,d){const l=s(),t=s(),a=s(),R=s(),P=s(),$=s(),K=s(),D=s(),U=s();G(l,b[1],b[0]),G(U,d[1],d[0]),C(l,l,U),Ce(t,b[0],b[1]),Ce(U,d[0],d[1]),C(t,t,U),C(a,b[3],d[3]),C(a,a,o),C(R,b[2],d[2]),Ce(R,R,R),G(P,t,l),G($,R,a),Ce(K,R,a),Ce(D,t,l),C(b[0],P,$),C(b[1],D,K),C(b[2],K,$),C(b[3],P,D)}function Ue(b,d,l){for(let t=0;t<4;t++)N(b[t],d[t],l)}function qe(b,d){const l=s(),t=s(),a=s();et(a,d[2]),C(l,d[0],a),C(t,d[1],a),W(b,t),b[31]^=Le(l)<<7}function m(b,d,l){S(b[0],E),S(b[1],x),S(b[2],x),S(b[3],E);for(let t=255;t>=0;--t){const a=l[t/8|0]>>(t&7)&1;Ue(b,d,a),ke(d,b),ke(b,b),Ue(b,d,a)}}function _(b,d){const l=[s(),s(),s(),s()];S(l[0],u),S(l[1],y),S(l[2],x),C(l[3],u,y),m(b,l,d)}function Y(b){if(b.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const d=(0,n.hash)(b);d[0]&=248,d[31]&=127,d[31]|=64;const l=new Uint8Array(32),t=[s(),s(),s(),s()];_(t,d),qe(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 d=(0,r.randomBytes)(32,b),l=Y(d);return(0,c.wipe)(d),l}e.generateKeyPair=le;function A(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=A;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,d){let l,t,a,R;for(t=63;t>=32;--t){for(l=0,a=t-32,R=t-12;a<R;++a)d[a]+=l-16*d[t]*I[a-(t-32)],l=Math.floor((d[a]+128)/256),d[a]-=l*256;d[a]+=l,d[t]=0}for(l=0,a=0;a<32;a++)d[a]+=l-(d[31]>>4)*I[a],l=d[a]>>8,d[a]&=255;for(a=0;a<32;a++)d[a]-=l*I[a];for(t=0;t<32;t++)d[t+1]+=d[t]>>8,b[t]=d[t]&255}function L(b){const d=new Float64Array(64);for(let l=0;l<64;l++)d[l]=b[l];for(let l=0;l<64;l++)b[l]=0;O(b,d)}function Ae(b,d){const l=new Float64Array(64),t=[s(),s(),s(),s()],a=(0,n.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 n.SHA512;P.update(R.subarray(32)),P.update(d);const $=P.digest();P.clean(),L($),_(t,$),qe(R,t),P.reset(),P.update(R.subarray(0,32)),P.update(b.subarray(32)),P.update(d);const K=P.digest();L(K);for(let D=0;D<32;D++)l[D]=$[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=Ae;function ne(b,d){const l=s(),t=s(),a=s(),R=s(),P=s(),$=s(),K=s();return S(b[2],x),ge(b[1],d),Ne(a,b[1]),C(R,a,g),G(a,a,b[2]),Ce(R,b[2],R),Ne(P,R),Ne($,P),C(K,$,P),C(l,K,a),C(l,l,R),ye(l,l),C(l,l,a),C(l,l,R),C(l,l,R),C(b[0],l,R),Ne(t,b[0]),C(t,t,R),M(t,a)&&C(b[0],b[0],w),Ne(t,b[0]),C(t,t,R),M(t,a)?-1:(Le(b[0])===d[31]>>7&&G(b[0],E,b[0]),C(b[3],b[0],b[1]),0)}function mt(b,d,l){const t=new Uint8Array(32),a=[s(),s(),s(),s()],R=[s(),s(),s(),s()];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 n.SHA512;P.update(l.subarray(0,32)),P.update(b),P.update(d);const $=P.digest();return L($),m(a,R,$),_(R,l.subarray(32)),ke(a,R),qe(t,a),!X(l,t)}e.verify=mt;function z(b){let d=[s(),s(),s(),s()];if(ne(d,b))throw new Error("Ed25519: invalid public key");let l=s(),t=s(),a=d[1];Ce(l,x,a),G(t,x,a),et(t,t),C(l,l,t);let R=new Uint8Array(32);return W(R,l),R}e.convertPublicKeyToX25519=z;function bt(b){const d=(0,n.hash)(b.subarray(0,32));d[0]&=248,d[31]&=127,d[31]|=64;const l=new Uint8Array(d.subarray(0,32));return(0,c.wipe)(d),l}e.convertSecretKeyToX25519=bt})(or);const cs="EdDSA",us="JWT",Yr=".",Zr="base64url",ls="utf8",hs="utf8",ds=":",bs="did",gs="key",Rr="base58btc",ys="z",ps="K36",_s=32,ms=e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString()+"n":n);function xs(e){return typeof e=="string"?e:ms(e)||""}function Gt(e){return kt(Jt(xs(e),ls),Zr)}function Qr(e){const r=Jt(ps,Rr),n=ys+kt($r([r,e]),Rr);return[bs,gs,n].join(ds)}function ws(e){return kt(e,Zr)}function vs(e){return Jt([Gt(e.header),Gt(e.payload)].join(Yr),hs)}function Ss(e){return[Gt(e.header),Gt(e.payload),ws(e.signature)].join(Yr)}function Es(e=De.random.randomBytes(_s)){return or.generateKeyPairFromSeed(e)}async function Is(e,r,n,c,s=De.cjs.fromMiliseconds(Date.now())){const h={alg:cs,typ:us},E=Qr(c.publicKey),x=s+n,g={iss:E,sub:e,aud:r,iat:s,exp:x},o=vs({header:h,payload:g}),u=or.sign(c.secretKey,o);return Ss({header:h,payload:g,signature:u})}const Os="PARSE_ERROR",Ts="INVALID_REQUEST",Ls="METHOD_NOT_FOUND",As="INVALID_PARAMS",en="INTERNAL_ERROR",ar="SERVER_ERROR",Rs=[-32700,-32600,-32601,-32602,-32603],St={[Os]:{code:-32700,message:"Parse error"},[Ts]:{code:-32600,message:"Invalid Request"},[Ls]:{code:-32601,message:"Method not found"},[As]:{code:-32602,message:"Invalid params"},[en]:{code:-32603,message:"Internal error"},[ar]:{code:-32e3,message:"Server error"}},tn=ar;function Ps(e){return Rs.includes(e)}function Pr(e){return Object.keys(St).includes(e)?St[e]:St[tn]}function js(e){const r=Object.values(St).find(n=>n.code===e);return r||St[tn]}function rn(e,r,n){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${r}`):e}var nn={};/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const D=require("./index-
|
|
1
|
+
"use strict";const D=require("./index-rtZ91I3M.js");var _={exports:{}};(function(x,c){var B=typeof self<"u"?self:D.commonjsGlobal,b=function(){function a(){this.fetch=!1,this.DOMException=B.DOMException}return a.prototype=B,new a}();(function(a){(function(f){var u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function R(e){return e&&DataView.prototype.isPrototypeOf(e)}if(u.arrayBuffer)var U=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],S=ArrayBuffer.isView||function(e){return e&&U.indexOf(Object.prototype.toString.call(e))>-1};function y(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function g(e){return typeof e!="string"&&(e=String(e)),e}function w(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return u.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}i.prototype.append=function(e,t){e=y(e),t=g(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},i.prototype.delete=function(e){delete this.map[y(e)]},i.prototype.get=function(e){return e=y(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(y(e))},i.prototype.set=function(e,t){this.map[y(e)]=g(t)},i.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),w(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),w(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),w(e)},u.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);function v(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function T(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function j(e){var t=new FileReader,r=T(t);return t.readAsArrayBuffer(e),r}function F(e){var t=new FileReader,r=T(t);return t.readAsText(e),r}function I(e){for(var t=new Uint8Array(e),r=new Array(t.length),s=0;s<t.length;s++)r[s]=String.fromCharCode(t[s]);return r.join("")}function O(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function P(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:u.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u.arrayBuffer&&u.blob&&R(e)?(this._bodyArrayBuffer=O(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||S(e))?this._bodyArrayBuffer=O(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var e=v(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?v(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(j)}),this.text=function(){var e=v(this);if(e)return e;if(this._bodyBlob)return F(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(I(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(H)}),this.json=function(){return this.text().then(JSON.parse)},this}var M=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function q(e){var t=e.toUpperCase();return M.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var r=t.body;if(e instanceof l){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new i(t.headers)),this.method=q(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}l.prototype.clone=function(){return new l(this,{body:this._bodyInit})};function H(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var s=r.split("="),n=s.shift().replace(/\+/g," "),o=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function L(e){var t=new i,r=e.replace(/\r?\n[\t ]+/g," ");return r.split(/\r?\n/).forEach(function(s){var n=s.split(":"),o=n.shift().trim();if(o){var m=n.join(":").trim();t.append(o,m)}}),t}P.call(l.prototype);function h(e,t){t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}P.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];h.redirect=function(e,t){if(C.indexOf(t)===-1)throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},f.DOMException=a.DOMException;try{new f.DOMException}catch{f.DOMException=function(t,r){this.message=t,this.name=r;var s=Error(t);this.stack=s.stack},f.DOMException.prototype=Object.create(Error.prototype),f.DOMException.prototype.constructor=f.DOMException}function E(e,t){return new Promise(function(r,s){var n=new l(e,t);if(n.signal&&n.signal.aborted)return s(new f.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function m(){o.abort()}o.onload=function(){var p={status:o.status,statusText:o.statusText,headers:L(o.getAllResponseHeaders()||"")};p.url="responseURL"in o?o.responseURL:p.headers.get("X-Request-URL");var A="response"in o?o.response:o.responseText;r(new h(A,p))},o.onerror=function(){s(new TypeError("Network request failed"))},o.ontimeout=function(){s(new TypeError("Network request failed"))},o.onabort=function(){s(new f.DOMException("Aborted","AbortError"))},o.open(n.method,n.url,!0),n.credentials==="include"?o.withCredentials=!0:n.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&u.blob&&(o.responseType="blob"),n.headers.forEach(function(p,A){o.setRequestHeader(A,p)}),n.signal&&(n.signal.addEventListener("abort",m),o.onreadystatechange=function(){o.readyState===4&&n.signal.removeEventListener("abort",m)}),o.send(typeof n._bodyInit>"u"?null:n._bodyInit)})}return E.polyfill=!0,a.fetch||(a.fetch=E,a.Headers=i,a.Request=l,a.Response=h),f.Headers=i,f.Request=l,f.Response=h,f.fetch=E,Object.defineProperty(f,"__esModule",{value:!0}),f})({})})(b),b.fetch.ponyfill=!0,delete b.fetch.polyfill;var d=b;c=d.fetch,c.default=d.fetch,c.fetch=d.fetch,c.Headers=d.Headers,c.Request=d.Request,c.Response=d.Response,x.exports=c})(_,_.exports);var k=_.exports;const N=D.getDefaultExportFromCjs(k);exports.o=N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./evm-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./evm-CyCIXNVR.js");class y extends e.BaseError{constructor({callbackSelector:r,cause:t,data:c,extraData:i,sender:u,urls:a}){var d;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(d=t.metaMessages)!=null&&d.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${e.getUrl(f)}`)],` Sender: ${u}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:r,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(r)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class b extends e.BaseError{constructor({sender:r,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function g(n,r){if(!e.isAddress(n))throw new e.InvalidAddressError({address:n});if(!e.isAddress(r))throw new e.InvalidAddressError({address:r});return n.toLowerCase()===r.toLowerCase()}const k="0x556f1830",p={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function E(n,{blockNumber:r,blockTag:t,data:c,to:i}){const{args:u}=e.decodeErrorResult({data:c,abi:[p]}),[a,d,f,s,o]=u;try{if(!g(i,a))throw new b({sender:a,to:i});const l=await h({data:f,sender:a,urls:d}),{data:m}=await e.call(n,{blockNumber:r,blockTag:t,data:e.concat([s,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[l,o])]),to:i});return m}catch(l){throw new y({callbackSelector:s,cause:l,data:c,extraData:o,sender:a,urls:d})}}async function h({data:n,sender:r,urls:t}){var i;let c=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],d=a.includes("{data}")?"GET":"POST",f=d==="POST"?{data:n,sender:r}:void 0;try{const s=await fetch(a.replace("{sender}",r).replace("{data}",n),{body:JSON.stringify(f),method:d});let o;if((i=s.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?o=(await s.json()).data:o=await s.text(),!s.ok){c=new e.HttpRequestError({body:f,details:o!=null&&o.error?e.stringify(o.error):s.statusText,headers:s.headers,status:s.status,url:a});continue}if(!e.isHex(o)){c=new w({result:o,url:a});continue}return o}catch(s){c=new e.HttpRequestError({body:f,details:s.message,url:a})}}throw c}exports.ccipFetch=h;exports.offchainLookup=E;exports.offchainLookupAbiItem=p;exports.offchainLookupSignature=k;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as l, g as w, s as y, i as p, I as h, d as g, c as k, a as O, e as L, H as m, b as E } from "./evm-
|
|
1
|
+
import { B as l, g as w, s as y, i as p, I as h, d as g, c as k, a as O, e as L, H as m, b as E } from "./evm-WeYh1CwH.mjs";
|
|
2
2
|
class x extends l {
|
|
3
3
|
constructor({ callbackSelector: e, cause: a, data: o, extraData: c, sender: d, urls: r }) {
|
|
4
4
|
var i;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var p = Object.defineProperty;
|
|
2
2
|
var u = (o, t, i) => t in o ? p(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
|
|
3
3
|
var e = (o, t, i) => (u(o, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
|
-
import { ci as d, az as f, aA as m, cj as w, ck as k, cl as B } from "./index-
|
|
4
|
+
import { ci as d, az as f, aA as m, cj as w, ck as k, cl as B } from "./index-C6mDtHMX.mjs";
|
|
5
5
|
function P(o) {
|
|
6
6
|
return "getVersion" in o;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var d=(o,t,i)=>t in o?u(o,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[t]=i;var e=(o,t,i)=>(d(o,typeof t!="symbol"?t+"":t,i),i);const n=require("./index-
|
|
1
|
+
"use strict";var u=Object.defineProperty;var d=(o,t,i)=>t in o?u(o,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[t]=i;var e=(o,t,i)=>(d(o,typeof t!="symbol"?t+"":t,i),i);const n=require("./index-rtZ91I3M.js");function f(o){return"getVersion"in o}const s={};function m(o,t,i){t in s||(s[t]={});const r=s[t];if(o in r)throw new Error(`Protocol ${o} for protocol ${t} has already registered`);s[t][o]=i}function w(o,t){const i=n.isChain(o)?n.chainToPlatform.get(o):o;return t in s?i in s[t]:!1}function l(o,t){if(t in s){const i=s[t];if(i&&o in i){const r=i[o];if(r)return r}}throw new Error(`No protocols registered for ${o}:${t}. This may be because the platform specific protocol implementation is not registered (by installing and importing it) or no implementation exists for this platform`)}const B=(o,t,i,r)=>l(o,t).fromRpc(i,r);class k{constructor(t,i){e(this,"network");e(this,"config");this.network=t,this.config=i}utils(){return this.constructor}getProtocol(t,i){return B(this.utils()._platform,t,i,this.config)}getProtocolInitializer(t){return l(this.utils()._platform,t)}async parseWormholeMessages(t,i,r){return(await this.getProtocol("WormholeCore",i)).parseTransaction(r)}}class P{constructor(t,i,r){e(this,"network");e(this,"chain");e(this,"config");e(this,"platform");e(this,"rpc");e(this,"protocols",new Map);e(this,"supportsWormholeCore",()=>this.supportsProtocol("WormholeCore"));e(this,"getWormholeCore",()=>this.getProtocol("WormholeCore"));e(this,"supportsTokenBridge",()=>this.supportsProtocol("TokenBridge"));e(this,"getTokenBridge",()=>this.getProtocol("TokenBridge"));e(this,"supportsAutomaticTokenBridge",()=>this.supportsProtocol("AutomaticTokenBridge"));e(this,"getAutomaticTokenBridge",()=>this.getProtocol("AutomaticTokenBridge"));e(this,"supportsCircleBridge",()=>this.supportsProtocol("CircleBridge"));e(this,"getCircleBridge",()=>this.getProtocol("CircleBridge"));e(this,"supportsAutomaticCircleBridge",()=>this.supportsProtocol("AutomaticCircleBridge"));e(this,"getAutomaticCircleBridge",()=>this.getProtocol("AutomaticCircleBridge"));e(this,"supportsIbcBridge",()=>this.supportsProtocol("IbcBridge"));e(this,"getIbcBridge",()=>this.getProtocol("IbcBridge"));e(this,"supportsPorticoBridge",()=>this.supportsProtocol("PorticoBridge"));e(this,"getPorticoBridge",()=>this.getProtocol("PorticoBridge"));this.config=i.config[t],this.platform=i,this.chain=this.config.key,this.network=this.config.network,this.rpc=r}getRpc(){return this.rpc=this.rpc?this.rpc:this.platform.getRpc(this.chain),this.rpc}async getDecimals(t){if(n.isNative(t))return this.config.nativeTokenDecimals;if(this.config.tokenMap){const i=n.canonicalAddress({chain:this.chain,address:t}),r=n.getTokenByAddress(this.network,this.chain,i);if(r)return r.decimals}return this.platform.utils().getDecimals(this.chain,await this.getRpc(),t)}async getBalance(t,i){return this.platform.utils().getBalance(this.chain,await this.getRpc(),t,i)}async getLatestBlock(){return this.platform.utils().getLatestBlock(await this.getRpc())}async getLatestFinalizedBlock(){return this.platform.utils().getLatestFinalizedBlock(await this.getRpc())}async parseTransaction(t){return this.platform.parseWormholeMessages(this.chain,await this.getRpc(),t)}async sendWait(t){return this.platform.utils().sendWait(this.chain,await this.getRpc(),t)}getToken(t){if(this.config.tokenMap&&t in this.config.tokenMap)return this.config.tokenMap[t]}async getNativeWrappedTokenId(){if(this.config.wrappedNative){const{address:i}=this.config.wrappedNative;return{chain:this.chain,address:n.toNative(this.chain,i)}}const t=await this.getTokenBridge();return{chain:this.chain,address:await t.getWrappedNative()}}async getTokenAccount(t,i){return{chain:this.chain,address:t}}supportsProtocol(t){return w(this.chain,t)}async getProtocol(t,i,r){if(!i&&this.protocols.has(t))return this.protocols.get(t);const c=i?{...this.config.contracts,...i}:this.config.contracts,h=r??await this.getRpc(),g=this.platform.getProtocolInitializer(t);let a;if(r){if(i)throw new Error("Custom contracts are currently not supported with custom rpc connection. Add the contracts to the base config.");a=await this.platform.getProtocol(t,h)}else if(f(g)){const p=await g.getVersion(h,c);a=new g(this.network,this.chain,h,c,p)}else a=new g(this.network,this.chain,h,c);return i||this.protocols.set(t,a),a}}exports.ChainContext=P;exports.PlatformContext=k;exports.registerProtocol=m;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var t8 = Object.defineProperty;
|
|
2
2
|
var r8 = (e, a, d) => a in e ? t8(e, a, { enumerable: !0, configurable: !0, writable: !0, value: d }) : e[a] = d;
|
|
3
3
|
var ee = (e, a, d) => (r8(e, typeof a != "symbol" ? a + "" : a, d), d);
|
|
4
|
-
import { r as cb, n as n8, o as U, p as x8, u as i8, q as fb, s as F3, t as H3, v as o8, w as bb, d as N, x as Ze, y as s8, W as u8, z as l8, A as h8, c as Kd, e as bf, B as p8, D as m8, E as tf, F as g8, G as b1, _ as p, L as B, H as na, S as y8, I as v8, J as w8, K as I8, M as S8, O as A8, P as E8, Q as P8, R as N8, T as W3, U as T8, V as _8, X as J3, Y as k8, Z as M8, $ as O8, a0 as lc, m as rf, a1 as B8 } from "./index-
|
|
5
|
-
import { g as tb, s as kd, R as D8, N as L8, a as q3, k as U8 } from "./ens-validation.es6-
|
|
6
|
-
import { l as R8 } from "./libsodium-wrappers-
|
|
4
|
+
import { r as cb, n as n8, o as U, p as x8, u as i8, q as fb, s as F3, t as H3, v as o8, w as bb, d as N, x as Ze, y as s8, W as u8, z as l8, A as h8, c as Kd, e as bf, B as p8, D as m8, E as tf, F as g8, G as b1, _ as p, L as B, H as na, S as y8, I as v8, J as w8, K as I8, M as S8, O as A8, P as E8, Q as P8, R as N8, T as W3, U as T8, V as _8, X as J3, Y as k8, Z as M8, $ as O8, a0 as lc, m as rf, a1 as B8 } from "./index-C6mDtHMX.mjs";
|
|
5
|
+
import { g as tb, s as kd, R as D8, N as L8, a as q3, k as U8 } from "./ens-validation.es6-CtTsD9-1.mjs";
|
|
6
|
+
import { l as R8 } from "./libsodium-wrappers-Cz0uCBox.mjs";
|
|
7
7
|
const G8 = cb().ec, $8 = new G8("secp256k1"), z8 = $8.curve;
|
|
8
8
|
z8.n.constructor;
|
|
9
9
|
var Y3 = {};
|
|
@@ -1485,7 +1485,7 @@ me.prototype.dblp = function(a) {
|
|
|
1485
1485
|
d = d.dbl();
|
|
1486
1486
|
return d;
|
|
1487
1487
|
};
|
|
1488
|
-
var c2 = re, t0 = De, xb = fb
|
|
1488
|
+
var c2 = re, t0 = De, xb = fb, xd = hc, f2 = c2.assert;
|
|
1489
1489
|
function ge(e) {
|
|
1490
1490
|
xd.call(this, "short", e), this.a = new t0(e.a, 16).toRed(this.red), this.b = new t0(e.b, 16).toRed(this.red), this.tinv = this.two.redInvm(), this.zeroA = this.a.fromRed().cmpn(0) === 0, this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0, this.endo = this._getEndomorphism(e), this._endoWnafT1 = new Array(4), this._endoWnafT2 = new Array(4);
|
|
1491
1491
|
}
|
|
@@ -1869,7 +1869,7 @@ Z0.prototype.inspect = function() {
|
|
|
1869
1869
|
Z0.prototype.isInfinity = function() {
|
|
1870
1870
|
return this.z.cmpn(0) === 0;
|
|
1871
1871
|
};
|
|
1872
|
-
var Aa = De, Z3 = fb
|
|
1872
|
+
var Aa = De, Z3 = fb, pc = hc, t2 = re;
|
|
1873
1873
|
function id(e) {
|
|
1874
1874
|
pc.call(this, "mont", e), this.a = new Aa(e.a, 16).toRed(this.red), this.b = new Aa(e.b, 16).toRed(this.red), this.i4 = new Aa(4).toRed(this.red).redInvm(), this.two = new Aa(2).toRed(this.red), this.a24 = this.i4.redMul(this.a.redAdd(this.two));
|
|
1875
1875
|
}
|
|
@@ -1939,7 +1939,7 @@ q0.prototype.normalize = function() {
|
|
|
1939
1939
|
q0.prototype.getX = function() {
|
|
1940
1940
|
return this.normalize(), this.x.fromRed();
|
|
1941
1941
|
};
|
|
1942
|
-
var n2 = re, Me = De, K3 = fb
|
|
1942
|
+
var n2 = re, Me = De, K3 = fb, mc = hc, x2 = n2.assert;
|
|
1943
1943
|
function _e(e) {
|
|
1944
1944
|
this.twisted = (e.a | 0) !== 1, this.mOneA = this.twisted && (e.a | 0) === -1, this.extended = this.mOneA, mc.call(this, "edwards", e), this.a = new Me(e.a, 16).umod(this.red.m), this.a = this.a.toRed(this.red), this.c = new Me(e.c, 16).toRed(this.red), this.c2 = this.c.redSqr(), this.d = new Me(e.d, 16).toRed(this.red), this.dd = this.d.redAdd(this.d), x2(!this.twisted || this.c.fromRed().cmpn(1) === 0), this.oneC = (e.c | 0) === 1;
|
|
1945
1945
|
}
|