shogun-button-react 6.3.1 → 6.3.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shogun-button-react",
3
3
  "description": "Shogun connector button",
4
- "version": "6.3.1",
4
+ "version": "6.3.3",
5
5
  "files": [
6
6
  "dist",
7
7
  "src/styles/index.css"
@@ -45,7 +45,7 @@
45
45
  "prettier": "^3.5.3",
46
46
  "process": "^0.11.10",
47
47
  "rxjs": "^7.8.2",
48
- "shogun-core": "^6.3.1",
48
+ "shogun-core": "^6.3.3",
49
49
  "stream-browserify": "^3.0.0",
50
50
  "util": "^0.12.5"
51
51
  },
package/dist/122.index.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 122.index.js.LICENSE.txt */
2
- export const __webpack_esm_id__=122;export const __webpack_esm_ids__=[122];export const __webpack_esm_modules__={86122:(f,t,e)=>{e.d(t,{ed25519:()=>m});var n=e(8442),i=e(32531),r=e(50649),s=e(26618),o=(e(7766),e(15916)),c=e(78906);const a=BigInt(0),d=BigInt(1),u=BigInt(2),B=(BigInt(3),BigInt(5)),g=BigInt(8),l=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),_=(()=>({p:l,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:g,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}))();function I(f){return f[0]&=248,f[31]&=127,f[31]|=64,f}const p=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function w(f,t){const e=l,n=(0,o.zi)(t*t*t,e),i=function(f){const t=BigInt(10),e=BigInt(20),n=BigInt(40),i=BigInt(80),r=l,s=f*f%r*f%r,c=(0,o.zH)(s,u,r)*s%r,a=(0,o.zH)(c,d,r)*f%r,g=(0,o.zH)(a,B,r)*a%r,_=(0,o.zH)(g,t,r)*g%r,I=(0,o.zH)(_,e,r)*_%r,p=(0,o.zH)(I,n,r)*I%r,w=(0,o.zH)(p,i,r)*p%r,z=(0,o.zH)(w,i,r)*p%r,x=(0,o.zH)(z,t,r)*g%r;return{pow_p_5_8:(0,o.zH)(x,u,r)*f%r,b2:s}}(f*(0,o.zi)(n*n*t,e)).pow_p_5_8;let r=(0,o.zi)(f*n*i,e);const s=(0,o.zi)(t*r*r,e),c=r,a=(0,o.zi)(r*p,e),g=s===f,_=s===(0,o.zi)(-f,e),I=s===(0,o.zi)(-f*p,e);return g&&(r=c),(_||I)&&(r=a),(0,o.dQ)(r,e)&&(r=(0,o.zi)(-r,e)),{isValid:g||_,value:r}}const z=(()=>(0,o.D0)(_.p,{isLE:!0}))(),x=(()=>(0,o.D0)(_.n,{isLE:!0}))(),h=(()=>({..._,Fp:z,hash:n.Zf,adjustScalarBytes:I,uvRatio:w}))(),m=(()=>(0,s.n6)(h))(),H=p,b=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),E=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),v=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),y=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),P=f=>w(d,f),Q=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),F=f=>m.Point.Fp.create((0,c.lX)(f)&Q);function O(f){const{d:t}=_,e=l,n=f=>z.create(f),i=n(H*f*f),r=n((i+d)*v);let s=BigInt(-1);const c=n((s-t*i)*n(i+t));let{isValid:a,value:u}=w(r,c),B=n(u*f);(0,o.dQ)(B,e)||(B=n(-B)),a||(u=B),a||(s=i);const g=n(s*(i-d)*y-c),I=u*u,p=n((u+u)*c),x=n(g*b),h=n(d-I),E=n(d+I);return new m.Point(n(p*E),n(h*x),n(x*E),n(p*h))}class R extends s.i5{constructor(f){super(f)}static fromAffine(f){return new R(m.Point.fromAffine(f))}assertSame(f){if(!(f instanceof R))throw new Error("RistrettoPoint expected")}init(f){return new R(f)}static hashToCurve(f){return function(f){(0,i.DO)(f,64);const t=O(F(f.subarray(0,32))),e=O(F(f.subarray(32,64)));return new R(t.add(e))}((0,c.qj)("ristrettoHash",f,64))}static fromBytes(f){(0,i.DO)(f,32);const{a:t,d:e}=_,n=l,r=f=>z.create(f),s=F(f);if(!(0,c.ex)(z.toBytes(s),f)||(0,o.dQ)(s,n))throw new Error("invalid ristretto255 encoding 1");const u=r(s*s),B=r(d+t*u),g=r(d-t*u),I=r(B*B),p=r(g*g),w=r(t*e*I-p),{isValid:x,value:h}=P(r(w*p)),H=r(h*g),b=r(h*H*w);let E=r((s+s)*H);(0,o.dQ)(E,n)&&(E=r(-E));const v=r(B*b),y=r(E*v);if(!x||(0,o.dQ)(y,n)||v===a)throw new Error("invalid ristretto255 encoding 2");return new R(new m.Point(E,v,d,y))}static fromHex(f){return R.fromBytes((0,c.qj)("ristrettoHex",f,32))}static msm(f,t){return(0,r.Xf)(R,m.Point.Fn,f,t)}toBytes(){let{X:f,Y:t,Z:e,T:n}=this.ep;const i=l,r=f=>z.create(f),s=r(r(e+t)*r(e-t)),c=r(f*t),a=r(c*c),{value:d}=P(r(s*a)),u=r(d*s),B=r(d*c),g=r(u*B*n);let _;if((0,o.dQ)(n*g,i)){let e=r(t*H),n=r(f*H);f=e,t=n,_=r(u*E)}else _=B;(0,o.dQ)(f*g,i)&&(t=r(-t));let I=r((e-t)*_);return(0,o.dQ)(I,i)&&(I=r(-I)),z.toBytes(I)}equals(f){this.assertSame(f);const{X:t,Y:e}=this.ep,{X:n,Y:i}=f.ep,r=f=>z.create(f),s=r(t*i)===r(e*n),o=r(e*i)===r(t*n);return s||o}is0(){return this.equals(R.ZERO)}}R.BASE=(()=>new R(m.Point.BASE))(),R.ZERO=(()=>new R(m.Point.ZERO))(),R.Fp=(()=>z)(),R.Fn=(()=>x)()}};
@@ -1 +0,0 @@
1
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
package/dist/47.index.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 47.index.js.LICENSE.txt */
2
- export const __webpack_esm_id__=47;export const __webpack_esm_ids__=[47];export const __webpack_esm_modules__={91047:(e,t,f)=>{f.d(t,{p256:()=>P,p384:()=>k,p521:()=>q});var r=f(8442),n=f(21454),o=f(32531),i=f(78906),s=f(50649),a=f(15916);const c=(e,t)=>(e+(e>=0?t:-t)/m)/t;function d(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function u(e,t){const f={};for(let r of Object.keys(t))f[r]=void 0===e[r]?t[r]:e[r];return(0,i.d6)(f.lowS,"lowS"),(0,i.d6)(f.prehash,"prehash"),void 0!==f.format&&d(f.format),f}class l extends Error{constructor(e=""){super(e)}}const h={Err:l,_tlv:{encode:(e,t)=>{const{Err:f}=h;if(e<0||e>256)throw new f("tlv.encode: wrong tag");if(1&t.length)throw new f("tlv.encode: unpadded data");const r=t.length/2,n=(0,i.zW)(r);if(n.length/2&128)throw new f("tlv.encode: long form length too big");const o=r>127?(0,i.zW)(n.length/2|128):"";return(0,i.zW)(e)+o+n+t},decode(e,t){const{Err:f}=h;let r=0;if(e<0||e>256)throw new f("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new f("tlv.decode: wrong tlv");const n=t[r++];let o=0;if(128&n){const e=127&n;if(!e)throw new f("tlv.decode(long): indefinite length not supported");if(e>4)throw new f("tlv.decode(long): byte length is too big");const i=t.subarray(r,r+e);if(i.length!==e)throw new f("tlv.decode: length bytes not complete");if(0===i[0])throw new f("tlv.decode(long): zero leftmost byte");for(const e of i)o=o<<8|e;if(r+=e,o<128)throw new f("tlv.decode(long): not minimal encoding")}else o=n;const i=t.subarray(r,r+o);if(i.length!==o)throw new f("tlv.decode: wrong value length");return{v:i,l:t.subarray(r+o)}}},_int:{encode(e){const{Err:t}=h;if(e<y)throw new t("integer: negative integers are not allowed");let f=(0,i.zW)(e);if(8&Number.parseInt(f[0],16)&&(f="00"+f),1&f.length)throw new t("unexpected DER parsing assertion: unpadded hex");return f},decode(e){const{Err:t}=h;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return(0,i.Ph)(e)}},toSig(e){const{Err:t,_int:f,_tlv:r}=h,n=(0,i.qj)("signature",e),{v:o,l:s}=r.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,o),{v:d,l:u}=r.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:f.decode(a),s:f.decode(d)}},hexFromSig(e){const{_tlv:t,_int:f}=h,r=t.encode(2,f.encode(e.r))+t.encode(2,f.encode(e.s));return t.encode(48,r)}},y=BigInt(0),b=BigInt(1),m=BigInt(2),p=BigInt(3),g=BigInt(4);function w(e,t){const{BYTES:f}=e;let r;if("bigint"==typeof t)r=t;else{let n=(0,i.qj)("private key",t);try{r=e.fromBytes(n)}catch(e){throw new Error(`invalid private key: expected ui8a of size ${f}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function E(e){return Uint8Array.of(e?2:3)}function B(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function v(e){const{CURVE:t,curveOpts:f,hash:r,ecdsaOpts:l}=function(e){const{CURVE:t,curveOpts:f}=function(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},f=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:f,Fn:(0,a.D0)(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:f,hash:e.hash,ecdsaOpts:r}}(e);return function(e,t){const f=t.Point;return Object.assign({},t,{ProjectivePoint:f,CURVE:Object.assign({},e,(0,a.LH)(f.Fn.ORDER,f.Fn.BITS))})}(e,function(e,t,f={}){(0,o.sd)(t),(0,i.DS)(f,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=f.randomBytes||o.po,s=f.hmac||((e,...f)=>(0,n.w)(t,e,(0,o.Id)(...f))),{Fp:c,Fn:l}=e,{ORDER:p,BITS:g}=l,{keygen:v,getPublicKey:x,getSharedSecret:S,utils:O,lengths:R}=function(e,t={}){const{Fn:f}=e,r=t.randomBytes||o.po,n=Object.assign(B(e.Fp,f),{seed:(0,a.Tp)(f.ORDER)});function s(e){try{return!!w(f,e)}catch(e){return!1}}function c(e=r(n.seed)){return(0,a.qy)((0,i.eV)(e,n.seed,"seed"),f.ORDER)}function d(t,r=!0){return e.BASE.multiply(w(f,t)).toBytes(r)}function u(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;const{secretKey:r,publicKey:o,publicKeyUncompressed:s}=n;if(f.allowedLengths||r===o)return;const a=(0,i.qj)("key",t).length;return a===o||a===s}const l={isValidSecretKey:s,isValidPublicKey:function(t,f){const{publicKey:r,publicKeyUncompressed:o}=n;try{const n=t.length;return!(!0===f&&n!==r||!1===f&&n!==o||!e.fromBytes(t))}catch(e){return!1}},randomSecretKey:c,isValidPrivateKey:s,randomPrivateKey:c,normPrivateKeyToScalar:e=>w(f,e),precompute:(t=8,f=e.BASE)=>f.precompute(t,!1)};return Object.freeze({getPublicKey:d,getSharedSecret:function(t,r,n=!0){if(!0===u(t))throw new Error("first arg must be private key");if(!1===u(r))throw new Error("second arg must be public key");const o=w(f,t);return e.fromHex(r).multiply(o).toBytes(n)},keygen:function(e){const t=c(e);return{secretKey:t,publicKey:d(t)}},Point:e,utils:l,lengths:n})}(e,f),I={prehash:!1,lowS:"boolean"==typeof f.lowS&&f.lowS,format:void 0,extraEntropy:!1},K="compact";function V(e){return e>p>>b}function P(e,t){if(!l.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class k{constructor(e,t,f){this.r=P("r",e),this.s=P("s",t),null!=f&&(this.recovery=f),Object.freeze(this)}static fromBytes(e,t=K){let f;if(function(e,t){d(t);const f=R.signature,r="compact"===t?f:"recovered"===t?f+1:void 0;(0,i.eV)(e,r,`${t} signature`)}(e,t),"der"===t){const{r:t,s:f}=h.toSig((0,i.eV)(e));return new k(t,f)}"recovered"===t&&(f=e[0],t="compact",e=e.subarray(1));const r=l.BYTES,n=e.subarray(0,r),o=e.subarray(r,2*r);return new k(l.fromBytes(n),l.fromBytes(o),f)}static fromHex(e,t){return this.fromBytes((0,o.aT)(e),t)}addRecoveryBit(e){return new k(this.r,this.s,e)}recoverPublicKey(t){const f=c.ORDER,{r,s:n,recovery:s}=this;if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");if(p*m<f&&s>1)throw new Error("recovery id is ambiguous for h>1 curve");const a=2===s||3===s?r+p:r;if(!c.isValid(a))throw new Error("recovery id 2 or 3 invalid");const d=c.toBytes(a),u=e.fromBytes((0,o.Id)(E(!(1&s)),d)),h=l.inv(a),y=A((0,i.qj)("msgHash",t)),b=l.create(-y*h),g=l.create(n*h),w=e.BASE.multiplyUnsafe(b).add(u.multiplyUnsafe(g));if(w.is0())throw new Error("point at infinify");return w.assertValidity(),w}hasHighS(){return V(this.s)}toBytes(e=K){if(d(e),"der"===e)return(0,o.aT)(h.hexFromSig(this));const t=l.toBytes(this.r),f=l.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw new Error("recovery bit must be present");return(0,o.Id)(Uint8Array.of(this.recovery),t,f)}return(0,o.Id)(t,f)}toHex(e){return(0,o.My)(this.toBytes(e))}assertValidity(){}static fromCompact(e){return k.fromBytes((0,i.qj)("sig",e),"compact")}static fromDER(e){return k.fromBytes((0,i.qj)("sig",e),"der")}normalizeS(){return this.hasHighS()?new k(this.r,l.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,o.My)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,o.My)(this.toBytes("compact"))}}const q=f.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=(0,i.Ph)(e),f=8*e.length-g;return f>0?t>>BigInt(f):t},A=f.bits2int_modN||function(e){return l.create(q(e))},F=(0,i.OG)(g);function Z(e){return(0,i.aK)("num < 2^"+g,e,y,F),l.toBytes(e)}function _(e,f){return(0,i.eV)(e,void 0,"message"),f?(0,i.eV)(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:v,getPublicKey:x,getSharedSecret:S,utils:O,lengths:R,Point:e,sign:function(f,n,a={}){f=(0,i.qj)("message",f);const{seed:c,k2sig:d}=function(t,f,n){if(["recovered","canonical"].some(e=>e in n))throw new Error("sign() legacy options not supported");const{lowS:s,prehash:a,extraEntropy:c}=u(n,I);t=_(t,a);const d=A(t),h=w(l,f),m=[Z(h),Z(d)];if(null!=c&&!1!==c){const e=!0===c?r(R.secretKey):c;m.push((0,i.qj)("extraEntropy",e))}const p=(0,o.Id)(...m),g=d;return{seed:p,k2sig:function(t){const f=q(t);if(!l.isValidNot0(f))return;const r=l.inv(f),n=e.BASE.multiply(f).toAffine(),o=l.create(n.x);if(o===y)return;const i=l.create(r*l.create(g+o*h));if(i===y)return;let a=(n.x===o?0:2)|Number(n.y&b),c=i;return s&&V(i)&&(c=l.neg(i),a^=1),new k(o,c,a)}}}(f,n,a);return(0,i.fg)(t.outputLen,l.BYTES,s)(c,d)},verify:function(t,f,r,n={}){const{lowS:s,prehash:a,format:c}=u(n,I);if(r=(0,i.qj)("publicKey",r),f=_((0,i.qj)("message",f),a),"strict"in n)throw new Error("options.strict was renamed to lowS");const d=void 0===c?function(e){let t;const f="string"==typeof e||(0,o.aY)(e),r=!f&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!f&&!r)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(r)t=new k(e.r,e.s);else if(f){try{t=k.fromBytes((0,i.qj)("sig",e),"der")}catch(e){if(!(e instanceof h.Err))throw e}if(!t)try{t=k.fromBytes((0,i.qj)("sig",e),"compact")}catch(e){return!1}}return t||!1}(t):k.fromBytes((0,i.qj)("sig",t),c);if(!1===d)return!1;try{const t=e.fromBytes(r);if(s&&d.hasHighS())return!1;const{r:n,s:o}=d,i=A(f),a=l.inv(o),c=l.create(i*a),u=l.create(n*a),h=e.BASE.multiplyUnsafe(c).add(t.multiplyUnsafe(u));return!h.is0()&&l.create(h.x)===n}catch(e){return!1}},recoverPublicKey:function(e,t,f={}){const{prehash:r}=u(f,I);return t=_(t,r),k.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:k,hash:t})}(function(e,t={}){const f=(0,s.UT)("weierstrass",e,t),{Fp:r,Fn:n}=f;let a=f.CURVE;const{h:d,n:u}=a;(0,i.DS)(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:l}=t;if(l&&(!r.is0(a.a)||"bigint"!=typeof l.beta||!Array.isArray(l.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const h=B(r,n);function m(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const v=t.toBytes||function(e,t,f){const{x:n,y:s}=t.toAffine(),a=r.toBytes(n);if((0,i.d6)(f,"isCompressed"),f){m();const e=!r.isOdd(s);return(0,o.Id)(E(e),a)}return(0,o.Id)(Uint8Array.of(4),a,r.toBytes(s))},x=t.fromBytes||function(e){(0,i.eV)(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:f}=h,n=e.length,o=e[0],s=e.subarray(1);if(n!==t||2!==o&&3!==o){if(n===f&&4===o){const e=r.BYTES,t=r.fromBytes(s.subarray(0,e)),f=r.fromBytes(s.subarray(e,2*e));if(!O(t,f))throw new Error("bad point: is not on curve");return{x:t,y:f}}throw new Error(`bad point: got length ${n}, expected compressed=${t} or uncompressed=${f}`)}{const e=r.fromBytes(s);if(!r.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=S(e);let f;try{f=r.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("bad point: is not on curve, sqrt error"+t)}return m(),!(1&~o)!==r.isOdd(f)&&(f=r.neg(f)),{x:e,y:f}}};function S(e){const t=r.sqr(e),f=r.mul(t,e);return r.add(r.add(f,r.mul(e,a.a)),a.b)}function O(e,t){const f=r.sqr(t),n=S(e);return r.eql(f,n)}if(!O(a.Gx,a.Gy))throw new Error("bad curve params: generator point");const R=r.mul(r.pow(a.a,p),g),I=r.mul(r.sqr(a.b),BigInt(27));if(r.is0(r.add(R,I)))throw new Error("bad curve params: a or b");function K(e,t,f=!1){if(!r.isValid(t)||f&&r.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function V(e){if(!(e instanceof F))throw new Error("ProjectivePoint expected")}function P(e){if(!l||!l.basises)throw new Error("no endo");return function(e,t,f){const[[r,n],[o,s]]=t,a=c(s*e,f),d=c(-n*e,f);let u=e-a*r-d*o,l=-a*n-d*s;const h=u<y,m=l<y;h&&(u=-u),m&&(l=-l);const p=(0,i.OG)(Math.ceil((0,i.dJ)(f)/2))+b;if(u<y||u>=p||l<y||l>=p)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:h,k1:u,k2neg:m,k2:l}}(e,l.basises,n.ORDER)}const k=(0,i.x)((e,t)=>{const{X:f,Y:n,Z:o}=e;if(r.eql(o,r.ONE))return{x:f,y:n};const i=e.is0();null==t&&(t=i?r.ONE:r.inv(o));const s=r.mul(f,t),a=r.mul(n,t),c=r.mul(o,t);if(i)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}),q=(0,i.x)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw new Error("bad point: ZERO")}const{x:f,y:n}=e.toAffine();if(!r.isValid(f)||!r.isValid(n))throw new Error("bad point: x or y not field elements");if(!O(f,n))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function A(e,t,f,n,o){return f=new F(r.mul(f.X,e),f.Y,f.Z),t=(0,s.u0)(n,t),f=(0,s.u0)(o,f),t.add(f)}class F{constructor(e,t,f){this.X=K("x",e),this.Y=K("y",t,!0),this.Z=K("z",f),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){const{x:t,y:f}=e||{};if(!e||!r.isValid(t)||!r.isValid(f))throw new Error("invalid affine point");if(e instanceof F)throw new Error("projective point not allowed");return r.is0(t)&&r.is0(f)?F.ZERO:new F(t,f,r.ONE)}static fromBytes(e){const t=F.fromAffine(x((0,i.eV)(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return F.fromBytes((0,i.qj)("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return _.createCache(this,e),t||this.multiply(p),this}assertValidity(){q(this)}hasEvenY(){const{y:e}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){V(e);const{X:t,Y:f,Z:n}=this,{X:o,Y:i,Z:s}=e,a=r.eql(r.mul(t,s),r.mul(o,n)),c=r.eql(r.mul(f,s),r.mul(i,n));return a&&c}negate(){return new F(this.X,r.neg(this.Y),this.Z)}double(){const{a:e,b:t}=a,f=r.mul(t,p),{X:n,Y:o,Z:i}=this;let s=r.ZERO,c=r.ZERO,d=r.ZERO,u=r.mul(n,n),l=r.mul(o,o),h=r.mul(i,i),y=r.mul(n,o);return y=r.add(y,y),d=r.mul(n,i),d=r.add(d,d),s=r.mul(e,d),c=r.mul(f,h),c=r.add(s,c),s=r.sub(l,c),c=r.add(l,c),c=r.mul(s,c),s=r.mul(y,s),d=r.mul(f,d),h=r.mul(e,h),y=r.sub(u,h),y=r.mul(e,y),y=r.add(y,d),d=r.add(u,u),u=r.add(d,u),u=r.add(u,h),u=r.mul(u,y),c=r.add(c,u),h=r.mul(o,i),h=r.add(h,h),u=r.mul(h,y),s=r.sub(s,u),d=r.mul(h,l),d=r.add(d,d),d=r.add(d,d),new F(s,c,d)}add(e){V(e);const{X:t,Y:f,Z:n}=this,{X:o,Y:i,Z:s}=e;let c=r.ZERO,d=r.ZERO,u=r.ZERO;const l=a.a,h=r.mul(a.b,p);let y=r.mul(t,o),b=r.mul(f,i),m=r.mul(n,s),g=r.add(t,f),w=r.add(o,i);g=r.mul(g,w),w=r.add(y,b),g=r.sub(g,w),w=r.add(t,n);let E=r.add(o,s);return w=r.mul(w,E),E=r.add(y,m),w=r.sub(w,E),E=r.add(f,n),c=r.add(i,s),E=r.mul(E,c),c=r.add(b,m),E=r.sub(E,c),u=r.mul(l,w),c=r.mul(h,m),u=r.add(c,u),c=r.sub(b,u),u=r.add(b,u),d=r.mul(c,u),b=r.add(y,y),b=r.add(b,y),m=r.mul(l,m),w=r.mul(h,w),b=r.add(b,m),m=r.sub(y,m),m=r.mul(l,m),w=r.add(w,m),y=r.mul(b,w),d=r.add(d,y),y=r.mul(E,w),c=r.mul(g,c),c=r.sub(c,y),y=r.mul(g,b),u=r.mul(E,u),u=r.add(u,y),new F(c,d,u)}subtract(e){return this.add(e.negate())}is0(){return this.equals(F.ZERO)}multiply(e){const{endo:f}=t;if(!n.isValidNot0(e))throw new Error("invalid scalar: out of range");let r,o;const i=e=>_.cached(this,e,e=>(0,s.Ak)(F,e));if(f){const{k1neg:t,k1:n,k2neg:s,k2:a}=P(e),{p:c,f:d}=i(n),{p:u,f:l}=i(a);o=d.add(l),r=A(f.beta,c,u,t,s)}else{const{p:t,f}=i(e);r=t,o=f}return(0,s.Ak)(F,[r,o])[0]}multiplyUnsafe(e){const{endo:f}=t,r=this;if(!n.isValid(e))throw new Error("invalid scalar: out of range");if(e===y||r.is0())return F.ZERO;if(e===b)return r;if(_.hasCache(this))return this.multiply(e);if(f){const{k1neg:t,k1:n,k2neg:o,k2:i}=P(e),{p1:a,p2:c}=(0,s.fH)(F,r,n,i);return A(f.beta,a,c,t,o)}return _.unsafe(r,e)}multiplyAndAddUnsafe(e,t,f){const r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(f));return r.is0()?void 0:r}toAffine(e){return k(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return d===b||(e?e(F,this):_.unsafe(this,u).is0())}clearCofactor(){const{clearCofactor:e}=t;return d===b?this:e?e(F,this):this.multiplyUnsafe(d)}isSmallOrder(){return this.multiplyUnsafe(d).is0()}toBytes(e=!0){return(0,i.d6)(e,"isCompressed"),this.assertValidity(),v(F,this,e)}toHex(e=!0){return(0,o.My)(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return(0,s.Ak)(F,e)}static msm(e,t){return(0,s.Xf)(F,n,e,t)}static fromPrivateKey(e){return F.BASE.multiply(w(n,e))}}F.BASE=new F(a.Gx,a.Gy,r.ONE),F.ZERO=new F(r.ZERO,r.ONE,r.ZERO),F.Fp=r,F.Fn=n;const Z=n.BITS,_=new s.hT(F,t.endo?Math.ceil(Z/2):Z);return F.BASE.precompute(8),F}(t,f),r,l))}function x(e,t){const f=t=>v({...e,hash:t});return{...f(t),create:f}}const S={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},O={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},R={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},I=(0,a.D0)(S.p),K=(0,a.D0)(O.p),V=(0,a.D0)(R.p),P=x({...S,Fp:I,lowS:!1},r.sc),k=x({...O,Fp:K,lowS:!1},r.qt),q=x({...R,Fp:V,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},r.Zf)}};
@@ -1 +0,0 @@
1
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
package/dist/649.index.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 649.index.js.LICENSE.txt */
2
- export const __webpack_esm_id__=649;export const __webpack_esm_ids__=[649];export const __webpack_esm_modules__={15916:(t,e,r)=>{r.d(e,{D0:()=>A,LH:()=>R,Tp:()=>F,dQ:()=>O,jr:()=>q,pS:()=>N,qy:()=>S,zH:()=>p,zi:()=>g});var n=r(78906),o=r(32531);const i=BigInt(0),s=BigInt(1),f=BigInt(2),u=BigInt(3),c=BigInt(4),l=BigInt(5),a=BigInt(7),d=BigInt(8),w=BigInt(9),h=BigInt(16);function g(t,e){const r=t%e;return r>=i?r:e+r}function p(t,e,r){let n=t;for(;e-- >i;)n*=n,n%=r;return n}function E(t,e){if(t===i)throw new Error("invert: expected non-zero number");if(e<=i)throw new Error("invert: expected positive modulus, got "+e);let r=g(t,e),n=e,o=i,f=s,u=s,c=i;for(;r!==i;){const t=n/r,e=n%r,i=o-u*t,s=f-c*t;n=r,r=e,o=u,f=c,u=i,c=s}if(n!==s)throw new Error("invert: does not exist");return g(o,e)}function m(t,e,r){if(!t.eql(t.sqr(e),r))throw new Error("Cannot find square root")}function b(t,e){const r=(t.ORDER+s)/c,n=t.pow(e,r);return m(t,n,e),n}function y(t,e){const r=(t.ORDER-l)/d,n=t.mul(e,f),o=t.pow(n,r),i=t.mul(e,o),s=t.mul(t.mul(i,f),o),u=t.mul(i,t.sub(s,t.ONE));return m(t,u,e),u}function v(t){if(t<u)throw new Error("sqrt is not defined for small field");let e=t-s,r=0;for(;e%f===i;)e/=f,r++;let n=f;const o=A(t);for(;1===x(o,n);)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===r)return b;let c=o.pow(n,e);const l=(e+s)/f;return function(t,n){if(t.is0(n))return n;if(1!==x(t,n))throw new Error("Cannot find square root");let o=r,i=t.mul(t.ONE,c),f=t.pow(n,e),u=t.pow(n,l);for(;!t.eql(f,t.ONE);){if(t.is0(f))return t.ZERO;let e=1,r=t.sqr(f);for(;!t.eql(r,t.ONE);)if(e++,r=t.sqr(r),e===o)throw new Error("Cannot find square root");const n=s<<BigInt(o-e-1),c=t.pow(i,n);o=e,i=t.sqr(c),f=t.mul(f,i),u=t.mul(u,c)}return u}}const O=(t,e)=>(g(t,e)&s)===s,B=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function q(t){const e=B.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n.DS)(t,e),t}function N(t,e,r=!1){const n=new Array(e.length).fill(r?t.ZERO:void 0),o=e.reduce((e,r,o)=>t.is0(r)?e:(n[o]=e,t.mul(e,r)),t.ONE),i=t.inv(o);return e.reduceRight((e,r,o)=>t.is0(r)?e:(n[o]=t.mul(e,n[o]),t.mul(e,r)),i),n}function x(t,e){const r=(t.ORDER-s)/f,n=t.pow(e,r),o=t.eql(n,t.ONE),i=t.eql(n,t.ZERO),u=t.eql(n,t.neg(t.ONE));if(!o&&!i&&!u)throw new Error("invalid Legendre symbol result");return o?1:i?0:-1}function R(t,e){void 0!==e&&(0,o.Fe)(e);const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function A(t,e,r=!1,o={}){if(t<=i)throw new Error("invalid field: expected ORDER > 0, got "+t);let f,p,O,B=!1;if("object"==typeof e&&null!=e){if(o.sqrt||r)throw new Error("cannot specify opts in two arguments");const t=e;t.BITS&&(f=t.BITS),t.sqrt&&(p=t.sqrt),"boolean"==typeof t.isLE&&(r=t.isLE),"boolean"==typeof t.modFromBytes&&(B=t.modFromBytes),O=t.allowedLengths}else"number"==typeof e&&(f=e),o.sqrt&&(p=o.sqrt);const{nBitLength:q,nByteLength:x}=R(t,f);if(x>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let I;const F=Object.freeze({ORDER:t,isLE:r,BITS:q,BYTES:x,MASK:(0,n.OG)(q),ZERO:i,ONE:s,allowedLengths:O,create:e=>g(e,t),isValid:e=>{if("bigint"!=typeof e)throw new Error("invalid field element: expected bigint, got "+typeof e);return i<=e&&e<t},is0:t=>t===i,isValidNot0:t=>!F.is0(t)&&F.isValid(t),isOdd:t=>(t&s)===s,neg:e=>g(-e,t),eql:(t,e)=>t===e,sqr:e=>g(e*e,t),add:(e,r)=>g(e+r,t),sub:(e,r)=>g(e-r,t),mul:(e,r)=>g(e*r,t),pow:(t,e)=>function(t,e,r){if(r<i)throw new Error("invalid exponent, negatives unsupported");if(r===i)return t.ONE;if(r===s)return e;let n=t.ONE,o=e;for(;r>i;)r&s&&(n=t.mul(n,o)),o=t.sqr(o),r>>=s;return n}(F,t,e),div:(e,r)=>g(e*E(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>E(e,t),sqrt:p||(e=>{return I||(I=(r=t)%c===u?b:r%d===l?y:r%h===w?function(t){const e=A(t),r=v(t),n=r(e,e.neg(e.ONE)),o=r(e,n),i=r(e,e.neg(n)),s=(t+a)/h;return(t,e)=>{let r=t.pow(e,s),f=t.mul(r,n);const u=t.mul(r,o),c=t.mul(r,i),l=t.eql(t.sqr(f),e),a=t.eql(t.sqr(u),e);r=t.cmov(r,f,l),f=t.cmov(c,u,a);const d=t.eql(t.sqr(f),e),w=t.cmov(r,f,d);return m(t,w,e),w}}(r):v(r)),I(F,e);var r}),toBytes:t=>r?(0,n.z)(t,x):(0,n.lq)(t,x),fromBytes:(e,o=!0)=>{if(O){if(!O.includes(e.length)||e.length>x)throw new Error("Field.fromBytes: expected "+O+" bytes, got "+e.length);const t=new Uint8Array(x);t.set(e,r?0:t.length-e.length),e=t}if(e.length!==x)throw new Error("Field.fromBytes: expected "+x+" bytes, got "+e.length);let i=r?(0,n.lX)(e):(0,n.Ph)(e);if(B&&(i=g(i,t)),!o&&!F.isValid(i))throw new Error("invalid field element: outside of range 0..ORDER");return i},invertBatch:t=>N(F,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(F)}function I(t){if("bigint"!=typeof t)throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function F(t){const e=I(t);return e+Math.ceil(e/2)}function S(t,e,r=!1){const o=t.length,i=I(e),f=F(e);if(o<16||o<f||o>1024)throw new Error("expected "+f+"-1024 bytes of input, got "+o);const u=g(r?(0,n.lX)(t):(0,n.Ph)(t),e-s)+s;return r?(0,n.z)(u,i):(0,n.lq)(u,i)}},50649:(t,e,r)=>{r.d(e,{Ak:()=>u,UT:()=>y,Xf:()=>m,fH:()=>E,hT:()=>p,u0:()=>f});var n=r(78906),o=r(15916);const i=BigInt(0),s=BigInt(1);function f(t,e){const r=e.negate();return t?r:e}function u(t,e){const r=(0,o.pS)(t.Fp,e.map(t=>t.Z));return e.map((e,n)=>t.fromAffine(e.toAffine(r[n])))}function c(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function l(t,e){c(t,e);const r=2**t;return{windows:Math.ceil(e/t)+1,windowSize:2**(t-1),mask:(0,n.OG)(t),maxNumber:r,shiftBy:BigInt(t)}}function a(t,e,r){const{windowSize:n,mask:o,maxNumber:i,shiftBy:f}=r;let u=Number(t&o),c=t>>f;u>n&&(u-=i,c+=s);const l=e*n;return{nextN:c,offset:l+Math.abs(u)-1,isZero:0===u,isNeg:u<0,isNegF:e%2!=0,offsetF:l}}const d=new WeakMap,w=new WeakMap;function h(t){return w.get(t)||1}function g(t){if(t!==i)throw new Error("invalid wNAF")}class p{constructor(t,e){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=e}_unsafeLadder(t,e,r=this.ZERO){let n=t;for(;e>i;)e&s&&(r=r.add(n)),n=n.double(),e>>=s;return r}precomputeWindow(t,e){const{windows:r,windowSize:n}=l(e,this.bits),o=[];let i=t,s=i;for(let t=0;t<r;t++){s=i,o.push(s);for(let t=1;t<n;t++)s=s.add(i),o.push(s);i=s.double()}return o}wNAF(t,e,r){if(!this.Fn.isValid(r))throw new Error("invalid scalar");let n=this.ZERO,o=this.BASE;const i=l(t,this.bits);for(let t=0;t<i.windows;t++){const{nextN:s,offset:u,isZero:c,isNeg:l,isNegF:d,offsetF:w}=a(r,t,i);r=s,c?o=o.add(f(d,e[w])):n=n.add(f(l,e[u]))}return g(r),{p:n,f:o}}wNAFUnsafe(t,e,r,n=this.ZERO){const o=l(t,this.bits);for(let t=0;t<o.windows&&r!==i;t++){const{nextN:i,offset:s,isZero:f,isNeg:u}=a(r,t,o);if(r=i,!f){const t=e[s];n=n.add(u?t.negate():t)}}return g(r),n}getPrecomputes(t,e,r){let n=d.get(e);return n||(n=this.precomputeWindow(e,t),1!==t&&("function"==typeof r&&(n=r(n)),d.set(e,n))),n}cached(t,e,r){const n=h(t);return this.wNAF(n,this.getPrecomputes(n,t,r),e)}unsafe(t,e,r,n){const o=h(t);return 1===o?this._unsafeLadder(t,e,n):this.wNAFUnsafe(o,this.getPrecomputes(o,t,r),e,n)}createCache(t,e){c(e,this.bits),w.set(t,e),d.delete(t)}hasCache(t){return 1!==h(t)}}function E(t,e,r,n){let o=e,f=t.ZERO,u=t.ZERO;for(;r>i||n>i;)r&s&&(f=f.add(o)),n&s&&(u=u.add(o)),o=o.double(),r>>=s,n>>=s;return{p1:f,p2:u}}function m(t,e,r,o){(function(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw new Error("invalid point at index "+r)})})(r,t),function(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw new Error("invalid scalar at index "+r)})}(o,e);const i=r.length,s=o.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const f=t.ZERO,u=(0,n.dJ)(BigInt(i));let c=1;u>12?c=u-3:u>4?c=u-2:u>0&&(c=2);const l=(0,n.OG)(c),a=new Array(Number(l)+1).fill(f);let d=f;for(let t=Math.floor((e.BITS-1)/c)*c;t>=0;t-=c){a.fill(f);for(let e=0;e<s;e++){const n=o[e],i=Number(n>>BigInt(t)&l);a[i]=a[i].add(r[e])}let e=f;for(let t=a.length-1,r=f;t>0;t--)r=r.add(a[t]),e=e.add(r);if(d=d.add(e),0!==t)for(let t=0;t<c;t++)d=d.double()}return d}function b(t,e,r){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,o.jr)(e),e}return(0,o.D0)(t,{isLE:r})}function y(t,e,r={},n){if(void 0===n&&(n="edwards"===t),!e||"object"!=typeof e)throw new Error(`expected valid ${t} CURVE object`);for(const t of["p","n","h"]){const r=e[t];if(!("bigint"==typeof r&&r>i))throw new Error(`CURVE.${t} must be positive bigint`)}const o=b(e.p,r.Fp,n),s=b(e.n,r.Fn,n),f=["Gx","Gy","a","weierstrass"===t?"b":"d"];for(const t of f)if(!o.isValid(e[t]))throw new Error(`CURVE.${t} must be valid field element of CURVE.Fp`);return{CURVE:e=Object.freeze(Object.assign({},e)),Fp:o,Fn:s}}},78906:(t,e,r)=>{r.d(e,{DS:()=>B,Mh:()=>E,OG:()=>v,Ph:()=>l,SJ:()=>q,aK:()=>b,d6:()=>s,dJ:()=>y,eV:()=>f,ex:()=>g,fg:()=>O,lX:()=>a,lq:()=>d,nC:()=>p,qj:()=>h,x:()=>N,z:()=>w,zW:()=>u});var n=r(32531);const o=BigInt(0),i=BigInt(1);function s(t,e=""){if("boolean"!=typeof t)throw new Error((e&&`"${e}"`)+"expected boolean, got type="+typeof t);return t}function f(t,e,r=""){const o=(0,n.aY)(t),i=t?.length,s=void 0!==e;if(!o||s&&i!==e)throw new Error((r&&`"${r}" `)+"expected Uint8Array"+(s?` of length ${e}`:"")+", got "+(o?`length=${i}`:"type="+typeof t));return t}function u(t){const e=t.toString(16);return 1&e.length?"0"+e:e}function c(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);return""===t?o:BigInt("0x"+t)}function l(t){return c((0,n.My)(t))}function a(t){return(0,n.DO)(t),c((0,n.My)(Uint8Array.from(t).reverse()))}function d(t,e){return(0,n.aT)(t.toString(16).padStart(2*e,"0"))}function w(t,e){return d(t,e).reverse()}function h(t,e,r){let o;if("string"==typeof e)try{o=(0,n.aT)(e)}catch(e){throw new Error(t+" must be hex string or Uint8Array, cause: "+e)}else{if(!(0,n.aY)(e))throw new Error(t+" must be hex string or Uint8Array");o=Uint8Array.from(e)}const i=o.length;if("number"==typeof r&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return o}function g(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r}function p(t){return Uint8Array.from(t)}function E(t){return Uint8Array.from(t,(e,r)=>{const n=e.charCodeAt(0);if(1!==e.length||n>127)throw new Error(`string contains non-ASCII character "${t[r]}" with code ${n} at position ${r}`);return n})}const m=t=>"bigint"==typeof t&&o<=t;function b(t,e,r,n){if(!function(t,e,r){return m(t)&&m(e)&&m(r)&&e<=t&&t<r}(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function y(t){let e;for(e=0;t>o;t>>=i,e+=1);return e}const v=t=>(i<<BigInt(t))-i;function O(t,e,r){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 r)throw new Error("hmacFn must be a function");const o=t=>new Uint8Array(t),i=t=>Uint8Array.of(t);let s=o(t),f=o(t),u=0;const c=()=>{s.fill(1),f.fill(0),u=0},l=(...t)=>r(f,s,...t),a=(t=o(0))=>{f=l(i(0),t),s=l(),0!==t.length&&(f=l(i(1),t),s=l())},d=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let t=0;const r=[];for(;t<e;){s=l();const e=s.slice();r.push(e),t+=s.length}return(0,n.Id)(...r)};return(t,e)=>{let r;for(c(),a(t);!(r=e(d()));)a();return c(),r}}function B(t,e,r={}){if(!t||"object"!=typeof t)throw new Error("expected valid options object");function n(e,r,n){const o=t[e];if(n&&void 0===o)return;const i=typeof o;if(i!==r||null===o)throw new Error(`param "${e}" is invalid: expected ${r}, got ${i}`)}Object.entries(e).forEach(([t,e])=>n(t,e,!1)),Object.entries(r).forEach(([t,e])=>n(t,e,!0))}const q=()=>{throw new Error("not implemented")};function N(t){const e=new WeakMap;return(r,...n)=>{const o=e.get(r);if(void 0!==o)return o;const i=t(r,...n);return e.set(r,i),i}}}};
@@ -1 +0,0 @@
1
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
package/dist/794.index.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 794.index.js.LICENSE.txt */
2
- export const __webpack_esm_id__=794;export const __webpack_esm_ids__=[794];export const __webpack_esm_modules__={26794:(f,t,e)=>{e.d(t,{ed448:()=>G});var s=e(79271),n=e(32531);const i=BigInt(0),o=BigInt(1),r=BigInt(2),c=BigInt(7),a=BigInt(256),h=BigInt(113),d=[],u=[],l=[];for(let f=0,t=o,e=1,s=0;f<24;f++){[e,s]=[s,(2*e+3*s)%5],d.push(2*(5*s+e)),u.push((f+1)*(f+2)/2%64);let n=i;for(let f=0;f<7;f++)t=(t<<o^(t>>c)*h)%a,t&r&&(n^=o<<(o<<BigInt(f))-o);l.push(n)}const p=(0,s.lD)(l,!0),B=p[0],g=p[1],I=(f,t,e)=>e>32?(0,s.WM)(f,t,e):(0,s.P5)(f,t,e),b=(f,t,e)=>e>32?(0,s.im)(f,t,e):(0,s.B4)(f,t,e);class w extends n.Vw{constructor(f,t,e,s=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=f,this.suffix=t,this.outputLen=e,this.enableXOF=s,this.rounds=i,(0,n.Fe)(e),!(0<f&&f<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,n.DH)(this.state)}clone(){return this._cloneInto()}keccak(){(0,n.fd)(this.state32),function(f,t=24){const e=new Uint32Array(10);for(let s=24-t;s<24;s++){for(let t=0;t<10;t++)e[t]=f[t]^f[t+10]^f[t+20]^f[t+30]^f[t+40];for(let t=0;t<10;t+=2){const s=(t+8)%10,n=(t+2)%10,i=e[n],o=e[n+1],r=I(i,o,1)^e[s],c=b(i,o,1)^e[s+1];for(let e=0;e<50;e+=10)f[t+e]^=r,f[t+e+1]^=c}let t=f[2],n=f[3];for(let e=0;e<24;e++){const s=u[e],i=I(t,n,s),o=b(t,n,s),r=d[e];t=f[r],n=f[r+1],f[r]=i,f[r+1]=o}for(let t=0;t<50;t+=10){for(let s=0;s<10;s++)e[s]=f[t+s];for(let s=0;s<10;s++)f[t+s]^=~e[(s+2)%10]&e[(s+4)%10]}f[0]^=B[s],f[1]^=g[s]}(0,n.uH)(e)}(this.state32,this.rounds),(0,n.fd)(this.state32),this.posOut=0,this.pos=0}update(f){(0,n.CC)(this),f=(0,n.ZJ)(f),(0,n.DO)(f);const{blockLen:t,state:e}=this,s=f.length;for(let n=0;n<s;){const i=Math.min(t-this.pos,s-n);for(let t=0;t<i;t++)e[this.pos++]^=f[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:f,suffix:t,pos:e,blockLen:s}=this;f[e]^=t,128&t&&e===s-1&&this.keccak(),f[s-1]^=128,this.keccak()}writeInto(f){(0,n.CC)(this,!1),(0,n.DO)(f),this.finish();const t=this.state,{blockLen:e}=this;for(let s=0,n=f.length;s<n;){this.posOut>=e&&this.keccak();const i=Math.min(e-this.posOut,n-s);f.set(t.subarray(this.posOut,this.posOut+i),s),this.posOut+=i,s+=i}return f}xofInto(f){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(f)}xof(f){return(0,n.Fe)(f),this.xofInto(new Uint8Array(f))}digestInto(f){if((0,n.Ht)(f,this),this.finished)throw new Error("digest() was already called");return this.writeInto(f),this.destroy(),f}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,n.uH)(this.state)}_cloneInto(f){const{blockLen:t,suffix:e,outputLen:s,rounds:n,enableXOF:i}=this;return f||(f=new w(t,e,s,i,n)),f.state32.set(this.state32),f.pos=this.pos,f.posOut=this.posOut,f.finished=this.finished,f.rounds=n,f.suffix=e,f.outputLen=s,f.enableXOF=i,f.destroyed=this.destroyed,f}}const x=(()=>{return f=31,t=136,e=32,(0,n.xS)((s={})=>new w(t,f,void 0===s.dkLen?e:s.dkLen,!0));var f,t,e})();var y=e(50649),O=e(26618),k=(e(7766),e(15916)),m=e(78906);const E={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x3fffffffffffffffffffffffffffffffffffffffffffffffffffffff7cca23e9c44edb49aed63690216cc2728dc58f552378c292ab5844f3"),h:BigInt(4),a:BigInt(1),d:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffff6756"),Gx:BigInt("0x4f1970c66bed0ded221d15a622bf36da9e146570470f1767ea6de324a3d3a46412ae1af72ab66511433b80e18b00938e2626a82bc70cc05e"),Gy:BigInt("0x693f46716eb6bc248876203756c9c7624bea73736ca3984087789c1e05a0c2d73ad3ff1ce67c39c4fdbd132c4ed7c8ad9808795bf230fa14")},_=Object.assign({},E,{d:BigInt("0xd78b4bdc7f0daf19f24f38c29373a2ccad46157242a50f37809b1da3412a12e79ccc9c81264cfe9ad080997058fb61c4243cc32dbaa156b9"),Gx:BigInt("0x79a70b2b70400553ae7c9df416c792c61128751ac92969240c25a07d728bdc93e21f7787ed6972249de732f38496cd11698713093e9c04fc"),Gy:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000001")}),H=(0,n.qj)(()=>x.create({dkLen:114})),z=BigInt(1),L=BigInt(2),D=BigInt(3),v=BigInt(4),F=BigInt(11),S=BigInt(22),R=BigInt(44),X=BigInt(88),A=BigInt(223);function T(f){return f[0]&=252,f[55]|=128,f[56]=0,f}function P(f,t){const e=E.p,s=(0,k.zi)(f*f*t,e),n=(0,k.zi)(s*f,e),i=function(f){const t=E.p,e=f*f*f%t,s=e*e*f%t,n=(0,k.zH)(s,D,t)*s%t,i=(0,k.zH)(n,D,t)*s%t,o=(0,k.zH)(i,L,t)*e%t,r=(0,k.zH)(o,F,t)*o%t,c=(0,k.zH)(r,S,t)*r%t,a=(0,k.zH)(c,R,t)*c%t,h=(0,k.zH)(a,X,t)*a%t,d=(0,k.zH)(h,R,t)*c%t,u=(0,k.zH)(d,L,t)*e%t,l=(0,k.zH)(u,z,t)*f%t;return(0,k.zH)(l,A,t)*u%t}((0,k.zi)(n*s*t,e)),o=(0,k.zi)(n*i,e),r=(0,k.zi)(o*o,e);return{isValid:(0,k.zi)(r*t,e)===f,value:o}}const U=(()=>(0,k.D0)(E.p,{BITS:456,isLE:!0}))(),j=(()=>(0,k.D0)(E.n,{BITS:456,isLE:!0}))(),q=(()=>(0,k.D0)(E.p,{BITS:448,isLE:!0}))(),C=(()=>(0,k.D0)(E.n,{BITS:448,isLE:!0}))();function Q(f,t,e){if(t.length>255)throw new Error("context must be smaller than 255, got: "+t.length);return(0,n.Id)((0,m.Mh)("SigEd448"),new Uint8Array([e?1:0,t.length]),t,f)}const Z=(()=>({...E,Fp:U,Fn:j,nBitLength:j.BITS,hash:H,adjustScalarBytes:T,domain:Q,uvRatio:P}))(),G=(0,O.n6)(Z);(0,O.TO)(_);const M=BigInt("39082"),V=BigInt("78163"),Y=BigInt("98944233647732219769177004876929019128417576295529901074099889598043702116001257856802131563896515373927712232092845883226922417596214"),J=BigInt("315019913931389607337177038330951043522456072897266928557328499619017160722351061360252776265186336876723201881398623946864393857820716"),W=f=>P(z,f);function K(f){const{d:t}=E,e=U.ORDER,s=f=>U.create(f),n=s(-f*f),i=s(t*(n-z)),o=s((i+z)*(i-n)),{isValid:r,value:c}=P(V,s((n+z)*o));let a=c;r||(a=s(f*c));let h=z;r||(h=s(-z));const d=s(a*(n+z));let u=d;(0,k.dQ)(d,e)&&(u=s(-d));const l=d*d,p=s(u*L),B=s(l+z),g=s(l-z),I=s(a*d*(n-z)*V+h);return new G.Point(s(p*I),s(g*B),s(B*I),s(p*g))}class N extends O.i5{constructor(f){super(f)}static fromAffine(f){return new N(G.Point.fromAffine(f))}assertSame(f){if(!(f instanceof N))throw new Error("DecafPoint expected")}init(f){return new N(f)}static hashToCurve(f){return function(f){(0,n.DO)(f,112);const t=!0,e=K(q.create(q.fromBytes(f.subarray(0,56),t))),s=K(q.create(q.fromBytes(f.subarray(56,112),t)));return new N(e.add(s))}((0,m.qj)("decafHash",f,112))}static fromBytes(f){(0,n.DO)(f,56);const{d:t}=E,e=U.ORDER,s=f=>q.create(f),i=q.fromBytes(f);if(!(0,m.ex)(C.toBytes(i),f)||(0,k.dQ)(i,e))throw new Error("invalid decaf448 encoding 1");const o=s(i*i),r=s(z+o),c=s(r*r),a=s(c-v*t*o),{isValid:h,value:d}=W(s(a*c));let u=s((i+i)*d*r*Y);(0,k.dQ)(u,e)&&(u=s(-u));const l=s(u*d*a*J),p=s((z-o)*d*r),B=s(l*p);if(!h)throw new Error("invalid decaf448 encoding 2");return new N(new G.Point(l,p,z,B))}static fromHex(f){return N.fromBytes((0,m.qj)("decafHex",f,56))}static msm(f,t){return(0,y.Xf)(N,j,f,t)}toBytes(){const{X:f,Z:t,T:e}=this.ep,s=U.ORDER,n=f=>U.create(f),i=n(n(f+e)*n(f-e)),o=n(f*f),{value:r}=W(n(i*M*o));let c=n(r*i*Y);(0,k.dQ)(c,s)&&(c=n(-c));const a=n(J*c*t-e);let h=n(M*r*f*a);return(0,k.dQ)(h,s)&&(h=n(-h)),C.toBytes(h)}equals(f){this.assertSame(f);const{X:t,Y:e}=this.ep,{X:s,Y:n}=f.ep;return U.create(t*n)===U.create(e*s)}is0(){return this.equals(N.ZERO)}}N.BASE=(()=>new N(G.Point.BASE).multiplyUnsafe(L))(),N.ZERO=(()=>new N(G.Point.ZERO))(),N.Fp=(()=>q)(),N.Fn=(()=>C)()}};
@@ -1 +0,0 @@
1
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */