@dodoex/wallet-web3 0.0.40-4 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DefaultJsonRpcProvider-0d7925ff.js → DefaultJsonRpcProvider-a9b4edef.js} +1 -1
- package/dist/__node-resolve_empty-ad78977d.js +1 -0
- package/dist/__tslib-e712523b.js +1 -0
- package/dist/{blocto-edcf7e9c.js → blocto-c2f03aa6.js} +1 -1
- package/dist/{bn-92d59440.js → bn-a80bf6c0.js} +1 -1
- package/dist/{browser-ponyfill-d3098539.js → browser-ponyfill-f38c41bc.js} +1 -1
- package/dist/cjs/{DefaultJsonRpcProvider-bca8f91d.cjs → DefaultJsonRpcProvider-ca454f8e.cjs} +1 -1
- package/dist/cjs/{__node-resolve_empty-265d1c49.cjs → __node-resolve_empty-6d7ad87b.cjs} +1 -1
- package/dist/cjs/__tslib-b203abab.cjs +1 -0
- package/dist/cjs/{blocto-d87e4c02.cjs → blocto-05a85ecf.cjs} +1 -1
- package/dist/cjs/{bn-70ac244c.cjs → bn-b63aca15.cjs} +1 -1
- package/dist/cjs/{browser-ponyfill-71fb8794.cjs → browser-ponyfill-b0be11d9.cjs} +1 -1
- package/dist/cjs/core/index.d.ts +2 -2
- package/dist/cjs/{draggabilly-14f61cef.cjs → draggabilly-f616433b.cjs} +1 -1
- package/dist/cjs/ethers-ba816f82.cjs +1 -0
- package/dist/cjs/{id-64cfc377.cjs → id-323e4c90.cjs} +1 -1
- package/dist/cjs/{index-2ddcd00d.cjs → index-0c0e48bd.cjs} +1 -1
- package/dist/cjs/index-41d4ce9e.cjs +6 -0
- package/dist/cjs/{index-8a737425.cjs → index-56f21973.cjs} +1 -1
- package/dist/cjs/index-578427cc.cjs +9 -0
- package/dist/cjs/{index-0ed73dc0.cjs → index-65d19adb.cjs} +1 -1
- package/dist/cjs/{index-d16b6756.cjs → index-6902d1ea.cjs} +3 -3
- package/dist/cjs/index-8c9af5ed.cjs +1 -0
- package/dist/cjs/index-a2ac2501.cjs +1 -0
- package/dist/cjs/{index-b92a55b8.cjs → index-ad37aa8e.cjs} +1 -1
- package/dist/cjs/index-c40d494c.cjs +1 -0
- package/dist/cjs/{index-f63cfc3f.cjs → index-f529a5e1.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-091ee5b4.cjs → index.es-8f036e0f.cjs} +1 -1
- package/dist/cjs/{interface-885a5be0.cjs → interface-b28a2cea.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-88b4f6fa.cjs → lib-typedarrays-e979897b.cjs} +1 -1
- package/dist/cjs/{portis-838df928.cjs → portis-a05f6805.cjs} +1 -1
- package/dist/cjs/{provider-4c7501d6.cjs → provider-deee1712.cjs} +1 -1
- package/dist/cjs/providers/connector/index.d.ts +43 -175
- package/dist/cjs/providers/connector/injected.d.ts +1 -1
- package/dist/cjs/providers/connector/ledgerUSB/index.d.ts +43 -43
- package/dist/cjs/providers/connector/ledgerUSB/provider.d.ts +10 -10
- package/dist/cjs/providers/connector/types.d.ts +0 -7
- package/dist/cjs/providers/connector/uniPass/index.d.ts +43 -43
- package/dist/cjs/providers/connector/uniPass/provider.d.ts +10 -10
- package/dist/cjs/providers/wallets/index.d.ts +2 -7
- package/dist/cjs/providers/wallets/standalone.d.ts +0 -1
- package/dist/cjs/providers/wallets/types.d.ts +0 -2
- package/dist/cjs/{rainbow-7d2fe1e2.cjs → rainbow-69c0a69b.cjs} +1 -1
- package/dist/cjs/{sha224-158bd458.cjs → sha224-9457bb96.cjs} +1 -1
- package/dist/cjs/{sha256-6071af96.cjs → sha256-5fb5de86.cjs} +1 -1
- package/dist/cjs/state.d.ts +2 -2
- package/dist/cjs/{uAuth-921a815b.cjs → uAuth-7fa3d23a.cjs} +1 -1
- package/dist/cjs/walletConnect-c603a6a4.cjs +1 -0
- package/dist/cjs/{walletLink-7fe3af33.cjs → walletLink-899a33a2.cjs} +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/{draggabilly-2580bf5b.js → draggabilly-8b6b21c5.js} +1 -1
- package/dist/ethers-598924c4.js +1 -0
- package/dist/{id-3aece8c0.js → id-bce3c131.js} +1 -1
- package/dist/{index-b09fd06f.js → index-0288dfdf.js} +1 -1
- package/dist/index-13cee3c1.js +1 -0
- package/dist/{index-cd6bd2ce.js → index-19bc04f2.js} +1 -1
- package/dist/{index-9a4379d7.js → index-57766b84.js} +1 -1
- package/dist/{index-767c26b7.js → index-7f873c40.js} +1 -1
- package/dist/index-9b7de542.js +9 -0
- package/dist/index-a6717e78.js +6 -0
- package/dist/index-b80e350c.js +1 -0
- package/dist/index-cb9250a0.js +1 -0
- package/dist/{index-1a005328.js → index-cf915864.js} +3 -3
- package/dist/{index-b5d79167.js → index-cf9d6206.js} +1 -1
- package/dist/{index.es-e8743b8d.js → index.es-2b585733.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-c94b78af.js → interface-bdaa6e2e.js} +1 -1
- package/dist/{lib-typedarrays-a8bb783b.js → lib-typedarrays-b5e70c03.js} +1 -1
- package/dist/{portis-2205d07c.js → portis-58d16f24.js} +1 -1
- package/dist/{provider-4d3d7268.js → provider-62a23419.js} +1 -1
- package/dist/providers/connector/index.d.ts +43 -175
- package/dist/providers/connector/injected.d.ts +1 -1
- package/dist/providers/connector/ledgerUSB/index.d.ts +43 -43
- package/dist/providers/connector/ledgerUSB/provider.d.ts +10 -10
- package/dist/providers/connector/types.d.ts +0 -7
- package/dist/providers/connector/uniPass/index.d.ts +43 -43
- package/dist/providers/connector/uniPass/provider.d.ts +10 -10
- package/dist/providers/wallets/index.d.ts +2 -7
- package/dist/providers/wallets/standalone.d.ts +0 -1
- package/dist/providers/wallets/types.d.ts +0 -2
- package/dist/rainbow-898a2c25.js +1 -0
- package/dist/{sha224-7c9278b8.js → sha224-1c4b79b3.js} +1 -1
- package/dist/{sha256-fe7bb483.js → sha256-c7e66f3f.js} +1 -1
- package/dist/state.d.ts +2 -2
- package/dist/{uAuth-6044680b.js → uAuth-0812723b.js} +1 -1
- package/dist/walletConnect-0b1a9181.js +1 -0
- package/dist/{walletLink-26ad7eac.js → walletLink-7080edd7.js} +1 -1
- package/package.json +3 -10
- package/dist/__node-resolve_empty-261d59ac.js +0 -1
- package/dist/__tslib-0e83d985.js +0 -1
- package/dist/alchemy-provider-5870b6fa-e395a256.js +0 -1
- package/dist/alchemy-websocket-provider-213da986-313bda01.js +0 -1
- package/dist/ccip-579ffb0a.js +0 -1
- package/dist/cjs/__tslib-23f33cbc.cjs +0 -1
- package/dist/cjs/alchemy-provider-5870b6fa-96ba77e7.cjs +0 -1
- package/dist/cjs/alchemy-websocket-provider-213da986-6aab7eae.cjs +0 -1
- package/dist/cjs/ccip-e892e984.cjs +0 -1
- package/dist/cjs/ethers-70b6183e.cjs +0 -1
- package/dist/cjs/index-106a55ec.cjs +0 -1
- package/dist/cjs/index-18b9efa9.cjs +0 -20
- package/dist/cjs/index-2d21ff5b.cjs +0 -1
- package/dist/cjs/index-94459054.cjs +0 -9
- package/dist/cjs/index-9ce25397.cjs +0 -6
- package/dist/cjs/index-a4ac3bd5.cjs +0 -1
- package/dist/cjs/index-d0ceb723.cjs +0 -1
- package/dist/cjs/index-e373c760.cjs +0 -1
- package/dist/cjs/providers/connector/alchemy/index.d.ts +0 -135
- package/dist/cjs/providers/connector/alchemy/provider.d.ts +0 -140
- package/dist/cjs/providers/connector/alchemy/signer.d.ts +0 -23
- package/dist/cjs/walletConnect-70d89c92.cjs +0 -1
- package/dist/ethers-833b2300.js +0 -1
- package/dist/index-14387775.js +0 -1
- package/dist/index-21722c04.js +0 -1
- package/dist/index-33f10a1b.js +0 -6
- package/dist/index-3dfcceec.js +0 -20
- package/dist/index-5b79ce49.js +0 -1
- package/dist/index-7decf620.js +0 -9
- package/dist/index-9cc0c074.js +0 -1
- package/dist/index-e75a363b.js +0 -1
- package/dist/providers/connector/alchemy/index.d.ts +0 -135
- package/dist/providers/connector/alchemy/provider.d.ts +0 -140
- package/dist/providers/connector/alchemy/signer.d.ts +0 -23
- package/dist/rainbow-27aaabde.js +0 -1
- package/dist/walletConnect-9e745470.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@ethersproject/address"),t=require("@ethersproject/abstract-provider"),r=require("@ethersproject/abstract-signer"),i=require("@ethersproject/bytes"),n=require("./index-94459054.cjs"),o=require("./id-64cfc377.cjs"),a=require("./index-f63cfc3f.cjs"),f=require("@ethersproject/properties"),s=require("./bn-70ac244c.cjs"),u=require("./hash-7ce6fed5.cjs"),d=require("@ethersproject/transactions"),l=require("@ethersproject/json-wallets");const h=new o.Logger(o.version),c={},p=o.BigNumber.from(0),m=o.BigNumber.from(-1);function y(e,t,r,i){const n={fault:t,operation:r};return void 0!==i&&(n.value=i),h.throwError(e,o.Logger.errors.NUMERIC_FAULT,n)}let g="0";for(;g.length<256;)g+=g;function b(e){if("number"!=typeof e)try{e=o.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+g.substring(0,e):h.throwArgumentError("invalid decimal size","decimals",e)}function v(e,t){null==t&&(t=0);const r=b(t),i=(e=o.BigNumber.from(e)).lt(p);i&&(e=e.mul(m));let n=e.mod(r).toString();for(;n.length<r.length-1;)n="0"+n;n=n.match(/^([0-9]*[1-9]|0)(0*)/)[1];const a=e.div(r).toString();return e=1===r.length?a:a+"."+n,i&&(e="-"+e),e}function S(e,t){null==t&&(t=0);const r=b(t);"string"==typeof e&&e.match(/^-?[0-9.]+$/)||h.throwArgumentError("invalid decimal value","value",e);const i="-"===e.substring(0,1);i&&(e=e.substring(1)),"."===e&&h.throwArgumentError("missing value","value",e);const n=e.split(".");n.length>2&&h.throwArgumentError("too many decimal points","value",e);let a=n[0],f=n[1];for(a||(a="0"),f||(f="0");"0"===f[f.length-1];)f=f.substring(0,f.length-1);for(f.length>r.length-1&&y("fractional component exceeds decimals","underflow","parseFixed"),""===f&&(f="0");f.length<r.length-1;)f+="0";const s=o.BigNumber.from(a),u=o.BigNumber.from(f);let d=s.mul(r).add(u);return i&&(d=d.mul(m)),d}class w{constructor(e,t,r,i){e!==c&&h.throwError("cannot use FixedFormat constructor; use FixedFormat.from",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=t,this.width=r,this.decimals=i,this.name=(t?"":"u")+"fixed"+String(r)+"x"+String(i),this._multiplier=b(i),Object.freeze(this)}static from(e){if(e instanceof w)return e;"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,i=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const n=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);n||h.throwArgumentError("invalid fixed format","format",e),t="u"!==n[1],r=parseInt(n[2]),i=parseInt(n[3])}else if(e){const n=(t,r,i)=>null==e[t]?i:(typeof e[t]!==r&&h.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=n("signed","boolean",t),r=n("width","number",r),i=n("decimals","number",i)}return r%8&&h.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),i>80&&h.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new w(c,t,r,i)}}class A{constructor(e,t,r,i){e!==c&&h.throwError("cannot use FixedNumber constructor; use FixedNumber.from",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&h.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=S(this._value,this.format.decimals),r=S(e._value,e.format.decimals);return A.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=S(this._value,this.format.decimals),r=S(e._value,e.format.decimals);return A.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=S(this._value,this.format.decimals),r=S(e._value,e.format.decimals);return A.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=S(this._value,this.format.decimals),r=S(e._value,e.format.decimals);return A.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=A.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(x.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=A.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(x.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&h.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=A.from("1"+g.substring(0,e),this.format),i=P.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(i).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&h.throwArgumentError("invalid byte width","width",e);const t=o.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return i.hexZeroPad(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return A.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||o.isBigNumberish(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),A.fromString(v(e,t),w.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=w.from(t),n=S(e,r.decimals);!r.signed&&n.lt(p)&&y("unsigned value cannot be negative","overflow","value",e);let o=null;r.signed?o=n.toTwos(r.width).toHexString():(o=n.toHexString(),o=i.hexZeroPad(o,r.width/8));const a=v(n,r.decimals);return new A(c,o,a,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=w.from(t);if(i.arrayify(e).length>r.width/8)throw new Error("overflow");let n=o.BigNumber.from(e);r.signed&&(n=n.fromTwos(r.width));const a=n.toTwos((r.signed?0:1)+r.width).toHexString(),f=v(n,r.decimals);return new A(c,a,f,r)}static from(e,t){if("string"==typeof e)return A.fromString(e,t);if(i.isBytes(e))return A.fromBytes(e,t);try{return A.fromValue(e,0,t)}catch(e){if(e.code!==o.Logger.errors.INVALID_ARGUMENT)throw e}return h.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const x=A.from(1),P=A.from("0.5"),E="Ethereum Signed Message:\n";function I(e){return"string"==typeof e&&(e=o.toUtf8Bytes(e)),n.keccak256(i.concat([o.toUtf8Bytes(E),o.toUtf8Bytes(String(e.length)),e]))}class R{constructor(e){f.defineReadOnly(this,"alphabet",e),f.defineReadOnly(this,"base",e.length),f.defineReadOnly(this,"_alphabetMap",{}),f.defineReadOnly(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=i.arrayify(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let i=t[e];for(let e=0;e<r.length;++e)i+=r[e]<<8,r[e]=i%this.base,i=i/this.base|0;for(;i>0;)r.push(i%this.base),i=i/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let i=this._alphabetMap[e[r]];if(void 0===i)throw new Error("Non-base"+this.base+" character");let n=i;for(let e=0;e<t.length;++e)n+=t[e]*this.base,t[e]=255&n,n>>=8;for(;n>0;)t.push(255&n),n>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return i.arrayify(new Uint8Array(t.reverse()))}}const M=new R("abcdefghijklmnopqrstuvwxyz234567"),C=new R("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var B,k=Object.freeze({__proto__:null,BaseX:R,Base32:M,Base58:C});exports.SupportedAlgorithm=void 0,(B=exports.SupportedAlgorithm||(exports.SupportedAlgorithm={})).sha256="sha256",B.sha512="sha512";const T=new o.Logger("sha2/5.7.0");function _(e){return"0x"+u.hash.ripemd160().update(i.arrayify(e)).digest("hex")}function F(e){return"0x"+u.hash.sha256().update(i.arrayify(e)).digest("hex")}function N(e,t,r){return exports.SupportedAlgorithm[e]||T.throwError("unsupported algorithm "+e,o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+u.hash.hmac(u.hash[e],i.arrayify(t)).update(i.arrayify(r)).digest("hex")}function D(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var O=L;function L(e,t){if(!e)throw new Error(t||"Assertion failed")}L.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var q=D((function(e,t){var r=t;function i(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,a=255&n;o?r.push(o,a):r.push(a)}return r},r.zero2=i,r.toHex=n,r.encode=function(e,t){return"hex"===t?n(e):e}})),K=D((function(e,t){var r=t;r.assert=O,r.toArray=q.toArray,r.zero2=q.zero2,r.toHex=q.toHex,r.encode=q.encode,r.getNAF=function(e,t,r){var i=new Array(Math.max(e.bitLength(),r)+1);i.fill(0);for(var n=1<<t+1,o=e.clone(),a=0;a<i.length;a++){var f,s=o.andln(n-1);o.isOdd()?(f=s>(n>>1)-1?(n>>1)-s:s,o.isubn(f)):f=0,i[a]=f,o.iushrn(1)}return i},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i,n=0,o=0;e.cmpn(-n)>0||t.cmpn(-o)>0;){var a,f,s=e.andln(3)+n&3,u=t.andln(3)+o&3;3===s&&(s=-1),3===u&&(u=-1),a=0==(1&s)?0:3!==(i=e.andln(7)+n&7)&&5!==i||2!==u?s:-s,r[0].push(a),f=0==(1&u)?0:3!==(i=t.andln(7)+o&7)&&5!==i||2!==s?u:-u,r[1].push(f),2*n===a+1&&(n=1-n),2*o===f+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new s.BN(e,"hex","le")}})),z=K.getNAF,W=K.getJSF,U=K.assert;function G(e,t){this.type=e,this.p=new s.BN(t.p,16),this.red=t.prime?s.BN.red(t.prime):s.BN.mont(this.p),this.zero=new s.BN(0).toRed(this.red),this.one=new s.BN(1).toRed(this.red),this.two=new s.BN(2).toRed(this.red),this.n=t.n&&new s.BN(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var H=G;function V(e,t){this.curve=e,this.type=t,this.precomputed=null}G.prototype.point=function(){throw new Error("Not implemented")},G.prototype.validate=function(){throw new Error("Not implemented")},G.prototype._fixedNafMul=function(e,t){U(e.precomputed);var r=e._getDoubles(),i=z(t,1,this._bitLength),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;var o,a,f=[];for(o=0;o<i.length;o+=r.step){a=0;for(var s=o+r.step-1;s>=o;s--)a=(a<<1)+i[s];f.push(a)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),l=n;l>0;l--){for(o=0;o<f.length;o++)(a=f[o])===l?d=d.mixedAdd(r.points[o]):a===-l&&(d=d.mixedAdd(r.points[o].neg()));u=u.add(d)}return u.toP()},G.prototype._wnafMul=function(e,t){var r=4,i=e._getNAFPoints(r);r=i.wnd;for(var n=i.points,o=z(t,r,this._bitLength),a=this.jpoint(null,null,null),f=o.length-1;f>=0;f--){for(var s=0;f>=0&&0===o[f];f--)s++;if(f>=0&&s++,a=a.dblp(s),f<0)break;var u=o[f];U(0!==u),a="affine"===e.type?u>0?a.mixedAdd(n[u-1>>1]):a.mixedAdd(n[-u-1>>1].neg()):u>0?a.add(n[u-1>>1]):a.add(n[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},G.prototype._wnafMulAdd=function(e,t,r,i,n){var o,a,f,s=this._wnafT1,u=this._wnafT2,d=this._wnafT3,l=0;for(o=0;o<i;o++){var h=(f=t[o])._getNAFPoints(e);s[o]=h.wnd,u[o]=h.points}for(o=i-1;o>=1;o-=2){var c=o-1,p=o;if(1===s[c]&&1===s[p]){var m=[t[c],null,null,t[p]];0===t[c].y.cmp(t[p].y)?(m[1]=t[c].add(t[p]),m[2]=t[c].toJ().mixedAdd(t[p].neg())):0===t[c].y.cmp(t[p].y.redNeg())?(m[1]=t[c].toJ().mixedAdd(t[p]),m[2]=t[c].add(t[p].neg())):(m[1]=t[c].toJ().mixedAdd(t[p]),m[2]=t[c].toJ().mixedAdd(t[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],g=W(r[c],r[p]);for(l=Math.max(g[0].length,l),d[c]=new Array(l),d[p]=new Array(l),a=0;a<l;a++){var b=0|g[0][a],v=0|g[1][a];d[c][a]=y[3*(b+1)+(v+1)],d[p][a]=0,u[c]=m}}else d[c]=z(r[c],s[c],this._bitLength),d[p]=z(r[p],s[p],this._bitLength),l=Math.max(d[c].length,l),l=Math.max(d[p].length,l)}var S=this.jpoint(null,null,null),w=this._wnafT4;for(o=l;o>=0;o--){for(var A=0;o>=0;){var x=!0;for(a=0;a<i;a++)w[a]=0|d[a][o],0!==w[a]&&(x=!1);if(!x)break;A++,o--}if(o>=0&&A++,S=S.dblp(A),o<0)break;for(a=0;a<i;a++){var P=w[a];0!==P&&(P>0?f=u[a][P-1>>1]:P<0&&(f=u[a][-P-1>>1].neg()),S="affine"===f.type?S.mixedAdd(f):S.add(f))}}for(o=0;o<i;o++)u[o]=null;return n?S:S.toP()},G.BasePoint=V,V.prototype.eq=function(){throw new Error("Not implemented")},V.prototype.validate=function(){return this.curve.validate(this)},G.prototype.decodePoint=function(e,t){e=K.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?U(e[e.length-1]%2==0):7===e[0]&&U(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},V.prototype.encodeCompressed=function(e){return this.encode(e,!0)},V.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},V.prototype.encode=function(e,t){return K.encode(this._encode(t),e)},V.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},V.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},V.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var o=0;o<e;o++)i=i.dbl();r.push(i)}return{step:e,points:r}},V.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},V.prototype._getBeta=function(){return null},V.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var j=D((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),J=K.assert;function $(e){H.call(this,"short",e),this.a=new s.BN(e.a,16).toRed(this.red),this.b=new s.BN(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}j($,H);var Z=$;function X(e,t,r,i){H.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new s.BN(t,16),this.y=new s.BN(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Y(e,t,r,i){H.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new s.BN(0)):(this.x=new s.BN(t,16),this.y=new s.BN(r,16),this.z=new s.BN(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}$.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new s.BN(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)r=new s.BN(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?r=n[0]:(r=n[1],J(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new s.BN(e.a,16),b:new s.BN(e.b,16)}})):this._getEndoBasis(r)}}},$.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:s.BN.mont(e),r=new s.BN(2).toRed(t).redInvm(),i=r.redNeg(),n=new s.BN(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(n).fromRed(),i.redSub(n).fromRed()]},$.prototype._getEndoBasis=function(e){for(var t,r,i,n,o,a,f,u,d,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,c=this.n.clone(),p=new s.BN(1),m=new s.BN(0),y=new s.BN(0),g=new s.BN(1),b=0;0!==h.cmpn(0);){var v=c.div(h);u=c.sub(v.mul(h)),d=y.sub(v.mul(p));var S=g.sub(v.mul(m));if(!i&&u.cmp(l)<0)t=f.neg(),r=p,i=u.neg(),n=d;else if(i&&2==++b)break;f=u,c=h,h=u,y=p,p=d,g=m,m=S}o=u.neg(),a=d;var w=i.sqr().add(n.sqr());return o.sqr().add(a.sqr()).cmp(w)>=0&&(o=t,a=r),i.negative&&(i=i.neg(),n=n.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:i,b:n},{a:o,b:a}]},$.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=n.mul(r.a),f=o.mul(i.a),s=n.mul(r.b),u=o.mul(i.b);return{k1:e.sub(a).sub(f),k2:s.add(u).neg()}},$.prototype.pointFromX=function(e,t){(e=new s.BN(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=i.fromRed().isOdd();return(t&&!n||!t&&n)&&(i=i.redNeg()),this.point(e,i)},$.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},$.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),f=e[o],s=f._getBeta();a.k1.negative&&(a.k1.ineg(),f=f.neg(!0)),a.k2.negative&&(a.k2.ineg(),s=s.neg(!0)),i[2*o]=f,i[2*o+1]=s,n[2*o]=a.k1,n[2*o+1]=a.k2}for(var u=this._wnafMulAdd(1,i,n,2*o,r),d=0;d<2*o;d++)i[d]=null,n[d]=null;return u},j(X,H.BasePoint),$.prototype.point=function(e,t,r){return new X(this,e,t,r)},$.prototype.pointFromJSON=function(e,t){return X.fromJSON(this,e,t)},X.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}},X.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},X.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;function n(t){return e.point(t[0],t[1],r)}var o=t[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},X.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},X.prototype.isInfinity=function(){return this.inf},X.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},X.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),a=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},X.prototype.getX=function(){return this.x.fromRed()},X.prototype.getY=function(){return this.y.fromRed()},X.prototype.mul=function(e){return e=new s.BN(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},X.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},X.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},X.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},X.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},X.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},j(Y,H.BasePoint),$.prototype.jpoint=function(e,t,r){return new Y(this,e,t,r)},Y.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},Y.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Y.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),f=i.redSub(n),s=o.redSub(a);if(0===f.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=f.redSqr(),d=u.redMul(f),l=i.redMul(u),h=s.redSqr().redIAdd(d).redISub(l).redISub(l),c=s.redMul(l.redISub(h)).redISub(o.redMul(d)),p=this.z.redMul(e.z).redMul(f);return this.curve.jpoint(h,c,p)},Y.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(i),f=n.redSub(o);if(0===a.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=a.redSqr(),u=s.redMul(a),d=r.redMul(s),l=f.redSqr().redIAdd(u).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(n.redMul(u)),c=this.z.redMul(a);return this.curve.jpoint(l,h,c)},Y.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var i=this.curve.a,n=this.curve.tinv,o=this.x,a=this.y,f=this.z,s=f.redSqr().redSqr(),u=a.redAdd(a);for(t=0;t<e;t++){var d=o.redSqr(),l=u.redSqr(),h=l.redSqr(),c=d.redAdd(d).redIAdd(d).redIAdd(i.redMul(s)),p=o.redMul(l),m=c.redSqr().redISub(p.redAdd(p)),y=p.redISub(m),g=c.redMul(y);g=g.redIAdd(g).redISub(h);var b=u.redMul(f);t+1<e&&(s=s.redMul(h)),o=m,f=b,u=g}return this.curve.jpoint(o,u.redMul(n),f)},Y.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Y.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(i).redISub(o);a=a.redIAdd(a);var f=i.redAdd(i).redIAdd(i),s=f.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=s,t=f.redMul(a.redISub(s)).redISub(u),r=this.y.redAdd(this.y)}else{var d=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),c=this.x.redAdd(l).redSqr().redISub(d).redISub(h);c=c.redIAdd(c);var p=d.redAdd(d).redIAdd(d),m=p.redSqr(),y=h.redIAdd(h);y=(y=y.redIAdd(y)).redIAdd(y),e=m.redISub(c).redISub(c),t=p.redMul(c.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},Y.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(i).redISub(o);a=a.redIAdd(a);var f=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),s=f.redSqr().redISub(a).redISub(a);e=s;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=f.redMul(a.redISub(s)).redISub(u),r=this.y.redAdd(this.y)}else{var d=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),c=this.x.redSub(d).redMul(this.x.redAdd(d));c=c.redAdd(c).redIAdd(c);var p=h.redIAdd(h),m=(p=p.redIAdd(p)).redAdd(p);e=c.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(d);var y=l.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=c.redMul(p.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},Y.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),f=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(n)),s=t.redAdd(t),u=(s=s.redIAdd(s)).redMul(a),d=f.redSqr().redISub(u.redAdd(u)),l=u.redISub(d),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var c=f.redMul(l).redISub(h),p=r.redAdd(r).redMul(i);return this.curve.jpoint(d,c,p)},Y.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),o=n.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(i),f=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),s=i.redIAdd(i);s=(s=(s=s.redIAdd(s)).redIAdd(s)).redIAdd(s);var u=n.redIAdd(a).redSqr().redISub(o).redISub(f).redISub(s),d=t.redMul(u);d=(d=d.redIAdd(d)).redIAdd(d);var l=this.x.redMul(f).redISub(d);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(u.redMul(s.redISub(u)).redISub(a.redMul(f)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var c=this.z.redAdd(a).redSqr().redISub(r).redISub(f);return this.curve.jpoint(l,h,c)},Y.prototype.mul=function(e,t){return e=new s.BN(e,t),this.curve._wnafMul(this,e)},Y.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var i=t.redMul(this.z),n=r.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)},Y.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},Y.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Y.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Q=D((function(e,t){var r=t;r.base=H,r.short=Z,r.mont=null,r.edwards=null})),ee=D((function(e,t){var r,i=t,n=K.assert;function o(e){"short"===e.type?this.curve=new Q.short(e):"edwards"===e.type?this.curve=new Q.edwards(e):this.curve=new Q.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=o,a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:u.hash.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:u.hash.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:u.hash.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:u.hash.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:u.hash.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:u.hash.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:u.hash.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:u.hash.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function te(e){if(!(this instanceof te))return new te(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=q.toArray(e.entropy,e.entropyEnc||"hex"),r=q.toArray(e.nonce,e.nonceEnc||"hex"),i=q.toArray(e.pers,e.persEnc||"hex");O(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}var re=te;te.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},te.prototype._hmac=function(){return new u.hash.hmac(this.hash,this.K)},te.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},te.prototype.reseed=function(e,t,r,i){"string"!=typeof t&&(i=r,r=t,t=null),e=q.toArray(e,t),r=q.toArray(r,i),O(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},te.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=q.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,e);return this._update(r),this._reseed++,q.encode(o,t)};var ie=K.assert;function ne(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var oe=ne;ne.fromPublic=function(e,t,r){return t instanceof ne?t:new ne(e,{pub:t,pubEnc:r})},ne.fromPrivate=function(e,t,r){return t instanceof ne?t:new ne(e,{priv:t,privEnc:r})},ne.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},ne.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},ne.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},ne.prototype._importPrivate=function(e,t){this.priv=new s.BN(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},ne.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?ie(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||ie(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},ne.prototype.derive=function(e){return e.validate()||ie(e.validate(),"public point not validated"),e.mul(this.priv).getX()},ne.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},ne.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},ne.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var ae=K.assert;function fe(e,t){if(e instanceof fe)return e;this._importDER(e,t)||(ae(e.r&&e.s,"Signature without r or s"),this.r=new s.BN(e.r,16),this.s=new s.BN(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var se=fe;function ue(){this.place=0}function de(e,t){var r=e[t.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;for(var n=0,o=0,a=t.place;o<i;o++,a++)n<<=8,n|=e[a],n>>>=0;return!(n<=127)&&(t.place=a,n)}function le(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function he(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}fe.prototype._importDER=function(e,t){e=K.toArray(e,t);var r=new ue;if(48!==e[r.place++])return!1;var i=de(e,r);if(!1===i)return!1;if(i+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var n=de(e,r);if(!1===n)return!1;var o=e.slice(r.place,n+r.place);if(r.place+=n,2!==e[r.place++])return!1;var a=de(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var f=e.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new s.BN(o),this.s=new s.BN(f),this.recoveryParam=null,!0},fe.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=le(t),r=le(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];he(i,t.length),(i=i.concat(t)).push(2),he(i,r.length);var n=i.concat(r),o=[48];return he(o,n.length),o=o.concat(n),K.encode(o,e)};var ce=function(){throw new Error("unsupported")},pe=K.assert;function me(e){if(!(this instanceof me))return new me(e);"string"==typeof e&&(pe(Object.prototype.hasOwnProperty.call(ee,e),"Unknown curve "+e),e=ee[e]),e instanceof ee.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var ye=me;me.prototype.keyPair=function(e){return new oe(this,e)},me.prototype.keyFromPrivate=function(e,t){return oe.fromPrivate(this,e,t)},me.prototype.keyFromPublic=function(e,t){return oe.fromPublic(this,e,t)},me.prototype.genKeyPair=function(e){e||(e={});for(var t=new re({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||ce(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new s.BN(2));;){var n=new s.BN(t.generate(r));if(!(n.cmp(i)>0))return n.iaddn(1),this.keyFromPrivate(n)}},me.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},me.prototype.sign=function(e,t,r,i){"object"==typeof r&&(i=r,r=null),i||(i={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new s.BN(e,16));for(var n=this.n.byteLength(),o=t.getPrivate().toArray("be",n),a=e.toArray("be",n),f=new re({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new s.BN(1)),d=0;;d++){var l=i.k?i.k(d):new s.BN(f.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(u)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var c=h.getX(),p=c.umod(this.n);if(0!==p.cmpn(0)){var m=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var y=(h.getY().isOdd()?1:0)|(0!==c.cmp(p)?2:0);return i.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),y^=1),new se({r:p,s:m,recoveryParam:y})}}}}}},me.prototype.verify=function(e,t,r,i){e=this._truncateToN(new s.BN(e,16)),r=this.keyFromPublic(r,i);var n=(t=new se(t,"hex")).r,o=t.s;if(n.cmpn(1)<0||n.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,f=o.invm(this.n),u=f.mul(e).umod(this.n),d=f.mul(n).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),d)).isInfinity()&&a.eqXToP(n):!(a=this.g.mulAdd(u,r.getPublic(),d)).isInfinity()&&0===a.getX().umod(this.n).cmp(n)},me.prototype.recoverPubKey=function(e,t,r,i){pe((3&r)===r,"The recovery param is more than two bits"),t=new se(t,i);var n=this.n,o=new s.BN(e),a=t.r,f=t.s,u=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var l=t.r.invm(n),h=n.sub(o).mul(l).umod(n),c=f.mul(l).umod(n);return this.g.mulAdd(h,a,c)},me.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new se(t,i)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(e,t,n)}catch(e){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")};var ge=D((function(e,t){var r=t;r.version="6.5.4",r.utils=K,r.rand=function(){throw new Error("unsupported")},r.curve=Q,r.curves=ee,r.ec=ye,r.eddsa=null})).ec;const be=new o.Logger("signing-key/5.7.0");let ve=null;function Se(){return ve||(ve=new ge("secp256k1")),ve}class we{constructor(e){f.defineReadOnly(this,"curve","secp256k1"),f.defineReadOnly(this,"privateKey",i.hexlify(e)),32!==i.hexDataLength(this.privateKey)&&be.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Se().keyFromPrivate(i.arrayify(this.privateKey));f.defineReadOnly(this,"publicKey","0x"+t.getPublic(!1,"hex")),f.defineReadOnly(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),f.defineReadOnly(this,"_isSigningKey",!0)}_addPoint(e){const t=Se().keyFromPublic(i.arrayify(this.publicKey)),r=Se().keyFromPublic(i.arrayify(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=Se().keyFromPrivate(i.arrayify(this.privateKey)),r=i.arrayify(e);32!==r.length&&be.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return i.splitSignature({recoveryParam:n.recoveryParam,r:i.hexZeroPad("0x"+n.r.toString(16),32),s:i.hexZeroPad("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=Se().keyFromPrivate(i.arrayify(this.privateKey)),r=Se().keyFromPublic(i.arrayify(xe(e)));return i.hexZeroPad("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function Ae(e,t){const r=i.splitSignature(t),n={r:i.arrayify(r.r),s:i.arrayify(r.s)};return"0x"+Se().recoverPubKey(i.arrayify(e),n,r.recoveryParam).encode("hex",!1)}function xe(e,t){const r=i.arrayify(e);if(32===r.length){const e=new we(r);return t?"0x"+Se().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?i.hexlify(r):"0x"+Se().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Se().keyFromPublic(r).getPublic(!0,"hex"):i.hexlify(r):be.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Pe=Object.freeze({__proto__:null,SigningKey:we,recoverPublicKey:Ae,computePublicKey:xe});const Ee=new o.Logger("wordlists/5.7.0");class Ie{constructor(e){Ee.checkAbstract(new.target,Ie),f.defineReadOnly(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const i=e.getWord(r);if(r!==e.getWordIndex(i))return"0x";t.push(i)}return o.id(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}let Re=null;function Me(e){if(null==Re&&(Re="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==Ie.check(e)))throw Re=null,new Error("BIP39 Wordlist for en (English) FAILED")}const Ce=new class extends Ie{constructor(){super("en")}getWord(e){return Me(this),Re[e]}getWordIndex(e){return Me(this),Re.indexOf(e)}};Ie.register(Ce);const Be={en:Ce},ke=new o.Logger("hdnode/5.7.0"),Te=o.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_e=o.toUtf8Bytes("Bitcoin seed"),Fe=2147483648;function Ne(e){return(1<<e)-1<<8-e}function De(e){return i.hexZeroPad(i.hexlify(e),32)}function Oe(e){return C.encode(i.concat([e,i.hexDataSlice(F(F(e)),0,4)]))}function Le(e){if(null==e)return Be.en;if("string"==typeof e){const t=Be[e];return null==t&&ke.throwArgumentError("unknown locale","wordlist",e),t}return e}const qe={},Ke="m/44'/60'/0'/0/0";class ze{constructor(e,t,r,n,o,a,s,u){if(e!==qe)throw new Error("HDNode constructor cannot be called directly");if(t){const e=new we(t);f.defineReadOnly(this,"privateKey",e.privateKey),f.defineReadOnly(this,"publicKey",e.compressedPublicKey)}else f.defineReadOnly(this,"privateKey",null),f.defineReadOnly(this,"publicKey",i.hexlify(r));f.defineReadOnly(this,"parentFingerprint",n),f.defineReadOnly(this,"fingerprint",i.hexDataSlice(_(F(this.publicKey)),0,4)),f.defineReadOnly(this,"address",d.computeAddress(this.publicKey)),f.defineReadOnly(this,"chainCode",o),f.defineReadOnly(this,"index",a),f.defineReadOnly(this,"depth",s),null==u?(f.defineReadOnly(this,"mnemonic",null),f.defineReadOnly(this,"path",null)):"string"==typeof u?(f.defineReadOnly(this,"mnemonic",null),f.defineReadOnly(this,"path",u)):(f.defineReadOnly(this,"mnemonic",u),f.defineReadOnly(this,"path",u.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return Oe(i.concat([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",i.hexlify(this.depth),this.parentFingerprint,i.hexZeroPad(i.hexlify(this.index),4),this.chainCode,null!=this.privateKey?i.concat(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new ze(qe,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(2147483647&e));const r=new Uint8Array(37);if(e&Fe){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(i.arrayify(this.privateKey),1),t&&(t+="'")}else r.set(i.arrayify(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=i.arrayify(N(exports.SupportedAlgorithm.sha512,this.chainCode,r)),a=n.slice(0,32),f=n.slice(32);let s=null,u=null;if(this.privateKey)s=De(o.BigNumber.from(a).add(this.privateKey).mod(Te));else{u=new we(i.hexlify(a))._addPoint(this.publicKey)}let d=t;const l=this.mnemonic;return l&&(d=Object.freeze({phrase:l.phrase,path:t,locale:l.locale||"en"})),new ze(qe,s,u,this.fingerprint,De(f),e,this.depth+1,d)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e<t.length;e++){const i=t[e];if(i.match(/^[0-9]+'$/)){const e=parseInt(i.substring(0,i.length-1));if(e>=Fe)throw new Error("invalid path index - "+i);r=r._derive(Fe+e)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);{const e=parseInt(i);if(e>=Fe)throw new Error("invalid path index - "+i);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=i.arrayify(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=i.arrayify(N(exports.SupportedAlgorithm.sha512,_e,r));return new ze(qe,De(n.slice(0,32)),null,"0x00000000",De(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=Ge(Ue(e,r=Le(r)),r),ze._fromSeed(We(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return ze._fromSeed(e,null)}static fromExtendedKey(e){const t=C.decode(e);82===t.length&&Oe(t.slice(0,78))===e||ke.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],n=i.hexlify(t.slice(5,9)),o=parseInt(i.hexlify(t.slice(9,13)).substring(2),16),a=i.hexlify(t.slice(13,45)),f=t.slice(45,78);switch(i.hexlify(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new ze(qe,null,i.hexlify(f),n,a,o,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==f[0])break;return new ze(qe,i.hexlify(f.slice(1)),null,n,a,o,r,null)}return ke.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function We(e,t){t||(t="");const r=o.toUtf8Bytes("mnemonic"+t,o.UnicodeNormalizationForm.NFKD);return function(e,t,r,n,o){let a;e=i.arrayify(e),t=i.arrayify(t);let f=1;const s=new Uint8Array(n),u=new Uint8Array(t.length+4);let d,l;u.set(t);for(let h=1;h<=f;h++){u[t.length]=h>>24&255,u[t.length+1]=h>>16&255,u[t.length+2]=h>>8&255,u[t.length+3]=255&h;let c=i.arrayify(N(o,e,u));a||(a=c.length,l=new Uint8Array(a),f=Math.ceil(n/a),d=n-(f-1)*a),l.set(c);for(let t=1;t<r;t++){c=i.arrayify(N(o,e,c));for(let e=0;e<a;e++)l[e]^=c[e]}const p=(h-1)*a,m=h===f?d:a;s.set(i.arrayify(l).slice(0,m),p)}return i.hexlify(s)}(o.toUtf8Bytes(e,o.UnicodeNormalizationForm.NFKD),r,2048,64,"sha512")}function Ue(e,t){t=Le(t),ke.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=i.arrayify(new Uint8Array(Math.ceil(11*r.length/8)));let o=0;for(let e=0;e<r.length;e++){let i=t.getWordIndex(r[e].normalize("NFKD"));if(-1===i)throw new Error("invalid mnemonic");for(let e=0;e<11;e++)i&1<<10-e&&(n[o>>3]|=1<<7-o%8),o++}const a=32*r.length/3,f=Ne(r.length/3);if((i.arrayify(F(n.slice(0,a/8)))[0]&f)!==(n[n.length-1]&f))throw new Error("invalid checksum");return i.hexlify(n.slice(0,a/8))}function Ge(e,t){if(t=Le(t),(e=i.arrayify(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t<e.length;t++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const o=e.length/4,a=i.arrayify(F(e))[0]&Ne(o);return r[r.length-1]<<=o,r[r.length-1]|=a>>8-o,t.join(r.map((e=>t.getWord(e))))}function He(e,t){try{return Ue(e,t),!0}catch(e){}return!1}function Ve(e){return("number"!=typeof e||e<0||e>=Fe||e%1)&&ke.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}var je=Object.freeze({__proto__:null,defaultPath:Ke,HDNode:ze,mnemonicToSeed:We,mnemonicToEntropy:Ue,entropyToMnemonic:Ge,isValidMnemonic:He,getAccountPath:Ve});const Je=new o.Logger("random/5.7.0");const $e=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();let Ze=$e.crypto||$e.msCrypto;function Xe(e){(e<=0||e>1024||e%1||e!=e)&&Je.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return Ze.getRandomValues(t),i.arrayify(t)}Ze&&Ze.getRandomValues||(Je.warn("WARNING: Missing strong random number source"),Ze={getRandomValues:function(e){return Je.throwError("no secure random source avaialble",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var Ye=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function f(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,f)}s((i=i.apply(e,t||[])).next())}))};const Qe=new o.Logger("wallet/5.7.0");class et extends r.Signer{constructor(r,n){if(super(),null!=(o=r)&&i.isHexString(o.privateKey,32)&&null!=o.address){const t=new we(r.privateKey);if(f.defineReadOnly(this,"_signingKey",(()=>t)),f.defineReadOnly(this,"address",d.computeAddress(this.publicKey)),this.address!==e.getAddress(r.address)&&Qe.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(r)){const e=r.mnemonic;f.defineReadOnly(this,"_mnemonic",(()=>({phrase:e.phrase,path:e.path||Ke,locale:e.locale||"en"})));const t=this.mnemonic,i=ze.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path);d.computeAddress(i.privateKey)!==this.address&&Qe.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else f.defineReadOnly(this,"_mnemonic",(()=>null))}else{if(we.isSigningKey(r))"secp256k1"!==r.curve&&Qe.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),f.defineReadOnly(this,"_signingKey",(()=>r));else{"string"==typeof r&&r.match(/^[0-9a-f]*$/i)&&64===r.length&&(r="0x"+r);const e=new we(r);f.defineReadOnly(this,"_signingKey",(()=>e))}f.defineReadOnly(this,"_mnemonic",(()=>null)),f.defineReadOnly(this,"address",d.computeAddress(this.publicKey))}var o;n&&!t.Provider.isProvider(n)&&Qe.throwArgumentError("invalid provider","provider",n),f.defineReadOnly(this,"provider",n||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new et(this,e)}signTransaction(t){return f.resolveProperties(t).then((r=>{null!=r.from&&(e.getAddress(r.from)!==this.address&&Qe.throwArgumentError("transaction from address mismatch","transaction.from",t.from),delete r.from);const i=this._signingKey().signDigest(n.keccak256(d.serialize(r)));return d.serialize(r,i)}))}signMessage(e){return Ye(this,void 0,void 0,(function*(){return i.joinSignature(this._signingKey().signDigest(I(e)))}))}_signTypedData(e,t,r){return Ye(this,void 0,void 0,(function*(){const n=yield a.TypedDataEncoder.resolveNames(e,t,r,(e=>(null==this.provider&&Qe.throwError("cannot resolve ENS names without a provider",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return i.joinSignature(this._signingKey().signDigest(a.TypedDataEncoder.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),l.encryptKeystore(this,e,t,r)}static createRandom(e){let t=Xe(16);e||(e={}),e.extraEntropy&&(t=i.arrayify(i.hexDataSlice(n.keccak256(i.concat([t,e.extraEntropy])),0,16)));const r=Ge(t,e.locale);return et.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return l.decryptJsonWallet(e,t,r).then((e=>new et(e)))}static fromEncryptedJsonSync(e,t){return new et(l.decryptJsonWalletSync(e,t))}static fromMnemonic(e,t,r){return t||(t=Ke),new et(ze.fromMnemonic(e,null,r).derivePath(t))}}function tt(e,t){return d.recoverAddress(I(e),t)}function rt(e,t,r,i){return d.recoverAddress(a.TypedDataEncoder.hash(e,t,r),i)}var it=Object.freeze({__proto__:null,Wallet:et,verifyMessage:tt,verifyTypedData:rt});const nt=new o.Logger("units/5.7.0"),ot=["wei","kwei","mwei","gwei","szabo","finney","ether"];function at(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&nt.throwArgumentError("invalid value","value",e);let r=t[0],i="";for("-"===r.substring(0,1)&&(i="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let n="";for(2===t.length&&(n="."+(t[1]||"0"));n.length>2&&"0"===n[n.length-1];)n=n.substring(0,n.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const e=r.length-3;o.unshift(r.substring(e)),r=r.substring(0,e)}}return i+o.join(",")+n}function ft(e,t){if("string"==typeof t){const e=ot.indexOf(t);-1!==e&&(t=3*e)}return v(e,null!=t?t:18)}function st(e,t){if("string"!=typeof e&&nt.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=ot.indexOf(t);-1!==e&&(t=3*e)}return S(e,null!=t?t:18)}function ut(e){return ft(e,18)}function dt(e){return st(e,18)}var lt=Object.freeze({__proto__:null,commify:at,formatUnits:ft,parseUnits:st,formatEther:ut,parseEther:dt});exports.Base58=C,exports.FixedNumber=A,exports.HDNode=ze,exports.SigningKey=we,exports.Wallet=et,exports.Wordlist=Ie,exports.commify=at,exports.computeHmac=N,exports.computePublicKey=xe,exports.defaultPath=Ke,exports.entropyToMnemonic=Ge,exports.formatEther=ut,exports.formatUnits=ft,exports.getAccountPath=Ve,exports.hashMessage=I,exports.isValidMnemonic=He,exports.lib_esm=k,exports.lib_esm$1=je,exports.lib_esm$2=Pe,exports.lib_esm$3=lt,exports.lib_esm$4=it,exports.messagePrefix=E,exports.mnemonicToEntropy=Ue,exports.mnemonicToSeed=We,exports.parseEther=dt,exports.parseUnits=st,exports.randomBytes=Xe,exports.recoverPublicKey=Ae,exports.ripemd160=_,exports.sha256=F,exports.sha512=function(e){return"0x"+u.hash.sha512().update(i.arrayify(e)).digest("hex")},exports.verifyMessage=tt,exports.verifyTypedData=rt,exports.wordlists=Be;
|