shogun-button-react 6.0.6 → 6.0.7
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 +1 -1
- package/dist/120.index.js +0 -2
- package/dist/120.index.js.LICENSE.txt +0 -1
- package/dist/146.index.js +0 -1
- package/dist/307.index.js +0 -2
- package/dist/307.index.js.LICENSE.txt +0 -3
- package/dist/317.index.js +0 -2
- package/dist/317.index.js.LICENSE.txt +0 -1
- package/dist/355.index.js +0 -1
- package/dist/365.index.js +0 -2
- package/dist/365.index.js.LICENSE.txt +0 -7
- package/dist/56.index.js +0 -2
- package/dist/56.index.js.LICENSE.txt +0 -1
- package/dist/570.index.js +0 -2
- package/dist/570.index.js.LICENSE.txt +0 -1
- package/dist/873.index.js +0 -2
- package/dist/873.index.js.LICENSE.txt +0 -1
- package/dist/88.index.js +0 -2
- package/dist/88.index.js.LICENSE.txt +0 -1
- package/dist/909.index.js +0 -2
- package/dist/909.index.js.LICENSE.txt +0 -1
- package/dist/919.index.js +0 -1
- package/dist/index.mjs +0 -3
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/*! OpenPGP.js v6.2.2 - 2025-09-02 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
|
2
|
-
|
|
3
|
-
/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
|
|
4
|
-
|
|
5
|
-
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
6
|
-
|
|
7
|
-
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
package/dist/56.index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 56.index.js.LICENSE.txt */
|
|
2
|
-
"use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[56],{62056:(e,t,f)=>{f.d(t,{p256:()=>P,p384:()=>k,p521:()=>q});var r=f(69227),n=f(90181),o=f(56088),i=f(47693),s=f(47088),a=f(24949);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 j(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=j(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=j((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=j(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 j.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=>j.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(j.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 j.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):j.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,j=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/570.index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 570.index.js.LICENSE.txt */
|
|
2
|
-
"use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[570],{12570:(f,t,e)=>{e.d(t,{ed448:()=>M});var n=e(46008),s=e(56088);const i=BigInt(0),r=BigInt(1),o=BigInt(2),c=BigInt(7),a=BigInt(256),h=BigInt(113),d=[],u=[],l=[];for(let f=0,t=r,e=1,n=0;f<24;f++){[e,n]=[n,(2*e+3*n)%5],d.push(2*(5*n+e)),u.push((f+1)*(f+2)/2%64);let s=i;for(let f=0;f<7;f++)t=(t<<r^(t>>c)*h)%a,t&o&&(s^=r<<(r<<BigInt(f))-r);l.push(s)}const B=(0,n.lD)(l,!0),g=B[0],p=B[1],I=(f,t,e)=>e>32?(0,n.WM)(f,t,e):(0,n.P5)(f,t,e),b=(f,t,e)=>e>32?(0,n.im)(f,t,e):(0,n.B4)(f,t,e);class w extends s.Vw{constructor(f,t,e,n=!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=n,this.rounds=i,(0,s.Fe)(e),!(0<f&&f<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,s.DH)(this.state)}clone(){return this._cloneInto()}keccak(){(0,s.fd)(this.state32),function(f,t=24){const e=new Uint32Array(10);for(let n=24-t;n<24;n++){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 n=(t+8)%10,s=(t+2)%10,i=e[s],r=e[s+1],o=I(i,r,1)^e[n],c=b(i,r,1)^e[n+1];for(let e=0;e<50;e+=10)f[t+e]^=o,f[t+e+1]^=c}let t=f[2],s=f[3];for(let e=0;e<24;e++){const n=u[e],i=I(t,s,n),r=b(t,s,n),o=d[e];t=f[o],s=f[o+1],f[o]=i,f[o+1]=r}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)e[n]=f[t+n];for(let n=0;n<10;n++)f[t+n]^=~e[(n+2)%10]&e[(n+4)%10]}f[0]^=g[n],f[1]^=p[n]}(0,s.uH)(e)}(this.state32,this.rounds),(0,s.fd)(this.state32),this.posOut=0,this.pos=0}update(f){(0,s.CC)(this),f=(0,s.ZJ)(f),(0,s.DO)(f);const{blockLen:t,state:e}=this,n=f.length;for(let s=0;s<n;){const i=Math.min(t-this.pos,n-s);for(let t=0;t<i;t++)e[this.pos++]^=f[s++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:f,suffix:t,pos:e,blockLen:n}=this;f[e]^=t,128&t&&e===n-1&&this.keccak(),f[n-1]^=128,this.keccak()}writeInto(f){(0,s.CC)(this,!1),(0,s.DO)(f),this.finish();const t=this.state,{blockLen:e}=this;for(let n=0,s=f.length;n<s;){this.posOut>=e&&this.keccak();const i=Math.min(e-this.posOut,s-n);f.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=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,s.Fe)(f),this.xofInto(new Uint8Array(f))}digestInto(f){if((0,s.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,s.uH)(this.state)}_cloneInto(f){const{blockLen:t,suffix:e,outputLen:n,rounds:s,enableXOF:i}=this;return f||(f=new w(t,e,n,i,s)),f.state32.set(this.state32),f.pos=this.pos,f.posOut=this.posOut,f.finished=this.finished,f.rounds=s,f.suffix=e,f.outputLen=n,f.enableXOF=i,f.destroyed=this.destroyed,f}}const y=(()=>{return f=31,t=136,e=32,(0,s.xS)((n={})=>new w(t,f,void 0===n.dkLen?e:n.dkLen,!0));var f,t,e})();var O=e(47088),x=e(28835),k=(e(30851),e(24949)),E=e(47693);const m={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x3fffffffffffffffffffffffffffffffffffffffffffffffffffffff7cca23e9c44edb49aed63690216cc2728dc58f552378c292ab5844f3"),h:BigInt(4),a:BigInt(1),d:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffff6756"),Gx:BigInt("0x4f1970c66bed0ded221d15a622bf36da9e146570470f1767ea6de324a3d3a46412ae1af72ab66511433b80e18b00938e2626a82bc70cc05e"),Gy:BigInt("0x693f46716eb6bc248876203756c9c7624bea73736ca3984087789c1e05a0c2d73ad3ff1ce67c39c4fdbd132c4ed7c8ad9808795bf230fa14")},H=Object.assign({},m,{d:BigInt("0xd78b4bdc7f0daf19f24f38c29373a2ccad46157242a50f37809b1da3412a12e79ccc9c81264cfe9ad080997058fb61c4243cc32dbaa156b9"),Gx:BigInt("0x79a70b2b70400553ae7c9df416c792c61128751ac92969240c25a07d728bdc93e21f7787ed6972249de732f38496cd11698713093e9c04fc"),Gy:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000001")}),z=(0,s.qj)(()=>y.create({dkLen:114})),L=BigInt(1),D=BigInt(2),S=BigInt(3),v=BigInt(4),F=BigInt(11),R=BigInt(22),X=BigInt(44),A=BigInt(88),T=BigInt(223);function C(f){return f[0]&=252,f[55]|=128,f[56]=0,f}function P(f,t){const e=m.p,n=(0,k.zi)(f*f*t,e),s=(0,k.zi)(n*f,e),i=function(f){const t=m.p,e=f*f*f%t,n=e*e*f%t,s=(0,k.zH)(n,S,t)*n%t,i=(0,k.zH)(s,S,t)*n%t,r=(0,k.zH)(i,D,t)*e%t,o=(0,k.zH)(r,F,t)*r%t,c=(0,k.zH)(o,R,t)*o%t,a=(0,k.zH)(c,X,t)*c%t,h=(0,k.zH)(a,A,t)*a%t,d=(0,k.zH)(h,X,t)*c%t,u=(0,k.zH)(d,D,t)*e%t,l=(0,k.zH)(u,L,t)*f%t;return(0,k.zH)(l,T,t)*u%t}((0,k.zi)(s*n*t,e)),r=(0,k.zi)(s*i,e),o=(0,k.zi)(r*r,e);return{isValid:(0,k.zi)(o*t,e)===f,value:r}}const U=(()=>(0,k.D0)(m.p,{BITS:456,isLE:!0}))(),j=(()=>(0,k.D0)(m.n,{BITS:456,isLE:!0}))(),q=(()=>(0,k.D0)(m.p,{BITS:448,isLE:!0}))(),Q=(()=>(0,k.D0)(m.n,{BITS:448,isLE:!0}))();function Z(f,t,e){if(t.length>255)throw new Error("context must be smaller than 255, got: "+t.length);return(0,s.Id)((0,E.Mh)("SigEd448"),new Uint8Array([e?1:0,t.length]),t,f)}const G=(()=>({...m,Fp:U,Fn:j,nBitLength:j.BITS,hash:z,adjustScalarBytes:C,domain:Z,uvRatio:P}))(),M=(0,x.n6)(G);(0,x.TO)(H);const V=BigInt("39082"),Y=BigInt("78163"),_=BigInt("98944233647732219769177004876929019128417576295529901074099889598043702116001257856802131563896515373927712232092845883226922417596214"),J=BigInt("315019913931389607337177038330951043522456072897266928557328499619017160722351061360252776265186336876723201881398623946864393857820716"),W=f=>P(L,f);function K(f){const{d:t}=m,e=U.ORDER,n=f=>U.create(f),s=n(-f*f),i=n(t*(s-L)),r=n((i+L)*(i-s)),{isValid:o,value:c}=P(Y,n((s+L)*r));let a=c;o||(a=n(f*c));let h=L;o||(h=n(-L));const d=n(a*(s+L));let u=d;(0,k.dQ)(d,e)&&(u=n(-d));const l=d*d,B=n(u*D),g=n(l+L),p=n(l-L),I=n(a*d*(s-L)*Y+h);return new M.Point(n(B*I),n(p*g),n(g*I),n(B*p))}class N extends x.i5{constructor(f){super(f)}static fromAffine(f){return new N(M.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,s.DO)(f,112);const t=!0,e=K(q.create(q.fromBytes(f.subarray(0,56),t))),n=K(q.create(q.fromBytes(f.subarray(56,112),t)));return new N(e.add(n))}((0,E.qj)("decafHash",f,112))}static fromBytes(f){(0,s.DO)(f,56);const{d:t}=m,e=U.ORDER,n=f=>q.create(f),i=q.fromBytes(f);if(!(0,E.ex)(Q.toBytes(i),f)||(0,k.dQ)(i,e))throw new Error("invalid decaf448 encoding 1");const r=n(i*i),o=n(L+r),c=n(o*o),a=n(c-v*t*r),{isValid:h,value:d}=W(n(a*c));let u=n((i+i)*d*o*_);(0,k.dQ)(u,e)&&(u=n(-u));const l=n(u*d*a*J),B=n((L-r)*d*o),g=n(l*B);if(!h)throw new Error("invalid decaf448 encoding 2");return new N(new M.Point(l,B,L,g))}static fromHex(f){return N.fromBytes((0,E.qj)("decafHex",f,56))}static msm(f,t){return(0,O.Xf)(N,j,f,t)}toBytes(){const{X:f,Z:t,T:e}=this.ep,n=U.ORDER,s=f=>U.create(f),i=s(s(f+e)*s(f-e)),r=s(f*f),{value:o}=W(s(i*V*r));let c=s(o*i*_);(0,k.dQ)(c,n)&&(c=s(-c));const a=s(J*c*t-e);let h=s(V*o*f*a);return(0,k.dQ)(h,n)&&(h=s(-h)),Q.toBytes(h)}equals(f){this.assertSame(f);const{X:t,Y:e}=this.ep,{X:n,Y:s}=f.ep;return U.create(t*s)===U.create(e*n)}is0(){return this.equals(N.ZERO)}}N.BASE=(()=>new N(M.Point.BASE).multiplyUnsafe(D))(),N.ZERO=(()=>new N(M.Point.ZERO))(),N.Fp=(()=>q)(),N.Fn=(()=>Q)()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
package/dist/873.index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 873.index.js.LICENSE.txt */
|
|
2
|
-
"use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[873],{28835:(t,e,r)=>{r.d(e,{TO:()=>d,i5:()=>l,n6:()=>f});var n=r(47693),i=r(56088),s=r(47088),o=r(24949);const a=BigInt(0),u=BigInt(1),c=BigInt(2),h=BigInt(8);function d(t,e={}){const r=(0,s.UT)("edwards",t,e,e.FpFnLE),{Fp:o,Fn:d}=r;let l=r.CURVE;const{h:f}=l;(0,n.DS)(e,{},{uvRatio:"function"});const p=c<<BigInt(8*d.BYTES)-u,y=t=>o.create(t),m=e.uvRatio||((t,e)=>{try{return{isValid:!0,value:o.sqrt(o.div(t,e))}}catch(t){return{isValid:!1,value:a}}});if(!function(t,e,r,n){const i=t.sqr(r),s=t.sqr(n),o=t.add(t.mul(e.a,i),s),a=t.add(t.ONE,t.mul(e.d,t.mul(i,s)));return t.eql(o,a)}(o,l,l.Gx,l.Gy))throw new Error("bad curve params: generator point");function g(t,e,r=!1){const i=r?u:a;return(0,n.aK)("coordinate "+t,e,i,p),e}function w(t){if(!(t instanceof x))throw new Error("ExtendedPoint expected")}const B=(0,n.x)((t,e)=>{const{X:r,Y:n,Z:i}=t,s=t.is0();null==e&&(e=s?h:o.inv(i));const c=y(r*e),d=y(n*e),l=o.mul(i,e);if(s)return{x:a,y:u};if(l!==u)throw new Error("invZ was invalid");return{x:c,y:d}}),E=(0,n.x)(t=>{const{a:e,d:r}=l;if(t.is0())throw new Error("bad point: ZERO");const{X:n,Y:i,Z:s,T:o}=t,a=y(n*n),u=y(i*i),c=y(s*s),h=y(c*c),d=y(a*e);if(y(c*y(d+u))!==y(h+y(r*y(a*u))))throw new Error("bad point: equation left != right (1)");if(y(n*i)!==y(s*o))throw new Error("bad point: equation left != right (2)");return!0});class x{constructor(t,e,r,n){this.X=g("x",t),this.Y=g("y",e),this.Z=g("z",r,!0),this.T=g("t",n),Object.freeze(this)}static CURVE(){return l}static fromAffine(t){if(t instanceof x)throw new Error("extended point not allowed");const{x:e,y:r}=t||{};return g("x",e),g("y",r),new x(e,r,u,y(e*r))}static fromBytes(t,e=!1){const r=o.BYTES,{a:i,d:s}=l;t=(0,n.nC)((0,n.eV)(t,r,"point")),(0,n.d6)(e,"zip215");const c=(0,n.nC)(t),h=t[r-1];c[r-1]=-129&h;const d=(0,n.lX)(c),f=e?p:o.ORDER;(0,n.aK)("point.y",d,a,f);const g=y(d*d),w=y(g-u),B=y(s*g-i);let{isValid:E,value:S}=m(w,B);if(!E)throw new Error("bad point: invalid y coordinate");const v=(S&u)===u,b=!!(128&h);if(!e&&S===a&&b)throw new Error("bad point: x=0 and x_0=1");return b!==v&&(S=y(-S)),x.fromAffine({x:S,y:d})}static fromHex(t,e=!1){return x.fromBytes((0,n.qj)("point",t),e)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(t=8,e=!0){return S.createCache(this,t),e||this.multiply(c),this}assertValidity(){E(this)}equals(t){w(t);const{X:e,Y:r,Z:n}=this,{X:i,Y:s,Z:o}=t,a=y(e*o),u=y(i*n),c=y(r*o),h=y(s*n);return a===u&&c===h}is0(){return this.equals(x.ZERO)}negate(){return new x(y(-this.X),this.Y,this.Z,y(-this.T))}double(){const{a:t}=l,{X:e,Y:r,Z:n}=this,i=y(e*e),s=y(r*r),o=y(c*y(n*n)),a=y(t*i),u=e+r,h=y(y(u*u)-i-s),d=a+s,f=d-o,p=a-s,m=y(h*f),g=y(d*p),w=y(h*p),B=y(f*d);return new x(m,g,B,w)}add(t){w(t);const{a:e,d:r}=l,{X:n,Y:i,Z:s,T:o}=this,{X:a,Y:u,Z:c,T:h}=t,d=y(n*a),f=y(i*u),p=y(o*r*h),m=y(s*c),g=y((n+i)*(a+u)-d-f),B=m-p,E=m+p,S=y(f-e*d),v=y(g*B),b=y(E*S),A=y(g*S),T=y(B*E);return new x(v,b,T,A)}subtract(t){return this.add(t.negate())}multiply(t){if(!d.isValidNot0(t))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:e,f:r}=S.cached(this,t,t=>(0,s.Ak)(x,t));return(0,s.Ak)(x,[e,r])[0]}multiplyUnsafe(t,e=x.ZERO){if(!d.isValid(t))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return t===a?x.ZERO:this.is0()||t===u?this:S.unsafe(this,t,t=>(0,s.Ak)(x,t),e)}isSmallOrder(){return this.multiplyUnsafe(f).is0()}isTorsionFree(){return S.unsafe(this,l.n).is0()}toAffine(t){return B(this,t)}clearCofactor(){return f===u?this:this.multiplyUnsafe(f)}toBytes(){const{x:t,y:e}=this.toAffine(),r=o.toBytes(e);return r[r.length-1]|=t&u?128:0,r}toHex(){return(0,i.My)(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(t){return(0,s.Ak)(x,t)}static msm(t,e){return(0,s.Xf)(x,d,t,e)}_setWindowSize(t){this.precompute(t)}toRawBytes(){return this.toBytes()}}x.BASE=new x(l.Gx,l.Gy,u,y(l.Gx*l.Gy)),x.ZERO=new x(a,u,u,a),x.Fp=o,x.Fn=d;const S=new s.hT(x,d.BITS);return x.BASE.precompute(8),x}class l{constructor(t){this.ep=t}static fromBytes(t){(0,n.SJ)()}static fromHex(t){(0,n.SJ)()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(t){return this.ep.toAffine(t)}toHex(){return(0,i.My)(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(t){return this.assertSame(t),this.init(this.ep.add(t.ep))}subtract(t){return this.assertSame(t),this.init(this.ep.subtract(t.ep))}multiply(t){return this.init(this.ep.multiply(t))}multiplyUnsafe(t){return this.init(this.ep.multiplyUnsafe(t))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(t,e){return this.init(this.ep.precompute(t,e))}toRawBytes(){return this.toBytes()}}function f(t){const{CURVE:e,curveOpts:r,hash:s,eddsaOpts:a}=function(t){const e={a:t.a,d:t.d,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r={Fp:t.Fp,Fn:(0,o.D0)(e.n,t.nBitLength,!0),uvRatio:t.uvRatio},n={randomBytes:t.randomBytes,adjustScalarBytes:t.adjustScalarBytes,domain:t.domain,prehash:t.prehash,mapToCurve:t.mapToCurve};return{CURVE:e,curveOpts:r,hash:t.hash,eddsaOpts:n}}(t);return function(t,e){const r=e.Point;return Object.assign({},e,{ExtendedPoint:r,CURVE:t,nBitLength:r.Fn.BITS,nByteLength:r.Fn.BYTES})}(t,function(t,e,r={}){if("function"!=typeof e)throw new Error('"hash" function param is required');(0,n.DS)(r,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:s}=r,{BASE:o,Fp:a,Fn:c}=t,h=r.randomBytes||i.po,d=r.adjustScalarBytes||(t=>t),l=r.domain||((t,e,r)=>{if((0,n.d6)(r,"phflag"),e.length||r)throw new Error("Contexts/pre-hash are not supported");return t});function f(t){return c.create((0,n.lX)(t))}function p(t){const{head:r,prefix:i,scalar:s}=function(t){const r=B.secretKey;t=(0,n.qj)("private key",t,r);const i=(0,n.qj)("hashed private key",e(t),2*r),s=d(i.slice(0,r));return{head:s,prefix:i.slice(r,2*r),scalar:f(s)}}(t),a=o.multiply(s),u=a.toBytes();return{head:r,prefix:i,scalar:s,point:a,pointBytes:u}}function y(t){return p(t).pointBytes}function m(t=Uint8Array.of(),...r){const o=(0,i.Id)(...r);return f(e(l(o,(0,n.qj)("context",t),!!s)))}const g={zip215:!0},w=a.BYTES,B={secretKey:w,publicKey:w,signature:2*w,seed:w};function E(t=h(B.seed)){return(0,n.eV)(t,B.seed,"seed")}const x={getExtendedPublicKey:p,randomSecretKey:E,isValidSecretKey:function(t){return(0,i.aY)(t)&&t.length===c.BYTES},isValidPublicKey:function(e,r){try{return!!t.fromBytes(e,r)}catch(t){return!1}},toMontgomery(e){const{y:r}=t.fromBytes(e),n=B.publicKey,i=32===n;if(!i&&57!==n)throw new Error("only defined for 25519 and 448");const s=i?a.div(u+r,u-r):a.div(r-u,r+u);return a.toBytes(s)},toMontgomerySecret(t){const r=B.secretKey;(0,n.eV)(t,r);const i=e(t.subarray(0,r));return d(i).subarray(0,r)},randomPrivateKey:E,precompute:(e=8,r=t.BASE)=>r.precompute(e,!1)};return Object.freeze({keygen:function(t){const e=x.randomSecretKey(t);return{secretKey:e,publicKey:y(e)}},getPublicKey:y,sign:function(t,e,r={}){t=(0,n.qj)("message",t),s&&(t=s(t));const{prefix:a,scalar:u,pointBytes:h}=p(e),d=m(r.context,a,t),l=o.multiply(d).toBytes(),f=m(r.context,l,h,t),y=c.create(d+f*u);if(!c.isValid(y))throw new Error("sign failed: invalid s");const g=(0,i.Id)(l,c.toBytes(y));return(0,n.eV)(g,B.signature,"result")},verify:function(e,r,i,a=g){const{context:u,zip215:c}=a,h=B.signature;e=(0,n.qj)("signature",e,h),r=(0,n.qj)("message",r),i=(0,n.qj)("publicKey",i,B.publicKey),void 0!==c&&(0,n.d6)(c,"zip215"),s&&(r=s(r));const d=h/2,l=e.subarray(0,d),f=(0,n.lX)(e.subarray(d,h));let p,y,w;try{p=t.fromBytes(i,c),y=t.fromBytes(l,c),w=o.multiplyUnsafe(f)}catch(t){return!1}if(!c&&p.isSmallOrder())return!1;const E=m(u,y.toBytes(),p.toBytes(),r);return y.add(p.multiplyUnsafe(E)).subtract(w).clearCofactor().is0()},utils:x,Point:t,lengths:B})}(d(e,r),s,a))}},30851:(t,e,r)=>{r.d(e,{Tq:()=>u,qX:()=>h,zc:()=>c});var n=r(56088);function i(t,e){if(o(t),o(e),t<0||t>=1<<8*e)throw new Error("invalid I2OSP input: "+t);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=255&t,t>>>=8;return new Uint8Array(r)}function s(t,e){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function o(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function a(t){if(!(0,n.aY)(t)&&"string"!=typeof t)throw new Error("DST must be Uint8Array or string");return"string"==typeof t?(0,n.AI)(t):t}function u(t,e,r,u){(0,n.DO)(t),o(r),(e=a(e)).length>255&&(e=u((0,n.Id)((0,n.AI)("H2C-OVERSIZE-DST-"),e)));const{outputLen:c,blockLen:h}=u,d=Math.ceil(r/c);if(r>65535||d>255)throw new Error("expand_message_xmd: invalid lenInBytes");const l=(0,n.Id)(e,i(e.length,1)),f=i(0,h),p=i(r,2),y=new Array(d),m=u((0,n.Id)(f,t,p,i(0,1),l));y[0]=u((0,n.Id)(m,i(1,1),l));for(let t=1;t<=d;t++){const e=[s(m,y[t-1]),i(t+1,1),l];y[t]=u((0,n.Id)(...e))}return(0,n.Id)(...y).slice(0,r)}function c(t,e,r,s,u){if((0,n.DO)(t),o(r),(e=a(e)).length>255){const t=Math.ceil(2*s/8);e=u.create({dkLen:t}).update((0,n.AI)("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return u.create({dkLen:r}).update(t).update(i(r,2)).update(e).update(i(e.length,1)).digest()}const h=(0,n.AI)("HashToScalar-")}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
package/dist/88.index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 88.index.js.LICENSE.txt */
|
|
2
|
-
"use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[88],{24949:(t,e,r)=>{r.d(e,{D0:()=>A,LH:()=>x,Tp:()=>S,dQ:()=>B,jr:()=>q,pS:()=>R,qy:()=>F,zH:()=>p,zi:()=>g});var n=r(47693),o=r(56088);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),h=BigInt(9),w=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===N(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!==N(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 B=(t,e)=>(g(t,e)&s)===s,O=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function q(t){const e=O.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n.DS)(t,e),t}function R(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 N(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 x(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,B,O=!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&&(O=t.modFromBytes),B=t.allowedLengths}else"number"==typeof e&&(f=e),o.sqrt&&(p=o.sqrt);const{nBitLength:q,nByteLength:N}=x(t,f);if(N>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let I;const S=Object.freeze({ORDER:t,isLE:r,BITS:q,BYTES:N,MASK:(0,n.OG)(q),ZERO:i,ONE:s,allowedLengths:B,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=>!S.is0(t)&&S.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}(S,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%w===h?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)/w;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),h=t.cmov(r,f,d);return m(t,h,e),h}}(r):v(r)),I(S,e);var r}),toBytes:t=>r?(0,n.z)(t,N):(0,n.lq)(t,N),fromBytes:(e,o=!0)=>{if(B){if(!B.includes(e.length)||e.length>N)throw new Error("Field.fromBytes: expected "+B+" bytes, got "+e.length);const t=new Uint8Array(N);t.set(e,r?0:t.length-e.length),e=t}if(e.length!==N)throw new Error("Field.fromBytes: expected "+N+" bytes, got "+e.length);let i=r?(0,n.lX)(e):(0,n.Ph)(e);if(O&&(i=g(i,t)),!o&&!S.isValid(i))throw new Error("invalid field element: outside of range 0..ORDER");return i},invertBatch:t=>R(S,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(S)}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 S(t){const e=I(t);return e+Math.ceil(e/2)}function F(t,e,r=!1){const o=t.length,i=I(e),f=S(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)}},47088:(t,e,r)=>{r.d(e,{Ak:()=>u,UT:()=>y,Xf:()=>m,fH:()=>E,hT:()=>p,u0:()=>f});var n=r(47693),o=r(24949);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,h=new WeakMap;function w(t){return h.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:h}=a(r,t,i);r=s,c?o=o.add(f(d,e[h])):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=w(t);return this.wNAF(n,this.getPrecomputes(n,t,r),e)}unsafe(t,e,r,n){const o=w(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),h.set(t,e),d.delete(t)}hasCache(t){return 1!==w(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}}},47693:(t,e,r)=>{r.d(e,{DS:()=>O,Mh:()=>E,OG:()=>v,Ph:()=>l,SJ:()=>q,aK:()=>b,d6:()=>s,dJ:()=>y,eV:()=>f,ex:()=>g,fg:()=>B,lX:()=>a,lq:()=>d,nC:()=>p,qj:()=>w,x:()=>R,z:()=>h,zW:()=>u});var n=r(56088);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 h(t,e){return d(t,e).reverse()}function w(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 B(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 O(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 R(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/909.index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 909.index.js.LICENSE.txt */
|
|
2
|
-
"use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[909],{75909:(f,t,n)=>{n.d(t,{ed25519:()=>E});var e=n(69227),i=n(56088),r=n(47088),s=n(28835),o=(n(30851),n(24949)),c=n(47693);const a=BigInt(0),d=BigInt(1),u=BigInt(2),B=(BigInt(3),BigInt(5)),g=BigInt(8),l=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),I=(()=>({p:l,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:g,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}))();function h(f){return f[0]&=248,f[31]&=127,f[31]|=64,f}const w=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function z(f,t){const n=l,e=(0,o.zi)(t*t*t,n),i=function(f){const t=BigInt(10),n=BigInt(20),e=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,I=(0,o.zH)(g,t,r)*g%r,h=(0,o.zH)(I,n,r)*I%r,w=(0,o.zH)(h,e,r)*h%r,z=(0,o.zH)(w,i,r)*w%r,p=(0,o.zH)(z,i,r)*w%r,x=(0,o.zH)(p,t,r)*g%r;return{pow_p_5_8:(0,o.zH)(x,u,r)*f%r,b2:s}}(f*(0,o.zi)(e*e*t,n)).pow_p_5_8;let r=(0,o.zi)(f*e*i,n);const s=(0,o.zi)(t*r*r,n),c=r,a=(0,o.zi)(r*w,n),g=s===f,I=s===(0,o.zi)(-f,n),h=s===(0,o.zi)(-f*w,n);return g&&(r=c),(I||h)&&(r=a),(0,o.dQ)(r,n)&&(r=(0,o.zi)(-r,n)),{isValid:g||I,value:r}}const p=(()=>(0,o.D0)(I.p,{isLE:!0}))(),x=(()=>(0,o.D0)(I.n,{isLE:!0}))(),H=(()=>({...I,Fp:p,hash:e.Zf,adjustScalarBytes:h,uvRatio:z}))(),E=(()=>(0,s.n6)(H))(),b=w,m=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),v=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),y=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),P=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),Q=f=>z(d,f),R=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),S=f=>E.Point.Fp.create((0,c.lX)(f)&R);function _(f){const{d:t}=I,n=l,e=f=>p.create(f),i=e(b*f*f),r=e((i+d)*y);let s=BigInt(-1);const c=e((s-t*i)*e(i+t));let{isValid:a,value:u}=z(r,c),B=e(u*f);(0,o.dQ)(B,n)||(B=e(-B)),a||(u=B),a||(s=i);const g=e(s*(i-d)*P-c),h=u*u,w=e((u+u)*c),x=e(g*m),H=e(d-h),v=e(d+h);return new E.Point(e(w*v),e(H*x),e(x*v),e(w*H))}class F extends s.i5{constructor(f){super(f)}static fromAffine(f){return new F(E.Point.fromAffine(f))}assertSame(f){if(!(f instanceof F))throw new Error("RistrettoPoint expected")}init(f){return new F(f)}static hashToCurve(f){return function(f){(0,i.DO)(f,64);const t=_(S(f.subarray(0,32))),n=_(S(f.subarray(32,64)));return new F(t.add(n))}((0,c.qj)("ristrettoHash",f,64))}static fromBytes(f){(0,i.DO)(f,32);const{a:t,d:n}=I,e=l,r=f=>p.create(f),s=S(f);if(!(0,c.ex)(p.toBytes(s),f)||(0,o.dQ)(s,e))throw new Error("invalid ristretto255 encoding 1");const u=r(s*s),B=r(d+t*u),g=r(d-t*u),h=r(B*B),w=r(g*g),z=r(t*n*h-w),{isValid:x,value:H}=Q(r(z*w)),b=r(H*g),m=r(H*b*z);let v=r((s+s)*b);(0,o.dQ)(v,e)&&(v=r(-v));const y=r(B*m),P=r(v*y);if(!x||(0,o.dQ)(P,e)||y===a)throw new Error("invalid ristretto255 encoding 2");return new F(new E.Point(v,y,d,P))}static fromHex(f){return F.fromBytes((0,c.qj)("ristrettoHex",f,32))}static msm(f,t){return(0,r.Xf)(F,E.Point.Fn,f,t)}toBytes(){let{X:f,Y:t,Z:n,T:e}=this.ep;const i=l,r=f=>p.create(f),s=r(r(n+t)*r(n-t)),c=r(f*t),a=r(c*c),{value:d}=Q(r(s*a)),u=r(d*s),B=r(d*c),g=r(u*B*e);let I;if((0,o.dQ)(e*g,i)){let n=r(t*b),e=r(f*b);f=n,t=e,I=r(u*v)}else I=B;(0,o.dQ)(f*g,i)&&(t=r(-t));let h=r((n-t)*I);return(0,o.dQ)(h,i)&&(h=r(-h)),p.toBytes(h)}equals(f){this.assertSame(f);const{X:t,Y:n}=this.ep,{X:e,Y:i}=f.ep,r=f=>p.create(f),s=r(t*i)===r(n*e),o=r(n*i)===r(t*e);return s||o}is0(){return this.equals(F.ZERO)}}F.BASE=(()=>new F(E.Point.BASE))(),F.ZERO=(()=>new F(E.Point.ZERO))(),F.Fp=(()=>p)(),F.Fn=(()=>x)()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
package/dist/919.index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[919],{36919:(t,e,n)=>{n.d(e,{chacha20poly1305:()=>v});var r=n(89253);const o=t=>Uint8Array.from(t.split(""),t=>t.charCodeAt(0)),s=o("expand 16-byte k"),i=o("expand 32-byte k"),h=(0,r.DH)(s),u=(0,r.DH)(i);function c(t,e){return t<<e|t>>>32-e}function a(t){return t.byteOffset%4==0}const l=2**32-1,f=Uint32Array.of();function d(t,e){const{allowShortKeys:n,extendNonceFn:o,counterLength:s,counterRight:i,rounds:c}=(0,r.tY)({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if("function"!=typeof t)throw new Error("core must be a function");return(0,r.Fe)(s),(0,r.Fe)(c),(0,r.e8)(i),(0,r.e8)(n),(e,d,p,y,w=0)=>{(0,r.DO)(e,void 0,"key"),(0,r.DO)(d,void 0,"nonce"),(0,r.DO)(p,void 0,"data");const g=p.length;if(void 0===y&&(y=new Uint8Array(g)),(0,r.DO)(y,void 0,"output"),(0,r.Fe)(w),w<0||w>=l)throw new Error("arx: counter overflow");if(y.length<g)throw new Error(`arx: output (${y.length}) is shorter than data (${g})`);const b=[];let A,D,k=e.length;if(32===k)b.push(A=(0,r.nC)(e)),D=u;else{if(16!==k||!n)throw(0,r.DO)(e,32,"arx key"),new Error("invalid key size");A=new Uint8Array(32),A.set(e),A.set(e,16),D=h,b.push(A)}a(d)||b.push(d=(0,r.nC)(d));const H=(0,r.DH)(A);if(o){if(24!==d.length)throw new Error("arx: extended nonce must be 24 bytes");o(D,H,(0,r.DH)(d.subarray(0,16)),H),d=d.subarray(16)}const L=16-s;if(L!==d.length)throw new Error(`arx: nonce must be ${L} or 16 bytes`);if(12!==L){const t=new Uint8Array(12);t.set(d,i?0:12-d.length),d=t,b.push(d)}const U=(0,r.DH)(d);return function(t,e,n,o,s,i,h,u){const c=s.length,d=new Uint8Array(64),p=(0,r.DH)(d),y=a(s)&&a(i),w=y?(0,r.DH)(s):f,g=y?(0,r.DH)(i):f;for(let r=0;r<c;h++){if(t(e,n,o,p,h,u),h>=l)throw new Error("arx: counter overflow");const a=Math.min(64,c-r);if(y&&64===a){const t=r/4;if(r%4!=0)throw new Error("arx: invalid block position");for(let e,n=0;n<16;n++)e=t+n,g[e]=w[e]^p[n];r+=64;continue}for(let t,e=0;e<a;e++)t=r+e,i[t]=s[t]^d[e];r+=a}}(t,D,H,U,p,y,w,c),(0,r.uH)(...b),y}}function p(t,e){return 255&t[e++]|(255&t[e++])<<8}class y{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor(t){const e=p(t=(0,r.nC)((0,r.DO)(t,32,"key")),0),n=p(t,2),o=p(t,4),s=p(t,6),i=p(t,8),h=p(t,10),u=p(t,12),c=p(t,14);this.r[0]=8191&e,this.r[1]=8191&(e>>>13|n<<3),this.r[2]=7939&(n>>>10|o<<6),this.r[3]=8191&(o>>>7|s<<9),this.r[4]=255&(s>>>4|i<<12),this.r[5]=i>>>1&8190,this.r[6]=8191&(i>>>14|h<<2),this.r[7]=8065&(h>>>11|u<<5),this.r[8]=8191&(u>>>8|c<<8),this.r[9]=c>>>5&127;for(let e=0;e<8;e++)this.pad[e]=p(t,16+2*e)}process(t,e,n=!1){const r=n?0:2048,{h:o,r:s}=this,i=s[0],h=s[1],u=s[2],c=s[3],a=s[4],l=s[5],f=s[6],d=s[7],y=s[8],w=s[9],g=p(t,e+0),b=p(t,e+2),A=p(t,e+4),D=p(t,e+6),k=p(t,e+8),H=p(t,e+10),L=p(t,e+12),U=p(t,e+14);let v=o[0]+(8191&g),x=o[1]+(8191&(g>>>13|b<<3)),C=o[2]+(8191&(b>>>10|A<<6)),E=o[3]+(8191&(A>>>7|D<<9)),O=o[4]+(8191&(D>>>4|k<<12)),S=o[5]+(k>>>1&8191),m=o[6]+(8191&(k>>>14|H<<2)),R=o[7]+(8191&(H>>>11|L<<5)),F=o[8]+(8191&(L>>>8|U<<8)),$=o[9]+(U>>>5|r),z=0,K=z+v*i+x*(5*w)+C*(5*y)+E*(5*d)+O*(5*f);z=K>>>13,K&=8191,K+=S*(5*l)+m*(5*a)+R*(5*c)+F*(5*u)+$*(5*h),z+=K>>>13,K&=8191;let N=z+v*h+x*i+C*(5*w)+E*(5*y)+O*(5*d);z=N>>>13,N&=8191,N+=S*(5*f)+m*(5*l)+R*(5*a)+F*(5*c)+$*(5*u),z+=N>>>13,N&=8191;let B=z+v*u+x*h+C*i+E*(5*w)+O*(5*y);z=B>>>13,B&=8191,B+=S*(5*d)+m*(5*f)+R*(5*l)+F*(5*a)+$*(5*c),z+=B>>>13,B&=8191;let I=z+v*c+x*u+C*h+E*i+O*(5*w);z=I>>>13,I&=8191,I+=S*(5*y)+m*(5*d)+R*(5*f)+F*(5*l)+$*(5*a),z+=I>>>13,I&=8191;let M=z+v*a+x*c+C*u+E*h+O*i;z=M>>>13,M&=8191,M+=S*(5*w)+m*(5*y)+R*(5*d)+F*(5*f)+$*(5*l),z+=M>>>13,M&=8191;let q=z+v*l+x*a+C*c+E*u+O*h;z=q>>>13,q&=8191,q+=S*i+m*(5*w)+R*(5*y)+F*(5*d)+$*(5*f),z+=q>>>13,q&=8191;let P=z+v*f+x*l+C*a+E*c+O*u;z=P>>>13,P&=8191,P+=S*h+m*i+R*(5*w)+F*(5*y)+$*(5*d),z+=P>>>13,P&=8191;let Y=z+v*d+x*f+C*l+E*a+O*c;z=Y>>>13,Y&=8191,Y+=S*u+m*h+R*i+F*(5*w)+$*(5*y),z+=Y>>>13,Y&=8191;let j=z+v*y+x*d+C*f+E*l+O*a;z=j>>>13,j&=8191,j+=S*c+m*u+R*h+F*i+$*(5*w),z+=j>>>13,j&=8191;let G=z+v*w+x*y+C*d+E*f+O*l;z=G>>>13,G&=8191,G+=S*a+m*c+R*u+F*h+$*i,z+=G>>>13,G&=8191,z=(z<<2)+z|0,z=z+K|0,K=8191&z,z>>>=13,N+=z,o[0]=K,o[1]=N,o[2]=B,o[3]=I,o[4]=M,o[5]=q,o[6]=P,o[7]=Y,o[8]=j,o[9]=G}finalize(){const{h:t,pad:e}=this,n=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let e=2;e<10;e++)t[e]+=o,o=t[e]>>>13,t[e]&=8191;t[0]+=5*o,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,n[0]=t[0]+5,o=n[0]>>>13,n[0]&=8191;for(let e=1;e<10;e++)n[e]=t[e]+o,o=n[e]>>>13,n[e]&=8191;n[9]-=8192;let s=(1^o)-1;for(let t=0;t<10;t++)n[t]&=s;s=~s;for(let e=0;e<10;e++)t[e]=t[e]&s|n[e];t[0]=65535&(t[0]|t[1]<<13),t[1]=65535&(t[1]>>>3|t[2]<<10),t[2]=65535&(t[2]>>>6|t[3]<<7),t[3]=65535&(t[3]>>>9|t[4]<<4),t[4]=65535&(t[4]>>>12|t[5]<<1|t[6]<<14),t[5]=65535&(t[6]>>>2|t[7]<<11),t[6]=65535&(t[7]>>>5|t[8]<<8),t[7]=65535&(t[8]>>>8|t[9]<<5);let i=t[0]+e[0];t[0]=65535&i;for(let n=1;n<8;n++)i=(t[n]+e[n]|0)+(i>>>16)|0,t[n]=65535&i;(0,r.uH)(n)}update(t){(0,r.CC)(this),(0,r.DO)(t),t=(0,r.nC)(t);const{buffer:e,blockLen:n}=this,o=t.length;for(let r=0;r<o;){const s=Math.min(n-this.pos,o-r);if(s!==n)e.set(t.subarray(r,r+s),this.pos),this.pos+=s,r+=s,this.pos===n&&(this.process(e,0,!1),this.pos=0);else for(;n<=o-r;r+=n)this.process(t,r)}return this}destroy(){(0,r.uH)(this.h,this.r,this.buffer,this.pad)}digestInto(t){(0,r.CC)(this),(0,r.Ht)(t,this),this.finished=!0;const{buffer:e,h:n}=this;let{pos:o}=this;if(o){for(e[o++]=1;o<16;o++)e[o]=0;this.process(e,0,!0)}this.finalize();let s=0;for(let e=0;e<8;e++)t[s++]=n[e]>>>0,t[s++]=n[e]>>>8;return t}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}}const w=(()=>function(t){const e=(e,n)=>t(n).update(e).digest(),n=t(new Uint8Array(32));return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=e=>t(e),e}(t=>new y(t)))();function g(t,e,n,r,o,s=20){let i=t[0],h=t[1],u=t[2],a=t[3],l=e[0],f=e[1],d=e[2],p=e[3],y=e[4],w=e[5],g=e[6],b=e[7],A=o,D=n[0],k=n[1],H=n[2],L=i,U=h,v=u,x=a,C=l,E=f,O=d,S=p,m=y,R=w,F=g,$=b,z=A,K=D,N=k,B=H;for(let t=0;t<s;t+=2)L=L+C|0,z=c(z^L,16),m=m+z|0,C=c(C^m,12),L=L+C|0,z=c(z^L,8),m=m+z|0,C=c(C^m,7),U=U+E|0,K=c(K^U,16),R=R+K|0,E=c(E^R,12),U=U+E|0,K=c(K^U,8),R=R+K|0,E=c(E^R,7),v=v+O|0,N=c(N^v,16),F=F+N|0,O=c(O^F,12),v=v+O|0,N=c(N^v,8),F=F+N|0,O=c(O^F,7),x=x+S|0,B=c(B^x,16),$=$+B|0,S=c(S^$,12),x=x+S|0,B=c(B^x,8),$=$+B|0,S=c(S^$,7),L=L+E|0,B=c(B^L,16),F=F+B|0,E=c(E^F,12),L=L+E|0,B=c(B^L,8),F=F+B|0,E=c(E^F,7),U=U+O|0,z=c(z^U,16),$=$+z|0,O=c(O^$,12),U=U+O|0,z=c(z^U,8),$=$+z|0,O=c(O^$,7),v=v+S|0,K=c(K^v,16),m=m+K|0,S=c(S^m,12),v=v+S|0,K=c(K^v,8),m=m+K|0,S=c(S^m,7),x=x+C|0,N=c(N^x,16),R=R+N|0,C=c(C^R,12),x=x+C|0,N=c(N^x,8),R=R+N|0,C=c(C^R,7);let I=0;r[I++]=i+L|0,r[I++]=h+U|0,r[I++]=u+v|0,r[I++]=a+x|0,r[I++]=l+C|0,r[I++]=f+E|0,r[I++]=d+O|0,r[I++]=p+S|0,r[I++]=y+m|0,r[I++]=w+R|0,r[I++]=g+F|0,r[I++]=b+$|0,r[I++]=A+z|0,r[I++]=D+K|0,r[I++]=k+N|0,r[I++]=H+B|0}const b=d(g,{counterRight:!1,counterLength:4,allowShortKeys:!1}),A=d(g,{counterRight:!1,counterLength:8,extendNonceFn:function(t,e,n,r){let o=t[0],s=t[1],i=t[2],h=t[3],u=e[0],a=e[1],l=e[2],f=e[3],d=e[4],p=e[5],y=e[6],w=e[7],g=n[0],b=n[1],A=n[2],D=n[3];for(let t=0;t<20;t+=2)o=o+u|0,g=c(g^o,16),d=d+g|0,u=c(u^d,12),o=o+u|0,g=c(g^o,8),d=d+g|0,u=c(u^d,7),s=s+a|0,b=c(b^s,16),p=p+b|0,a=c(a^p,12),s=s+a|0,b=c(b^s,8),p=p+b|0,a=c(a^p,7),i=i+l|0,A=c(A^i,16),y=y+A|0,l=c(l^y,12),i=i+l|0,A=c(A^i,8),y=y+A|0,l=c(l^y,7),h=h+f|0,D=c(D^h,16),w=w+D|0,f=c(f^w,12),h=h+f|0,D=c(D^h,8),w=w+D|0,f=c(f^w,7),o=o+a|0,D=c(D^o,16),y=y+D|0,a=c(a^y,12),o=o+a|0,D=c(D^o,8),y=y+D|0,a=c(a^y,7),s=s+l|0,g=c(g^s,16),w=w+g|0,l=c(l^w,12),s=s+l|0,g=c(g^s,8),w=w+g|0,l=c(l^w,7),i=i+f|0,b=c(b^i,16),d=d+b|0,f=c(f^d,12),i=i+f|0,b=c(b^i,8),d=d+b|0,f=c(f^d,7),h=h+u|0,A=c(A^h,16),p=p+A|0,u=c(u^p,12),h=h+u|0,A=c(A^h,8),p=p+A|0,u=c(u^p,7);let k=0;r[k++]=o,r[k++]=s,r[k++]=i,r[k++]=h,r[k++]=g,r[k++]=b,r[k++]=A,r[k++]=D},allowShortKeys:!1}),D=new Uint8Array(16),k=(t,e)=>{t.update(e);const n=e.length%16;n&&t.update(D.subarray(n))},H=new Uint8Array(32);function L(t,e,n,o,s){void 0!==s&&(0,r.DO)(s,void 0,"AAD");const i=t(e,n,H),h=(0,r.Pg)(o.length,s?s.length:0,!0),u=w.create(i);s&&k(u,s),k(u,o),u.update(h);const c=u.digest();return(0,r.uH)(i,h),c}const U=t=>(e,n,o)=>({encrypt(s,i){const h=s.length;(i=(0,r.N$)(h+16,i,!1)).set(s);const u=i.subarray(0,-16);t(e,n,u,u,1);const c=L(t,e,n,u,o);return i.set(c,h),(0,r.uH)(c),i},decrypt(s,i){i=(0,r.N$)(s.length-16,i,!1);const h=s.subarray(0,-16),u=s.subarray(-16),c=L(t,e,n,h,o);if(!(0,r.ex)(u,c))throw new Error("invalid tag");return i.set(s.subarray(0,-16)),t(e,n,i,i,1),(0,r.uH)(c),i}}),v=(0,r.qn)({blockSize:64,nonceLength:12,tagLength:16},U(b));U(A)}}]);
|
package/dist/index.mjs
DELETED