PageSourceSearch

https://kounotoritoken.com/_next/static/chunks/3231.55f2b85f4e3217fb.js

js kounotoritoken.com collected 2026-10-08 04:08:54 UTC 36,970 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3231],{53231:function(t,e,n){n.r(e),n.d(e,{encodeToCurve:function(){return ue},hashToCurve:function(){return ae},schnorr:function(){return oe},secp256k1:function(){return Ft}});var r={};function o(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function i(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}n.r(r),n.d(r,{bitGet:function(){return Z},bitLen:function(){return F},bitMask:function(){return K},bitSet:function(){return z},bytesToHex:function(){return T},bytesToNumberBE:function(){return N},bytesToNumberLE:function(){return H},concatBytes:function(){return D},createHmacDrbg:function(){return G},ensureBytes:function(){return $},equalBytes:function(){return V},hexToBytes:function(){return L},hexToNumber:function(){return q},numberToBytesBE:function(){return k},numberToBytesLE:function(){return C},numberToHexUnpadded:function(){return U},numberToVarBytesBE:function(){return P},utf8ToBytes:function(){return _},validateObject:function(){return M}});const s={number:o,bool:function(t){if("boolean"!==typeof t)throw new Error(`Expected boolean, not ${t}`)},bytes:i,hash:function(t){if("function"!==typeof t||"function"!==typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");o(t.outputLen),o(t.blockLen)},exists:function(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")},output:function(t,e){i(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}};var f=s;const a="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,u=t=>t instanceof Uint8Array,c=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),d=(t,e)=>t<<32-e|t>>>e;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function l(t){if("string"===typeof t&&(t=function(t){if("string"!==typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),!u(t))throw new Error("expected Uint8Array, got "+typeof t);return t}class h{clone(){return this._cloneInto()}}function p(t){const e=e=>t().update(l(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function g(t=32){if(a&&"function"===typeof a.getRandomValues)return a.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class w extends h{constructor(t,e,n,r){super(),this.blockLen=t,this.outputLen=e,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=c(this.buffer)}update(t){f.exists(this);const{view:e,buffer:n,blockLen:r}=this,o=(t=l(t)).length;for(let i=0;i<o;){const s=Math.min(r-this.pos,o-i);if(s!==r)n.set(t.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(e,0),this.pos=0);else{const e=c(t);for(;r<=o-i;i+=r)this.process(e,i)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){f.exists(this),f.output(t,this),this.finished=!0;const{buffer:e,view:n,blockLen:r,isLE:o}=this;let{pos:i}=this;e[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>r-i&&(this.process(n,0),i=0);for(let f=i;f<r;f++)e[f]=0;!function(t,e,n,r){if("function"===typeof t.setBigUint64)return t.setBigUint64(e,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),f=Number(n&i),a=r?4:0,u=r?0:4;t.setUint32(e+a,s,r),t.setUint32(e+u,f,r)}(n,r-8,BigInt(8*this.length),o),this.process(n,0);const s=c(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=a/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)s.setUint32(4*f,d[f],o)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return t.length=r,t.pos=s,t.finished=o,t.destroyed=i,r%e&&t.buffer.set(n),t}}const y=(t,e,n)=>t&e^t&n^e&n,m=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
1734187,3204031479,3329325298]),b=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),E=new Uint32Array(64);class B extends w{constructor(){super(64,32,8,!1),this.A=0|b[0],this.B=0|b[1],this.C=0|b[2],this.D=0|b[3],this.E=0|b[4],this.F=0|b[5],this.G=0|b[6],this.H=0|b[7]}get(){const{A:t,B:e,C:n,D:r,E:o,F:i,G:s,H:f}=this;return[t,e,n,r,o,i,s,f]}set(t,e,n,r,o,i,s,f){this.A=0|t,this.B=0|e,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|f}process(t,e){for(let d=0;d<16;d++,e+=4)E[d]=t.getUint32(e,!1);for(let l=16;l<64;l++){const t=E[l-15],e=E[l-2],n=d(t,7)^d(t,18)^t>>>3,r=d(e,17)^d(e,19)^e>>>10;E[l]=r+E[l-7]+n+E[l-16]|0}let{A:n,B:r,C:o,D:i,E:s,F:f,G:a,H:u}=this;for(let l=0;l<64;l++){const t=u+(d(s,6)^d(s,11)^d(s,25))+((c=s)&f^~c&a)+m[l]+E[l]|0,e=(d(n,2)^d(n,13)^d(n,22))+y(n,r,o)|0;u=a,a=f,f=s,s=i+t|0,i=o,o=r,r=n,n=t+e|0}var c;n=n+this.A|0,r=r+this.B|0,o=o+this.C|0,i=i+this.D|0,s=s+this.E|0,f=f+this.F|0,a=a+this.G|0,u=u+this.H|0,this.set(n,r,o,i,s,f,a,u)}roundClean(){E.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class x extends B{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const v=p((()=>new B)),A=(p((()=>new x)),BigInt(0)),S=BigInt(1),I=BigInt(2),O=t=>t instanceof Uint8Array,R=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function T(t){if(!O(t))throw new Error("Uint8Array expected");let e="";for(let n=0;n<t.length;n++)e+=R[t[n]];return e}function U(t){const e=t.toString(16);return 1&e.length?`0${e}`:e}function q(t){if("string"!==typeof t)throw new Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":`0x${t}`)}function L(t){if("string"!==typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(e/2);for(let r=0;r<n.length;r++){const e=2*r,o=t.slice(e,e+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");n[r]=i}return n}function N(t){return q(T(t))}function H(t){if(!O(t))throw new Error("Uint8Array expected");return q(T(Uint8Array.from(t).reverse()))}function k(t,e){return L(t.toString(16).padStart(2*e,"0"))}function C(t,e){return k(t,e).reverse()}function P(t){return L(U(t))}function $(t,e,n){let r;if("string"===typeof e)try{r=L(e)}catch(i){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${i}`)}else{if(!O(e))throw new Error(`${t} must be hex string or Uint8Array`);r=Uint8Array.from(e)}const o=r.length;if("number"===typeof n&&o!==n)throw new Error(`${t} expected ${n} bytes, got ${o}`);return r}function D(...t){const e=new Uint8Array(t.reduce(((t,e)=>t+e.length),0));let n=0;return t.forEach((t=>{if(!O(t))throw new Error("Uint8Array expected");e.set(t,n),n+=t.length})),e}function V(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function _(t){if("string"!==typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function F(t){let e;for(e=0;t>A;t>>=S,e+=1);return e}function Z(t,e){return t>>BigInt(e)&S}const z=(t,e,n)=>t|(n?S:A)<<BigInt(e),K=t=>(I<<BigInt(t-1))-S,j=t=>new Uint8Array(t),Y=t=>Uint8Array.from(t);function G(t,e,n){if("number"!==typeof t||t<2)throw new Error("hashLen must be a number");if("number"!==typeof e||e<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=j(t),o=j(t),i=0;const s=()=>{r.fill(1),o.fill(0),i=0},f=(...t)=>n(o,r,...t),a=(t=j())=>{o=f(Y([0]),t),r=f(),0!==t.length&&(o=f(Y([1]),t),r=f())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let t=0;const n=[];for(;t<e;){r=f();const e=r.slice();n.push(e),t+=r.length}return D(...n)};return(t,e)=>{let n;for(s(),a(t);!(n=e(u()));)a();return s(),n}}const W={bigint:t=>"bigint"===typeof t,function:t=>"function"===typeof t,boolean:t=>"boolean"===typeof t,string:t=>"string"===typeof t,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"===typeof t&&Number.isSafeInteger(t.outputLen)};function M(t,e,n={}){const r=(e,n,r)=>{const o=W[n];if("function"!==typeof o)throw new Error(`Invalid validator "${n}", expected function`);const i=t[e];if((!r||void 0!==i)&&!o(i,t))throw new Error(`Invalid param ${String(e)}=${i} (${typeof i}), expected ${n}`)};for(const[o,i]of Object.entries(e))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return t}const X=BigInt(0),J=BigInt(1),Q=BigInt(2),tt=BigInt(3),et=BigInt(4),nt=BigInt(5),rt=BigInt(8);BigInt(9),BigInt(16);function ot(t,e){const n=t%e;return n>=X?n:e+n}function it(t,e,n){if(n<=X||e<X)throw new Error("Expected power/modulo > 0");if(n===J)return X;let r=J;for(;e>X;)e&J&&(r=r*t%n),t=t*t%n,e>>=J;return r}function st(t,e,n){let r=t;for(;e-- >X;)r*=r,r%=n;return r}function ft(t,e){if(t===X||e<=X)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=ot(t,e),r=e,o=X,i=J,s=J,f=X;for(;n!==X;){const t=r/n,e=r%n,a=o-s*t,u=i-f*t;r=n,n=e,o=s,i=f,s=a,f=u}if(r!==J)throw new Error("invert: does not exist");return ot(o,e)}function at(t){if(t%et===tt){const e=(t+J)/et;return function(t,n){const r=t.pow(n,e);if(!t.eql(t.sqr(r),n))throw new Error("Cannot find square root");return r}}if(t%rt===nt){const e=(t-nt)/rt;return function(t,n){const r=t.mul(n,Q),o=t.pow(r,e),i=t.mul(n,o),s=t.mul(t.mul(i,Q),o),f=t.mul(i,t.sub(s,t.ONE));if(!t.eql(t.sqr(f),n))throw new Error("Cannot find square root");return f}}return function(t){const e=(t-J)/Q;let n,r,o;for(n=t-J,r=0;n%Q===X;n/=Q,r++);for(o=Q;o<t&&it(o,e,t)!==t-J;o++);if(1===r){const e=(t+J)/et;return function(t,n){const r=t.pow(n,e);if(!t.eql(t.sqr(r),n))throw new Error("Cannot find square root");return r}}const i=(n+J)/Q;return function(t,s){if(t.pow(s,e)===t.neg(t.ONE))throw new Error("Cannot find square root");let f=r,a=t.pow(t.mul(t.ONE,o),n),u=t.pow(s,i),c=t.pow(s,n);for(;!t.eql(c,t.ONE);){if(t.eql(c,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(c);e<f&&!t.eql(r,t.ONE);e++)r=t.sqr(r);const n=t.pow(a,J<<BigInt(f-e-1));a=t.sqr(n),u=t.mul(u,n),c=t.mul(c,a),f=e}return u}}(t)}const ut=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ct(t){return M(t,ut.reduce(((t,e)=>(t[e]="function",t)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"}))}function dt(t,e){const n=void 0!==e?e:t.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}const lt=BigInt(0),ht=BigInt(1);function pt(t){return ct(t.Fp),M(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...dt(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const{bytesToNumberBE:gt,hexToBytes:wt}
1=r,yt={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){const{Err:e}=yt;if(t.length<2||2!==t[0])throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(128&r[0])throw new e("Invalid signature integer: negative");if(0===r[0]&&!(128&r[1]))throw new e("Invalid signature integer: unnecessary leading zero");return{d:gt(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=yt,n="string"===typeof t?wt(t):t;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||48!=n[0])throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:o,l:i}=yt._parseInt(n.subarray(2)),{d:s,l:f}=yt._parseInt(i);if(f.length)throw new e("Invalid signature: left bytes after parsing");return{r:o,s:s}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?"00"+t:t,n=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},r=e(n(t.s)),o=e(n(t.r)),i=r.length/2,s=o.length/2,f=n(i),a=n(s);return`30${n(s+i+4)}02${a}${o}02${f}${r}`}},mt=BigInt(0),bt=BigInt(1),Et=BigInt(2),Bt=BigInt(3),xt=BigInt(4);function vt(t){const e=function(t){const e=pt(t);M(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:o}=e;if(n){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof n||"bigint"!==typeof n.beta||"function"!==typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:n}=e,r=e.toBytes||((t,e,r)=>{const o=e.toAffine();return D(Uint8Array.from([4]),n.toBytes(o.x),n.toBytes(o.y))}),o=e.fromBytes||(t=>{const e=t.subarray(1);return{x:n.fromBytes(e.subarray(0,n.BYTES)),y:n.fromBytes(e.subarray(n.BYTES,2*n.BYTES))}});function i(t){const{a:r,b:o}=e,i=n.sqr(t),s=n.mul(i,t);return n.add(n.add(s,n.mul(t,r)),o)}if(!n.eql(n.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function s(t){return"bigint"===typeof t&&mt<t&&t<e.n}function f(t){if(!s(t))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function a(t){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:o,n:i}=e;if(n&&"bigint"!==typeof t){if(t instanceof Uint8Array&&(t=T(t)),"string"!==typeof t||!n.includes(t.length))throw new Error("Invalid key");t=t.padStart(2*r,"0")}let s;try{s="bigint"===typeof t?t:N($("private key",t,r))}catch(a){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof t}`)}return o&&(s=ot(s,i)),f(s),s}const u=new Map;function c(t){if(!(t instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(t,e,r){if(this.px=t,this.py=e,this.pz=r,null==t||!n.isValid(t))throw new Error("x required");if(null==e||!n.isValid(e))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required")}static fromAffine(t){const{x:e,y:r}=t||{};if(!t||!n.isValid(e)||!n.isValid(r))throw new Error("invalid affine point");if(t instanceof d)throw new Error("projective point not allowed");const o=t=>n.eql(t,n.ZERO);return o(e)&&o(r)?d.ZERO:new d(e,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=n.invertBatch(t.map((t=>t.pz)));return t.map(((t,n)=>t.toAffine(e[n]))).map(d.fromAffine)}static fromHex(t){const e=d.fromAffine(o($("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return d.BASE.multiply(a(t))}_setWindowSize(t){this._WINDOW_SIZE=t,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:t,y:r}=this.toAffine();if(!n.isValid(t)||!n.isValid(r))throw new Error("bad point: x or y not FE");const o=n.sqr(r),s=i(t);if(!n.eql(o,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:t}=this.toAffine();if(n.isOdd)return!n.isOdd(t);throw new Error("Field doesn't support isOdd")}equals(t){c(t);const{px:e,py:r,pz:o}=this,{px:i,py:s,pz:f}=t,a=n.eql(n.mul(e,f),n.mul(i,o)),u=n.eql(n.mul(r,f),n.mul(s,o));return a&&u}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){const{a:t,b:r}=e,o=n.mul(r,Bt),{px:i,py:s,pz:f}=this;let a=n.ZERO,u=n.ZERO,c=n.ZERO,l=n.mul(i,i),h=n.mul(s,s),p=n.mul(f,f),g=n.mul(i,s);return g=n.add(g,g),c=n.mul(i,f),c=n.add(c,c),a=n.mul(t,c),u=n.mul(o,p),u=n.add(a,u),a=n.sub(h,u),u=n.add(h,u),u=n.mul(a,u),a=n.mul(g,a),c=n.mul(o,c),p=n.mul(t,p),g=n.sub(l,p),g=n.mul(t,g),g=n.add(g,c),c=n.add(l,l),l=n.add(c,l),l=n.add(l,p),l=n.mul(l,g),u=n.add(u,l),p=n.mul(s,f),p=n.add(p,p),l=n.mul(p,g),a=n.sub(a,l),c=n.mul(p,h),c=n.add(c,c),c=n.add(c,c),new d(a,u,c)}add(t){c(t);const{px:r,py:o,pz:i}=this,{px:s,py:f,pz:a}=t;let u=n.ZERO,l=n.ZERO,h=n.ZERO;const p=e.a,g=n.mul(e.b,Bt);let w=n.mul(r,s),y=n.mul(o,f),m=n.mul(i,a),b=n.add(r,o),E=n.add(s,f);b=n.mul(b,E),E=n.add(w,y),b=n.sub(b,E),E=n.add(r,i);let B=n.add(s,a);return E=n.mul(E,B),B=n.add(w,m),E=n.sub(E,B),B=n.add(o,i),u=n.add(f,a),B=n.mul(B,u),u=n.add(y,m),B=n.sub(B,u),h=n.mul(p,E),u=n.mul(g,m),h=n.add(u,h),u=n.sub(y,h),h=n.add(y,h),l=n.mul(u,h),y=n.add(w,w),y=n.add(y,w),m=n.mul(p,m),E=n.mul(g,E),y=n.add(y,m),m=n.sub(w,m),m=n.mul(p,m),E=n.add(E,m),w=n.mul(y,E),l=n.add(l,w),w=n.mul(B,E),u=n.mul(b,u),u=n.sub(u,w),w=n.mul(b,y),h=n.mul(B,h),h=n.add(h,w),new d(u,l,h)}subtract(t){return this.add(t.negate())}is0(){return this.equals(d.ZERO)}wNAF(t){return h.wNAFCached(this,u,t,(t=>{const e=n.invertBatch(t.map((t=>t.pz)));return t.map(((t,n)=>t.toAffine(e[n]))).map(d.fromAffine)}))}multiplyUnsafe(t){const r=d.ZERO;if(t===mt)return r;if(f(t),t===bt)return this;
vendor: 7,063 bytes, line 1
1const{endo:o}=e;if(!o)return h.unsafeLadder(this,t);let{k1neg:i,k1:s,k2neg:a,k2:u}=o.splitScalar(t),c=r,l=r,p=this;for(;s>mt||u>mt;)s&bt&&(c=c.add(p)),u&bt&&(l=l.add(p)),p=p.double(),s>>=bt,u>>=bt;return i&&(c=c.negate()),a&&(l=l.negate()),l=new d(n.mul(l.px,o.beta),l.py,l.pz),c.add(l)}multiply(t){f(t);let r,o,i=t;const{endo:s}=e;if(s){const{k1neg:t,k1:e,k2neg:f,k2:a}=s.splitScalar(i);let{p:u,f:c}=this.wNAF(e),{p:l,f:p}=this.wNAF(a);u=h.constTimeNegate(t,u),l=h.constTimeNegate(f,l),l=new d(n.mul(l.px,s.beta),l.py,l.pz),r=u.add(l),o=c.add(p)}else{const{p:t,f:e}=this.wNAF(i);r=t,o=e}return d.normalizeZ([r,o])[0]}multiplyAndAddUnsafe(t,e,n){const r=d.BASE,o=(t,e)=>e!==mt&&e!==bt&&t.equals(r)?t.multiply(e):t.multiplyUnsafe(e),i=o(this,e).add(o(t,n));return i.is0()?void 0:i}toAffine(t){const{px:e,py:r,pz:o}=this,i=this.is0();null==t&&(t=i?n.ONE:n.inv(o));const s=n.mul(e,t),f=n.mul(r,t),a=n.mul(o,t);if(i)return{x:n.ZERO,y:n.ZERO};if(!n.eql(a,n.ONE))throw new Error("invZ was invalid");return{x:s,y:f}}isTorsionFree(){const{h:t,isTorsionFree:n}=e;if(t===bt)return!0;if(n)return n(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:t,clearCofactor:n}=e;return t===bt?this:n?n(d,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),r(d,this,t)}toHex(t=!0){return T(this.toRawBytes(t))}}d.BASE=new d(e.Gx,e.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);const l=e.nBitLength,h=function(t,e){const n=(t,e)=>{const n=e.negate();return t?n:e},r=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:n,unsafeLadder(e,n){let r=t.ZERO,o=e;for(;n>lt;)n&ht&&(r=r.add(o)),o=o.double(),n>>=ht;return r},precomputeWindow(t,e){const{windows:n,windowSize:o}=r(e),i=[];let s=t,f=s;for(let r=0;r<n;r++){f=s,i.push(f);for(let t=1;t<o;t++)f=f.add(s),i.push(f);s=f.double()}return i},wNAF(e,o,i){const{windows:s,windowSize:f}=r(e);let a=t.ZERO,u=t.BASE;const c=BigInt(2**e-1),d=2**e,l=BigInt(e);for(let t=0;t<s;t++){const e=t*f;let r=Number(i&c);i>>=l,r>f&&(r-=d,i+=ht);const s=e,h=e+Math.abs(r)-1,p=t%2!==0,g=r<0;0===r?u=u.add(n(p,o[s])):a=a.add(n(g,o[h]))}return{p:a,f:u}},wNAFCached(t,e,n,r){const o=t._WINDOW_SIZE||1;let i=e.get(t);return i||(i=this.precomputeWindow(t,o),1!==o&&e.set(t,r(i))),this.wNAF(o,i,n)}}}(d,e.endo?Math.ceil(l/2):l);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:a,weierstrassEquation:i,isWithinCurveOrder:s}}function At(t){const e=function(t){const e=pt(t);return M(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:n,n:r}=e,o=n.BYTES+1,i=2*n.BYTES+1;function s(t){return ot(t,r)}function f(t){return ft(t,r)}const{ProjectivePoint:a,normPrivateKeyToScalar:u,weierstrassEquation:c,isWithinCurveOrder:d}=vt({...e,toBytes(t,e,r){const o=e.toAffine(),i=n.toBytes(o.x),s=D;return r?s(Uint8Array.from([e.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,n.toBytes(o.y))},fromBytes(t){const e=t.length,r=t[0],s=t.subarray(1);if(e!==o||2!==r&&3!==r){if(e===i&&4===r){return{x:n.fromBytes(s.subarray(0,n.BYTES)),y:n.fromBytes(s.subarray(n.BYTES,2*n.BYTES))}}throw new Error(`Point of length ${e} was invalid. Expected ${o} compressed bytes or ${i} uncompressed bytes`)}{const t=N(s);if(!(mt<(f=t)&&f<n.ORDER))throw new Error("Point is not on curve");const e=c(t);let o=n.sqrt(e);return 1===(1&r)!==((o&bt)===bt)&&(o=n.neg(o)),{x:t,y:o}}var f}}),l=t=>T(k(t,e.nByteLength));function h(t){return t>r>>bt}const p=(t,e,n)=>N(t.slice(e,n));class g{constructor(t,e,n){this.r=t,this.s=e,this.recovery=n,this.assertValidity()}static fromCompact(t){const n=e.nByteLength;return t=$("compactSignature",t,2*n),new g(p(t,0,n),p(t,n,2*n))}static fromDER(t){const{r:e,s:n}=yt.toSig($("DER",t));return new g(e,n)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new g(this.r,this.s,t)}recoverPublicKey(t){const{r:r,s:o,recovery:i}=this,u=b($("msgHash",t));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const c=2===i||3===i?r+e.n:r;if(c>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=0===(1&i)?"02":"03",h=a.fromHex(d+l(c)),p=f(c),g=s(-u*p),w=s(o*p),y=a.BASE.multiplyAndAddUnsafe(h,g,w);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return L(this.toDERHex())}toDERHex(){return yt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return L(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}const w={isValidPrivateKey(t){try{return u(t),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const t=function(t,e,n=!1){const r=(t=$("privateHash",t)).length,o=dt(e).nByteLength+8;if(o<24||r<o||r>1024)throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${r}`);return ot(n?H(t):N(t),e-J)+J}(e.randomBytes(n.BYTES+8),r);return k(t,e.nByteLength)},precompute:(t=8,e=a.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function y(t){const e=t instanceof Uint8Array,n="string"===typeof t,r=(e||n)&&t.length;return e?r===o||r===i:n?r===2*o||r===2*i:t instanceof a}const m=e.bits2int||function(t){const n=N(t),r=8*t.length-e.nBitLength;return r>0?n>>BigInt(r):n},b=e.bits2int_modN||function(t){return s(m(t))},E=K(e.nBitLength);function B(t){if("bigint"!==typeof t)throw new Error("bigint expected");if(!(mt<=t&&t<E))throw new Error(`bigint expected < 2^${e.nBitLength}`);return k(t,e.nByteLength)}function x(t,r,o=v){if(["recovered","canonical"].some((t=>t in o)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:c}=e;let{lowS:l,prehash:p,extraEntropy:w}=o;null==l&&(l=!0),t=$("msgHash",t),p&&(t=$("prehashed msgHash",i(t)));const y=b(t),E=u(r),x=[B(E),B(y)];if(null!=w){const t=!0===w?c(n.BYTES):w;x.push($("extraEntropy",t,n.BYTES))}const A=D(...x),S=y;return{seed:A,k2sig:function(t){const e=m(t);if(!d(e))return;const n=f(e),r=a.BASE.multiply(e).toAffine(),o=s(r.x);if(o===mt)return;const i=s(n*s(S+o*E));if(i===mt)return;let u=(r.x===o?0:2)|Number(r.y&bt),c=i;return l&&h(i)&&(c=function(t){return h(t)?s(-t):t}(i),u^=1),new g(o,c,u)}}}const v={lowS:e.lowS,prehash:!1},A={lowS:e.lowS,prehash:!1};return a.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return a.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,n=!0){if(y(t))throw new Error("first arg must be private key");if(!y(e))throw new Error("second arg must be public key");return a.fromHex(e).multiply(u(t)).toRawBytes(n)},sign:function(t,n,r=v){const{seed:o,k2sig:i}=x(t,n,r),s=e;return G(s.hash.outputLen,s.nByteLength,s.hmac)(o,i)},verify:function(t,n,r,o=A){const i=t;if(n=$("msgHash",n),r=$("publicKey",r),"strict"in o)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=o;let d,l;try{if("string"===typeof i||i instanceof Uint8Array)try{d=g.fromDER(i)}
1catch(x){if(!(x instanceof yt.Err))throw x;d=g.fromCompact(i)}else{if("object"!==typeof i||"bigint"!==typeof i.r||"bigint"!==typeof i.s)throw new Error("PARSE");{const{r:t,s:e}=i;d=new g(t,e)}}l=a.fromHex(r)}catch(v){if("PARSE"===v.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&d.hasHighS())return!1;c&&(n=e.hash(n));const{r:h,s:p}=d,w=b(n),y=f(p),m=s(w*y),E=s(h*y),B=a.BASE.multiplyAndAddUnsafe(l,m,E)?.toAffine();return!!B&&s(B.x)===h},ProjectivePoint:a,Signature:g,utils:w}}function St(t,e){if(ct(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=function(t,e){const n=t.ORDER;let r=mt;for(let p=n-bt;p%Et===mt;p/=Et)r+=bt;const o=r,i=Et<<o-bt-bt,s=i*Et,f=(n-bt)/s,a=(f-bt)/Et,u=s-bt,c=i,d=t.pow(e,f),l=t.pow(e,(f+bt)/Et);let h=(e,n)=>{let r=d,i=t.pow(n,u),s=t.sqr(i);s=t.mul(s,n);let f=t.mul(e,s);f=t.pow(f,a),f=t.mul(f,i),i=t.mul(f,n),s=t.mul(f,e);let h=t.mul(s,i);f=t.pow(h,c);let p=t.eql(f,t.ONE);i=t.mul(s,l),f=t.mul(h,r),s=t.cmov(i,s,p),h=t.cmov(f,h,p);for(let a=o;a>bt;a--){let e=a-Et;e=Et<<e-bt;let n=t.pow(h,e);const o=t.eql(n,t.ONE);i=t.mul(s,r),r=t.mul(r,r),n=t.mul(h,r),s=t.cmov(i,s,o),h=t.cmov(n,h,o)}return{isValid:p,value:s}};if(t.ORDER%xt===Bt){const n=(t.ORDER-Bt)/xt,r=t.sqrt(t.neg(e));h=(e,o)=>{let i=t.sqr(o);const s=t.mul(e,o);i=t.mul(i,s);let f=t.pow(i,n);f=t.mul(f,s);const a=t.mul(f,r),u=t.mul(t.sqr(f),o),c=t.eql(u,e);return{isValid:c,value:t.cmov(a,f,c)}}}return h}(t,e.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let o,i,s,f,a,u,c,d;o=t.sqr(r),o=t.mul(o,e.Z),i=t.sqr(o),i=t.add(i,o),s=t.add(i,t.ONE),s=t.mul(s,e.B),f=t.cmov(e.Z,t.neg(i),!t.eql(i,t.ZERO)),f=t.mul(f,e.A),i=t.sqr(s),u=t.sqr(f),a=t.mul(u,e.A),i=t.add(i,a),i=t.mul(i,s),u=t.mul(u,f),a=t.mul(u,e.B),i=t.add(i,a),c=t.mul(o,s);const{isValid:l,value:h}=n(i,u);d=t.mul(o,r),d=t.mul(d,h),c=t.cmov(c,s,l),d=t.cmov(d,h,l);const p=t.isOdd(r)===t.isOdd(d);return d=t.cmov(t.neg(d),d,p),c=t.div(c,f),{x:c,y:d}}}const It=N;function Ot(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const n=Array.from({length:e}).fill(0);for(let r=e-1;r>=0;r--)n[r]=255&t,t>>>=8;return new Uint8Array(n)}function Rt(t,e){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t[r]^e[r];return n}function Tt(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected")}function Ut(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function qt(t,e,n){M(n,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:r,k:o,m:i,hash:s,expand:f,DST:a}=n;Tt(t),Ut(e);const u=function(t){if(t instanceof Uint8Array)return t;if("string"===typeof t)return _(t);throw new Error("DST must be Uint8Array or string")}(a),c=r.toString(2).length,d=Math.ceil((c+o)/8),l=e*i*d;let h;if("xmd"===f)h=function(t,e,n,r){Tt(t),Tt(e),Ut(n),e.length>255&&(e=r(D(_("H2C-OVERSIZE-DST-"),e)));const{outputLen:o,blockLen:i}=r,s=Math.ceil(n/o);if(s>255)throw new Error("Invalid xmd length");const f=D(e,Ot(e.length,1)),a=Ot(0,i),u=Ot(n,2),c=new Array(s),d=r(D(a,t,u,Ot(0,1),f));c[0]=r(D(d,Ot(1,1),f));for(let l=1;l<=s;l++){const t=[Rt(d,c[l-1]),Ot(l+1,1),f];c[l]=r(D(...t))}return D(...c).slice(0,n)}(t,u,l,s);else if("xof"===f)h=function(t,e,n,r,o){if(Tt(t),Tt(e),Ut(n),e.length>255){const t=Math.ceil(2*r/8);e=o.create({dkLen:t}).update(_("H2C-OVERSIZE-DST-")).update(e).digest()}if(n>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:n}).update(t).update(Ot(n,2)).update(e).update(Ot(e.length,1)).digest()}(t,u,l,o,s);else{if("_internal_pass"!==f)throw new Error('expand must be "xmd" or "xof"');h=t}const p=new Array(e);for(let g=0;g<e;g++){const t=new Array(i);for(let e=0;e<i;e++){const n=d*(e+g*i),o=h.subarray(n,n+d);t[e]=ot(It(o),r)}p[g]=t}return p}class Lt extends h{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,f.hash(t);const n=l(e);if(this.iHash=t.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,o=new Uint8Array(r);o.set(n.length>r?t.create().update(n).digest():n);for(let i=0;i<o.length;i++)o[i]^=54;this.iHash.update(o),this.oHash=t.create();for(let i=0;i<o.length;i++)o[i]^=106;this.oHash.update(o),o.fill(0)}update(t){return f.exists(this),this.iHash.update(t),this}digestInto(t){f.exists(this),f.bytes(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:n,finished:r,destroyed:o,blockLen:i,outputLen:s}=this;return t.finished=r,t.destroyed=o,t.blockLen=i,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Nt=(t,e,n)=>new Lt(t,e).update(n).digest();function Ht(t){return{hash:t,hmac:(e,...n)=>Nt(t,e,function(...t){const e=new Uint8Array(t.reduce(((t,e)=>t+e.length),0));let n=0;return t.forEach((t=>{if(!u(t))throw new Error("Uint8Array expected");
1e.set(t,n),n+=t.length})),e}(...n)),randomBytes:g}}Nt.create=(t,e)=>new Lt(t,e);const kt=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Ct=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Pt=BigInt(1),$t=BigInt(2),Dt=(t,e)=>(t+e/$t)/e;function Vt(t){const e=kt,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),s=BigInt(23),f=BigInt(44),a=BigInt(88),u=t*t*t%e,c=u*u*t%e,d=st(c,n,e)*c%e,l=st(d,n,e)*c%e,h=st(l,$t,e)*u%e,p=st(h,o,e)*h%e,g=st(p,i,e)*p%e,w=st(g,f,e)*g%e,y=st(w,a,e)*w%e,m=st(y,f,e)*g%e,b=st(m,n,e)*c%e,E=st(b,s,e)*p%e,B=st(E,r,e)*u%e,x=st(B,$t,e);if(!_t.eql(_t.sqr(x),t))throw new Error("Cannot find square root");return x}const _t=function(t,e,n=!1,r={}){if(t<=X)throw new Error(`Expected Fp ORDER > 0, got ${t}`);const{nBitLength:o,nByteLength:i}=dt(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=at(t),f=Object.freeze({ORDER:t,BITS:o,BYTES:i,MASK:K(o),ZERO:X,ONE:J,create:e=>ot(e,t),isValid:e=>{if("bigint"!==typeof e)throw new Error("Invalid field element: expected bigint, got "+typeof e);return X<=e&&e<t},is0:t=>t===X,isOdd:t=>(t&J)===J,neg:e=>ot(-e,t),eql:(t,e)=>t===e,sqr:e=>ot(e*e,t),add:(e,n)=>ot(e+n,t),sub:(e,n)=>ot(e-n,t),mul:(e,n)=>ot(e*n,t),pow:(t,e)=>function(t,e,n){if(n<X)throw new Error("Expected power > 0");if(n===X)return t.ONE;if(n===J)return e;let r=t.ONE,o=e;for(;n>X;)n&J&&(r=t.mul(r,o)),o=t.sqr(o),n>>=J;return r}(f,t,e),div:(e,n)=>ot(e*ft(n,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>ft(e,t),sqrt:r.sqrt||(t=>s(f,t)),invertBatch:t=>function(t,e){const n=new Array(e.length),r=e.reduce(((e,r,o)=>t.is0(r)?e:(n[o]=e,t.mul(e,r))),t.ONE),o=t.inv(r);return e.reduceRight(((e,r,o)=>t.is0(r)?e:(n[o]=t.mul(e,n[o]),t.mul(e,r))),o),n}(f,t),cmov:(t,e,n)=>n?e:t,toBytes:t=>n?C(t,i):k(t,i),fromBytes:t=>{if(t.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${t.length}`);return n?H(t):N(t)}});return Object.freeze(f)}(kt,void 0,void 0,{sqrt:Vt}),Ft=function(t,e){const n=e=>At({...t,...Ht(e)});return Object.freeze({...n(e),create:n})}({a:BigInt(0),b:BigInt(7),Fp:_t,n:Ct,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=Ct,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Pt*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,s=BigInt("0x100000000000000000000000000000000"),f=Dt(i*t,e),a=Dt(-r*t,e);let u=ot(t-f*n-a*o,e),c=ot(-f*r-a*i,e);const d=u>s,l=c>s;if(d&&(u=e-u),l&&(c=e-c),u>s||c>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:u,k2neg:l,k2:c}}}},v),Zt=BigInt(0),zt=t=>"bigint"===typeof t&&Zt<t&&t<kt,Kt={};function jt(t,...e){let n=Kt[t];if(void 0===n){const e=v(Uint8Array.from(t,(t=>t.charCodeAt(0))));n=D(e,e),Kt[t]=n}return v(D(n,...e))}const Yt=t=>t.toRawBytes(!0).slice(1),Gt=t=>k(t,32),Wt=t=>ot(t,kt),Mt=t=>ot(t,Ct),Xt=Ft.ProjectivePoint;function Jt(t){let e=Ft.utils.normPrivateKeyToScalar(t),n=Xt.fromPrivateKey(e);return{scalar:n.hasEvenY()?e:Mt(-e),bytes:Yt(n)}}function Qt(t){if(!zt(t))throw new Error("bad x: need 0 < x < p");const e=Wt(t*t);let n=Vt(Wt(e*t+BigInt(7)));n%$t!==Zt&&(n=Wt(-n));const r=new Xt(t,n,Pt);return r.assertValidity(),r}function te(...t){return Mt(N(jt("BIP0340/challenge",...t)))}function ee(t){return Jt(t).bytes}function ne(t,e,n=g(32)){const r=$("message",t),{bytes:o,scalar:i}=Jt(e),s=$("auxRand",n,32),f=Gt(i^N(jt("BIP0340/aux",s))),a=jt("BIP0340/nonce",f,o,r),u=Mt(N(a));if(u===Zt)throw new Error("sign failed: k is zero");const{bytes:c,scalar:d}=Jt(u),l=te(c,o,r),h=new Uint8Array(64);if(h.set(c,0),h.set(Gt(Mt(d+l*i)),32),!re(h,r,o))throw new Error("sign: Invalid signature produced");return h}function re(t,e,n){const r=$("signature",t,64),o=$("message",e),i=$("publicKey",n,32);try{const t=Qt(N(i)),e=N(r.subarray(0,32));if(!zt(e))return!1;const n=N(r.subarray(32,64));if(!("bigint"===typeof(u=n)&&Zt<u&&u<Ct))return!1;const c=te(Gt(e),Yt(t),o),d=(s=t,f=n,a=Mt(-c),Xt.BASE.multiplyAndAddUnsafe(s,f,a));return!(!d||!d.hasEvenY()||d.toAffine().x!==e)}catch(c){return!1}var s,f,a,u}const oe=(()=>({getPublicKey:ee,sign:ne,verify:re,utils:{randomPrivateKey:Ft.utils.randomPrivateKey,lift_x:Qt,pointToBytes:Yt,numberToBytesBE:k,bytesToNumberBE:N,taggedHash:jt,mod:ot}}))(),ie=(()=>function(t,e){const n=e.map((t=>Array.from(t).reverse()));return(e,r)=>{const[o,i,s,f]=n.map((n=>n.reduce(((n,r)=>t.add(t.mul(n,e),r)))));return e=t.div(o,i),r=t.mul(r,t.div(s,f)),{x:e,y:r}}}(_t,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a4
113deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((t=>t.map((t=>BigInt(t)))))))(),se=(()=>St(_t,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:_t.create(BigInt("-11"))}))(),fe=(()=>function(t,e,n){if("function"!==typeof e)throw new Error("mapToCurve() must be defined");return{hashToCurve(r,o){const i=qt(r,2,{...n,DST:n.DST,...o}),s=t.fromAffine(e(i[0])),f=t.fromAffine(e(i[1])),a=s.add(f).clearCofactor();return a.assertValidity(),a},encodeToCurve(r,o){const i=qt(r,1,{...n,DST:n.encodeDST,...o}),s=t.fromAffine(e(i[0])).clearCofactor();return s.assertValidity(),s}}}(Ft.ProjectivePoint,(t=>{const{x:e,y:n}=se(_t.create(t[0]));return ie(e,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:_t.ORDER,m:1,k:128,expand:"xmd",hash:v}))(),ae=(()=>fe.hashToCurve)(),ue=(()=>fe.encodeToCurve)()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.