-
Notifications
You must be signed in to change notification settings - Fork 0
/
7.4d859734f20a2c4cb46a.js
1 lines (1 loc) · 14 KB
/
7.4d859734f20a2c4cb46a.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"+0CH":function(e,r,t){"use strict";(function(e){Object.defineProperty(r,"__esModule",{value:!0}),r.assertIsString=r.assertIsArray=r.assertIsBuffer=r.assertIsHexString=void 0;var n=t("mhLr");r.assertIsHexString=function(e){if(!n.isHexString(e))throw new Error("This method only supports 0x-prefixed hex strings but input was: "+e)},r.assertIsBuffer=function(r){if(!e.isBuffer(r))throw new Error("This method only supports Buffer but input was: "+r)},r.assertIsArray=function(e){if(!Array.isArray(e))throw new Error("This method only supports number arrays but input was: "+e)},r.assertIsString=function(e){if("string"!=typeof e)throw new Error("This method only supports strings but input was: "+e)}}).call(this,t("tjlA").Buffer)},"0xaF":function(e,r,t){"use strict";(function(e){Object.defineProperty(r,"__esModule",{value:!0}),r.baToJSON=r.addHexPrefix=r.toUnsigned=r.fromSigned=r.bufferToHex=r.bufferToInt=r.toBuffer=r.unpadHexString=r.unpadArray=r.unpadBuffer=r.setLengthRight=r.setLengthLeft=r.zeros=void 0;var n=t("OZ/i"),f=t("mhLr"),i=t("+0CH");r.zeros=function(r){return e.allocUnsafe(r).fill(0)},r.setLengthLeft=function(e,r){return i.assertIsBuffer(e),o(e,r,!1)},r.setLengthRight=function(e,r){return i.assertIsBuffer(e),o(e,r,!0)};var o=function(e,t,n){var f=r.zeros(t);return n?e.length<t?(e.copy(f),f):e.slice(0,t):e.length<t?(e.copy(f,t-e.length),f):e.slice(-t)};r.unpadBuffer=function(e){return i.assertIsBuffer(e),s(e)},r.unpadArray=function(e){return i.assertIsArray(e),s(e)},r.unpadHexString=function(e){return i.assertIsHexString(e),e=f.stripHexPrefix(e),s(e)};var s=function(e){for(var r=e[0];e.length>0&&"0"===r.toString();)r=(e=e.slice(1))[0];return e};r.toBuffer=function(r){if(null==r)return e.allocUnsafe(0);if(e.isBuffer(r))return e.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return e.from(r);if("string"==typeof r){if(!f.isHexString(r))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+r);return e.from(f.padToEven(f.stripHexPrefix(r)),"hex")}if("number"==typeof r)return f.intToBuffer(r);if(n.isBN(r))return r.toArrayLike(e);if(r.toArray)return e.from(r.toArray());if(r.toBuffer)return e.from(r.toBuffer());throw new Error("invalid type")},r.bufferToInt=function(e){return new n(r.toBuffer(e)).toNumber()},r.bufferToHex=function(e){return"0x"+(e=r.toBuffer(e)).toString("hex")},r.fromSigned=function(e){return new n(e).fromTwos(256)},r.toUnsigned=function(r){return e.from(r.toTwos(256).toArray())},r.addHexPrefix=function(e){return"string"!=typeof e||f.isHexPrefixed(e)?e:"0x"+e},r.baToJSON=function(t){if(e.isBuffer(t))return"0x"+t.toString("hex");if(t instanceof Array){for(var n=[],f=0;f<t.length;f++)n.push(r.baToJSON(t[f]));return n}}}).call(this,t("tjlA").Buffer)},"47gy":function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KECCAK256_RLP=r.KECCAK256_RLP_S=r.KECCAK256_RLP_ARRAY=r.KECCAK256_RLP_ARRAY_S=r.KECCAK256_NULL=r.KECCAK256_NULL_S=r.TWO_POW256=r.MAX_INTEGER=void 0;var n=t("tjlA").Buffer,f=t("OZ/i");r.MAX_INTEGER=new f("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),r.TWO_POW256=new f("10000000000000000000000000000000000000000000000000000000000000000",16),r.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",r.KECCAK256_NULL=n.from(r.KECCAK256_NULL_S,"hex"),r.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",r.KECCAK256_RLP_ARRAY=n.from(r.KECCAK256_RLP_ARRAY_S,"hex"),r.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",r.KECCAK256_RLP=n.from(r.KECCAK256_RLP_S,"hex")},"4PoC":function(e,r,t){"use strict";(function(e){Object.defineProperty(r,"__esModule",{value:!0}),r.isZeroAddress=r.zeroAddress=r.importPublic=r.privateToPublic=r.privateToAddress=r.publicToAddress=r.pubToAddress=r.isValidPublic=r.isValidPrivate=r.generateAddress2=r.generateAddress=r.isValidChecksumAddress=r.toChecksumAddress=r.isValidAddress=r.Account=void 0;var n=t("9lTW"),f=t("OZ/i"),i=t("o8pB"),o=t("mhLr"),s=t("47gy"),u=t("0xaF"),a=t("niIc"),c=t("+0CH"),d=t("57w6"),l=t("IhPl"),h=l.privateKeyVerify,g=l.publicKeyCreate,p=l.publicKeyVerify,v=l.publicKeyConvert,A=function(){function e(e,r,t,n){void 0===e&&(e=new f(0)),void 0===r&&(r=new f(0)),void 0===t&&(t=s.KECCAK256_RLP),void 0===n&&(n=s.KECCAK256_NULL),this.nonce=e,this.balance=r,this.stateRoot=t,this.codeHash=n,this._validate()}return e.fromAccountData=function(r){var t=r.nonce,n=r.balance,i=r.stateRoot,o=r.codeHash;return new e(t?new f(u.toBuffer(t)):void 0,n?new f(u.toBuffer(n)):void 0,i?u.toBuffer(i):void 0,o?u.toBuffer(o):void 0)},e.fromRlpSerializedAccount=function(e){var r=i.decode(e);if(!Array.isArray(r))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(r)},e.fromValuesArray=function(r){var t=r[0],n=r[1],i=r[2],o=r[3];return new e(t?new f(t):void 0,n?new f(n):void 0,i,o)},e.prototype._validate=function(){if(this.nonce.lt(new f(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new f(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[d.bnToRlp(this.nonce),d.bnToRlp(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return i.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(s.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(s.KECCAK256_NULL)},e}();r.Account=A,r.isValidAddress=function(e){return c.assertIsHexString(e),/^0x[0-9a-fA-F]{40}$/.test(e)},r.toChecksumAddress=function(e,r){c.assertIsHexString(e);for(var t=o.stripHexPrefix(e).toLowerCase(),n=void 0!==r?r.toString()+"0x":"",f=a.keccakFromString(n+t).toString("hex"),i="0x",s=0;s<t.length;s++)parseInt(f[s],16)>=8?i+=t[s].toUpperCase():i+=t[s];return i},r.isValidChecksumAddress=function(e,t){return r.isValidAddress(e)&&r.toChecksumAddress(e,t)===e},r.generateAddress=function(r,t){c.assertIsBuffer(r),c.assertIsBuffer(t);var n=new f(t);return n.isZero()?a.rlphash([r,null]).slice(-20):a.rlphash([r,e.from(n.toArray())]).slice(-20)},r.generateAddress2=function(r,t,f){return c.assertIsBuffer(r),c.assertIsBuffer(t),c.assertIsBuffer(f),n(20===r.length),n(32===t.length),a.keccak256(e.concat([e.from("ff","hex"),r,t,a.keccak256(f)])).slice(-20)},r.isValidPrivate=function(e){return h(e)},r.isValidPublic=function(r,t){return void 0===t&&(t=!1),c.assertIsBuffer(r),64===r.length?p(e.concat([e.from([4]),r])):!!t&&p(r)},r.pubToAddress=function(r,t){return void 0===t&&(t=!1),c.assertIsBuffer(r),t&&64!==r.length&&(r=e.from(v(r,!1).slice(1))),n(64===r.length),a.keccak(r).slice(-20)},r.publicToAddress=r.pubToAddress,r.privateToAddress=function(e){return r.publicToAddress(r.privateToPublic(e))},r.privateToPublic=function(r){return c.assertIsBuffer(r),e.from(g(r,!1)).slice(1)},r.importPublic=function(r){return c.assertIsBuffer(r),64!==r.length&&(r=e.from(v(r,!1).slice(1))),r},r.zeroAddress=function(){var e=u.zeros(20);return u.bufferToHex(e)},r.isZeroAddress=function(e){return c.assertIsHexString(e),r.zeroAddress()===e}}).call(this,t("tjlA").Buffer)},"57w6":function(e,r,t){"use strict";(function(e){Object.defineProperty(r,"__esModule",{value:!0}),r.bnToRlp=r.bnToHex=void 0;var n=t("0xaF");r.bnToHex=function(e){return"0x"+e.toString(16)},r.bnToRlp=function(r){return n.unpadBuffer(r.toArrayLike(e))}}).call(this,t("tjlA").Buffer)},OiUL:function(e,r,t){"use strict";(function(e){Object.defineProperty(r,"__esModule",{value:!0}),r.defineProperties=void 0;var n=t("mhLr"),f=t("9lTW"),i=t("o8pB"),o=t("0xaF");r.defineProperties=function(r,t,s){if(r.raw=[],r._fields=[],r.toJSON=function(e){if(void 0===e&&(e=!1),e){var t={};return r._fields.forEach(function(e){t[e]="0x"+r[e].toString("hex")}),t}return o.baToJSON(r.raw)},r.serialize=function(){return i.encode(r.raw)},t.forEach(function(t,n){function i(){return r.raw[n]}function s(i){"00"!==(i=o.toBuffer(i)).toString("hex")||t.allowZero||(i=e.allocUnsafe(0)),t.allowLess&&t.length?(i=o.unpadBuffer(i),f(t.length>=i.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===i.length||!t.length||f(t.length===i.length,"The field "+t.name+" must have byte length of "+t.length),r.raw[n]=i}r._fields.push(t.name),Object.defineProperty(r,t.name,{enumerable:!0,configurable:!0,get:i,set:s}),t.default&&(r[t.name]=t.default),t.alias&&Object.defineProperty(r,t.alias,{enumerable:!1,configurable:!0,set:s,get:i})}),s)if("string"==typeof s&&(s=e.from(n.stripHexPrefix(s),"hex")),e.isBuffer(s)&&(s=i.decode(s)),Array.isArray(s)){if(s.length>r._fields.length)throw new Error("wrong number of fields in data");s.forEach(function(e,t){r[r._fields[t]]=o.toBuffer(e)})}else{if("object"!=typeof s)throw new Error("invalid data");var u=Object.keys(s);t.forEach(function(e){-1!==u.indexOf(e.name)&&(r[e.name]=s[e.name]),-1!==u.indexOf(e.alias)&&(r[e.alias]=s[e.alias])})}}}).call(this,t("tjlA").Buffer)},YPRe:function(e,r,t){"use strict";(function(e){Object.defineProperty(r,"__esModule",{value:!0}),r.hashPersonalMessage=r.isValidSignature=r.fromRpcSig=r.toRpcSig=r.ecrecover=r.ecsign=void 0;var n=t("IhPl"),f=n.ecdsaSign,i=n.ecdsaRecover,o=n.publicKeyConvert,s=t("OZ/i"),u=t("0xaF"),a=t("niIc"),c=t("+0CH");function d(e,r){return r?e-(2*r+35):e-27}function l(e){return 0===e||1===e}r.ecsign=function(r,t,n){var i=f(r,t),o=i.recid;return{r:e.from(i.signature.slice(0,32)),s:e.from(i.signature.slice(32,64)),v:n?o+(2*n+35):o+27}},r.ecrecover=function(r,t,n,f,s){var a=e.concat([u.setLengthLeft(n,32),u.setLengthLeft(f,32)],64),c=d(t,s);if(!l(c))throw new Error("Invalid signature v value");var h=i(a,c,r);return e.from(o(h,!1).slice(1))},r.toRpcSig=function(r,t,n,f){if(!l(d(r,f)))throw new Error("Invalid signature v value");return u.bufferToHex(e.concat([u.setLengthLeft(t,32),u.setLengthLeft(n,32),u.toBuffer(r)]))},r.fromRpcSig=function(e){var r=u.toBuffer(e);if(65!==r.length)throw new Error("Invalid signature length");var t=r[64];return t<27&&(t+=27),{v:t,r:r.slice(0,32),s:r.slice(32,64)}},r.isValidSignature=function(e,r,t,n,f){void 0===n&&(n=!0);var i=new s("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new s("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==r.length||32!==t.length)return!1;if(!l(d(e,f)))return!1;var u=new s(r),a=new s(t);return!(u.isZero()||u.gt(o)||a.isZero()||a.gt(o)||n&&1===a.cmp(i))},r.hashPersonalMessage=function(r){c.assertIsBuffer(r);var t=e.from("\x19Ethereum Signed Message:\n"+r.length.toString(),"utf-8");return a.keccak(e.concat([t,r]))}}).call(this,t("tjlA").Buffer)},ZDeM:function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){void 0===n&&(n=t),Object.defineProperty(e,n,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,n){void 0===n&&(n=t),e[n]=r[t]}),f=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||r.hasOwnProperty(t)||n(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),f(t("47gy"),r),f(t("4PoC"),r),f(t("n6jU"),r),f(t("niIc"),r),f(t("YPRe"),r),f(t("0xaF"),r),f(t("OiUL"),r),f(t("w0G5"),r),f(t("57w6"),r),f(t("mhLr"),r)},n6jU:function(e,r,t){"use strict";(function(e){Object.defineProperty(r,"__esModule",{value:!0}),r.Address=void 0;var n=t("9lTW"),f=t("OZ/i"),i=t("0xaF"),o=t("4PoC"),s=function(){function r(e){n(20===e.length,"Invalid address length"),this.buf=e}return r.zero=function(){return new r(i.zeros(20))},r.fromString=function(e){return n(o.isValidAddress(e),"Invalid address"),new r(i.toBuffer(e))},r.fromPublicKey=function(t){return n(e.isBuffer(t),"Public key should be Buffer"),new r(o.pubToAddress(t))},r.fromPrivateKey=function(t){return n(e.isBuffer(t),"Private key should be Buffer"),new r(o.privateToAddress(t))},r.generate=function(t,i){return n(f.isBN(i)),new r(o.generateAddress(t.buf,i.toArrayLike(e)))},r.generate2=function(t,f,i){return n(e.isBuffer(f)),n(e.isBuffer(i)),new r(o.generateAddress2(t.buf,f,i))},r.prototype.isZero=function(){return this.buf.equals(r.zero().buf)},r.prototype.toString=function(){return"0x"+this.buf.toString("hex")},r.prototype.toBuffer=function(){return e.from(this.buf)},r}();r.Address=s}).call(this,t("tjlA").Buffer)},niIc:function(e,r,t){"use strict";(function(e){Object.defineProperty(r,"__esModule",{value:!0}),r.rlphash=r.ripemd160FromArray=r.ripemd160FromString=r.ripemd160=r.sha256FromArray=r.sha256FromString=r.sha256=r.keccakFromArray=r.keccakFromHexString=r.keccakFromString=r.keccak256=r.keccak=void 0;var n=t("wzGL"),f=n.keccak224,i=n.keccak384,o=n.keccak256,s=n.keccak512,u=t("mObS"),a=t("o8pB"),c=t("0xaF"),d=t("+0CH");r.keccak=function(e,r){switch(void 0===r&&(r=256),d.assertIsBuffer(e),r){case 224:return f(e);case 256:return o(e);case 384:return i(e);case 512:return s(e);default:throw new Error("Invald algorithm: keccak"+r)}},r.keccak256=function(e){return r.keccak(e)},r.keccakFromString=function(t,n){void 0===n&&(n=256),d.assertIsString(t);var f=e.from(t,"utf8");return r.keccak(f,n)},r.keccakFromHexString=function(e,t){return void 0===t&&(t=256),d.assertIsHexString(e),r.keccak(c.toBuffer(e),t)},r.keccakFromArray=function(e,t){return void 0===t&&(t=256),d.assertIsArray(e),r.keccak(c.toBuffer(e),t)},r.sha256=function(e){return d.assertIsBuffer(e),l(e)},r.sha256FromString=function(e){return d.assertIsString(e),l(e)},r.sha256FromArray=function(e){return d.assertIsArray(e),l(e)};var l=function(e){return e=c.toBuffer(e),u("sha256").update(e).digest()};r.ripemd160=function(e,r){return d.assertIsBuffer(e),h(e,r)},r.ripemd160FromString=function(e,r){return d.assertIsString(e),h(e,r)},r.ripemd160FromArray=function(e,r){return d.assertIsArray(e),h(e,r)};var h=function(e,r){e=c.toBuffer(e);var t=u("rmd160").update(e).digest();return!0===r?c.setLengthLeft(t,32):t};r.rlphash=function(e){return r.keccak(a.encode(e))}}).call(this,t("tjlA").Buffer)},w0G5:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.rlp=r.BN=void 0;var n=t("OZ/i");r.BN=n;var f=t("o8pB");r.rlp=f}}]);