LavaPack.loadBundle([[2172,{buffer:1943,"ethereumjs-abi":2207,"ethereumjs-util":2177,tweetnacl:3338,"tweetnacl-util":3337},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(r,"__esModule",{value:!0}),r.recoverTypedSignature_v4=r.recoverTypedSignature=r.signTypedData_v4=r.signTypedData=r.recoverTypedMessage=r.signTypedMessage=r.getEncryptionPublicKey=r.decryptSafely=r.decrypt=r.encryptSafely=r.encrypt=r.recoverTypedSignatureLegacy=r.signTypedDataLegacy=r.typedSignatureHash=r.extractPublicKey=r.recoverPersonalSignature=r.personalSign=r.normalize=r.concatSig=r.TypedDataUtils=r.TYPED_MESSAGE_SCHEMA=void 0;const a=i(e("ethereumjs-util")),s=i(e("ethereumjs-abi")),c=i(e("tweetnacl")),u=i(e("tweetnacl-util")),d={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]};r.TYPED_MESSAGE_SCHEMA=d;const l={encodeData(e,r,n,o=!0){const i=["bytes32"],c=[this.hashType(e,n)];if(o){const u=(e,r,i)=>{if(n[r]!==undefined)return["bytes32",null==i?"0x0000000000000000000000000000000000000000000000000000000000000000":a.keccak(this.encodeData(r,i,n,o))];if(i===undefined)throw new Error(`missing value for field ${e} of type ${r}`);if("bytes"===r)return["bytes32",a.keccak(i)];if("string"===r)return"string"==typeof i&&(i=t.from(i,"utf8")),["bytes32",a.keccak(i)];if(r.lastIndexOf("]")===r.length-1){const t=r.slice(0,r.lastIndexOf("[")),n=i.map((r=>u(e,t,r)));return["bytes32",a.keccak(s.rawEncode(n.map((([e])=>e)),n.map((([,e])=>e))))]}return[r,i]};for(const t of n[e]){const[e,n]=u(t.name,t.type,r[t.name]);i.push(e),c.push(n)}}else for(const s of n[e]){let e=r[s.name];if(e!==undefined)if("bytes"===s.type)i.push("bytes32"),e=a.keccak(e),c.push(e);else if("string"===s.type)i.push("bytes32"),"string"==typeof e&&(e=t.from(e,"utf8")),e=a.keccak(e),c.push(e);else if(n[s.type]!==undefined)i.push("bytes32"),e=a.keccak(this.encodeData(s.type,e,n,o)),c.push(e);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");i.push(s.type),c.push(e)}}return s.rawEncode(i,c)},encodeType(e,t){let r="",n=this.findTypeDependencies(e,t).filter((t=>t!==e));n=[e].concat(n.sort());for(const e of n){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return r},findTypeDependencies(e,t,r=[]){if([e]=e.match(/^\w*/u),r.includes(e)||t[e]===undefined)return r;r.push(e);for(const n of t[e])for(const e of this.findTypeDependencies(n.type,t,r))!r.includes(e)&&r.push(e);return r},hashStruct(e,t,r,n=!0){return a.keccak(this.encodeData(e,t,r,n))},hashType(e,t){return a.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const r in d.properties)e[r]&&(t[r]=e[r]);return"types"in t&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},sign(e,r=!0){const n=this.sanitizeData(e),o=[t.from("1901","hex")];return o.push(this.hashStruct("EIP712Domain",n.domain,n.types,r)),"EIP712Domain"!==n.primaryType&&o.push(this.hashStruct(n.primaryType,n.message,n.types,r)),a.keccak(t.concat(o))}};function f(e,t,r){const n=a.fromSigned(t),o=a.fromSigned(r),i=a.bufferToInt(e),s=k(a.toUnsigned(n).toString("hex"),64),c=k(a.toUnsigned(o).toString("hex"),64),u=a.stripHexPrefix(a.intToHex(i));return a.addHexPrefix(s.concat(c,u)).toString("hex")}function h(e,t){const r=E(t.data),n=a.ecsign(r,e);return a.bufferToHex(f(n.v,n.r,n.s))}function p(e){const t=x(E(e.data),e.sig),r=a.publicToAddress(t);return a.bufferToHex(r)}function m(e,t,r){if("x25519-xsalsa20-poly1305"===r){if("string"!=typeof t.data)throw new Error('Cannot detect secret message, message params should be of the form {data: "secret message"} ');const r=c.box.keyPair();let n;try{n=u.decodeBase64(e)}catch(e){throw new Error("Bad public key")}const o=u.decodeUTF8(t.data),i=c.randomBytes(c.box.nonceLength),a=c.box(o,i,n,r.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:u.encodeBase64(i),ephemPublicKey:u.encodeBase64(r.publicKey),ciphertext:u.encodeBase64(a)}}throw new Error("Encryption type/version not supported")}function g(e,t){if("x25519-xsalsa20-poly1305"===e.version){const r=T(t),n=c.box.keyPair.fromSecretKey(r).secretKey,o=u.decodeBase64(e.nonce),i=u.decodeBase64(e.ciphertext),a=u.decodeBase64(e.ephemPublicKey),s=c.box.open(i,o,a,n);let d;try{d=u.encodeUTF8(s)}catch(e){throw new Error("Decryption failed.")}if(d)return d;throw new Error("Decryption failed.")}throw new Error("Encryption type/version not supported.")}function b(e,t){const r=l.sign(t.data,!1),n=a.ecsign(r,e);return a.bufferToHex(f(n.v,n.r,n.s))}function y(e,t){const r=l.sign(t.data),n=a.ecsign(r,e);return a.bufferToHex(f(n.v,n.r,n.s))}function v(e){const t=x(l.sign(e.data,!1),e.sig),r=a.publicToAddress(t);return a.bufferToHex(r)}function w(e){const t=x(l.sign(e.data),e.sig),r=a.publicToAddress(t);return a.bufferToHex(r)}function E(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const r=e.map((function(e){return"bytes"===e.type?a.toBuffer(e.value):e.value})),n=e.map((function(e){return e.type})),o=e.map((function(e){if(!e.name)throw t;return`${e.type} ${e.name}`}));return s.soliditySHA3(["bytes32","bytes32"],[s.soliditySHA3(new Array(e.length).fill("string"),o),s.soliditySHA3(n,r)])}function x(e,t){const r=a.toBuffer(t),n=a.fromRpcSig(r);return a.ecrecover(e,n.v,n.r,n.s)}function _(e){const t=a.toBuffer(e.data);return x(a.hashPersonalMessage(t),e.sig)}function k(e,t){let r=`${e}`;for(;r.length<t;)r=`0${r}`;return r}function T(e){const r=t.from(e,"hex").toString("base64");return u.decodeBase64(r)}r.TypedDataUtils=l,r.concatSig=f,r.normalize=function(e){if(!e)return undefined;if("number"==typeof e){const t=a.toBuffer(e);e=a.bufferToHex(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return a.addHexPrefix(e.toLowerCase())},r.personalSign=function(e,t){const r=a.toBuffer(t.data),n=a.hashPersonalMessage(r),o=a.ecsign(n,e);return a.bufferToHex(f(o.v,o.r,o.s))},r.recoverPersonalSignature=function(e){const t=_(e),r=a.publicToAddress(t);return a.bufferToHex(r)},r.extractPublicKey=function(e){return`0x${_(e).toString("hex")}`},r.typedSignatureHash=function(e){const t=E(e);return a.bufferToHex(t)},r.signTypedDataLegacy=h,r.recoverTypedSignatureLegacy=p,r.encrypt=m,r.encryptSafely=function(e,r,n){const{data:o}=r;if(!o)throw new Error("Cannot encrypt empty msg.data");if("object"==typeof o&&"toJSON"in o)throw new Error("Cannot encrypt with toJSON property.  Please remove toJSON property");const i={data:o,padding:""},a=t.byteLength(JSON.stringify(i),"utf-8")%2048;let s=0;return a>0&&(s=2048-a-16),i.padding="0".repeat(s),m(e,{data:JSON.stringify(i)},n)},r.decrypt=g,r.decryptSafely=function(e,t){return JSON.parse(g(e,t)).data},r.getEncryptionPublicKey=function(e){const t=T(e),r=c.box.keyPair.fromSecretKey(t).publicKey;return u.encodeBase64(r)},r.signTypedMessage=function(e,t,r="V4"){switch(r){case"V1":return h(e,t);case"V3":return b(e,t);default:return y(e,t)}},r.recoverTypedMessage=function(e,t="V4"){switch(t){case"V1":return p(e);case"V3":return v(e);default:return w(e)}},r.signTypedData=b,r.signTypedData_v4=y,r.recoverTypedSignature=v,r.recoverTypedSignature_v4=w}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-sig-util",file:"node_modules/eth-sig-util/dist/index.js"}],[2173,{buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createHashFunction=function(t){return function(r){var n=t();return n.update(r),e.from(n.digest())}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-sig-util>ethereumjs-util>ethereum-cryptography",file:"node_modules/eth-sig-util/node_modules/ethereum-cryptography/hash-utils.js"}],[2174,{"./hash-utils":2173,keccak:2747},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./hash-utils"),o=e("keccak");r.keccak224=n.createHashFunction((function(){return o("keccak224")})),r.keccak256=n.createHashFunction((function(){return o("keccak256")})),r.keccak384=n.createHashFunction((function(){return o("keccak384")})),r.keccak512=n.createHashFunction((function(){return o("keccak512")}))}}},{package:"eth-sig-util>ethereumjs-util>ethereum-cryptography",file:"node_modules/eth-sig-util/node_modules/ethereum-cryptography/keccak.js"}],[2175,{randombytes:3073},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("randombytes");r.getRandomBytes=function(e){return new Promise((function(t,r){n(e,(function(e,n){e?r(e):t(n)}))}))},r.getRandomBytesSync=function(e){return n(e)}}}},{package:"eth-sig-util>ethereumjs-util>ethereum-cryptography",file:"node_modules/eth-sig-util/node_modules/ethereum-cryptography/random.js"}],[2176,{"./random":2175,secp256k1:3219},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0});var i=e("secp256k1"),a=e("./random");r.createPrivateKey=function(){return n(this,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return[4,a.getRandomBytes(32)];case 1:return e=t.sent(),i.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}}))}))},r.createPrivateKeySync=function(){for(;;){var e=a.getRandomBytesSync(32);if(i.privateKeyVerify(e))return e}},function(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}(e("secp256k1"))}}},{package:"eth-sig-util>ethereumjs-util>ethereum-cryptography",file:"node_modules/eth-sig-util/node_modules/ethereum-cryptography/secp256k1.js"}],[2177,{"./secp256k1-adapter":2178,assert:1710,"bn.js":1900,"create-hash":2061,"ethereum-cryptography/keccak":2174,"ethjs-util":2181,rlp:3206,"safe-buffer":3208},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("ethereum-cryptography/keccak"),i=o.keccak224,a=o.keccak384,s=o.keccak256,c=o.keccak512,u=e("./secp256k1-adapter"),d=e("assert"),l=e("rlp"),f=e("bn.js"),h=e("create-hash"),p=e("safe-buffer").Buffer;Object.assign(r,e("ethjs-util")),r.MAX_INTEGER=new f("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),r.TWO_POW256=new f("10000000000000000000000000000000000000000000000000000000000000000",16),r.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",r.SHA3_NULL_S=r.KECCAK256_NULL_S,r.KECCAK256_NULL=p.from(r.KECCAK256_NULL_S,"hex"),r.SHA3_NULL=r.KECCAK256_NULL,r.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",r.SHA3_RLP_ARRAY_S=r.KECCAK256_RLP_ARRAY_S,r.KECCAK256_RLP_ARRAY=p.from(r.KECCAK256_RLP_ARRAY_S,"hex"),r.SHA3_RLP_ARRAY=r.KECCAK256_RLP_ARRAY,r.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",r.SHA3_RLP_S=r.KECCAK256_RLP_S,r.KECCAK256_RLP=p.from(r.KECCAK256_RLP_S,"hex"),r.SHA3_RLP=r.KECCAK256_RLP,r.BN=f,r.rlp=l,r.secp256k1=u,r.zeros=function(e){return p.allocUnsafe(e).fill(0)},r.zeroAddress=function(){var e=r.zeros(20);return r.bufferToHex(e)},r.setLengthLeft=r.setLength=function(e,t,n){var o=r.zeros(t);return e=r.toBuffer(e),n?e.length<t?(e.copy(o),o):e.slice(0,t):e.length<t?(e.copy(o,t-e.length),o):e.slice(-t)},r.setLengthRight=function(e,t){return r.setLength(e,t,!0)},r.unpad=r.stripZeros=function(e){for(var t=(e=r.stripHexPrefix(e))[0];e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},r.toBuffer=function(e){if(!p.isBuffer(e))if(Array.isArray(e))e=p.from(e);else if("string"==typeof e)e=r.isHexString(e)?p.from(r.padToEven(r.stripHexPrefix(e)),"hex"):p.from(e);else if("number"==typeof e)e=r.intToBuffer(e);else if(null===e||e===undefined)e=p.allocUnsafe(0);else if(f.isBN(e))e=e.toArrayLike(p);else{if(!e.toArray)throw new Error("invalid type");e=p.from(e.toArray())}return e},r.bufferToInt=function(e){return new f(r.toBuffer(e)).toNumber()},r.bufferToHex=function(e){return"0x"+(e=r.toBuffer(e)).toString("hex")},r.fromSigned=function(e){return new f(e).fromTwos(256)},r.toUnsigned=function(e){return p.from(e.toTwos(256).toArray())},r.keccak=function(e,t){switch(e=r.toBuffer(e),t||(t=256),t){case 224:return i(e);case 256:return s(e);case 384:return a(e);case 512:return c(e);default:throw new Error("Invald algorithm: keccak"+t)}},r.keccak256=function(e){return r.keccak(e)},r.sha3=r.keccak,r.sha256=function(e){return e=r.toBuffer(e),h("sha256").update(e).digest()},r.ripemd160=function(e,t){e=r.toBuffer(e);var n=h("rmd160").update(e).digest();return!0===t?r.setLength(n,32):n},r.rlphash=function(e){return r.keccak(l.encode(e))},r.isValidPrivate=function(e){return u.privateKeyVerify(e)},r.isValidPublic=function(e,t){return 64===e.length?u.publicKeyVerify(p.concat([p.from([4]),e])):!!t&&u.publicKeyVerify(e)},r.pubToAddress=r.publicToAddress=function(e,t){return e=r.toBuffer(e),t&&64!==e.length&&(e=u.publicKeyConvert(e,!1).slice(1)),d(64===e.length),r.keccak(e).slice(-20)};var m=r.privateToPublic=function(e){return e=r.toBuffer(e),u.publicKeyCreate(e,!1).slice(1)};r.importPublic=function(e){return 64!==(e=r.toBuffer(e)).length&&(e=u.publicKeyConvert(e,!1).slice(1)),e},r.ecsign=function(e,t){var r=u.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},r.hashPersonalMessage=function(e){var t=r.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return r.keccak(p.concat([t,e]))},r.ecrecover=function(e,t,n,o){var i=p.concat([r.setLength(n,32),r.setLength(o,32)],64),a=t-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var s=u.recover(e,i,a);return u.publicKeyConvert(s,!1).slice(1)},r.toRpcSig=function(e,t,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return r.bufferToHex(p.concat([r.setLengthLeft(t,32),r.setLengthLeft(n,32),r.toBuffer(e-27)]))},r.fromRpcSig=function(e){if(65!==(e=r.toBuffer(e)).length)throw new Error("Invalid signature length");var t=e[64];return t<27&&(t+=27),{v:t,r:e.slice(0,32),s:e.slice(32,64)}},r.privateToAddress=function(e){return r.publicToAddress(m(e))},r.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},r.isZeroAddress=function(e){return r.zeroAddress()===r.addHexPrefix(e)},r.toChecksumAddress=function(e){e=r.stripHexPrefix(e).toLowerCase();for(var t=r.keccak(e).toString("hex"),n="0x",o=0;o<e.length;o++)parseInt(t[o],16)>=8?n+=e[o].toUpperCase():n+=e[o];return n},r.isValidChecksumAddress=function(e){return r.isValidAddress(e)&&r.toChecksumAddress(e)===e},r.generateAddress=function(e,t){return e=r.toBuffer(e),t=(t=new f(t)).isZero()?null:p.from(t.toArray()),r.rlphash([e,t]).slice(-20)},r.isPrecompiled=function(e){var t=r.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},r.addHexPrefix=function(e){return"string"!=typeof e||r.isHexPrefixed(e)?e:"0x"+e},r.isValidSignature=function(e,t,r,n){var o=new f("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),i=new f("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===r.length&&((27===e||28===e)&&(t=new f(t),r=new f(r),!(t.isZero()||t.gt(i)||r.isZero()||r.gt(i))&&(!1!==n||1!==new f(r).cmp(o))))},r.baToJSON=function(e){if(p.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var t=[],n=0;n<e.length;n++)t.push(r.baToJSON(e[n]));return t}},r.defineProperties=function(e,t,o){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(t){var n={};return e._fields.forEach((function(t){n[t]="0x"+e[t].toString("hex")})),n}return r.baToJSON(this.raw)},e.serialize=function(){return l.encode(e.raw)},t.forEach((function(t,n){function o(){return e.raw[n]}function i(o){"00"!==(o=r.toBuffer(o)).toString("hex")||t.allowZero||(o=p.allocUnsafe(0)),t.allowLess&&t.length?(o=r.stripZeros(o),d(t.length>=o.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===o.length||!t.length||d(t.length===o.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[n]=o}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:o,set:i}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:i,get:o})})),o)if("string"==typeof o&&(o=p.from(r.stripHexPrefix(o),"hex")),p.isBuffer(o)&&(o=l.decode(o)),Array.isArray(o)){if(o.length>e._fields.length)throw new Error("wrong number of fields in data");o.forEach((function(t,n){e[e._fields[n]]=r.toBuffer(t)}))}else{if("object"!==(void 0===o?"undefined":n(o)))throw new Error("invalid data");var i=Object.keys(o);t.forEach((function(t){-1!==i.indexOf(t.name)&&(e[t.name]=o[t.name]),-1!==i.indexOf(t.alias)&&(e[t.alias]=o[t.alias])}))}}}}},{package:"eth-sig-util>ethereumjs-util",file:"node_modules/eth-sig-util/node_modules/ethereumjs-util/dist/index.js"}],[2178,{"./secp256k1-lib/der":2179,"./secp256k1-lib/index":2180,buffer:1943,"ethereum-cryptography/secp256k1":2176},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("ethereum-cryptography/secp256k1");function o(){return e("./secp256k1-lib/index")}var i=e("./secp256k1-lib/der"),a=function(e){return 32===e.length&&n.privateKeyVerify(Uint8Array.from(e))};t.exports={privateKeyVerify:a,privateKeyExport:function(e,t){var r=o();if(32!==e.length)throw new RangeError("private key length is invalid");var n=r.privateKeyExport(e,t);return i.privateKeyExport(e,n,t)},privateKeyImport:function(e){if(null!==(e=i.privateKeyImport(e))&&32===e.length&&a(e))return e;throw new Error("couldn't import from DER format")},privateKeyNegate:function(e){return r.from(n.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");var t=o();return r.from(t.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,t){return r.from(n.privateKeyTweakAdd(Uint8Array.from(e),t))},privateKeyTweakMul:function(e,t){return r.from(n.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},publicKeyCreate:function(e,t){return r.from(n.publicKeyCreate(Uint8Array.from(e),t))},publicKeyConvert:function(e,t){return r.from(n.publicKeyConvert(Uint8Array.from(e),t))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&n.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,t,o){return r.from(n.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),o))},publicKeyTweakMul:function(e,t,o){return r.from(n.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),o))},publicKeyCombine:function(e,t){var o=[];return e.forEach((function(e){o.push(Uint8Array.from(e))})),r.from(n.publicKeyCombine(o,t))},signatureNormalize:function(e){return r.from(n.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return r.from(n.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return r.from(n.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=o(),r=i.signatureImportLax(e);if(null===r)throw new Error("couldn't parse DER signature");return t.signatureImport(r)},sign:function(e,t,o){if(null===o)throw new TypeError("options should be an Object");var i=void 0;if(o){if(i={},null===o.data)throw new TypeError("options.data should be a Buffer");if(o.data){if(32!==o.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(o.data)}if(null===o.noncefn)throw new TypeError("options.noncefn should be a Function");o.noncefn&&(i.noncefn=function(e,t,n,i,a){var s=null!=n?r.from(n):null,c=null!=i?r.from(i):null,u=r.from("");return o.noncefn&&(u=o.noncefn(r.from(e),r.from(t),s,c,a)),Uint8Array.from(u)})}var a=n.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),i);return{signature:r.from(a.signature),recovery:a.recid}},verify:function(e,t,r){return n.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),r)},recover:function(e,t,o,i){return r.from(n.ecdsaRecover(Uint8Array.from(t),o,Uint8Array.from(e),i))},ecdh:function(e,t){return r.from(n.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},ecdhUnsafe:function(e,t,n){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");var i=o();return r.from(i.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),n))}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-sig-util>ethereumjs-util",file:"node_modules/eth-sig-util/node_modules/ethereumjs-util/dist/secp256k1-adapter.js"}],[2179,{buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){var t=e.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=e.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);r.privateKeyExport=function(r,o,i){var a=e.from(i?t:n);return r.copy(a,i?8:9),o.copy(a,i?181:214),a},r.privateKeyImport=function(e){var t=e.length,r=0;if(t<r+1||48!==e[r])return null;if(t<(r+=1)+1||!(128&e[r]))return null;var n=127&e[r];if(n<1||n>2)return null;if(t<(r+=1)+n)return null;var o=e[r+n-1]|(n>1?e[r+n-2]<<8:0);return t<(r+=n)+o||t<r+3||2!==e[r]||1!==e[r+1]||1!==e[r+2]||t<(r+=3)+2||4!==e[r]||e[r+1]>32||t<r+2+e[r+1]?null:e.slice(r+2,r+2+e[r+1])},r.signatureImportLax=function(t){var r=e.alloc(32,0),n=e.alloc(32,0),o=t.length,i=0;if(48!==t[i++])return null;var a=t[i++];if(128&a&&(i+=a-128)>o)return null;if(2!==t[i++])return null;var s=t[i++];if(128&s){if(i+(a=s-128)>o)return null;for(;a>0&&0===t[i];i+=1,a-=1);for(s=0;a>0;i+=1,a-=1)s=(s<<8)+t[i]}if(s>o-i)return null;var c=i;if(i+=s,2!==t[i++])return null;var u=t[i++];if(128&u){if(i+(a=u-128)>o)return null;for(;a>0&&0===t[i];i+=1,a-=1);for(u=0;a>0;i+=1,a-=1)u=(u<<8)+t[i]}if(u>o-i)return null;var d=i;for(i+=u;s>0&&0===t[c];s-=1,c+=1);if(s>32)return null;var l=t.slice(c,c+s);for(l.copy(r,32-l.length);u>0&&0===t[d];u-=1,d+=1);if(u>32)return null;var f=t.slice(d,d+u);return f.copy(n,32-f.length),{r:r,s:n}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-sig-util>ethereumjs-util",file:"node_modules/eth-sig-util/node_modules/ethereumjs-util/dist/secp256k1-lib/der.js"}],[2180,{"bn.js":1900,buffer:1943,elliptic:2095},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=e("bn.js"),o=new(0,e("elliptic").ec)("secp256k1"),i=o.curve;r.privateKeyExport=function(e,t){var r=new n(e);if(r.ucmp(i.n)>=0)throw new Error("couldn't export to DER format");var s=o.g.mul(r);return a(s.getX(),s.getY(),t)},r.privateKeyModInverse=function(e){var r=new n(e);if(r.ucmp(i.n)>=0||r.isZero())throw new Error("private key range is invalid");return r.invm(i.n).toArrayLike(t,"be",32)},r.signatureImport=function(e){var r=new n(e.r);r.ucmp(i.n)>=0&&(r=new n(0));var o=new n(e.s);return o.ucmp(i.n)>=0&&(o=new n(0)),t.concat([r.toArrayLike(t,"be",32),o.toArrayLike(t,"be",32)])},r.ecdhUnsafe=function(e,t,r){var s=o.keyFromPublic(e),c=new n(t);if(c.ucmp(i.n)>=0||c.isZero())throw new Error("scalar was invalid (zero or overflow)");var u=s.pub.mul(c);return a(u.getX(),u.getY(),r)};var a=function(e,r,n){var o=void 0;return n?((o=t.alloc(33))[0]=r.isOdd()?3:2,e.toArrayLike(t,"be",32).copy(o,1)):((o=t.alloc(65))[0]=4,e.toArrayLike(t,"be",32).copy(o,1),r.toArrayLike(t,"be",32).copy(o,33)),o}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-sig-util>ethereumjs-util",file:"node_modules/eth-sig-util/node_modules/ethereumjs-util/dist/secp256k1-lib/index.js"}],[2181,{buffer:1943,"is-hex-prefixed":2701,"strip-hex-prefix":3281},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("is-hex-prefixed"),o=e("strip-hex-prefix");function i(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function a(e){return"0x"+e.toString(16)}t.exports={arrayContainsArray:function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(r)?"some":"every"]((function(t){return e.indexOf(t)>=0}))},intToBuffer:function(e){var t=a(e);return new r(i(t.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return r.byteLength(e,"utf8")},isHexPrefixed:n,stripHexPrefix:o,padToEven:i,intToHex:a,fromAscii:function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r).toString(16);t+=n.length<2?"0"+n:n}return"0x"+t},fromUtf8:function(e){return"0x"+i(new r(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){var o=parseInt(e.substr(r,2),16);t+=String.fromCharCode(o)}return t},toUtf8:function(e){return new r(i(o(e).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(e,t,r){if(!Array.isArray(e))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof e+"'");if("string"!=typeof t)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof t+"'.");for(var n=[],o=0;o<e.length;o++){var i=e[o][t];if(r&&!i)i="";else if("string"!=typeof i)throw new Error("invalid abi");n.push(i)}return n},isHexString:function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-sig-util>ethereumjs-util>ethjs-util",file:"node_modules/eth-sig-util/node_modules/ethjs-util/lib/index.js"}],[2182,{"@ethereumjs/tx":363,buffer:1943,"ethereumjs-util":2231,events:1944,hdkey:2183,"trezor-connect":3306,"trezor-connect/lib/plugins/ethereum/typedData":3309},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){const{EventEmitter:n}=e("events"),o=e("ethereumjs-util"),i=e("hdkey"),a=e("trezor-connect").default,{TransactionFactory:s}=e("@ethereumjs/tx"),c=e("trezor-connect/lib/plugins/ethereum/typedData"),u="m/44'/60'/0'/0",d={[u]:!0,"m/44'/1'/0'/0":!0},l="Trezor Hardware",f=1e3,h={email:"support@metamask.io",appUrl:"https://metamask.io"};function p(e){return new Promise((t=>setTimeout(t,e)))}function m(e){return"function"==typeof e.getChainId}class g extends n{constructor(e={}){super(),this.type=l,this.accounts=[],this.hdk=new i,this.page=0,this.perPage=5,this.unlockedAccount=0,this.paths={},this.deserialize(e),a.on("DEVICE_EVENT",(e=>{e&&e.payload&&e.payload.features&&(this.model=e.payload.features.model)})),a.init({manifest:h})}getModel(){return this.model}dispose(){a.dispose()}serialize(){return Promise.resolve({hdPath:this.hdPath,accounts:this.accounts,page:this.page,paths:this.paths,perPage:this.perPage,unlockedAccount:this.unlockedAccount})}deserialize(e={}){return this.hdPath=e.hdPath||u,this.accounts=e.accounts||[],this.page=e.page||0,this.perPage=e.perPage||5,Promise.resolve()}isUnlocked(){return Boolean(this.hdk&&this.hdk.publicKey)}unlock(){return this.isUnlocked()?Promise.resolve("already unlocked"):new Promise(((e,t)=>{a.getPublicKey({path:this.hdPath,coin:"ETH"}).then((n=>{n.success?(this.hdk.publicKey=r.from(n.payload.publicKey,"hex"),this.hdk.chainCode=r.from(n.payload.chainCode,"hex"),e("just unlocked")):t(new Error(n.payload&&n.payload.error||"Unknown error"))})).catch((e=>{t(new Error(e&&e.toString()||"Unknown error"))}))}))}setAccountToUnlock(e){this.unlockedAccount=parseInt(e,10)}addAccounts(e=1){return new Promise(((t,r)=>{this.unlock().then((r=>{const n=this.unlockedAccount,o=n+e;for(let e=n;e<o;e++){const t=this._addressFromIndex("m",e);this.accounts.includes(t)||this.accounts.push(t),this.page=0}t(this.accounts)})).catch((e=>{r(e)}))}))}getFirstPage(){return this.page=0,this.__getPage(1)}getNextPage(){return this.__getPage(1)}getPreviousPage(){return this.__getPage(-1)}__getPage(e){return this.page+=e,this.page<=0&&(this.page=1),new Promise(((e,t)=>{this.unlock().then((t=>{const r=(this.page-1)*this.perPage,n=r+this.perPage,i=[];for(let e=r;e<n;e++){const t=this._addressFromIndex("m",e);i.push({address:t,balance:null,index:e}),this.paths[o.toChecksumAddress(t)]=e}e(i)})).catch((e=>{t(e)}))}))}getAccounts(){return Promise.resolve(this.accounts.slice())}removeAccount(e){if(!this.accounts.map((e=>e.toLowerCase())).includes(e.toLowerCase()))throw new Error(`Address ${e} not found in this keyring`);this.accounts=this.accounts.filter((t=>t.toLowerCase()!==e.toLowerCase()))}signTransaction(e,t){return m(t)?this._signTransaction(e,t.getChainId(),t,(e=>(t.v=r.from(e.v,"hex"),t.r=r.from(e.r,"hex"),t.s=r.from(e.s,"hex"),t))):this._signTransaction(e,t.common.chainIdBN().toNumber(),t,(e=>{const r=t.toJSON();return r.type=t.type,r.v=o.addHexPrefix(e.v),r.r=o.addHexPrefix(e.r),r.s=o.addHexPrefix(e.s),s.fromTxData(r,{common:t.common,freeze:Object.isFrozen(t)})}))}async _signTransaction(e,t,r,n){let i;i=m(r)?{to:this._normalize(r.to),value:this._normalize(r.value),data:this._normalize(r.data),chainId:t,nonce:this._normalize(r.nonce),gasLimit:this._normalize(r.gasLimit),gasPrice:this._normalize(r.gasPrice)}:{...r.toJSON(),chainId:t,to:this._normalize(r.to)};try{const t=await this.unlock();await p("just unlocked"===t?f:0);const r=await a.ethereumSignTransaction({path:this._pathFromAddress(e),transaction:i});if(r.success){const t=n(r.payload),i=o.toChecksumAddress(o.addHexPrefix(t.getSenderAddress().toString("hex")));if(i!==o.toChecksumAddress(e))throw new Error("signature doesn't match the right address");return t}throw new Error(r.payload&&r.payload.error||"Unknown error")}catch(e){throw new Error(e&&e.toString()||"Unknown error")}}signMessage(e,t){return this.signPersonalMessage(e,t)}signPersonalMessage(e,t){return new Promise(((r,n)=>{this.unlock().then((i=>{setTimeout((i=>{a.ethereumSignMessage({path:this._pathFromAddress(e),message:o.stripHexPrefix(t),hex:!0}).then((t=>{if(t.success){t.payload.address!==o.toChecksumAddress(e)&&n(new Error("signature doesnt match the right address"));const i=`0x${t.payload.signature}`;r(i)}else n(new Error(t.payload&&t.payload.error||"Unknown error"))})).catch((e=>{n(new Error(e&&e.toString()||"Unknown error"))}))}),"just unlocked"===i?f:0)})).catch((e=>{n(new Error(e&&e.toString()||"Unknown error"))}))}))}async signTypedData(e,t,{version:r}){const n=c(t,"V4"===r),{types:{EIP712Domain:i=[],...s}={},message:u={},domain:d={},primaryType:l,domain_separator_hash:h,message_hash:m}=n,g=await this.unlock();await p("just unlocked"===g?f:0);const b=await a.ethereumSignTypedData({path:this._pathFromAddress(e),data:{types:{EIP712Domain:i,...s},message:u,domain:d,primaryType:l},metamask_v4_compat:!0,domain_separator_hash:h,message_hash:m});if(b.success){if(o.toChecksumAddress(e)!==b.payload.address)throw new Error("signature doesnt match the right address");return b.payload.signature}throw new Error(b.payload&&b.payload.error||"Unknown error")}exportAccount(){return Promise.reject(new Error("Not supported on this device"))}forgetDevice(){this.accounts=[],this.hdk=new i,this.page=0,this.unlockedAccount=0,this.paths={}}setHdPath(e){if(!d[e])throw new Error(`The setHdPath method does not support setting HD Path to ${e}`);this.hdPath!==e&&(this.hdk=new i,this.accounts=[],this.page=0,this.perPage=5,this.unlockedAccount=0,this.paths={}),this.hdPath=e}_normalize(e){return o.bufferToHex(e).toString()}_addressFromIndex(e,t){const r=this.hdk.derive(`${e}/${t}`),n=o.publicToAddress(r.publicKey,!0).toString("hex");return o.toChecksumAddress(`0x${n}`)}_pathFromAddress(e){const t=o.toChecksumAddress(e);let r=this.paths[t];if(void 0===r)for(let e=0;e<1e3;e++)if(t===this._addressFromIndex("m",e)){r=e;break}if(void 0===r)throw new Error("Unknown address");return`${this.hdPath}/${r}`}}g.type=l,t.exports=g}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-trezor-keyring",file:"node_modules/eth-trezor-keyring/index.js"}],[2183,{assert:1710,coinstring:1983,crypto:2066,"safe-buffer":3208,secp256k1:2184},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("assert"),o=e("safe-buffer").Buffer,i=e("crypto"),a=e("coinstring"),s=e("secp256k1"),c=o.from("Bitcoin seed","utf8"),u=2147483648,d={private:76066276,public:76067358};function l(e){this.versions=e||d,this.depth=0,this.index=0,this._privateKey=null,this._publicKey=null,this.chainCode=null,this._fingerprint=0,this.parentFingerprint=0}function f(e,t,r){var n=o.allocUnsafe(78);n.writeUInt32BE(t,0),n.writeUInt8(e.depth,4);var i=e.depth?e.parentFingerprint:0;return n.writeUInt32BE(i,5),n.writeUInt32BE(e.index,9),e.chainCode.copy(n,13),r.copy(n,45),n}function h(e){var t=i.createHash("sha256").update(e).digest();return i.createHash("rmd160").update(t).digest()}Object.defineProperty(l.prototype,"fingerprint",{get:function(){return this._fingerprint}}),Object.defineProperty(l.prototype,"identifier",{get:function(){return this._identifier}}),Object.defineProperty(l.prototype,"pubKeyHash",{get:function(){return this.identifier}}),Object.defineProperty(l.prototype,"privateKey",{get:function(){return this._privateKey},set:function(e){n.equal(e.length,32,"Private key must be 32 bytes."),n(!0===s.privateKeyVerify(e),"Invalid private key"),this._privateKey=e,this._publicKey=s.publicKeyCreate(e,!0),this._identifier=h(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0)}}),Object.defineProperty(l.prototype,"publicKey",{get:function(){return this._publicKey},set:function(e){n(33===e.length||65===e.length,"Public key must be 33 or 65 bytes."),n(!0===s.publicKeyVerify(e),"Invalid public key"),this._publicKey=s.publicKeyConvert(e,!0),this._identifier=h(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0),this._privateKey=null}}),Object.defineProperty(l.prototype,"privateExtendedKey",{get:function(){return this._privateKey?a.encode(f(this,this.versions.private,o.concat([o.alloc(1,0),this.privateKey]))):null}}),Object.defineProperty(l.prototype,"publicExtendedKey",{get:function(){return a.encode(f(this,this.versions.public,this.publicKey))}}),l.prototype.derive=function(e){if("m"===e||"M"===e||"m'"===e||"M'"===e)return this;var t=e.split("/"),r=this;return t.forEach((function(e,t){if(0!==t){var o=e.length>1&&"'"===e[e.length-1],i=parseInt(e,10);n(i<u,"Invalid index"),o&&(i+=u),r=r.deriveChild(i)}else n(e,"m","Invalid path")})),r},l.prototype.deriveChild=function(e){var t,r=e>=u,a=o.allocUnsafe(4);if(a.writeUInt32BE(e,0),r){n(this.privateKey,"Could not derive hardened child key");var c=this.privateKey,d=o.alloc(1,0);c=o.concat([d,c]),t=o.concat([c,a])}else t=o.concat([this.publicKey,a]);var f=i.createHmac("sha512",this.chainCode).update(t).digest(),h=f.slice(0,32),p=f.slice(32),m=new l(this.versions);if(this.privateKey)try{m.privateKey=s.privateKeyTweakAdd(this.privateKey,h)}catch(t){return this.derive(e+1)}else try{m.publicKey=s.publicKeyTweakAdd(this.publicKey,h,!0)}catch(t){return this.derive(e+1,r)}return m.chainCode=p,m.depth=this.depth+1,m.parentFingerprint=this.fingerprint,m.index=e,m},l.prototype.sign=function(e){return s.sign(e,this.privateKey).signature},l.prototype.verify=function(e,t){return s.verify(e,t,this.publicKey)},l.prototype.toJSON=function(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}},l.fromMasterSeed=function(e,t){var r=i.createHmac("sha512",c).update(e).digest(),n=r.slice(0,32),o=r.slice(32),a=new l(t);return a.chainCode=o,a.privateKey=n,a},l.fromExtendedKey=function(e,t){var r=new l(t=t||d),o=a.decode(e),i=o.readUInt32BE(0);n(i===t.private||i===t.public,"Version mismatch: does not match private or public"),r.depth=o.readUInt8(4),r.parentFingerprint=o.readUInt32BE(5),r.index=o.readUInt32BE(9),r.chainCode=o.slice(13,45);var s=o.slice(45);return 0===s.readUInt8(0)?(n(i===t.private,"Version mismatch: version does not match private"),r.privateKey=s.slice(1)):(n(i===t.public,"Version mismatch: version does not match public"),r.publicKey=s),r},l.fromJSON=function(e){return l.fromExtendedKey(e.xpriv)},l.HARDENED_OFFSET=u,t.exports=l}}},{package:"eth-trezor-keyring>hdkey",file:"node_modules/eth-trezor-keyring/node_modules/hdkey/lib/hdkey.js"}],[2184,{"./lib":2188,"./lib/elliptic":2187},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("./lib")(e("./lib/elliptic"))}}},{package:"eth-trezor-keyring>hdkey>secp256k1",file:"node_modules/eth-trezor-keyring/node_modules/hdkey/node_modules/secp256k1/elliptic.js"}],[2185,{"../../../../../../is-buffer/index.js":2697},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){var t=Object.prototype.toString;r.isArray=function(e,t){if(!Array.isArray(e))throw TypeError(t)},r.isBoolean=function(e,r){if("[object Boolean]"!==t.call(e))throw TypeError(r)},r.isBuffer=function(t,r){if(!e.isBuffer(t))throw TypeError(r)},r.isFunction=function(e,r){if("[object Function]"!==t.call(e))throw TypeError(r)},r.isNumber=function(e,r){if("[object Number]"!==t.call(e))throw TypeError(r)},r.isObject=function(e,r){if("[object Object]"!==t.call(e))throw TypeError(r)},r.isBufferLength=function(e,t,r){if(e.length!==t)throw RangeError(r)},r.isBufferLength2=function(e,t,r,n){if(e.length!==t&&e.length!==r)throw RangeError(n)},r.isLengthGTZero=function(e,t){if(0===e.length)throw RangeError(t)},r.isNumberInInterval=function(e,t,r,n){if(e<=t||e>=r)throw RangeError(n)}}).call(this)}).call(this,{isBuffer:e("../../../../../../is-buffer/index.js")})}}},{package:"eth-trezor-keyring>hdkey>secp256k1",file:"node_modules/eth-trezor-keyring/node_modules/hdkey/node_modules/secp256k1/lib/assert.js"}],[2186,{bip66:1854,"safe-buffer":3208},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,o=e("bip66"),i=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),a=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);r.privateKeyExport=function(e,t,r){var o=n.from(r?i:a);return e.copy(o,r?8:9),t.copy(o,r?181:214),o},r.privateKeyImport=function(e){var t=e.length,r=0;if(!(t<r+1||48!==e[r])&&!(t<(r+=1)+1)&&128&e[r]){var n=127&e[r];if(r+=1,!(n<1||n>2||t<r+n)){var o=e[r+n-1]|(n>1?e[r+n-2]<<8:0);if(!(t<(r+=n)+o||t<r+3||2!==e[r]||1!==e[r+1]||1!==e[r+2]||t<(r+=3)+2||4!==e[r]||e[r+1]>32||t<r+2+e[r+1]))return e.slice(r+2,r+2+e[r+1])}}},r.signatureExport=function(e){for(var t=n.concat([n.from([0]),e.r]),r=33,i=0;r>1&&0===t[i]&&!(128&t[i+1]);--r,++i);for(var a=n.concat([n.from([0]),e.s]),s=33,c=0;s>1&&0===a[c]&&!(128&a[c+1]);--s,++c);return o.encode(t.slice(i),a.slice(c))},r.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0);try{var i=o.decode(e);if(33===i.r.length&&0===i.r[0]&&(i.r=i.r.slice(1)),i.r.length>32)throw new Error("R length is too long");if(33===i.s.length&&0===i.s[0]&&(i.s=i.s.slice(1)),i.s.length>32)throw new Error("S length is too long")}catch(e){return}return i.r.copy(t,32-i.r.length),i.s.copy(r,32-i.s.length),{r:t,s:r}},r.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),o=e.length,i=0;if(48===e[i++]){var a=e[i++];if(!(128&a&&(i+=a-128)>o)&&2===e[i++]){var s=e[i++];if(128&s){if(i+(a=s-128)>o)return;for(;a>0&&0===e[i];i+=1,a-=1);for(s=0;a>0;i+=1,a-=1)s=(s<<8)+e[i]}if(!(s>o-i)){var c=i;if(i+=s,2===e[i++]){var u=e[i++];if(128&u){if(i+(a=u-128)>o)return;for(;a>0&&0===e[i];i+=1,a-=1);for(u=0;a>0;i+=1,a-=1)u=(u<<8)+e[i]}if(!(u>o-i)){var d=i;for(i+=u;s>0&&0===e[c];s-=1,c+=1);if(!(s>32)){var l=e.slice(c,c+s);for(l.copy(t,32-l.length);u>0&&0===e[d];u-=1,d+=1);if(!(u>32)){var f=e.slice(d,d+u);return f.copy(r,32-f.length),{r:t,s:r}}}}}}}}}}}},{package:"eth-trezor-keyring>hdkey>secp256k1",file:"node_modules/eth-trezor-keyring/node_modules/hdkey/node_modules/secp256k1/lib/der.js"}],[2187,{"../messages.json":2189,"bn.js":1900,"create-hash":2061,elliptic:2095,"safe-buffer":3208},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,o=e("create-hash"),i=e("bn.js"),a=e("elliptic").ec,s=e("../messages.json"),c=new a("secp256k1"),u=c.curve;function d(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new i(t);if(r.cmp(u.p)>=0)return null;var n=(r=r.toRed(u.red)).redSqr().redIMul(r).redIAdd(u.b).redSqrt();return 3===e!==n.isOdd()&&(n=n.redNeg()),c.keyPair({pub:{x:r,y:n}})}(t,e.slice(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var n=new i(t),o=new i(r);if(n.cmp(u.p)>=0||o.cmp(u.p)>=0)return null;if(n=n.toRed(u.red),o=o.toRed(u.red),(6===e||7===e)&&o.isOdd()!==(7===e))return null;var a=n.redSqr().redIMul(n);return o.redSqr().redISub(a.redIAdd(u.b)).isZero()?c.keyPair({pub:{x:n,y:o}}):null}(t,e.slice(1,33),e.slice(33,65));default:return null}}r.privateKeyVerify=function(e){var t=new i(e);return t.cmp(u.n)<0&&!t.isZero()},r.privateKeyExport=function(e,t){var r=new i(e);if(r.cmp(u.n)>=0||r.isZero())throw new Error(s.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return n.from(c.keyFromPrivate(e).getPublic(t,!0))},r.privateKeyNegate=function(e){var t=new i(e);return t.isZero()?n.alloc(32):u.n.sub(t).umod(u.n).toArrayLike(n,"be",32)},r.privateKeyModInverse=function(e){var t=new i(e);if(t.cmp(u.n)>=0||t.isZero())throw new Error(s.EC_PRIVATE_KEY_RANGE_INVALID);return t.invm(u.n).toArrayLike(n,"be",32)},r.privateKeyTweakAdd=function(e,t){var r=new i(t);if(r.cmp(u.n)>=0)throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(new i(e)),r.cmp(u.n)>=0&&r.isub(u.n),r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toArrayLike(n,"be",32)},r.privateKeyTweakMul=function(e,t){var r=new i(t);if(r.cmp(u.n)>=0||r.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);return r.imul(new i(e)),r.cmp(u.n)&&(r=r.umod(u.n)),r.toArrayLike(n,"be",32)},r.publicKeyCreate=function(e,t){var r=new i(e);if(r.cmp(u.n)>=0||r.isZero())throw new Error(s.EC_PUBLIC_KEY_CREATE_FAIL);return n.from(c.keyFromPrivate(e).getPublic(t,!0))},r.publicKeyConvert=function(e,t){var r=d(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return n.from(r.getPublic(t,!0))},r.publicKeyVerify=function(e){return null!==d(e)},r.publicKeyTweakAdd=function(e,t,r){var o=d(e);if(null===o)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=new i(t)).cmp(u.n)>=0)throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);var a=u.g.mul(t).add(o.pub);if(a.isInfinity())throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return n.from(a.encode(!0,r))},r.publicKeyTweakMul=function(e,t,r){var o=d(e);if(null===o)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if((t=new i(t)).cmp(u.n)>=0||t.isZero())throw new Error(s.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.from(o.pub.mul(t).encode(!0,r))},r.publicKeyCombine=function(e,t){for(var r=new Array(e.length),o=0;o<e.length;++o)if(r[o]=d(e[o]),null===r[o])throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);for(var i=r[0].pub,a=1;a<r.length;++a)i=i.add(r[a].pub);if(i.isInfinity())throw new Error(s.EC_PUBLIC_KEY_COMBINE_FAIL);return n.from(i.encode(!0,t))},r.signatureNormalize=function(e){var t=new i(e.slice(0,32)),r=new i(e.slice(32,64));if(t.cmp(u.n)>=0||r.cmp(u.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);var o=n.from(e);return 1===r.cmp(c.nh)&&u.n.sub(r).toArrayLike(n,"be",32).copy(o,32),o},r.signatureExport=function(e){var t=e.slice(0,32),r=e.slice(32,64);if(new i(t).cmp(u.n)>=0||new i(r).cmp(u.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);return{r:t,s:r}},r.signatureImport=function(e){var t=new i(e.r);t.cmp(u.n)>=0&&(t=new i(0));var r=new i(e.s);return r.cmp(u.n)>=0&&(r=new i(0)),n.concat([t.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},r.sign=function(e,t,r,o){if("function"==typeof r){var a=r;r=function(r){var c=a(e,t,null,o,r);if(!n.isBuffer(c)||32!==c.length)throw new Error(s.ECDSA_SIGN_FAIL);return new i(c)}}var d=new i(t);if(d.cmp(u.n)>=0||d.isZero())throw new Error(s.ECDSA_SIGN_FAIL);var l=c.sign(e,t,{canonical:!0,k:r,pers:o});return{signature:n.concat([l.r.toArrayLike(n,"be",32),l.s.toArrayLike(n,"be",32)]),recovery:l.recoveryParam}},r.verify=function(e,t,r){var n={r:t.slice(0,32),s:t.slice(32,64)},o=new i(n.r),a=new i(n.s);if(o.cmp(u.n)>=0||a.cmp(u.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);if(1===a.cmp(c.nh)||o.isZero()||a.isZero())return!1;var l=d(r);if(null===l)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return c.verify(e,n,{x:l.pub.x,y:l.pub.y})},r.recover=function(e,t,r,o){var a={r:t.slice(0,32),s:t.slice(32,64)},d=new i(a.r),l=new i(a.s);if(d.cmp(u.n)>=0||l.cmp(u.n)>=0)throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);try{if(d.isZero()||l.isZero())throw new Error;var f=c.recoverPubKey(e,a,r);return n.from(f.encode(!0,o))}catch(e){throw new Error(s.ECDSA_RECOVER_FAIL)}},r.ecdh=function(e,t){var n=r.ecdhUnsafe(e,t,!0);return o("sha256").update(n).digest()},r.ecdhUnsafe=function(e,t,r){var o=d(e);if(null===o)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var a=new i(t);if(a.cmp(u.n)>=0||a.isZero())throw new Error(s.ECDH_FAIL);return n.from(o.pub.mul(a).encode(!0,r))}}}},{package:"eth-trezor-keyring>hdkey>secp256k1",file:"node_modules/eth-trezor-keyring/node_modules/hdkey/node_modules/secp256k1/lib/elliptic/index.js"}],[2188,{"./assert":2185,"./der":2186,"./messages.json":2189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./assert"),o=e("./der"),i=e("./messages.json");function a(e,t){return e===undefined?t:(n.isBoolean(e,i.COMPRESSED_TYPE_INVALID),e)}t.exports=function(e){return{privateKeyVerify:function(t){return n.isBuffer(t,i.EC_PRIVATE_KEY_TYPE_INVALID),32===t.length&&e.privateKeyVerify(t)},privateKeyExport:function(t,r){n.isBuffer(t,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,i.EC_PRIVATE_KEY_LENGTH_INVALID),r=a(r,!0);var s=e.privateKeyExport(t,r);return o.privateKeyExport(t,s,r)},privateKeyImport:function(t){if(n.isBuffer(t,i.EC_PRIVATE_KEY_TYPE_INVALID),(t=o.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error(i.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(t){return n.isBuffer(t,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,i.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyNegate(t)},privateKeyModInverse:function(t){return n.isBuffer(t,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,i.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyModInverse(t)},privateKeyTweakAdd:function(t,r){return n.isBuffer(t,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,i.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,i.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,i.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(t,r)},privateKeyTweakMul:function(t,r){return n.isBuffer(t,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,i.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,i.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,i.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(t,r)},publicKeyCreate:function(t,r){return n.isBuffer(t,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,i.EC_PRIVATE_KEY_LENGTH_INVALID),r=a(r,!0),e.publicKeyCreate(t,r)},publicKeyConvert:function(t,r){return n.isBuffer(t,i.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,i.EC_PUBLIC_KEY_LENGTH_INVALID),r=a(r,!0),e.publicKeyConvert(t,r)},publicKeyVerify:function(t){return n.isBuffer(t,i.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(t)},publicKeyTweakAdd:function(t,r,o){return n.isBuffer(t,i.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,i.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,i.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,i.TWEAK_LENGTH_INVALID),o=a(o,!0),e.publicKeyTweakAdd(t,r,o)},publicKeyTweakMul:function(t,r,o){return n.isBuffer(t,i.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,i.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,i.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,i.TWEAK_LENGTH_INVALID),o=a(o,!0),e.publicKeyTweakMul(t,r,o)},publicKeyCombine:function(t,r){n.isArray(t,i.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(t,i.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var o=0;o<t.length;++o)n.isBuffer(t[o],i.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t[o],33,65,i.EC_PUBLIC_KEY_LENGTH_INVALID);return r=a(r,!0),e.publicKeyCombine(t,r)},signatureNormalize:function(t){return n.isBuffer(t,i.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(t,64,i.ECDSA_SIGNATURE_LENGTH_INVALID),e.signatureNormalize(t)},signatureExport:function(t){n.isBuffer(t,i.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(t,64,i.ECDSA_SIGNATURE_LENGTH_INVALID);var r=e.signatureExport(t);return o.signatureExport(r)},signatureImport:function(t){n.isBuffer(t,i.ECDSA_SIGNATURE_TYPE_INVALID),n.isLengthGTZero(t,i.ECDSA_SIGNATURE_LENGTH_INVALID);var r=o.signatureImport(t);if(r)return e.signatureImport(r);throw new Error(i.ECDSA_SIGNATURE_PARSE_DER_FAIL)},signatureImportLax:function(t){n.isBuffer(t,i.ECDSA_SIGNATURE_TYPE_INVALID),n.isLengthGTZero(t,i.ECDSA_SIGNATURE_LENGTH_INVALID);var r=o.signatureImportLax(t);if(r)return e.signatureImport(r);throw new Error(i.ECDSA_SIGNATURE_PARSE_DER_FAIL)},sign:function(t,r,o){n.isBuffer(t,i.MSG32_TYPE_INVALID),n.isBufferLength(t,32,i.MSG32_LENGTH_INVALID),n.isBuffer(r,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,i.EC_PRIVATE_KEY_LENGTH_INVALID);var a=null,s=null;return o!==undefined&&(n.isObject(o,i.OPTIONS_TYPE_INVALID),o.data!==undefined&&(n.isBuffer(o.data,i.OPTIONS_DATA_TYPE_INVALID),n.isBufferLength(o.data,32,i.OPTIONS_DATA_LENGTH_INVALID),a=o.data),o.noncefn!==undefined&&(n.isFunction(o.noncefn,i.OPTIONS_NONCEFN_TYPE_INVALID),s=o.noncefn)),e.sign(t,r,s,a)},verify:function(t,r,o){return n.isBuffer(t,i.MSG32_TYPE_INVALID),n.isBufferLength(t,32,i.MSG32_LENGTH_INVALID),n.isBuffer(r,i.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(r,64,i.ECDSA_SIGNATURE_LENGTH_INVALID),n.isBuffer(o,i.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(o,33,65,i.EC_PUBLIC_KEY_LENGTH_INVALID),e.verify(t,r,o)},recover:function(t,r,o,s){return n.isBuffer(t,i.MSG32_TYPE_INVALID),n.isBufferLength(t,32,i.MSG32_LENGTH_INVALID),n.isBuffer(r,i.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(r,64,i.ECDSA_SIGNATURE_LENGTH_INVALID),n.isNumber(o,i.RECOVERY_ID_TYPE_INVALID),n.isNumberInInterval(o,-1,4,i.RECOVERY_ID_VALUE_INVALID),s=a(s,!0),e.recover(t,r,o,s)},ecdh:function(t,r){return n.isBuffer(t,i.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,i.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,i.EC_PRIVATE_KEY_LENGTH_INVALID),e.ecdh(t,r)},ecdhUnsafe:function(t,r,o){return n.isBuffer(t,i.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,i.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,i.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,i.EC_PRIVATE_KEY_LENGTH_INVALID),o=a(o,!0),e.ecdhUnsafe(t,r,o)}}}}}},{package:"eth-trezor-keyring>hdkey>secp256k1",file:"node_modules/eth-trezor-keyring/node_modules/hdkey/node_modules/secp256k1/lib/index.js"}],[2189,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}}}},{package:"eth-trezor-keyring>hdkey>secp256k1",file:"node_modules/eth-trezor-keyring/node_modules/hdkey/node_modules/secp256k1/lib/messages.json"}],[2193,{"@scure/bip32":1395},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.HDKey=r.HARDENED_OFFSET=void 0;var n=e("@scure/bip32");Object.defineProperty(r,"HARDENED_OFFSET",{enumerable:!0,get:function(){return n.HARDENED_OFFSET}}),Object.defineProperty(r,"HDKey",{enumerable:!0,get:function(){return n.HDKey}})}}},{package:"@metamask/utils>@ethereumjs/tx>ethereum-cryptography",file:"node_modules/ethereum-cryptography/hdkey.js"}],[22,{"./background-api":19,"./caveat-mutators":20,"./enums":21,"./permission-log":23,"./selectors":24,"./specifications":25},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./caveat-mutators");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=e("./background-api");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=e("./enums");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var a=e("./permission-log");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=e("./specifications");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=e("./selectors");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}}))}))}}},{package:"$root$",file:"app/scripts/controllers/permissions/index.js"}],[2241,{bs58check:1952,crypto:2066,"ethereumjs-util":2250,randombytes:3073,"safe-buffer":3208,scryptsy:3218,"uuid/v4":2259},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("safe-buffer").Buffer,i=e("ethereumjs-util"),a=e("crypto"),s=e("randombytes"),c=e("scryptsy"),u=e("uuid/v4"),d=e("bs58check");function l(e,t){if(!e)throw new Error(t||"Assertion failed")}function f(e,t){return o.concat([e.update(t),e.final()])}var h=function(e,t){if(e&&t)throw new Error("Cannot supply both a private and a public key to the constructor");if(e&&!i.isValidPrivate(e))throw new Error("Private key does not satisfy the curve requirements (ie. it is invalid)");if(t&&!i.isValidPublic(t))throw new Error("Invalid public key");this._privKey=e,this._pubKey=t};Object.defineProperty(h.prototype,"privKey",{get:function(){return l(this._privKey,"This is a public key only wallet"),this._privKey}}),Object.defineProperty(h.prototype,"pubKey",{get:function(){return this._pubKey||(this._pubKey=i.privateToPublic(this.privKey)),this._pubKey}}),h.generate=function(e){if(!e)return new h(s(32));for(var t=new i.BN("088f924eeceeda7fe92e1f5b0fffffffffffffff",16);;){var r=s(32);if(new i.BN(i.privateToAddress(r)).lte(t))return new h(r)}},h.generateVanityAddress=function(e){for("object"!==(void 0===e?"undefined":n(e))&&(e=new RegExp(e));;){var t=s(32),r=i.privateToAddress(t);if(e.test(r.toString("hex")))return new h(t)}},h.prototype.getPrivateKey=function(){return this.privKey},h.prototype.getPrivateKeyString=function(){return i.bufferToHex(this.getPrivateKey())},h.prototype.getPublicKey=function(){return this.pubKey},h.prototype.getPublicKeyString=function(){return i.bufferToHex(this.getPublicKey())},h.prototype.getAddress=function(){return i.publicToAddress(this.pubKey)},h.prototype.getAddressString=function(){return i.bufferToHex(this.getAddress())},h.prototype.getChecksumAddressString=function(){return i.toChecksumAddress(this.getAddressString())},h.prototype.toV3=function(e,t){l(this._privKey,"This is a public key only wallet");var r,n=(t=t||{}).salt||s(32),d=t.iv||s(16),h=t.kdf||"scrypt",p={dklen:t.dklen||32,salt:n.toString("hex")};if("pbkdf2"===h)p.c=t.c||262144,p.prf="hmac-sha256",r=a.pbkdf2Sync(o.from(e),n,p.c,p.dklen,"sha256");else{if("scrypt"!==h)throw new Error("Unsupported kdf");p.n=t.n||262144,p.r=t.r||8,p.p=t.p||1,r=c(o.from(e),n,p.n,p.r,p.p,p.dklen)}var m=a.createCipheriv(t.cipher||"aes-128-ctr",r.slice(0,16),d);if(!m)throw new Error("Unsupported cipher");var g=f(m,this.privKey),b=i.keccak256(o.concat([r.slice(16,32),o.from(g,"hex")]));return{version:3,id:u({random:t.uuid||s(16)}),address:this.getAddress().toString("hex"),crypto:{ciphertext:g.toString("hex"),cipherparams:{iv:d.toString("hex")},cipher:t.cipher||"aes-128-ctr",kdf:h,kdfparams:p,mac:b.toString("hex")}}},h.prototype.getV3Filename=function(e){return["UTC--",(e?new Date(e):new Date).toJSON().replace(/:/g,"-"),"--",this.getAddress().toString("hex")].join("")},h.prototype.toV3String=function(e,t){return JSON.stringify(this.toV3(e,t))},h.fromPublicKey=function(e,t){return t&&(e=i.importPublic(e)),new h(null,e)},h.fromExtendedPublicKey=function(e){return l("xpub"===e.slice(0,4),"Not an extended public key"),e=d.decode(e).slice(45),h.fromPublicKey(e,!0)},h.fromPrivateKey=function(e){return new h(e)},h.fromExtendedPrivateKey=function(e){l("xprv"===e.slice(0,4),"Not an extended private key");var t=d.decode(e);return l(0===t[45],"Invalid extended private key"),h.fromPrivateKey(t.slice(46))},h.fromV1=function(e,t){l("string"==typeof t);var r="object"===(void 0===e?"undefined":n(e))?e:JSON.parse(e);if("1"!==r.Version)throw new Error("Not a V1 wallet");if("scrypt"!==r.Crypto.KeyHeader.Kdf)throw new Error("Unsupported key derivation scheme");var s=r.Crypto.KeyHeader.KdfParams,u=c(o.from(t),o.from(r.Crypto.Salt,"hex"),s.N,s.R,s.P,s.DkLen),d=o.from(r.Crypto.CipherText,"hex");if(i.keccak256(o.concat([u.slice(16,32),d])).toString("hex")!==r.Crypto.MAC)throw new Error("Key derivation failed - possibly wrong passphrase");var p=f(a.createDecipheriv("aes-128-cbc",i.keccak256(u.slice(0,16)).slice(0,16),o.from(r.Crypto.IV,"hex")),d);return new h(p)},h.fromV3=function(e,t,r){l("string"==typeof t);var s,u,d="object"===(void 0===e?"undefined":n(e))?e:JSON.parse(r?e.toLowerCase():e);if(3!==d.version)throw new Error("Not a V3 wallet");if("scrypt"===d.crypto.kdf)u=d.crypto.kdfparams,s=c(o.from(t),o.from(u.salt,"hex"),u.n,u.r,u.p,u.dklen);else{if("pbkdf2"!==d.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(u=d.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");s=a.pbkdf2Sync(o.from(t),o.from(u.salt,"hex"),u.c,u.dklen,"sha256")}var p=o.from(d.crypto.ciphertext,"hex");if(i.keccak256(o.concat([s.slice(16,32),p])).toString("hex")!==d.crypto.mac)throw new Error("Key derivation failed - possibly wrong passphrase");var m=f(a.createDecipheriv(d.crypto.cipher,s.slice(0,16),o.from(d.crypto.cipherparams.iv,"hex")),p);return new h(m)},h.fromEthSale=function(e,t){l("string"==typeof t);var r="object"===(void 0===e?"undefined":n(e))?e:JSON.parse(e),s=o.from(r.encseed,"hex"),c=a.pbkdf2Sync(t,t,2e3,32,"sha256").slice(0,16),u=f(a.createDecipheriv("aes-128-cbc",c,s.slice(0,16)),s.slice(16)),d=new h(i.keccak256(u));if(d.getAddress().toString("hex")!==r.ethaddr)throw new Error("Decoded key mismatch - possibly wrong passphrase");return d},t.exports=h}}},{package:"ethereumjs-wallet",file:"node_modules/ethereumjs-wallet/index.js"}],[2242,{buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createHashFunction=function(t){return function(r){var n=t();return n.update(r),e.from(n.digest())}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereum-cryptography",file:"node_modules/ethereumjs-wallet/node_modules/ethereum-cryptography/hash-utils.js"}],[2243,{"./hash-utils":2242,keccak:2747},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./hash-utils"),o=e("keccak");r.keccak224=n.createHashFunction((function(){return o("keccak224")})),r.keccak256=n.createHashFunction((function(){return o("keccak256")})),r.keccak384=n.createHashFunction((function(){return o("keccak384")})),r.keccak512=n.createHashFunction((function(){return o("keccak512")}))}}},{package:"ethereumjs-wallet>ethereum-cryptography",file:"node_modules/ethereumjs-wallet/node_modules/ethereum-cryptography/keccak.js"}],[2244,{randombytes:3073},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("randombytes");r.getRandomBytes=function(e){return new Promise((function(t,r){n(e,(function(e,n){e?r(e):t(n)}))}))},r.getRandomBytesSync=function(e){return n(e)}}}},{package:"ethereumjs-wallet>ethereum-cryptography",file:"node_modules/ethereumjs-wallet/node_modules/ethereum-cryptography/random.js"}],[2245,{"./random":2244,secp256k1:3219},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0});var i=e("secp256k1"),a=e("./random");r.createPrivateKey=function(){return n(this,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return[4,a.getRandomBytes(32)];case 1:return e=t.sent(),i.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}}))}))},r.createPrivateKeySync=function(){for(;;){var e=a.getRandomBytesSync(32);if(i.privateKeyVerify(e))return e}},function(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}(e("secp256k1"))}}},{package:"ethereumjs-wallet>ethereum-cryptography",file:"node_modules/ethereumjs-wallet/node_modules/ethereum-cryptography/secp256k1.js"}],[2246,{"./bytes":2247,"./hash":2249,"./secp256k1v3-adapter":2252,assert:1710,"bn.js":1900,buffer:1943,"ethjs-util":2256},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.importPublic=r.privateToPublic=r.privateToAddress=r.publicToAddress=r.pubToAddress=r.isValidPublic=r.isValidPrivate=r.isPrecompiled=r.generateAddress2=r.generateAddress=r.isValidChecksumAddress=r.toChecksumAddress=r.isZeroAddress=r.isValidAddress=r.zeroAddress=void 0;var n=e("assert"),o=e("ethjs-util"),i=e("./secp256k1v3-adapter"),a=e("bn.js"),s=e("./bytes"),c=e("./hash");r.zeroAddress=function(){var e=s.zeros(20);return s.bufferToHex(e)},r.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},r.isZeroAddress=function(e){return r.zeroAddress()===s.addHexPrefix(e)},r.toChecksumAddress=function(e,t){e=o.stripHexPrefix(e).toLowerCase();for(var r=t!==undefined?t.toString()+"0x":"",n=c.keccak(r+e).toString("hex"),i="0x",a=0;a<e.length;a++)parseInt(n[a],16)>=8?i+=e[a].toUpperCase():i+=e[a];return i},r.isValidChecksumAddress=function(e,t){return r.isValidAddress(e)&&r.toChecksumAddress(e,t)===e},r.generateAddress=function(e,r){e=s.toBuffer(e);var n=new a(r);return n.isZero()?c.rlphash([e,null]).slice(-20):c.rlphash([e,t.from(n.toArray())]).slice(-20)},r.generateAddress2=function(e,r,o){var i=s.toBuffer(e),a=s.toBuffer(r),u=s.toBuffer(o);return n(20===i.length),n(32===a.length),c.keccak256(t.concat([t.from("ff","hex"),i,a,c.keccak256(u)])).slice(-20)},r.isPrecompiled=function(e){var t=s.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},r.isValidPrivate=function(e){return i.privateKeyVerify(e)},r.isValidPublic=function(e,r){return void 0===r&&(r=!1),64===e.length?i.publicKeyVerify(t.concat([t.from([4]),e])):!!r&&i.publicKeyVerify(e)},r.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=s.toBuffer(e),t&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),n(64===e.length),c.keccak(e).slice(-20)},r.publicToAddress=r.pubToAddress,r.privateToAddress=function(e){return r.publicToAddress(r.privateToPublic(e))},r.privateToPublic=function(e){return e=s.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)},r.importPublic=function(e){return 64!==(e=s.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/account.js"}],[2247,{"bn.js":1900,buffer:1943,"ethjs-util":2256},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.baToJSON=r.addHexPrefix=r.toUnsigned=r.fromSigned=r.bufferToHex=r.bufferToInt=r.toBuffer=r.stripZeros=r.unpad=r.setLengthRight=r.setLength=r.setLengthLeft=r.zeros=void 0;var n=e("ethjs-util"),o=e("bn.js");r.zeros=function(e){return t.allocUnsafe(e).fill(0)},r.setLengthLeft=function(e,t,n){void 0===n&&(n=!1);var o=r.zeros(t);return e=r.toBuffer(e),n?e.length<t?(e.copy(o),o):e.slice(0,t):e.length<t?(e.copy(o,t-e.length),o):e.slice(-t)},r.setLength=r.setLengthLeft,r.setLengthRight=function(e,t){return r.setLength(e,t,!0)},r.unpad=function(e){for(var t=(e=n.stripHexPrefix(e))[0];e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},r.stripZeros=r.unpad,r.toBuffer=function(e){if(!t.isBuffer(e))if(Array.isArray(e))e=t.from(e);else if("string"==typeof e){if(!n.isHexString(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+e);e=t.from(n.padToEven(n.stripHexPrefix(e)),"hex")}else if("number"==typeof e)e=n.intToBuffer(e);else if(null===e||e===undefined)e=t.allocUnsafe(0);else if(o.isBN(e))e=e.toArrayLike(t);else{if(!e.toArray)throw new Error("invalid type");e=t.from(e.toArray())}return e},r.bufferToInt=function(e){return new o(r.toBuffer(e)).toNumber()},r.bufferToHex=function(e){return"0x"+(e=r.toBuffer(e)).toString("hex")},r.fromSigned=function(e){return new o(e).fromTwos(256)},r.toUnsigned=function(e){return t.from(e.toTwos(256).toArray())},r.addHexPrefix=function(e){return"string"!=typeof e||n.isHexPrefixed(e)?e:"0x"+e},r.baToJSON=function(e){if(t.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var n=[],o=0;o<e.length;o++)n.push(r.baToJSON(e[o]));return n}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/bytes.js"}],[2248,{"bn.js":1900,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){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=e("bn.js");r.MAX_INTEGER=new n("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),r.TWO_POW256=new n("10000000000000000000000000000000000000000000000000000000000000000",16),r.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",r.KECCAK256_NULL=t.from(r.KECCAK256_NULL_S,"hex"),r.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",r.KECCAK256_RLP_ARRAY=t.from(r.KECCAK256_RLP_ARRAY_S,"hex"),r.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",r.KECCAK256_RLP=t.from(r.KECCAK256_RLP_S,"hex")}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/constants.js"}],[2249,{"./bytes":2247,buffer:1943,"create-hash":2061,"ethereum-cryptography/keccak":2243,"ethjs-util":2256,rlp:3206},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.rlphash=r.ripemd160=r.sha256=r.keccak256=r.keccak=void 0;var n=e("ethereum-cryptography/keccak"),o=n.keccak224,i=n.keccak384,a=n.keccak256,s=n.keccak512,c=e("create-hash"),u=e("ethjs-util"),d=e("rlp"),l=e("./bytes");r.keccak=function(e,r){switch(void 0===r&&(r=256),e="string"!=typeof e||u.isHexString(e)?l.toBuffer(e):t.from(e,"utf8"),r||(r=256),r){case 224:return o(e);case 256:return a(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.sha256=function(e){return e=l.toBuffer(e),c("sha256").update(e).digest()},r.ripemd160=function(e,t){e=l.toBuffer(e);var r=c("rmd160").update(e).digest();return!0===t?l.setLength(r,32):r},r.rlphash=function(e){return r.keccak(d.encode(e))}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/hash.js"}],[2250,{"./account":2246,"./bytes":2247,"./constants":2248,"./hash":2249,"./object":2251,"./secp256k1v3-adapter":2252,"./signature":2255,"bn.js":1900,"ethjs-util":2256,rlp:3206},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.secp256k1=r.rlp=r.BN=void 0;var i=e("./secp256k1v3-adapter");r.secp256k1=i;var a=e("ethjs-util"),s=e("bn.js");r.BN=s;var c=e("rlp");r.rlp=c,Object.assign(r,a),o(e("./constants"),r),o(e("./account"),r),o(e("./hash"),r),o(e("./signature"),r),o(e("./bytes"),r),o(e("./object"),r)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/index.js"}],[2251,{"./bytes":2247,assert:1710,buffer:1943,"ethjs-util":2256,rlp:3206},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.defineProperties=void 0;var n=e("assert"),o=e("ethjs-util"),i=e("rlp"),a=e("./bytes");r.defineProperties=function(e,r,s){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(void 0===t&&(t=!1),t){var r={};return e._fields.forEach((function(t){r[t]="0x"+e[t].toString("hex")})),r}return a.baToJSON(e.raw)},e.serialize=function(){return i.encode(e.raw)},r.forEach((function(r,o){function i(){return e.raw[o]}function s(i){"00"!==(i=a.toBuffer(i)).toString("hex")||r.allowZero||(i=t.allocUnsafe(0)),r.allowLess&&r.length?(i=a.stripZeros(i),n(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||n(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[o]=i}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:i,set:s}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:s,get:i})})),s)if("string"==typeof s&&(s=t.from(o.stripHexPrefix(s),"hex")),t.isBuffer(s)&&(s=i.decode(s)),Array.isArray(s)){if(s.length>e._fields.length)throw new Error("wrong number of fields in data");s.forEach((function(t,r){e[e._fields[r]]=a.toBuffer(t)}))}else{if("object"!=typeof s)throw new Error("invalid data");var c=Object.keys(s);r.forEach((function(t){-1!==c.indexOf(t.name)&&(e[t.name]=s[t.name]),-1!==c.indexOf(t.alias)&&(e[t.alias]=s[t.alias])}))}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/object.js"}],[2252,{"./secp256k1v3-lib/der":2253,"./secp256k1v3-lib/index":2254,buffer:1943,"ethereum-cryptography/secp256k1":2245},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.ecdhUnsafe=r.ecdh=r.recover=r.verify=r.sign=r.signatureImportLax=r.signatureImport=r.signatureExport=r.signatureNormalize=r.publicKeyCombine=r.publicKeyTweakMul=r.publicKeyTweakAdd=r.publicKeyVerify=r.publicKeyConvert=r.publicKeyCreate=r.privateKeyTweakMul=r.privateKeyTweakAdd=r.privateKeyModInverse=r.privateKeyNegate=r.privateKeyImport=r.privateKeyExport=r.privateKeyVerify=void 0;var n=e("ethereum-cryptography/secp256k1"),o=e("./secp256k1v3-lib/index"),i=e("./secp256k1v3-lib/der");r.privateKeyVerify=function(e){return 32===e.length&&n.privateKeyVerify(Uint8Array.from(e))},r.privateKeyExport=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var r=o.privateKeyExport(e,t);return i.privateKeyExport(e,r,t)},r.privateKeyImport=function(e){if(null!==(e=i.privateKeyImport(e))&&32===e.length&&r.privateKeyVerify(e))return e;throw new Error("couldn't import from DER format")},r.privateKeyNegate=function(e){return t.from(n.privateKeyNegate(Uint8Array.from(e)))},r.privateKeyModInverse=function(e){if(32!==e.length)throw new Error("private key length is invalid");return t.from(o.privateKeyModInverse(Uint8Array.from(e)))},r.privateKeyTweakAdd=function(e,r){return t.from(n.privateKeyTweakAdd(Uint8Array.from(e),r))},r.privateKeyTweakMul=function(e,r){return t.from(n.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(r)))},r.publicKeyCreate=function(e,r){return t.from(n.publicKeyCreate(Uint8Array.from(e),r))},r.publicKeyConvert=function(e,r){return t.from(n.publicKeyConvert(Uint8Array.from(e),r))},r.publicKeyVerify=function(e){return(33===e.length||65===e.length)&&n.publicKeyVerify(Uint8Array.from(e))},r.publicKeyTweakAdd=function(e,r,o){return t.from(n.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(r),o))},r.publicKeyTweakMul=function(e,r,o){return t.from(n.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(r),o))},r.publicKeyCombine=function(e,r){var o=[];return e.forEach((function(e){o.push(Uint8Array.from(e))})),t.from(n.publicKeyCombine(o,r))},r.signatureNormalize=function(e){return t.from(n.signatureNormalize(Uint8Array.from(e)))},r.signatureExport=function(e){return t.from(n.signatureExport(Uint8Array.from(e)))},r.signatureImport=function(e){return t.from(n.signatureImport(Uint8Array.from(e)))},r.signatureImportLax=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=i.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return o.signatureImport(t)},r.sign=function(e,r,o){if(null===o)throw new TypeError("options should be an Object");var i=undefined;if(o){if(i={},null===o.data)throw new TypeError("options.data should be a Buffer");if(o.data){if(32!=o.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(o.data)}if(null===o.noncefn)throw new TypeError("options.noncefn should be a Function");o.noncefn&&(i.noncefn=function(e,r,n,i,a){var s=null!=n?t.from(n):null,c=null!=i?t.from(i):null,u=t.from("");return o.noncefn&&(u=o.noncefn(t.from(e),t.from(r),s,c,a)),new Uint8Array(u)})}var a=n.ecdsaSign(Uint8Array.from(e),Uint8Array.from(r),i);return{signature:t.from(a.signature),recovery:a.recid}},r.verify=function(e,t,r){return n.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),r)},r.recover=function(e,r,o,i){return t.from(n.ecdsaRecover(Uint8Array.from(r),o,Uint8Array.from(e),i))},r.ecdh=function(e,r){return t.from(n.ecdh(Uint8Array.from(e),Uint8Array.from(r),{}))},r.ecdhUnsafe=function(e,r,n){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==r.length)throw new RangeError("private key length is invalid");return t.from(o.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(r),n))}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/secp256k1v3-adapter.js"}],[2253,{buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){Object.defineProperty(r,"__esModule",{value:!0});var t=e.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=e.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);r.privateKeyExport=function(r,o,i){void 0===i&&(i=!0);var a=e.from(i?t:n);return r.copy(a,i?8:9),o.copy(a,i?181:214),a},r.privateKeyImport=function(e){var t=e.length,r=0;if(t<r+1||48!==e[r])return null;if(t<(r+=1)+1||!(128&e[r]))return null;var n=127&e[r];if(n<1||n>2)return null;if(t<(r+=1)+n)return null;var o=e[r+n-1]|(n>1?e[r+n-2]<<8:0);return t<(r+=n)+o||t<r+3||2!==e[r]||1!==e[r+1]||1!==e[r+2]||t<(r+=3)+2||4!==e[r]||e[r+1]>32||t<r+2+e[r+1]?null:e.slice(r+2,r+2+e[r+1])},r.signatureImportLax=function(t){var r=e.alloc(32,0),n=e.alloc(32,0),o=t.length,i=0;if(48!==t[i++])return null;var a=t[i++];if(128&a&&(i+=a-128)>o)return null;if(2!==t[i++])return null;var s=t[i++];if(128&s){if(i+(a=s-128)>o)return null;for(;a>0&&0===t[i];i+=1,a-=1);for(s=0;a>0;i+=1,a-=1)s=(s<<8)+t[i]}if(s>o-i)return null;var c=i;if(i+=s,2!==t[i++])return null;var u=t[i++];if(128&u){if(i+(a=u-128)>o)return null;for(;a>0&&0===t[i];i+=1,a-=1);for(u=0;a>0;i+=1,a-=1)u=(u<<8)+t[i]}if(u>o-i)return null;var d=i;for(i+=u;s>0&&0===t[c];s-=1,c+=1);if(s>32)return null;var l=t.slice(c,c+s);for(l.copy(r,32-l.length);u>0&&0===t[d];u-=1,d+=1);if(u>32)return null;var f=t.slice(d,d+u);return f.copy(n,32-f.length),{r:r,s:n}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/secp256k1v3-lib/der.js"}],[2254,{"bn.js":1900,buffer:1943,elliptic:2095},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0});var n=e("bn.js"),o=new(0,e("elliptic").ec)("secp256k1"),i=o.curve;r.privateKeyExport=function(e,t){void 0===t&&(t=!0);var r=new n(e);if(r.ucmp(i.n)>=0)throw new Error("couldn't export to DER format");var s=o.g.mul(r);return a(s.getX(),s.getY(),t)},r.privateKeyModInverse=function(e){var r=new n(e);if(r.ucmp(i.n)>=0||r.isZero())throw new Error("private key range is invalid");return r.invm(i.n).toArrayLike(t,"be",32)},r.signatureImport=function(e){var r=new n(e.r);r.ucmp(i.n)>=0&&(r=new n(0));var o=new n(e.s);return o.ucmp(i.n)>=0&&(o=new n(0)),t.concat([r.toArrayLike(t,"be",32),o.toArrayLike(t,"be",32)])},r.ecdhUnsafe=function(e,t,r){void 0===r&&(r=!0);var s=o.keyFromPublic(e),c=new n(t);if(c.ucmp(i.n)>=0||c.isZero())throw new Error("scalar was invalid (zero or overflow)");var u=s.pub.mul(c);return a(u.getX(),u.getY(),r)};var a=function(e,r,n){var o;return n?((o=t.alloc(33))[0]=r.isOdd()?3:2,e.toArrayLike(t,"be",32).copy(o,1)):((o=t.alloc(65))[0]=4,e.toArrayLike(t,"be",32).copy(o,1),r.toArrayLike(t,"be",32).copy(o,33)),o}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/secp256k1v3-lib/index.js"}],[2255,{"./bytes":2247,"./hash":2249,"./secp256k1v3-adapter":2252,"bn.js":1900,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.hashPersonalMessage=r.isValidSignature=r.fromRpcSig=r.toRpcSig=r.ecrecover=r.ecsign=void 0;var n=e("./secp256k1v3-adapter"),o=e("bn.js"),i=e("./bytes"),a=e("./hash");function s(e,t){return t?e-(2*t+35):e-27}function c(e){return 0===e||1===e}r.ecsign=function(e,t,r){var o=n.sign(e,t),i=o.recovery;return{r:o.signature.slice(0,32),s:o.signature.slice(32,64),v:r?i+(2*r+35):i+27}},r.ecrecover=function(e,r,o,a,u){var d=t.concat([i.setLength(o,32),i.setLength(a,32)],64),l=s(r,u);if(!c(l))throw new Error("Invalid signature v value");var f=n.recover(e,d,l);return n.publicKeyConvert(f,!1).slice(1)},r.toRpcSig=function(e,r,n,o){if(!c(s(e,o)))throw new Error("Invalid signature v value");return i.bufferToHex(t.concat([i.setLengthLeft(r,32),i.setLengthLeft(n,32),i.toBuffer(e)]))},r.fromRpcSig=function(e){var t=i.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var r=t[64];return r<27&&(r+=27),{v:r,r:t.slice(0,32),s:t.slice(32,64)}},r.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=new o("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!c(s(e,i)))return!1;var d=new o(t),l=new o(r);return!(d.isZero()||d.gt(u)||l.isZero()||l.gt(u))&&(!n||1!==l.cmp(a))},r.hashPersonalMessage=function(e){var r=t.from("Ethereum Signed Message:\n"+e.length.toString(),"utf-8");return a.keccak(t.concat([r,e]))}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethereumjs-util/dist/signature.js"}],[2256,{buffer:1943,"is-hex-prefixed":2701,"strip-hex-prefix":3281},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("is-hex-prefixed"),o=e("strip-hex-prefix");function i(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function a(e){return"0x"+e.toString(16)}t.exports={arrayContainsArray:function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(r)?"some":"every"]((function(t){return e.indexOf(t)>=0}))},intToBuffer:function(e){var t=a(e);return new r(i(t.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return r.byteLength(e,"utf8")},isHexPrefixed:n,stripHexPrefix:o,padToEven:i,intToHex:a,fromAscii:function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r).toString(16);t+=n.length<2?"0"+n:n}return"0x"+t},fromUtf8:function(e){return"0x"+i(new r(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){var o=parseInt(e.substr(r,2),16);t+=String.fromCharCode(o)}return t},toUtf8:function(e){return new r(i(o(e).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(e,t,r){if(!Array.isArray(e))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof e+"'");if("string"!=typeof t)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof t+"'.");for(var n=[],o=0;o<e.length;o++){var i=e[o][t];if(r&&!i)i="";else if("string"!=typeof i)throw new Error("invalid abi");n.push(i)}return n},isHexString:function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"ethereumjs-wallet>ethereumjs-util>ethjs-util",file:"node_modules/ethereumjs-wallet/node_modules/ethjs-util/lib/index.js"}],[2257,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){for(var n=[],o=0;o<256;++o)n[o]=(o+256).toString(16).substr(1);t.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}}}},{package:"ethereumjs-wallet>uuid",file:"node_modules/ethereumjs-wallet/node_modules/uuid/lib/bytesToUuid.js"}],[2258,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var o=new Uint8Array(16);t.exports=function(){return n(o),o}}else{var i=new Array(16);t.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}}}},{package:"ethereumjs-wallet>uuid",file:"node_modules/ethereumjs-wallet/node_modules/uuid/lib/rng-browser.js"}],[2259,{"./lib/bytesToUuid":2257,"./lib/rng":2258},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./lib/rng"),o=e("./lib/bytesToUuid");t.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}}}},{package:"ethereumjs-wallet>uuid",file:"node_modules/ethereumjs-wallet/node_modules/uuid/v4.js"}],[2260,{"./index.js":2241,"aes-js":1671,crypto:2066,"ethereumjs-util":2250,"safe-buffer":3208,scryptsy:3218,utf8:3349},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./index.js"),i=e("ethereumjs-util"),a=e("crypto"),s=e("scryptsy"),c=e("utf8"),u=e("aes-js"),d=e("safe-buffer").Buffer;function l(e,t){if(!e)throw new Error(t||"Assertion failed")}var f={};f.fromEtherWallet=function(e,t){var r,i="object"===(void 0===e?"undefined":n(e))?e:JSON.parse(e);if(i.locked){if("string"!=typeof t)throw new Error("Password required");if(t.length<7)throw new Error("Password must be at least 7 characters");var s=i.encrypted?i.private.slice(0,128):i.private;if(s=function(e){var t=d.from(e,"base64");return"Salted__"===t.slice(0,8).toString()?{salt:t.slice(8,16),ciphertext:t.slice(16)}:{ciphertext:t}}(s),!s.salt)throw new Error("Unsupported EtherWallet key format");var u=function(e,t,r){function n(n){var o=a.createHash(r.digest||"md5");o.update(n),o.update(e),o.update(t),n=o.digest();for(var i=1;i<(r.count||1);i++)(o=a.createHash(r.digest||"md5")).update(n),n=o.digest();return n}for(var o=r.keysize||16,i=r.ivsize||16,s=[],c=0;d.concat(s).length<o+i;)s[c]=n(0===c?d.alloc(0):s[c-1]),c++;var u=d.concat(s);return{key:u.slice(0,o),iv:u.slice(o,o+i)}}(d.from(t),s.salt,{keysize:32,ivsize:16});r=function(e,t){return d.concat([e.update(t),e.final()])}(a.createDecipheriv("aes-256-cbc",u.key,u.iv),d.from(s.ciphertext)),r=d.from(c.decode(r.toString()),"hex")}else{if(64!==i.private.length)throw new Error("Invalid private key length");r=d.from(i.private,"hex")}var l=new o(r);if(l.getAddressString()!==i.address)throw new Error("Invalid private key or address");return l},f.fromEtherCamp=function(e){return new o(i.keccak256(d.from(e)))},f.fromKryptoKit=function(e,t){"#"===e[0]&&(e=e.slice(1));var r,n=e[0];if(e=e.slice(1),"d"===n)r=i.sha256(d.from(e));else{if("q"!==n)throw new Error("Unsupported or invalid entropy type");if("string"!=typeof t)throw new Error("Password required");var a=i.sha256(d.from(e.slice(0,30))),c=e.slice(30,46),l=function(e){function t(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}for(var r="",n="",o=0;o<e.length;o++)e[o]<=127?(r+=t(n)+String.fromCharCode(e[o]),n=""):n+="%"+e[o].toString(16);return d.from(r+t(n))}(a),f=s(d.from(t,"utf8"),l,16384,8,1,32),h=new u.ModeOfOperation.ecb(f);if(r=d.concat([d.from(h.decrypt(a.slice(0,16))),d.from(h.decrypt(a.slice(16,32)))]),c.length>0&&c!==i.sha256(i.sha256(r)).slice(0,8).toString("hex"))throw new Error("Failed to decrypt input - possibly invalid passphrase")}return new o(r)},f.fromQuorumWallet=function(e,t){l(e.length>=10),l(t.length>=10);var r=e+t;return r=a.pbkdf2Sync(r,r,2e3,32,"sha256"),new o(r)},t.exports=f}}},{package:"ethereumjs-wallet",file:"node_modules/ethereumjs-wallet/thirdparty.js"}],[23,{"../../../../shared/constants/permissions":3410,"./enums":21,"@metamask/obs-store":1298},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.PermissionLogController=void 0;var n=e("@metamask/obs-store"),o=e("../../../../shared/constants/permissions"),i=e("./enums");function a(e,t){return e.reduce(((e,r)=>({...e,[r]:t})),{})}r.PermissionLogController=class{constructor({restrictedMethods:e,initState:t}){this.restrictedMethods=e,this.store=new n.ObservableStore({permissionHistory:{},permissionActivityLog:[],...t})}getActivityLog(){return this.store.getState().permissionActivityLog}updateActivityLog(e){this.store.updateState({permissionActivityLog:e})}getHistory(){return this.store.getState().permissionHistory}updateHistory(e){this.store.updateState({permissionHistory:e})}updateAccountsHistory(e,t){if(0===t.length)return;const r=a(t,Date.now());this.commitNewHistory(e,{eth_accounts:{accounts:r}})}createMiddleware(){return(e,t,r,n)=>{let o,a;const{origin:s,method:c}=e,u=c.startsWith(i.WALLET_PREFIX);if(i.LOG_IGNORE_METHODS.includes(c)||!u&&!this.restrictedMethods.has(c)){if("eth_requestAccounts"!==c)return void r();o=this.logRequest(e,u),a=["eth_accounts"]}else o=this.logRequest(e,u),c===`${i.WALLET_PREFIX}requestPermissions`&&(a=this.getRequestedMethods(e));r((e=>{const r=Date.now();this.logResponse(o,t,r),a&&!t.error&&t.result&&this.logPermissionsHistory(a,s,t.result,r,"eth_requestAccounts"===c),e()}))}}logRequest(e,t){const r={id:e.id,method:e.method,methodType:t?i.LOG_METHOD_TYPES.internal:i.LOG_METHOD_TYPES.restricted,origin:e.origin,requestTime:Date.now(),responseTime:null,success:null};return this.commitNewActivity(r),r}logResponse(e,t,r){e&&t&&(e.success=Object.hasOwnProperty.call(t,"result"),e.responseTime=r)}commitNewActivity(e){const t=this.getActivityLog();t.push(e),t.length>i.LOG_LIMIT&&t.shift(),this.updateActivityLog(t)}logPermissionsHistory(e,t,r,n,o){let i,s;if(o){i=r;s={eth_accounts:{accounts:a(i,n),lastApproved:n}}}else s=r.map((e=>("eth_accounts"===e.parentCapability&&(i=this.getAccountsFromPermission(e)),e.parentCapability))).reduce(((t,r)=>{if(e.includes(r))if("eth_accounts"===r){const e=a(i,n);t[r]={lastApproved:n,accounts:e}}else t[r]={lastApproved:n};return t}),{});Object.keys(s).length>0&&this.commitNewHistory(t,s)}commitNewHistory(e,t){const r=this.getHistory(),n={...r[e],...t},o=r[e]&&r[e].eth_accounts,i=t.eth_accounts;if(o&&i){const e=i.lastApproved||o.lastApproved;n.eth_accounts={lastApproved:e,accounts:{...o.accounts,...i.accounts}}}r[e]=n,this.updateHistory(r)}getRequestedMethods(e){return e.params&&e.params[0]&&"object"==typeof e.params[0]&&!Array.isArray(e.params[0])?Object.keys(e.params[0]):null}getAccountsFromPermission(e){if("eth_accounts"!==e.parentCapability||!e.caveats)return[];const t=new Set;for(const r of e.caveats)if(r.type===o.CaveatTypes.restrictReturnedAccounts&&Array.isArray(r.value))for(const e of r.value)t.add(e);return[...t]}}}}},{package:"$root$",file:"app/scripts/controllers/permissions/permission-log.js"}],[24,{"../../../../shared/constants/permissions":3410,reselect:3201},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getPermittedAccountsByOrigin=r.getChangedAccounts=void 0;var n=e("reselect"),o=e("../../../../shared/constants/permissions");const i=(0,n.createSelector)((e=>e.subjects),(e=>Object.values(e).reduce(((e,t)=>{var r,n;const i=null===(r=t.permissions)||void 0===r||null===(n=r.eth_accounts)||void 0===n?void 0:n.caveats.find((({type:e})=>e===o.CaveatTypes.restrictReturnedAccounts));return i&&e.set(t.origin,i.value),e}),new Map)));r.getPermittedAccountsByOrigin=i;r.getChangedAccounts=(e,t)=>{if(t===undefined)return e;const r=new Map;if(e===t)return r;const n=new Set([...e.keys()]);for(const o of t.keys()){const i=e.get(o)??[];t.get(o)!==i&&r.set(o,i),n.delete(o)}for(const t of n.keys())r.set(t,e.get(t));return r}}}},{package:"$root$",file:"app/scripts/controllers/permissions/selectors.js"}],[2487,{"./helpers.js":2489},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./helpers.js");r.JsonPatchError=n.PatchError,r.deepClone=n._deepClone;var o={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var o=a(r,this.path);o&&(o=n._deepClone(o));var i=s(r,{op:"remove",path:this.from}).removed;return s(r,{op:"add",path:this.path,value:i}),{newDocument:r,removed:o}},copy:function(e,t,r){var o=a(r,this.from);return s(r,{op:"add",path:this.path,value:n._deepClone(o)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:l(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},i={add:function(e,t,r){return n.isInteger(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){return{newDocument:r,removed:e.splice(t,1)[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:o.move,copy:o.copy,test:o.test,_get:o._get};function a(e,t){if(""==t)return e;var r={op:"_get",path:t};return s(e,r),r.value}function s(e,t,s,c,d,f){if(void 0===s&&(s=!1),void 0===c&&(c=!0),void 0===d&&(d=!0),void 0===f&&(f=0),s&&("function"==typeof s?s(t,0,e,t.path):u(t,0)),""===t.path){var h={newDocument:e};if("add"===t.op)return h.newDocument=t.value,h;if("replace"===t.op)return h.newDocument=t.value,h.removed=e,h;if("move"===t.op||"copy"===t.op)return h.newDocument=a(e,t.from),"move"===t.op&&(h.removed=e),h;if("test"===t.op){if(h.test=l(e,t.value),!1===h.test)throw new r.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",f,t,e);return h.newDocument=e,h}if("remove"===t.op)return h.removed=e,h.newDocument=null,h;if("_get"===t.op)return t.value=e,h;if(s)throw new r.JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",f,t,e);return h}c||(e=n._deepClone(e));var p=(t.path||"").split("/"),m=e,g=1,b=p.length,y=undefined,v=void 0,w=void 0;for(w="function"==typeof s?s:u;;){if((v=p[g])&&-1!=v.indexOf("~")&&(v=n.unescapePathComponent(v)),d&&("__proto__"==v||"prototype"==v&&g>0&&"constructor"==p[g-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(s&&y===undefined&&(m[v]===undefined?y=p.slice(0,g).join("/"):g==b-1&&(y=t.path),y!==undefined&&w(t,0,e,y)),g++,Array.isArray(m)){if("-"===v)v=m.length;else{if(s&&!n.isInteger(v))throw new r.JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",f,t,e);n.isInteger(v)&&(v=~~v)}if(g>=b){if(s&&"add"===t.op&&v>m.length)throw new r.JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",f,t,e);if(!1===(h=i[t.op].call(t,m,v,e)).test)throw new r.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",f,t,e);return h}}else if(g>=b){if(!1===(h=o[t.op].call(t,m,v,e)).test)throw new r.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",f,t,e);return h}if(m=m[v],s&&g<b&&(!m||"object"!=typeof m))throw new r.JsonPatchError("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",f,t,e)}}function c(e,t,o,i,a){if(void 0===i&&(i=!0),void 0===a&&(a=!0),o&&!Array.isArray(t))throw new r.JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");i||(e=n._deepClone(e));for(var c=new Array(t.length),u=0,d=t.length;u<d;u++)c[u]=s(e,t[u],o,!0,a,u),e=c[u].newDocument;return c.newDocument=e,c}function u(e,t,i,a){if("object"!=typeof e||null===e||Array.isArray(e))throw new r.JsonPatchError("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,i);if(!o[e.op])throw new r.JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,i);if("string"!=typeof e.path)throw new r.JsonPatchError("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,i);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new r.JsonPatchError('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,i);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new r.JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,i);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&e.value===undefined)throw new r.JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,i);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&n.hasUndefined(e.value))throw new r.JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,i);if(i)if("add"==e.op){var s=e.path.split("/").length,c=a.split("/").length;if(s!==c+1&&s!==c)throw new r.JsonPatchError("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,i)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==a)throw new r.JsonPatchError("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,i)}else if("move"===e.op||"copy"===e.op){var u=d([{op:"_get",path:e.from,value:undefined}],i);if(u&&"OPERATION_PATH_UNRESOLVABLE"===u.name)throw new r.JsonPatchError("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,i)}}function d(e,t,o){try{if(!Array.isArray(e))throw new r.JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)c(n._deepClone(t),n._deepClone(e),o||!0);else{o=o||u;for(var i=0;i<e.length;i++)o(e[i],i,t,undefined)}}catch(e){if(e instanceof r.JsonPatchError)return e;throw e}}function l(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var r,n,o,i=Array.isArray(e),a=Array.isArray(t);if(i&&a){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!l(e[r],t[r]))return!1;return!0}if(i!=a)return!1;var s=Object.keys(e);if((n=s.length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!t.hasOwnProperty(s[r]))return!1;for(r=n;0!=r--;)if(!l(e[o=s[r]],t[o]))return!1;return!0}return e!=e&&t!=t}r.getValueByPointer=a,r.applyOperation=s,r.applyPatch=c,r.applyReducer=function(e,t,n){var o=s(e,t);if(!1===o.test)throw new r.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return o.newDocument},r.validator=u,r.validate=d,r._areEquals=l}}},{package:"fast-json-patch",file:"node_modules/fast-json-patch/commonjs/core.js"}],[2488,{"./core.js":2487,"./helpers.js":2489},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2021 Joachim Wester
 * MIT license
 */
var n=e("./helpers.js"),o=e("./core.js"),i=new WeakMap,a=function(e){this.observers=new Map,this.obj=e},s=function(e,t){this.callback=e,this.observer=t};function c(e,t){void 0===t&&(t=!1);var r=i.get(e.object);u(r.value,e.object,e.patches,"",t),e.patches.length&&o.applyPatch(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function u(e,t,r,o,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var a=n._objectKeys(t),s=n._objectKeys(e),c=!1,d=s.length-1;d>=0;d--){var l=e[h=s[d]];if(!n.hasOwnProperty(t,h)||t[h]===undefined&&l!==undefined&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(i&&r.push({op:"test",path:o+"/"+n.escapePathComponent(h),value:n._deepClone(l)}),r.push({op:"remove",path:o+"/"+n.escapePathComponent(h)}),c=!0):(i&&r.push({op:"test",path:o,value:e}),r.push({op:"replace",path:o,value:t}),!0);else{var f=t[h];"object"==typeof l&&null!=l&&"object"==typeof f&&null!=f&&Array.isArray(l)===Array.isArray(f)?u(l,f,r,o+"/"+n.escapePathComponent(h),i):l!==f&&(!0,i&&r.push({op:"test",path:o+"/"+n.escapePathComponent(h),value:n._deepClone(l)}),r.push({op:"replace",path:o+"/"+n.escapePathComponent(h),value:n._deepClone(f)}))}}if(c||a.length!=s.length)for(d=0;d<a.length;d++){var h=a[d];n.hasOwnProperty(e,h)||t[h]===undefined||r.push({op:"add",path:o+"/"+n.escapePathComponent(h),value:n._deepClone(t[h])})}}}r.unobserve=function(e,t){t.unobserve()},r.observe=function(e,t){var r,o=function(e){return i.get(e)}(e);if(o){var u=function(e,t){return e.observers.get(t)}(o,t);r=u&&u.observer}else o=new a(e),i.set(e,o);if(r)return r;if(r={},o.value=n._deepClone(e),t){r.callback=t,r.next=null;var d=function(){c(r)},l=function(){clearTimeout(r.next),r.next=setTimeout(d)};"undefined"!=typeof window&&(window.addEventListener("mouseup",l),window.addEventListener("keyup",l),window.addEventListener("mousedown",l),window.addEventListener("keydown",l),window.addEventListener("change",l))}return r.patches=[],r.object=e,r.unobserve=function(){c(r),clearTimeout(r.next),function(e,t){e.observers.delete(t.callback)}(o,r),"undefined"!=typeof window&&(window.removeEventListener("mouseup",l),window.removeEventListener("keyup",l),window.removeEventListener("mousedown",l),window.removeEventListener("keydown",l),window.removeEventListener("change",l))},o.observers.set(t,new s(t,r)),r},r.generate=c,r.compare=function(e,t,r){void 0===r&&(r=!1);var n=[];return u(e,t,n,"",r),n}}}},{package:"fast-json-patch",file:"node_modules/fast-json-patch/commonjs/duplex.js"}],[2489,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2022 Joachim Wester
 * MIT licensed
 */
var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var i=Object.prototype.hasOwnProperty;function a(e,t){return i.call(e,t)}function s(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var n=[];for(var o in e)a(e,o)&&n.push(o);return n}function c(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e,t){var r;for(var n in e)if(a(e,n)){if(e[n]===t)return c(n)+"/";if("object"==typeof e[n]&&""!=(r=u(e[n],t)))return c(n)+"/"+r}return""}function d(e,t){var r=[e];for(var n in t){var o="object"==typeof t[n]?JSON.stringify(t[n],null,2):t[n];void 0!==o&&r.push(n+": "+o)}return r.join("\n")}Object.defineProperty(r,"hasOwnProperty",{value:a}),r._objectKeys=s,r._deepClone=function(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}},r.isInteger=function(e){for(var t,r=0,n=e.length;r<n;){if(!((t=e.charCodeAt(r))>=48&&t<=57))return!1;r++}return!0},r.escapePathComponent=c,r.unescapePathComponent=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},r._getPathRecursive=u,r.getPath=function(e,t){if(e===t)return"/";var r=u(e,t);if(""===r)throw new Error("Object not found in root");return"/"+r},r.hasUndefined=function e(t){if(t===undefined)return!0;if(t)if(Array.isArray(t)){for(var r=0,n=t.length;r<n;r++)if(e(t[r]))return!0}else if("object"==typeof t)for(var o=s(t),i=o.length,a=0;a<i;a++)if(e(t[o[a]]))return!0;return!1};var l=function(e){function t(t,r,n,o,i){var a=this.constructor,s=e.call(this,d(t,{name:r,index:n,operation:o,tree:i}))||this;return s.name=r,s.index=n,s.operation=o,s.tree=i,Object.setPrototypeOf(s,a.prototype),s.message=d(t,{name:r,index:n,operation:o,tree:i}),s}return o(t,e),t}(Error);r.PatchError=l}}},{package:"fast-json-patch",file:"node_modules/fast-json-patch/commonjs/helpers.js"}],[2490,{"./commonjs/core.js":2487,"./commonjs/duplex.js":2488,"./commonjs/helpers.js":2489},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("./commonjs/core.js");Object.assign(r,n);var o=e("./commonjs/duplex.js");Object.assign(r,o);var i=e("./commonjs/helpers.js");r.JsonPatchError=i.PatchError,r.deepClone=i._deepClone,r.escapePathComponent=i.escapePathComponent,r.unescapePathComponent=i.unescapePathComponent}}},{package:"fast-json-patch",file:"node_modules/fast-json-patch/index.js"}],[2491,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(){var e;try{e="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){console.log("Collator could not be initialized and wouldn't be used")}var n=[],o=[],i={get:function(t,r,i){var a,s,c,u,d,l,f=i&&e&&i.useCollator,h=t.length,p=r.length;if(0===h)return p;if(0===p)return h;for(c=0;c<p;++c)n[c]=c,o[c]=r.charCodeAt(c);if(n[p]=p,f)for(c=0;c<h;++c){for(s=c+1,u=0;u<p;++u)a=s,l=0===e.compare(t.charAt(c),String.fromCharCode(o[u])),(s=n[u]+(l?0:1))>(d=a+1)&&(s=d),s>(d=n[u+1]+1)&&(s=d),n[u]=a;n[u]=s}else for(c=0;c<h;++c){for(s=c+1,u=0;u<p;++u)a=s,l=t.charCodeAt(c)===o[u],(s=n[u]+(l?0:1))>(d=a+1)&&(s=d),s>(d=n[u+1]+1)&&(s=d),n[u]=a;n[u]=s}return s}};"undefined"!=typeof define&&null!==define&&define.amd?define((function(){return i})):null!=t&&void 0!==r&&t.exports===r?t.exports=i:"undefined"!=typeof self&&"function"==typeof self.postMessage&&"function"==typeof self.importScripts?self.Levenshtein=i:"undefined"!=typeof window&&null!==window&&(window.Levenshtein=i)}()}}},{package:"eslint>optionator>fast-levenshtein",file:"node_modules/fast-levenshtein/levenshtein.js"}],[25,{"../../../../shared/constants/permissions":3410,"@metamask/permission-controller":1305},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.unrestrictedMethods=r.getPermissionSpecifications=r.getCaveatSpecifications=void 0;var n=e("@metamask/permission-controller"),o=e("../../../../shared/constants/permissions");const i=Object.freeze({...o.RestrictedMethods}),a=Object.freeze({[o.CaveatTypes.restrictReturnedAccounts]:e=>({type:o.CaveatTypes.restrictReturnedAccounts,value:e})});r.getCaveatSpecifications=({getIdentities:e})=>({[o.CaveatTypes.restrictReturnedAccounts]:{type:o.CaveatTypes.restrictReturnedAccounts,decorator:(e,t)=>async r=>(await e(r)).filter((e=>t.value.includes(e))).slice(0,1),validator:(t,r,n)=>function(e,t){if(!Array.isArray(e)||0===e.length)throw new Error(`${i.eth_accounts} error: Expected non-empty array of Ethereum addresses.`);const r=t();e.forEach((e=>{if(!e||"string"!=typeof e)throw new Error(`${i.eth_accounts} error: Expected an array of Ethereum addresses. Received: "${e}".`);if(!r[e])throw new Error(`${i.eth_accounts} error: Received unrecognized address: "${e}".`)}))}(t.value,e)}});r.getPermissionSpecifications=({getAllAccounts:e,getIdentities:t,captureKeyringTypesWithMissingIdentities:r})=>({[i.eth_accounts]:{permissionType:n.PermissionType.RestrictedMethod,targetKey:i.eth_accounts,allowedCaveats:[o.CaveatTypes.restrictReturnedAccounts],factory:(e,t)=>{if(Array.isArray(e.caveats))throw new Error(`${i.eth_accounts} error: Received unexpected caveats. Any permitted caveats will be added automatically.`);if(!t.approvedAccounts)throw new Error(`${i.eth_accounts} error: No approved accounts specified.`);return(0,n.constructPermission)({...e,caveats:[a[o.CaveatTypes.restrictReturnedAccounts](t.approvedAccounts)]})},methodImplementation:async n=>{const o=await e(),i=t();return o.sort(((e,t)=>{if(!i[e])throw r(i,o),new Error(`Missing identity for address: "${e}".`);if(!i[t])throw r(i,o),new Error(`Missing identity for address: "${t}".`);return i[e].lastSelected===i[t].lastSelected?0:i[e].lastSelected===undefined?1:i[t].lastSelected===undefined?-1:i[t].lastSelected-i[e].lastSelected}))},validator:(e,t,r)=>{const{caveats:n}=e;if(!n||1!==n.length||n[0].type!==o.CaveatTypes.restrictReturnedAccounts)throw new Error(`${i.eth_accounts} error: Invalid caveats. There must be a single caveat of type "${o.CaveatTypes.restrictReturnedAccounts}".`)}}});const s=Object.freeze(["eth_blockNumber","eth_call","eth_chainId","eth_coinbase","eth_decrypt","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getEncryptionPublicKey","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getWork","eth_hashrate","eth_mining","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_protocolVersion","eth_sendRawTransaction","eth_sendTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_submitHashrate","eth_submitWork","eth_syncing","eth_uninstallFilter","metamask_getProviderState","metamask_watchAsset","net_listening","net_peerCount","net_version","personal_ecRecover","personal_sign","wallet_watchAsset","web3_clientVersion","web3_sha3"]);r.unrestrictedMethods=s}}},{package:"$root$",file:"app/scripts/controllers/permissions/specifications.js"}],[2506,{"./constants":2510,bech32:2626,bs58check:1952,buffer:1943,"hash.js/lib/hash/ripemd":2674,"hash.js/lib/hash/sha":2675},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var o=e("bech32"),i=n(e("bs58check")),a=e("hash.js/lib/hash/ripemd"),s=e("hash.js/lib/hash/sha"),c=e("./constants"),u=t.from("01","hex"),d=c.BIP_CONSTANTS.PURPOSES,l=c.BIP_CONSTANTS.COINS,f=0,h=169,p=118,m=135,g=136,b=172,y=208,v=240;function w(e,r){return t.concat([e,r])}function E(e){var r=t.alloc(4);return r.writeUInt32LE(e,0),r}function x(e){var r;return e<253?(r=t.alloc(1)).writeUInt8(e,0):e<=65535?((r=t.alloc(3)).writeUInt8(253,0),r.writeUInt16LE(e,1)):e<4294967295?((r=t.alloc(5)).writeUInt8(254,0),r.writeUInt32LE(e,1)):((r=t.alloc(9)).writeUInt8(255,0),r.writeUInt32LE(e>>>0,1),r.writeUInt32LE(e/4294967296|0,5)),r}function _(e,r,n){"number"==typeof e&&(e=e.toString(16));var o=t.alloc(8),i=e.length%2==0?e.toString(16):"0".concat(e.toString(16));return t.from(i,"hex").reverse().copy(o,0),o.copy(r,n),o}function k(e){var r,n;try{r=i.default.decode(e)[0],n=i.default.decode(e).slice(1)}catch(i){try{var a=o.bech32.decode(e);if("bc"===a.prefix)r=y;else{if("tb"!==a.prefix)throw new Error("Unsupported prefix: must be bc or tb.");r=v}if(0!==a.words[0])throw new Error("Unsupported segwit version: must be 0, got ".concat(a.words[0]));if(33!==a.words.length){var s=53===a.words.length;throw new Error("Unsupported address".concat(s?" (P2WSH not supported)":"",": ").concat(e))}n=t.from(o.bech32.fromWords(a.words.slice(1)))}catch(t){throw new Error("Unable to decode address: ".concat(e,": ").concat(t.message))}}return{versionByte:r,pkh:n}}function T(e){if(e.length<2)throw new Error("Path must be >1 index");var t=e[0],r=e[1];if(t===d.BTC_SEGWIT&&r===l.BTC)return y;if(t===d.BTC_SEGWIT&&r===l.BTC_TESTNET)return v;if(t===d.BTC_WRAPPED_SEGWIT&&r===l.BTC)return 5;if(t===d.BTC_WRAPPED_SEGWIT&&r===l.BTC_TESTNET)return 196;if(t===d.BTC_LEGACY&&r===l.BTC)return 0;if(t===d.BTC_LEGACY&&r===l.BTC_TESTNET)return 111;throw new Error("Invalid Bitcoin path provided. Cannot determine address format.")}function S(e){switch(e.signerPath[0]){case d.BTC_LEGACY:return 1;case d.BTC_WRAPPED_SEGWIT:return 3;case d.BTC_SEGWIT:return 4;default:throw new Error("Unsupported path purpose (".concat(e.signerPath[0],"): cannot determine BTC script type."))}}r.default={buildBitcoinTxRequest:function(e){var r=e.prevOuts,n=e.recipient,o=e.value,i=e.changePath,a=e.fee;if(!i)throw new Error("No changePath provided.");if(5!==i.length)throw new Error("Please provide a full change path.");var s=t.alloc(59+69*r.length),u=0,d=T(i);s.writeUInt8(d,0),u++,s.writeUInt32LE(i.length,u),u+=4;for(var l=0;l<i.length;l++)s.writeUInt32LE(i[l],u),u+=4;s.writeUInt32LE(a,u),u+=4;var f=k(n);s.writeUInt8(f.versionByte,u),u++,f.pkh.copy(s,u),u+=f.pkh.length,_(o,s,u),u+=8,s.writeUInt8(r.length,u),u++;var h=0;return r.forEach((function(e){if(!e.signerPath||5!==e.signerPath.length)throw new Error("Full recipient path not specified ");s.writeUInt32LE(e.signerPath.length,u),u+=4;for(var r=0;r<e.signerPath.length;r++)s.writeUInt32LE(e.signerPath[r],u),u+=4;s.writeUInt32LE(e.index,u),u+=4,_(e.value,s,u),u+=8,h+=e.value;var n=S(e);s.writeUInt8(n,u),u++,t.isBuffer(e.txHash)||(e.txHash=t.from(e.txHash,"hex")),e.txHash.copy(s,u),u+=e.txHash.length})),{payload:s,schema:c.signingSchema.BTC_TRANSFER,origData:e,changeData:{value:h-(o+a)}}},serializeTx:function(e){var r=e.inputs,n=e.outputs,o=e.lockTime,i=void 0===o?0:o,c=t.alloc(4),l=0,T=function(e){var t=!1;return e.forEach((function(e){e.signerPath[0]!==d.BTC_SEGWIT&&e.signerPath[0]!==d.BTC_WRAPPED_SEGWIT||(t=!0)})),t}(r);c.writeUInt32LE(2,l),l+=4,T&&(c=w(c,t.from("00","hex")),c=w(c,t.from("01","hex")));var A=x(r.length);c=w(c,A),l+=A.length,r.forEach((function(e){c=w(c,e.hash.reverse()),l+=e.hash.length;var r=E(e.index);c=w(c,r),l+=r.length;var n=S(e);if(3===n){var o=function(e){var r=t.alloc(22),n=t.from((0,s.sha256)().update(e).digest("hex"),"hex"),o=t.from((0,a.ripemd160)().update(n).digest("hex"),"hex");return r.writeUInt8(f,0),r.writeUInt8(o.length,1),o.copy(r,2),r}(e.pubkey),i=x(o.length),d=x((h=t.concat([i,o])).length);c=w(c,d),l+=d.length,c=w(c,h),l+=h.length}else if(1===n){var h=function(e,r){var n=x((e=t.concat([e,u])).length),o=x(r.length),i=t.concat([n,e,o,r]),a=x(i.length);return t.concat([a,i])}(e.sig,e.pubkey);c=w(c,h),l+=h.length}else if(4===n){var p=t.from("00","hex");c=w(c,p),l+=1}var m=E(4294967295);c=w(c,m),l+=m.length}));var P=x(n.length);if(c=w(c,P),l+=P.length,n.forEach((function(e){var r,n,o=(r=e.value,n=t.alloc(8),_(r,n,0),n);c=w(c,o),l+=o.length;var i=function(e){var r=k(e);switch(r.versionByte){case y:case v:return n=r.pkh,(o=t.alloc(2+n.length)).writeUInt8(f,0),o.writeUInt8(n.length,1),n.copy(o,2),o;case 5:case 196:return function(e){var r=t.alloc(3+e.length),n=0;return r.writeUInt8(h,n),n++,r.writeUInt8(e.length,n),n++,e.copy(r,n),n+=e.length,r.writeUInt8(m,n),n++,r}(r.pkh);case 0:case 111:return function(e){var r=t.alloc(5+e.length),n=0;return r.writeUInt8(p,n),n++,r.writeUInt8(h,n),n++,r.writeUInt8(e.length,n),n++,e.copy(r,n),n+=e.length,r.writeUInt8(g,n),n++,r.writeUInt8(b,n),n++,r}(r.pkh);default:throw new Error("Unknown version byte: ".concat(r.versionByte,". Cannot build BTC transaction."))}var n,o}(e.recipient),a=x(i.length);c=w(c,a),l+=a.length,c=w(c,i),l+=i.length})),T){for(var I=[],R=[],C=0;C<r.length;C++)I.push(r[C].sig),R.push(r[C].pubkey);var j=function(e,r){var n=t.alloc(0),o=t.alloc(1);o.writeUInt8(2,0);for(var i=0;i<e.length;i++){var a=t.concat([e[i],u]),s=x(a.length),c=r[i],d=x(c.length);n=t.concat([n,o,s,a,d,c])}return n}(I,R);c=w(c,j),l+=j.length}return t.concat([c,E(i)]).toString("hex")},getBitcoinAddress:function(e,r){var n=null,a=null;if(r===y?(n="bc",a=0):r===v&&(n="tb",a=0),null!==n&&null!==a){var s=o.bech32.toWords(e);return s.unshift(a),o.bech32.encode(n,s)}return i.default.encode(t.concat([t.from([r]),e]))},getAddressFormat:T}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/bitcoin.js"}],[2507,{"@ethersproject/abi":396,buffer:1943,"js-sha3":2628},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.replaceNestedDefs=r.getNestedCalldata=r.parseCanonicalName=r.parseSolidityJSONABI=void 0;var n=e("js-sha3"),o=e("@ethersproject/abi");r.parseSolidityJSONABI=function(e,t){e=a(e);var r=t.filter((function(e){return"function"===e.type})).find((function(t){return i(l(t).canonicalName)===e}));if(r)return{def:l(r).def};throw new Error("Unable to find matching function in ABI")};r.parseCanonicalName=function(e,t){if((e=a(e))!==i(t))throw new Error("Name does not match provided sig.");var r=[],n=t.indexOf("(");if(n<0)throw new Error(v);r.push(t.slice(0,n)),t=t.slice(n+1);for(var o=[];t.length>1;){var s=c(t);o=o.concat(u(s)),t=t.slice(s.length+1)}var d=f(o);return r.concat(d)};r.getNestedCalldata=function(e,r){var n=[],i=e.slice(1),a=s(i);function c(e){return(e.length-4)%32==0}return(new o.AbiCoder).decode(a,"0x"+r.slice(4).toString("hex")).forEach((function(e,r){if(g(i[r])){var o=!0;if(y(i[r]))e.forEach((function(e){c(t.from(e.slice(2),"hex"))||(o=!1)}));else if(b(i[r])){var a=t.from(e.slice(2),"hex");o=c(a)}else o=!1;n.push(o?e:null)}else n.push(null)})),n};function i(e){return"0x".concat((0,n.keccak256)(e).slice(0,8))}function a(e){if("string"!=typeof e||10!==e.length&&8!==e.length)throw new Error("`sig` must be a hex string with 4 bytes of data.");return 8===e.length&&(e="0x".concat(e)),e}function s(e){for(var t=[],r=function(r){var n=e[r],o=w[n[1]];if(n[2]&&(o="".concat(o).concat(8*n[2])),n[3].length>0&&n[3].forEach((function(e){o=0===n[3][e]?"".concat(o,"[]"):"".concat(o,"[").concat(n[3][e],"]")})),n[4]){var i=s(n[4]);o="".concat(o,"(").concat(i.join(","),")")}t.push(o)},n=0;n<e.length;n++)r(n);return t}function c(e){if(m(e))return p(e);if(e.indexOf(",")>-1)return e.slice(0,e.indexOf(","));if(e.indexOf(")")>-1)return e.slice(0,e.indexOf(")"));throw new Error(v)}function u(e){if(!m(e))return[d(e)];var t={szBytes:0,typeIdx:w.indexOf("tuple"),arraySzs:[]},r=p(e,!1),n=e.slice(r.length);t.arraySzs=h(n),r=r.slice(1);for(var o=[];r.length>0;){var i=c(r);r=r.slice(i.length+1),o=o.concat(u(i))}if(!o.length)throw new Error(v);return[t,o]}function d(e){var t={szBytes:0,typeIdx:0,arraySzs:[]},r=!1;if(w.forEach((function(n,o){if(e.indexOf(n)>-1&&!r){t.typeIdx=o,t.arraySzs=h(e);var i=t.arraySzs.length>0?e.indexOf("["):e.length,a=e.slice(n.length,i);if(parseInt(a)&&(t.szBytes=parseInt(a)/8,t.szBytes>32))throw new Error(v);r=!0}})),!r)throw new Error(v);return t}function l(e,t,r,n){if(void 0===t&&(t=""),void 0===r&&(r=[]),void 0===n&&(n=!1),!n){var o=e.name||"";r.push(o),t+=o}return e.inputs&&(t+="(",e.inputs.forEach((function(e){var n=function(e){if(!e.type)throw new Error("No type in input");var t=[e.name],r=function(e){var t,r={szBytes:0,typeIdx:0,arraySzs:[]};w.forEach((function(n,o){e.indexOf(n)>-1&&!t&&(t=n,r.typeIdx=o)})),r.arraySzs=h(e);var n=r.arraySzs.length>0?e.indexOf("["):e.length;if(["uint","int","bytes"].indexOf(t)>-1){var o=parseInt(e.slice(t.length,n))||0;if(o>256)throw new Error("Invalid param size");r.szBytes=o/8}else r.szBytes=0;return r}(e.type),n=r.typeIdx,o=r.szBytes,i=r.arraySzs;return t.push(n),t.push(o),t.push(i),t}(e);if(e.type.indexOf("tuple")>-1&&e.components){var o=l({inputs:e.components},t,[],!0);t=o.canonicalName,t+="".concat(e.type.slice(5),","),n.push(o.def)}else t+=e.type,t+=",";r.push(n)})),","===t[t.length-1]&&(t=t.slice(0,t.length-1)),t+=")"),{def:r,canonicalName:t}}function f(e,t){void 0===t&&(t="");var r=[],n=0;return e.forEach((function(e,o){Array.isArray(e)?r[r.length-1].push(f(e,"".concat(o,"-"))):r.push(["#".concat(t).concat(o+1-n),e.typeIdx,e.szBytes,e.arraySzs]),e.typeIdx===w.indexOf("tuple")&&(n+=1)})),r}function h(e){if("string"!=typeof e)throw new Error("Invalid type");for(var t=[],r=e;r.length>0;){var n=r.indexOf("[");if(n<0)return t;var o=r.slice(n),i=o.indexOf("]");if(i<0)throw new Error("Bad param type");var a=o.slice(1,i);0===a.length?t.push(0):t.push(parseInt(a)),r=o.slice(i+1)}return t}function p(e,t){void 0===t&&(t=!0);for(var r=0,n=!1,o=0;o<e.length;o++){"("===e[o]?(r+=1,n=!0):")"===e[o]&&(r-=1);var i=","===e[o+1]||")"===e[o+1]||o===e.length-1;if(t||"["!==e[o+1]||(i=!0),!r&&n&&i)return e.slice(0,o+1)}throw new Error(v)}function m(e){return"("===e[0]}function g(e){return"bytes"===w[e[1]]}function b(e){return g(e)&&0===e[3].length}function y(e){return g(e)&&1===e[3].length&&0===e[3][0]}r.replaceNestedDefs=function(e,t){for(var r=0;r<t.length;r++){var n=y(e[1+r]),o=b(e[1+r]);if(null!==t[r]&&(n||o)){e[1+r][1]=w.indexOf("nestedDef");var i=n?t[r]:[t[r]];e[1+r]=e[1+r].concat([i])}}return e};var v="Could not parse canonical function name.",w=[null,"address","bool","uint","int","bytes","string","tuple","nestedDef"]}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/calldata/evm.js"}],[2508,{"./evm":2507},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CALLDATA=void 0;var n=e("./evm");r.CALLDATA={EVM:{type:1,parsers:{parseSolidityJSONABI:n.parseSolidityJSONABI,parseCanonicalName:n.parseCanonicalName},processors:{getNestedCalldata:n.getNestedCalldata,replaceNestedDefs:n.replaceNestedDefs}}}}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/calldata/index.js"}],[2509,{"./constants":2510,"./functions/index":2518,"./shared/functions":2525,"./shared/validators":2528,"./util":2529,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.Client=void 0;var i=e("./constants"),a=e("./functions/index"),s=e("./shared/functions"),c=e("./shared/validators"),u=e("./util"),d=function(){function e(e){var t=e.baseUrl,r=e.name,n=e.privKey,o=e.stateData,a=e.timeout,c=e.retryCount,d=e.skipRetryOnWrongWallet;this.name=r||"Unknown",this.baseUrl=t||i.BASE_URL,this.deviceId=null,this.isPaired=!1,this.activeWallets=i.DEFAULT_ACTIVE_WALLETS,this.timeout=a||6e4,this.retryCount=c||3,this.skipRetryOnWrongWallet=d||!1,this.privKey=n||(0,u.randomBytes)(32),this.key=(0,u.getP256KeyPair)(this.privKey),this.retryWrapper=(0,s.buildRetryWrapper)(this,this.retryCount),o&&this.unpackAndApplyStateData(o)}return Object.defineProperty(e.prototype,"sharedSecret",{get:function(){return t.from(this.key.derive(this.ephemeralPub.getPublic()).toArray("be",32))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ephemeralPub",{get:function(){return this._ephemeralPub},set:function(e){(0,c.validateEphemeralPub)(e),this._ephemeralPub=e},enumerable:!1,configurable:!0}),e.prototype.connect=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.retryWrapper(a.connect,{id:e})]}))}))},e.prototype.pair=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.retryWrapper(a.pair,{pairingSecret:e})]}))}))},e.prototype.getAddresses=function(e){var t=e.startPath,r=e.n,i=void 0===r?1:r,s=e.flag,c=void 0===s?0:s;return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.retryWrapper(a.getAddresses,{startPath:t,n:i,flag:c})]}))}))},e.prototype.sign=function(e){var t=e.data,r=e.currency,i=e.cachedData,s=e.nextCode;return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.retryWrapper(a.sign,{data:t,currency:r,cachedData:i,nextCode:s})]}))}))},e.prototype.fetchActiveWallet=function(){return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.retryWrapper(a.fetchActiveWallet)]}))}))},e.prototype.addKvRecords=function(e){var t=e.type,r=void 0===t?0:t,i=e.records,s=e.caseSensitive,c=void 0!==s&&s;return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.retryWrapper(a.addKvRecords,{type:r,records:i,caseSensitive:c})]}))}))},e.prototype.getKvRecords=function(e){var t=e.type,r=void 0===t?0:t,i=e.n,s=void 0===i?1:i,c=e.start,u=void 0===c?0:c;return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.retryWrapper(a.getKvRecords,{type:r,n:s,start:u})]}))}))},e.prototype.removeKvRecords=function(e){var t=e.type,r=void 0===t?0:t,i=e.ids,s=void 0===i?[]:i;return n(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.retryWrapper(a.removeKvRecords,{type:r,ids:s})]}))}))},e.prototype.fetchEncryptedData=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.retryWrapper(a.fetchEncData,e)]}))}))},e.prototype.getActiveWallet=function(){return this.activeWallets.external.uid&&!i.EMPTY_WALLET_UID.equals(this.activeWallets.external.uid)?this.activeWallets.external:this.activeWallets.internal.uid&&!i.EMPTY_WALLET_UID.equals(this.activeWallets.internal.uid)?this.activeWallets.internal:undefined},e.prototype.hasActiveWallet=function(){return!!this.getActiveWallet()},e.prototype.resetActiveWallets=function(){this.activeWallets=i.DEFAULT_ACTIVE_WALLETS},e.prototype.getStateData=function(){return this.packStateData()},e.prototype.getFwConstants=function(){var e;return(0,i.getFwVersionConst)(null!==(e=this.fwVersion)&&void 0!==e?e:t.alloc(0))},e.prototype.getFwVersion=function(){return this.fwVersion&&this.fwVersion.length>=3?{fix:this.fwVersion[0],minor:this.fwVersion[1],major:this.fwVersion[2]}:{fix:0,minor:0,major:0}},e.prototype.getAppName=function(){return this.name},e.prototype.packStateData=function(){var e,t,r,n,o;try{var i={activeWallets:{internal:{uid:null===(e=this.activeWallets.internal.uid)||void 0===e?void 0:e.toString("hex"),name:null===(t=this.activeWallets.internal.name)||void 0===t?void 0:t.toString(),capabilities:this.activeWallets.internal.capabilities},external:{uid:null===(r=this.activeWallets.external.uid)||void 0===r?void 0:r.toString("hex"),name:null===(n=this.activeWallets.external.name)||void 0===n?void 0:n.toString(),capabilities:this.activeWallets.external.capabilities}},ephemeralPub:this.ephemeralPub.getPublic().encode("hex"),fwVersion:null===(o=this.fwVersion)||void 0===o?void 0:o.toString("hex"),deviceId:this.deviceId,name:this.name,baseUrl:this.baseUrl,privKey:this.privKey.toString("hex"),retryCount:this.retryCount,timeout:this.timeout};return JSON.stringify(i)}catch(e){return console.warn("Could not pack state data."),null}},e.prototype.unpackAndApplyStateData=function(e){try{var r=JSON.parse(e),n={uid:t.from(r.activeWallets.internal.uid,"hex"),name:r.activeWallets.internal.name?t.from(r.activeWallets.internal.name):null,capabilities:r.activeWallets.internal.capabilities,external:!1},o={uid:t.from(r.activeWallets.external.uid,"hex"),name:r.activeWallets.external.name?t.from(r.activeWallets.external.name):null,capabilities:r.activeWallets.external.capabilities,external:!0},i=t.from(r.ephemeralPub,"hex"),a=t.from(r.fwVersion,"hex"),c=t.from(r.privKey,"hex");this.activeWallets.internal=n,this.activeWallets.external=o,this.ephemeralPub=(0,u.getP256KeyPairFromPub)(i),this.fwVersion=a,this.deviceId=r.deviceId,this.name=r.name,this.baseUrl=r.baseUrl,this.url="".concat(this.baseUrl,"/").concat(this.deviceId),this.privKey=c,this.key=(0,u.getP256KeyPair)(this.privKey),this.retryCount=r.retryCount,this.timeout=r.timeout,this.retryWrapper=(0,s.buildRetryWrapper)(this,this.retryCount)}catch(e){console.warn("Could not apply state data.")}},e}();r.Client=d}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/client.js"}],[2510,{buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){var t,n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.PUBLIC=r.ETH_ABI_LATTICE_FW_TYPE_MAP=r.MAX_CHAIN_ID_BYTES=r.HANDLE_LARGER_CHAIN_ID=r.HARDENED_OFFSET=r.VERSION_BYTE=r.REQUEST_TYPE_BYTE=r.signingSchema=r.responseMsgs=r.responseCodes=r.messageConstants=r.ethMsgProtocol=r.encReqCodes=r.deviceCodes=r.decResLengths=r.addressSizes=r.ENC_MSG_LEN=r.EXTERNAL_NETWORKS_BY_CHAIN_ID_URL=r.NETWORKS_BY_CHAIN_ID=r.MAX_ADDR=r.CURRENCIES=r.BASE_URL=r.BIP_CONSTANTS=r.AES_IV=r.ADDR_STR_LEN=r.getFwVersionConst=r.ASCII_REGEX=r.DEFAULT_ACTIVE_WALLETS=r.EMPTY_WALLET_UID=r.EXTERNAL=void 0;r.AES_IV=[109,121,115,101,99,114,101,116,112,97,115,115,119,111,114,100];r.ADDR_STR_LEN=129;var o={empty:0,getAddresses:1290,sign:1090,getWallets:142,getKvRecords:1395,getDecoders:1608,fetchEncryptedData:1608,removeDecoders:4,test:1646};r.decResLengths=o;var i=0;r.ENC_MSG_LEN=i,Object.keys(o).forEach((function(e){o[e]+82>i&&(r.ENC_MSG_LEN=i=o[e]+82)}));r.deviceCodes={CONNECT:1,ENCRYPTED_REQUEST:2};r.encReqCodes={FINALIZE_PAIRING:0,GET_ADDRESSES:1,ADD_PERMISSION:2,SIGN_TRANSACTION:3,GET_WALLETS:4,ADD_PERMISSION_V0:5,ADD_DECODERS:6,GET_KV_RECORDS:7,ADD_KV_RECORDS:8,REMOVE_KV_RECORDS:9,GET_DECODERS:10,REMOVE_DECODERS:11,EXPORT_ENC_DATA:12,TEST:13};r.messageConstants={NOT_PAIRED:0,PAIRED:1};r.addressSizes={BTC:20,ETH:20};var a={RESP_SUCCESS:0,RESP_ERR_INVALID_MSG:128,RESP_ERR_UNSUPPORTED_VER:129,RESP_ERR_DEV_BUSY:130,RESP_ERR_USER_TIMEOUT:131,RESP_ERR_USER_DECLINED:132,RESP_ERR_PAIR_FAIL:133,RESP_ERR_PAIR_DISABLED:134,RESP_ERR_PERMISSION_DISABLED:135,RESP_ERR_INTERNAL:136,RESP_ERR_GCE_TIMEOUT:137,RESP_ERR_WRONG_WALLET:138,RESP_ERR_DEV_LOCKED:139,RESP_ERR_DISABLED:140,RESP_ERR_ALREADY:141,RESP_ERR_INVALID_EPHEM_ID:142};r.responseCodes=a;r.CURRENCIES={ETH:"ETH",BTC:"BTC",ETH_MSG:"ETH_MSG"};var s=((t={})[a.RESP_SUCCESS]=0,t[a.RESP_ERR_INVALID_MSG]="Invalid request",t[a.RESP_ERR_UNSUPPORTED_VER]="Unsupported version",t[a.RESP_ERR_DEV_BUSY]="Device busy",t[a.RESP_ERR_USER_TIMEOUT]="Timeout waiting for user",t[a.RESP_ERR_USER_DECLINED]="Request declined by user",t[a.RESP_ERR_PAIR_FAIL]="Pairing failed",t[a.RESP_ERR_PAIR_DISABLED]="Pairing is currently disabled",t[a.RESP_ERR_PERMISSION_DISABLED]="Automated signing is currently disabled",t[a.RESP_ERR_INTERNAL]="Device error",t[a.RESP_ERR_GCE_TIMEOUT]="Timeout",t[a.RESP_ERR_WRONG_WALLET]="Active wallet does not match request",t[a.RESP_ERR_DEV_LOCKED]="Device locked",t[a.RESP_ERR_DISABLED]="Disabled",t[a.RESP_ERR_ALREADY]="Record already exists. You must first remove it on your device.",t[a.RESP_ERR_INVALID_EPHEM_ID]="Could not find requester. Please reconnect.",t);r.responseMsgs=s;r.signingSchema={BTC_TRANSFER:0,ETH_TRANSFER:1,ERC20_TRANSFER:2,ETH_MSG:3,EXTRA_DATA:4,GENERAL_SIGNING:5};var c=2147483648;r.HARDENED_OFFSET=c;var u={PURPOSES:{ETH:2147483692,BTC_LEGACY:2147483692,BTC_WRAPPED_SEGWIT:2147483697,BTC_SEGWIT:2147483732},COINS:{ETH:2147483708,BTC:c,BTC_TESTNET:2147483649}};r.BIP_CONSTANTS=u;r.REQUEST_TYPE_BYTE=2;r.VERSION_BYTE=1;r.HANDLE_LARGER_CHAIN_ID=255;r.MAX_CHAIN_ID_BYTES=8;r.BASE_URL="https://signing.gridpl.us";var d={address:1,bool:2,uint8:3,uint16:4,uint24:5,uint32:6,uint40:7,uint48:8,uint56:9,uint64:10,uint72:11,uint80:12,uint88:13,uint96:14,uint104:15,uint112:16,uint120:17,uint128:18,uint136:19,uint144:20,uint152:21,uint160:22,uint168:23,uint176:24,uint184:25,uint192:26,uint200:27,uint208:28,uint216:29,uint224:30,uint232:31,uint240:32,uint248:33,uint256:34,int8:35,int16:36,int24:37,int32:38,int40:39,int48:40,int56:41,int64:42,int72:43,int80:44,int88:45,int96:46,int104:47,int112:48,int120:49,int128:50,int136:51,int144:52,int152:53,int160:54,int168:55,int176:56,int184:57,int192:58,int200:59,int208:60,int216:61,int224:62,int232:63,int240:64,int248:65,int256:66,uint:67,bytes1:69,bytes2:70,bytes3:71,bytes4:72,bytes5:73,bytes6:74,bytes7:75,bytes8:76,bytes9:77,bytes10:78,bytes11:79,bytes12:80,bytes13:81,bytes14:82,bytes15:83,bytes16:84,bytes17:85,bytes18:86,bytes19:87,bytes20:88,bytes21:89,bytes22:90,bytes23:91,bytes24:92,bytes25:93,bytes26:94,bytes27:95,bytes28:96,bytes29:97,bytes30:98,bytes31:99,bytes32:100,bytes:101,string:102},l=n(n({},d),{tuple1:103,tuple2:104,tuple3:105,tuple4:106,tuple5:107,tuple6:108,tuple7:109,tuple8:110,tuple9:111,tuple10:112,tuple11:113,tuple12:114,tuple13:115,tuple14:116,tuple15:117,tuple16:118,tuple17:119});r.ETH_ABI_LATTICE_FW_TYPE_MAP=l;var f={SIGN_PERSONAL:{str:"signPersonal",enumIdx:0},TYPED_DATA:{str:"typedData",enumIdx:1,rawDataMaxLen:1629,typeCodes:d}};r.ethMsgProtocol=f,r.EXTERNAL={GET_ADDR_FLAGS:{SECP256K1_PUB:3,ED25519_PUB:4,BLS12_381_G1_PUB:5},SIGNING:{HASHES:{NONE:0,KECCAK256:1,SHA256:2},CURVES:{SECP256K1:0,ED25519:1,BLS12_381_G2:2},ENCODINGS:{NONE:1,SOLANA:2,EVM:4,ETH_DEPOSIT:5},BLS_DST:{BLS_DST_NUL:1,BLS_DST_POP:2}},ENC_DATA:{SCHEMAS:{BLS_KEYSTORE_EIP2335_PBKDF_V4:0}},ETH_CONSENSUS_SPEC:{NETWORKS:{MAINNET_GENESIS:{networkName:"mainnet",forkVersion:e.alloc(4),validatorsRoot:e.alloc(32)}},DOMAINS:{DEPOSIT:e.from("03000000","hex"),VOLUNTARY_EXIT:e.from("04000000","hex")}}},r.PUBLIC=r.EXTERNAL,r.getFwVersionConst=function(e){var t={extraDataFrameSz:0,extraDataMaxFrames:0,genericSigning:{}};function n(e,t){return e[2]>t[0]||e[2]===t[0]&&e[1]>t[1]||e[2]===t[0]&&e[1]===t[1]&&e[0]>t[2]||e[2]===t[0]&&e[1]===t[1]&&e[0]===t[2]}var o=0===e.length;return!o&&n(e,[0,10,4])||!o&&n(e,[0,10,0])?(t.reqMaxDataSz=1678,t.ethMaxGasPrice=2e13,t.addrFlagsAllowed=!0):(t.reqMaxDataSz=1152,t.ethMaxGasPrice=5e11,t.addrFlagsAllowed=!1),t.ethMaxDataSz=t.reqMaxDataSz-128,t.ethMaxMsgSz=t.ethMaxDataSz,t.eip712MaxTypeParams=18,!o&&n(e,[0,10,4])&&(t.extraDataFrameSz=1500,t.extraDataMaxFrames=1),!o&&n(e,[0,10,5])&&(t.varAddrPathSzAllowed=!0,t.eip712Supported=!0),!o&&n(e,[0,10,8])&&(t.prehashAllowed=!0),!o&&n(e,[0,10,10])&&(t.ethMsgPreHashAllowed=!0),!o&&n(e,[0,11,0])&&(t.allowedEthTxTypes=[1,2],t.ethMaxDataSz-=10,t.ethMaxMsgSz=t.ethMaxDataSz),!o&&n(e,[0,11,2])&&(t.personalSignHeaderSz=72),!o&&n(e,[0,12,0])&&(t.kvActionsAllowed=!0,t.kvKeyMaxStrSz=63,t.kvValMaxStrSz=63,t.kvActionMaxNum=10,t.kvRemoveMaxNum=100),!o&&n(e,[0,13,0])&&(t.allowBtcLegacyAndSegwitAddrs=!0,t.contractDeployKey="0x08002e0fec8e6acf00835f43c9764f7364fa3f42"),!o&&n(e,[0,14,0])&&(t.abiCategorySz=32,t.abiMaxRmv=200,t.genericSigning.baseReqSz=1552,t.genericSigning.baseDataSz=1519,t.genericSigning.hashTypes=r.EXTERNAL.SIGNING.HASHES,t.genericSigning.curveTypes=r.EXTERNAL.SIGNING.CURVES,t.genericSigning.encodingTypes={NONE:r.EXTERNAL.SIGNING.ENCODINGS.NONE,SOLANA:r.EXTERNAL.SIGNING.ENCODINGS.SOLANA},t.getAddressFlags=[r.EXTERNAL.GET_ADDR_FLAGS.ED25519_PUB,r.EXTERNAL.GET_ADDR_FLAGS.SECP256K1_PUB],t.eip712MaxTypeParams=36),!o&&n(e,[0,15,0])&&(t.genericSigning.encodingTypes.EVM=r.EXTERNAL.SIGNING.ENCODINGS.EVM,t.ethMaxDataSz=1519,t.maxDecoderBufSz=1600,t.genericSigning.calldataDecoding={reserved:2895728,maxSz:1024}),!o&&n(e,[0,17,0])&&(t.getAddressFlags.push(r.EXTERNAL.GET_ADDR_FLAGS.BLS12_381_G1_PUB),t.genericSigning.encodingTypes.ETH_DEPOSIT=r.EXTERNAL.SIGNING.ENCODINGS.ETH_DEPOSIT),t};r.ASCII_REGEX=/^[\x00-\x7F]+$/;r.EXTERNAL_NETWORKS_BY_CHAIN_ID_URL="https://gridplus.github.io/chains/chains.json";r.MAX_ADDR=10;r.NETWORKS_BY_CHAIN_ID={1:{name:"ethereum",baseUrl:"https://api.etherscan.io",apiRoute:"api?module=contract&action=getabi"},137:{name:"polygon",baseUrl:"https://api.polygonscan.com",apiRoute:"api?module=contract&action=getabi"},56:{name:"binance",baseUrl:"https://api.bscscan.com",apiRoute:"api?module=contract&action=getabi"},42220:{name:"celo",baseUrl:"https://api.celoscan.io",apiRoute:"api?module=contract&action=getabi"},43114:{name:"avalanche",baseUrl:"https://api.snowtrace.io",apiRoute:"api?module=contract&action=getabi"}},r.EMPTY_WALLET_UID=e.alloc(32),r.DEFAULT_ACTIVE_WALLETS={internal:{uid:r.EMPTY_WALLET_UID,external:!1,name:e.alloc(0),capabilities:0},external:{uid:r.EMPTY_WALLET_UID,external:!0,name:e.alloc(0),capabilities:0}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/constants.js"}],[2511,{"./constants":2510,"./util":2529,"@ethereumjs/common":2562,"@ethereumjs/tx":2566,"bignumber.js":2627,borc:1907,buffer:1943,"eth-eip712-util-browser":2134,"js-sha3":2628,rlp:2629,secp256k1:2630},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var s=i(e("@ethereumjs/common")),c=e("@ethereumjs/tx"),u=a(e("bignumber.js")),d=a(e("borc")),l=e("eth-eip712-util-browser"),f=e("js-sha3"),h=e("rlp"),p=a(e("secp256k1")),m=e("./constants"),g=e("./util");function b(e){for(var t=e[0];e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e}function y(e,r,n,o){void 0===o&&(o={});try{var i=new Uint8Array(e),a=0,s=(0,g.fixLen)(r.r,32);r.r=s;var c=(0,g.fixLen)(r.s,32);r.s=c;var u=new Uint8Array(t.concat([s,c])),d=p.default.ecdsaRecover(u,a,i,!1).slice(1);if(v(d)===n.toString("hex"))return r.v=w(a,o),r;if(a=1,v(d=p.default.ecdsaRecover(u,a,i,!1).slice(1))===n.toString("hex"))return r.v=w(a,o),r;throw new Error("Invalid Ethereum signature returned.")}catch(e){throw new Error(e)}}function v(e){return(0,f.keccak256)(e).slice(-40)}function w(e,r){void 0===r&&(r={});var n=r.chainId,o=r.useEIP155,i=r.type;if(1===i||2===i)return(0,g.ensureHexBuffer)(e,!0);if(!1===o||null===n)return t.from(new u.default(e).plus(27).toString(16),"hex");var a=x(n),s=new u.default(a.toString("hex"),16);return(0,g.ensureHexBuffer)("0x".concat(s.times(2).plus(35).plus(e).toString(16)))}var E={mainnet:1,roptsten:3,rinkeby:4,kovan:42,goerli:5};function x(e){var r,n;if((r=!0===_(e)?(0,g.ensureHexBuffer)(e):(0,g.ensureHexBuffer)("0x".concat(new u.default(e).toString(16)))).length>8)throw new Error("ChainID provided is too large.");return r.length<=2||4===r.length||8===r.length?r:(3===r.length?(n=t.alloc(4)).writeUInt32BE(e):r.length<=8&&(n=t.alloc(8),r.copy(n,8-r.length)),n)}function _(e){if("string"!=typeof e)return!1;if("0x"!==e.slice(0,2))return!1;try{return!1===new u.default(e,16).isNaN()}catch(e){return!1}}function k(e,r){var n=r.fwConstants,o=n.ethMaxMsgSz,i=n.extraDataFrameSz,a=n.extraDataMaxFrames,s=o,c=i>0&&a>0,u=[];if(e.length>s){var d=s+a*i;if(!c)throw new Error("Your message is ".concat(e.length," bytes, but can only be a maximum of ").concat(s));if(c&&e.length>d)throw new Error("Your message is ".concat(e.length," bytes, but can only be a maximum of ").concat(d));(0,g.splitFrames)(e.slice(s),i).forEach((function(e){var r=t.alloc(4);r.writeUInt32LE(e.length,0),u.push(t.concat([r,e]))}))}return u}function T(e,t,r,n){return void 0===n&&(n=!1),r[t].forEach((function(t){var o=t.type.indexOf("[")>-1,i=o?t.type.slice(0,t.type.indexOf("[")):t.type,a=Object.keys(r).indexOf(i)>-1;if(a&&Array.isArray(e))for(var s=0;s<e.length;s++)e[s][t.name]=T(e[s][t.name],i,r,n);else if(a)e[t.name]=T(e[t.name],i,r,n);else if(Array.isArray(e))for(s=0;s<e.length;s++)if(o)for(var c=0;c<e[s][t.name].length;c++)e[s][t.name][c]=S(e[s][t.name][c],i,n);else e[s][t.name]=S(e[s][t.name],i,n);else if(o)for(s=0;s<e[t.name].length;s++)e[t.name][s]=S(e[t.name][s],i,n);else e[t.name]=S(e[t.name],i,n)})),e}function S(e,r,n){if(void 0===n&&(n=!1),"bytes"===r)e=(0,g.ensureHexBuffer)(e),n&&(e="0x".concat(e.toString("hex")));else if("bytes"===r.slice(0,5)){var o=parseInt(r.slice(5));if((e=(0,g.ensureHexBuffer)(e)).length!==o)throw new Error("Expected ".concat(r," type, but got ").concat(e.length," bytes"));n&&(e="0x".concat(e.toString("hex")))}else if("address"===r){if(0===(e=(0,g.ensureHexBuffer)(e)).length&&(e=t.alloc(20)),20!==e.length)throw new Error("Address type must be 20 bytes, but got ".concat(e.length," bytes"));n&&(e="0x".concat(e.toString("hex")))}else if(m.ethMsgProtocol.TYPED_DATA.typeCodes[r]&&(r.indexOf("uint")>-1||r.indexOf("int")>-1)){var i=(0,g.ensureHexBuffer)(e);0===i.length&&(i=t.from("00","hex")),e=n?"0x".concat(i.toString("hex")):(new d.default.Encoder).semanticTypes[1][0](i.toString("hex"),16)}else"bool"===r&&(e=!0===e?1:0);return e}function A(e){return t.from("Ethereum Signed Message:\n".concat(e.toString()),"utf-8")}function P(e,r){return r?t.concat([t.from([r]),t.from((0,h.encode)(e))]):t.from((0,h.encode)(e))}r.default={buildEthereumMsgRequest:function(e){if(!e.payload||!e.protocol||!e.signerPath)throw new Error("You must provide `payload`, `signerPath`, and `protocol` arguments in the messsage request");if(e.signerPath.length>5||e.signerPath.length<2)throw new Error("Please provide a signer path with 2-5 indices");var r={schema:m.signingSchema.ETH_MSG,payload:null,input:e,msg:null};switch(e.protocol){case"signPersonal":return function(e,r){var n=r.fwConstants.ethMaxMsgSz,o=r.fwConstants.varAddrPathSzAllowed,i=24+n+4,a=0;e.payload=t.alloc(i),e.payload.writeUInt8(m.ethMsgProtocol.SIGN_PERSONAL,0),a+=1;var s=(0,g.buildSignerPathBuf)(r.signerPath,o);s.copy(e.payload,a),a+=s.length;var c=r.payload,u=!1;if("string"==typeof r.payload)if("0x"===r.payload.slice(0,2))c=(0,g.ensureHexBuffer)(r.payload),u=!1===m.ASCII_REGEX.test(t.from(r.payload.slice(2),"hex").toString());else{if(!1===(0,g.isAsciiStr)(r.payload))throw new Error("Currently, the Lattice can only display ASCII strings.");c=t.from(r.payload)}else if("boolean"==typeof r.displayHex)u=r.displayHex;else{if(!r.payload.toString)throw new Error("Unsupported input data type");u=!1===m.ASCII_REGEX.test(r.payload.toString())}var d=r.fwConstants,l=n+d.extraDataMaxFrames*d.extraDataFrameSz;d.personalSignHeaderSz&&(l-=d.personalSignHeaderSz);if(d.ethMsgPreHashAllowed&&c.length>l){e.payload.writeUInt8(u,a),a+=1,e.payload.writeUInt16LE(c.length,a),a+=2;var h=t.from((0,f.keccak256)(t.concat([A(c.length),c])),"hex");h.copy(e.payload,a),e.prehash=h}else{var p=k(c,r);e.extraDataPayloads=p,e.msg=c,e.payload.writeUInt8(u,a),a+=1,e.payload.writeUInt16LE(c.length,a),a+=2,c.copy(e.payload,a)}return e}(r,e);case"eip712":if(!e.fwConstants.eip712Supported)throw new Error("EIP712 is not supported by your Lattice firmware version. Please upgrade.");return function(e,r){var n=r.fwConstants,o=n.ethMaxMsgSz,i=n.varAddrPathSzAllowed,a=n.eip712MaxTypeParams,s=m.ethMsgProtocol.TYPED_DATA,c=24+o+4,u=0;e.payload=t.alloc(c),e.payload.writeUInt8(s.enumIdx,0),u+=1;var f=(0,g.buildSignerPathBuf)(r.signerPath,i);f.copy(e.payload,u),u+=f.length;var h=JSON.parse(JSON.stringify(r.payload));if(!h.primaryType||!h.types[h.primaryType])throw new Error("primaryType must be specified and the type must be included.");if(!h.message||!h.domain)throw new Error("message and domain must be specified.");if(0>Object.keys(h.types).indexOf("EIP712Domain"))throw new Error("EIP712Domain type must be defined.");r.payload.message=T(JSON.parse(JSON.stringify(h.message)),JSON.parse(JSON.stringify(h.primaryType)),JSON.parse(JSON.stringify(h.types)),!0),r.payload.domain=T(JSON.parse(JSON.stringify(h.domain)),"EIP712Domain",JSON.parse(JSON.stringify(h.types)),!0),h.domain=T(h.domain,"EIP712Domain",h.types,!1),h.message=T(h.message,h.primaryType,h.types,!1);var p=t.from(d.default.encode(h)),b=r.fwConstants,y=o+b.extraDataMaxFrames*b.extraDataFrameSz,v=p.length>y;if(Object.keys(h.types).forEach((function(e){h.types[e].length>a&&(v=!0)})),b.ethMsgPreHashAllowed&&v){e.payload.writeUInt16LE(p.length,u),u+=2;var w=l.TypedDataUtils.hash(e.input.payload);t.from(w).copy(e.payload,u),e.prehash=w}else{var E=k(p,r);e.extraDataPayloads=E,e.payload.writeUInt16LE(p.length,u),u+=2,p.copy(e.payload,u),u+=p.length,e.payload=e.payload.slice(0,u)}return e}(r,e);default:throw new Error("Unsupported protocol")}},validateEthereumMsgResponse:function(e,r){var n=e.signer,o=e.sig,i=r.input,a=r.msg,s=r.prehash,c=void 0===s?null:s;if("signPersonal"===i.protocol)return y(c||t.from((0,f.keccak256)(t.concat([A(a.length),a])),"hex"),o,n,{chainId:1,useEIP155:!1});if("eip712"===i.protocol){var u=l.TypedDataUtils.hash(r.input.payload);return y(c||u,o,n,{useEIP155:!1})}throw new Error("Unsupported protocol")},buildEthereumTxRequest:function(e){try{var r=e.chainId,n=void 0===r?1:r,o=e.signerPath,i=e.eip155,a=void 0===i?null:i,s=e.fwConstants,c=e.type,u=void 0===c?null:c,d=s.contractDeployKey,l=s.extraDataFrameSz,h=s.extraDataMaxFrames,p=s.prehashAllowed,b=l>0&&h>0,y=s.ethMaxDataSz,v=s.varAddrPathSzAllowed;if("number"!=typeof n&&!1===_(n)&&(n=E[n]),!n)throw new Error("Unsupported chain ID or name");if(!o)throw new Error("`signerPath` not provided");if(null===e.to&&!d)throw new Error("Contract deployment not supported. Please update your Lattice firmware.");var w=null===e.to&&d,k=s.allowedEthTxTypes&&s.allowedEthTxTypes.indexOf(2)>-1,T=s.allowedEthTxTypes&&s.allowedEthTxTypes.indexOf(1)>-1,S=k&&(2===u||"eip1559"===u),A=T&&(1===u||"eip2930"===u);if(null!==u&&!S&&!A)throw new Error("Unsupported Ethereum transaction type");var I=function(e){switch(e){case 3:case 4:return!1;default:return!0}}(n);null!==a&&"boolean"==typeof a?I=a:(S||A)&&(I=!1),e.value||(e.value=0);var R=[],C=(0,g.ensureHexBuffer)(n),j=(0,g.ensureHexBuffer)(e.nonce),L=void 0,B=(0,g.ensureHexBuffer)(e.gasLimit),D=void 0,N=void 0;w?(D=t.alloc(0),N=(0,g.ensureHexBuffer)(d)):(D=(0,g.ensureHexBuffer)(e.to),N=(0,g.ensureHexBuffer)(e.to));var O=(0,g.ensureHexBuffer)(e.value),H=(0,g.ensureHexBuffer)(e.data);(S||A)&&R.push(C),R.push(j);var U=void 0,K=void 0;if(S){if(!e.maxPriorityFeePerGas)throw new Error("EIP1559 transactions must include `maxPriorityFeePerGas`");U=(0,g.ensureHexBuffer)(e.maxPriorityFeePerGas),R.push(U),K=(0,g.ensureHexBuffer)(e.maxFeePerGas),R.push(K),L=K}else L=(0,g.ensureHexBuffer)(e.gasPrice),R.push(L);R.push(B),R.push(D),R.push(O),R.push(H);var M=!1;if(S||A){var G=[];Array.isArray(e.accessList)&&e.accessList.forEach((function(e){var t=[];e.storageKeys.forEach((function(e){t.push((0,g.ensureHexBuffer)(e))})),G.push([(0,g.ensureHexBuffer)(e.address),t]),M=!0})),R.push(G)}else!0===I&&(R.push(C),R.push((0,g.ensureHexBuffer)(null)),R.push((0,g.ensureHexBuffer)(null)));var F=t.alloc(y+122),V=0;F.writeUInt8(Number(I),V),V++;var q=void 0,z=0;if(!0==(1!==(re=x(n)).length||255===re.readUInt8(0))){if((z=(q=x(n)).length)>m.MAX_CHAIN_ID_BYTES)throw new Error("ChainID provided is too large.");F.writeUInt8(m.HANDLE_LARGER_CHAIN_ID,V),V++}else{if(1!==(q=(0,g.ensureHexBuffer)(n)).length)throw new Error("Error parsing chainID");q.copy(F,V),V+=q.length}var W=(0,g.buildSignerPathBuf)(o,v);if(W.copy(F,V),V+=W.length,j.length>4)throw new Error("Nonce too large");if(j.copy(F,V+(4-j.length)),V+=4,L.length>8)throw new Error("Gas price too large");if(L.copy(F,V+(8-L.length)),V+=8,B.length>4)throw new Error("Gas limit too large");if(B.copy(F,V+(4-B.length)),V+=4,20!==N.length)throw new Error("Invalid `to` address");if(N.copy(F,V),V+=20,O.length>32)throw new Error("Value too large");O.copy(F,V+(32-O.length)),V+=32;var Y=!1;if(s.allowedEthTxTypes)if(M&&(Y=!0),F.writeUInt8(Y?1:0,V),V+=1,S){if(F.writeUInt8(2,V),V+=1,U.length>8)throw new Error("maxPriorityFeePerGasBytes too large");U.copy(F,V+(8-U.length)),V+=8}else A?(F.writeUInt8(1,V),V+=1,V+=8):V+=9;var J=[],X=null,Z=H.length||0,$=z>0?z+1:0,Q=t.alloc(Z+$);if($>0&&(Q.writeUInt8(z,0),q.copy(Q,1)),H.copy(Q,$),Z>y){var ee=Z+$,te=y+h*l;if(p&&ee>te)X=t.from((0,f.keccak256)(P(R,u)),"hex");else{if(!b||b&&ee>te)throw new Error("Data field too large (got ".concat(H.length,"; must be <=").concat(te-$," bytes)"));(0,g.splitFrames)(Q.slice(y),l).forEach((function(e){var r=t.alloc(4);r.writeUInt32LE(e.length,0),J.push(t.concat([r,e]))}))}}else Y&&(X=t.from((0,f.keccak256)(P(R,u)),"hex"));return F.writeUInt16BE(H.length,V),V+=2,z>0&&(F.writeUInt8(z,V),V++,q.copy(F,V),V+=z),X?(X.copy(F,V),V+=y):(H.slice(0,y).copy(F,V),V+=y),{rawTx:R,type:u,payload:F.slice(0,V),extraDataPayloads:J,schema:m.signingSchema.ETH_TRANSFER,chainId:n,useEIP155:I,signerPath:o}}catch(e){return{err:e.message}}var re},buildEthRawTx:function(e,r,n){var o=y(t.from((0,f.keccak256)(P(e.rawTx,e.type)),"hex"),r,n,e),i=e.useEIP155?e.rawTx.slice(0,-3):e.rawTx;i.push(o.v),i.push(b(o.r)),i.push(b(o.s));var a=t.from((0,h.encode)(i));return e.type&&(a=t.concat([t.from([e.type]),a])),{rawTx:a.toString("hex"),sigWithV:o}},hashTransaction:function(e){return(0,f.keccak256)(t.from(e,"hex"))},chainIds:E,ensureHexBuffer:g.ensureHexBuffer,ethConvertLegacyToGenericReq:function(e){var r;r=e.chainId&&"01"!==(0,g.ensureHexBuffer)(e.chainId).toString("hex")?s.default.custom({chainId:Number(e.chainId)},{hardfork:s.Hardfork.London,eips:[1559,2930]}):new s.default({chain:s.Chain.Mainnet,hardfork:s.Hardfork.London});var n=c.TransactionFactory.fromTxData(e,{common:r});return e.type?n.getMessageToSign(!1):t.from((0,h.encode)(n.getMessageToSign(!1)))}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/ethereum.js"}],[2512,{"../constants":2510,"../shared/functions":2525,"../shared/validators":2528,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.decryptAddKvRecordsResponse=r.requestAddKvRecords=r.encryptAddKvRecordsRequest=r.encodeAddKvRecordsRequest=r.validateAddKvRequest=r.addKvRecords=void 0;var i=e("../constants"),a=e("../shared/functions"),s=e("../shared/validators");r.addKvRecords=function(e){var t=e.type,i=void 0===t?0:t,a=e.records,s=e.caseSensitive,c=void 0!==s&&s,u=e.client;return n(this,void 0,void 0,(function(){var e,t,n,s,d,l,f,h,p,m,g;return o(this,(function(o){switch(o.label){case 0:return e=(0,r.validateAddKvRequest)({url:u.url,fwConstants:u.getFwConstants(),sharedSecret:u.sharedSecret,records:a}),t=e.url,n=e.sharedSecret,s=e.fwConstants,d=e.validRecords,l=(0,r.encodeAddKvRecordsRequest)({records:d,fwConstants:s,type:i,caseSensitive:c}),f=(0,r.encryptAddKvRecordsRequest)({payload:l,sharedSecret:n}),[4,(0,r.requestAddKvRecords)(f,t)];case 1:return h=o.sent(),p=(0,r.decryptAddKvRecordsResponse)(h,n),m=p.decryptedData,g=p.newEphemeralPub,u.ephemeralPub=g,[2,m]}}))}))};r.validateAddKvRequest=function(e){var t=e.url,r=e.fwConstants,n=e.sharedSecret,o=e.records,i=(0,s.validateUrl)(t),a=(0,s.validateFwConstants)(r);return{url:i,fwConstants:a,sharedSecret:(0,s.validateSharedSecret)(n),validRecords:(0,s.validateKvRecords)(o,a)}};r.encodeAddKvRecordsRequest=function(e){var r=e.records,n=e.fwConstants,o=e.type,i=e.caseSensitive,a=t.alloc(1+139*n.kvActionMaxNum);a.writeUInt8(Object.keys(r).length,0);var c=1;return Object.entries(r).forEach((function(e){var r=e[0],u=e[1],d=(0,s.validateKvRecord)({key:r,val:u},n),l=d.key,f=d.val;a.writeUInt32LE(0,c),c+=4,a.writeUInt32LE(o,c),c+=4,a.writeUInt8(i?1:0,c),c+=1,a.writeUInt8(String(l).length+1,c),c+=1,t.from(String(l)).copy(a,c),c+=n.kvKeyMaxStrSz+1,a.writeUInt8(String(f).length+1,c),c+=1,t.from(String(f)).copy(a,c),c+=n.kvValMaxStrSz+1})),a};r.encryptAddKvRecordsRequest=function(e){var t=e.payload,r=e.sharedSecret;return(0,a.encryptRequest)({requestCode:"ADD_KV_RECORDS",payload:t,sharedSecret:r})};r.requestAddKvRecords=function(e,t){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,(0,a.request)({payload:e,url:t})]}))}))};r.decryptAddKvRecordsResponse=function(e,t){var r=(0,a.decryptResponse)(e,i.decResLengths.empty,t);return{decryptedData:r.decryptedData,newEphemeralPub:r.newEphemeralPub}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/addKvRecords.js"}],[2513,{"../constants":2510,"../shared/functions":2525,"../shared/predicates":2526,"../shared/utilities":2527,"../shared/validators":2528,"../util":2529},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.decodeConnectResponse=r.requestConnect=r.encodeConnectRequest=r.validateConnectRequest=r.connect=void 0;var i=e("../constants"),a=e("../shared/functions"),s=e("../shared/predicates"),c=e("../shared/utilities"),u=e("../shared/validators"),d=e("../util");r.connect=function(e){var t=e.id,i=e.client;return n(this,void 0,void 0,(function(){var e,n,a,c,u,d,l,f,h,p,m,g;return o(this,(function(o){switch(o.label){case 0:return e=(0,r.validateConnectRequest)({deviceId:t,key:i.key,baseUrl:i.baseUrl}),n=e.deviceId,a=e.key,c=e.baseUrl,u="".concat(c,"/").concat(n),[4,(0,r.encodeConnectRequest)(a)];case 1:return d=o.sent(),[4,(0,r.requestConnect)(d,u)];case 2:return l=o.sent(),[4,(0,r.decodeConnectResponse)(l,a)];case 3:return f=o.sent(),h=f.isPaired,p=f.fwVersion,m=f.activeWallets,g=f.ephemeralPub,i.deviceId=n,i.ephemeralPub=g,i.url="".concat(i.baseUrl,"/").concat(n),i.isPaired=h,i.fwVersion=p,m&&(i.activeWallets=m),!h||(0,s.doesFetchWalletsOnLoad)(i.getFwVersion())?[3,5]:[4,i.fetchActiveWallet()];case 4:o.sent(),o.label=5;case 5:return[2,h]}}))}))};r.validateConnectRequest=function(e){var t=e.deviceId,r=e.key,n=e.baseUrl;return{deviceId:(0,u.validateDeviceId)(t),key:(0,u.validateKey)(r),baseUrl:(0,u.validateBaseUrl)(n)}};r.encodeConnectRequest=function(e){var t=i.deviceCodes.CONNECT,r=(0,c.getPubKeyBytes)(e);return(0,a.buildRequest)(t,r)};r.requestConnect=function(e,t){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,(0,a.request)({payload:e,url:t})]}))}))};r.decodeConnectResponse=function(e,t){var r=0,n=e.readUInt8(r)===i.messageConstants.PAIRED;r++;var o=e.slice(r,r+65).toString("hex");r+=65;var a=(0,d.getP256KeyPairFromPub)(o),s=e.slice(r,r+4);if(r+=4,n){var u=e.slice(r,r+160);r+=160;var l=(0,c.getSharedSecret)(t,a),f=(0,d.aes256_decrypt)(u,l);if(0!==f[f.length-2]||0!==f[f.length-1])throw new Error("Failed to connect to Lattice.");return{isPaired:n,fwVersion:s,activeWallets:(0,c.parseWallets)(f),ephemeralPub:a}}return{isPaired:n,fwVersion:s,activeWallets:undefined,ephemeralPub:a}}}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/connect.js"}],[2514,{"../constants":2510,"../shared/functions":2525,"../shared/validators":2528,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.decryptFetchActiveWalletResponse=r.decodeFetchActiveWalletResponse=r.requestFetchActiveWallet=r.encryptFetchActiveWalletRequest=r.validateFetchActiveWallet=r.fetchActiveWallet=void 0;var i=e("../constants"),a=e("../shared/functions"),s=e("../shared/validators");r.fetchActiveWallet=function(e){var t=e.client;return n(this,void 0,void 0,(function(){var e,n,i,a,c,u,d,l,f,h;return o(this,(function(o){switch(o.label){case 0:return e=(0,r.validateFetchActiveWallet)({url:t.url,sharedSecret:t.sharedSecret}),n=e.url,i=e.sharedSecret,a=(0,r.encryptFetchActiveWalletRequest)({sharedSecret:i}),[4,(0,r.requestFetchActiveWallet)(a,n).catch((function(e){throw t.resetActiveWallets(),e}))];case 1:return c=o.sent(),u=(0,r.decryptFetchActiveWalletResponse)(c,i),d=u.decryptedData,l=u.newEphemeralPub,f=(0,r.decodeFetchActiveWalletResponse)(d),h=(0,s.validateActiveWallets)(f),t.activeWallets=h,t.ephemeralPub=l,[2,h]}}))}))};r.validateFetchActiveWallet=function(e){var t=e.url,r=e.sharedSecret;return{url:(0,s.validateUrl)(t),sharedSecret:(0,s.validateSharedSecret)(r)}};r.encryptFetchActiveWalletRequest=function(e){var r=e.sharedSecret;return(0,a.encryptRequest)({requestCode:"GET_WALLETS",payload:t.alloc(0),sharedSecret:r})};r.requestFetchActiveWallet=function(e,t){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,(0,a.request)({payload:e,url:t})]}))}))};r.decodeFetchActiveWalletResponse=function(e){var r=e.slice(65),n={internal:{uid:i.EMPTY_WALLET_UID,external:!1,name:t.alloc(0),capabilities:0},external:{uid:i.EMPTY_WALLET_UID,external:!0,name:t.alloc(0),capabilities:0}},o=0;return n.internal.uid=r.slice(o,o+32),n.internal.capabilities=r.readUInt32BE(o+32),n.internal.name=r.slice(o+36,o+71),o+=71,n.external.uid=r.slice(o,o+32),n.external.capabilities=r.readUInt32BE(o+32),n.external.name=r.slice(o+36,o+71),n};r.decryptFetchActiveWalletResponse=function(e,t){var r=(0,a.decryptResponse)(e,i.decResLengths.getWallets,t);return{decryptedData:r.decryptedData,newEphemeralPub:r.newEphemeralPub}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/fetchActiveWallet.js"}],[2515,{"../constants":2510,"../shared/functions":2525,"../shared/utilities":2527,"../shared/validators":2528,buffer:1943,uuid:2633},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.decodeFetchEncData=r.encryptFetchEncDataRequest=r.encodeFetchEncDataRequest=r.validateFetchEncDataRequest=r.fetchEncData=void 0;var i=e("uuid"),a=e("../constants"),s=e("../shared/functions"),c=e("../shared/utilities"),u=e("../shared/validators"),d=a.EXTERNAL.ENC_DATA,l="Unknown encrypted data export type requested. Exiting.",f={CIPHERTEXT:32,SALT:32,CHECKSUM:32,IV:16,PUBKEY:48};r.fetchEncData=function(e){return n(this,void 0,void 0,(function(){var t,n,i,c,u,d,l;return o(this,(function(o){switch(o.label){case 0:return t=(0,r.validateFetchEncDataRequest)(e),n=(0,r.encodeFetchEncDataRequest)(e.schema,t),i=(0,r.encryptFetchEncDataRequest)({payload:n,sharedSecret:e.client.sharedSecret}),[4,(0,s.request)({payload:i,url:e.client.url})];case 1:return c=o.sent(),u=(0,s.decryptResponse)(c,a.decResLengths.fetchEncryptedData,e.client.sharedSecret),d=u.decryptedData,l=u.newEphemeralPub,e.client.ephemeralPub=l,[2,(0,r.decodeFetchEncData)(d,e)]}}))}))};r.validateFetchEncDataRequest=function(e){var t=e.schema,r=e.params,n=e.client,o=n.getActiveWallet();if((0,u.validateFwVersion)(n.fwVersion),(0,u.validateWallet)(o),(0,u.validateSharedSecret)(n.sharedSecret),(0,u.validateUrl)(n.url),n.fwVersion.major<1&&n.fwVersion.minor<17)throw new Error("Firmware version >=v0.17.0 is required for encrypted data export.");if(t===d.SCHEMAS.BLS_KEYSTORE_EIP2335_PBKDF_V4)return(0,u.validateStartPath)(r.path),r.walletUID=o.uid,r;throw new Error(l)};r.encodeFetchEncDataRequest=function(e,r){var n=t.alloc(1025),o=0;if(n.writeUInt8(e,o),o+=1,e===d.SCHEMAS.BLS_KEYSTORE_EIP2335_PBKDF_V4){r.walletUID.copy(n,o),o+=r.walletUID.length,n.writeUInt8(r.path.length,o),o+=1;for(var i=0;i<5;i++)i<=r.path.length&&n.writeUInt32LE(r.path[i],o),o+=4;return r.c&&n.writeUInt32LE(r.c,o),o+=4,n}throw new Error(l)};r.encryptFetchEncDataRequest=function(e){var t=e.payload,r=e.sharedSecret;return(0,s.encryptRequest)({requestCode:"EXPORT_ENC_DATA",payload:t,sharedSecret:r})};r.decodeFetchEncData=function(e,t){var r=65;if(t.schema===d.SCHEMAS.BLS_KEYSTORE_EIP2335_PBKDF_V4){var n={},o=f,i=o.CIPHERTEXT,a=o.SALT,s=o.CHECKSUM,c=o.IV,u=o.PUBKEY,p=4+i+a+s+c+u,m=e.readUInt32LE(r);if(r+=4,m!==p)throw new Error("Invalid data returned from Lattice. Expected EIP2335 data.");return n.iterations=e.readUInt32LE(r),r+=4,n.cipherText=e.slice(r,r+i),r+=i,n.salt=e.slice(r,r+a),r+=a,n.checksum=e.slice(r,r+s),r+=s,n.iv=e.slice(r,r+c),r+=c,n.pubkey=e.slice(r,r+u),r+=u,h(n,t.params.path)}throw new Error(l)};var h=function(e,r){try{var n=e.iterations,o=e.salt,a=e.checksum,s=e.iv,u=e.cipherText,d=e.pubkey;return t.from(JSON.stringify({version:4,uuid:(0,i.v4)(),path:(0,c.getPathStr)(r),pubkey:d.toString("hex"),crypto:{kdf:{function:"pbkdf2",params:{dklen:32,c:n,prf:"hmac-sha256",salt:o.toString("hex")},message:""},checksum:{function:"sha256",params:{},message:a.toString("hex")},cipher:{function:"aes-128-ctr",params:{iv:s.toString("hex")},message:u.toString("hex")}}}))}catch(e){throw Error("Failed to format EIP2335 return data: ".concat(e.toString()))}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/fetchEncData.js"}],[2516,{"../constants":2510,"../shared/functions":2525,"../shared/validators":2528,"../util":2529,bitwise:1889,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.decryptGetAddressesResponse=r.decodeGetAddresses=r.requestGetAddresses=r.encryptGetAddressesRequest=r.encodeGetAddressesRequest=r.validateGetAddressesRequest=r.getAddresses=void 0;var a=i(e("bitwise")),s=e("../constants"),c=e("../shared/functions"),u=e("../shared/validators"),d=e("../util");r.getAddresses=function(e){var t=e.startPath,i=e.n,a=e.flag,s=e.client;return n(this,void 0,void 0,(function(){var e,n,c,u,d,l,f,h,p,m,g;return o(this,(function(o){switch(o.label){case 0:return e=(0,r.validateGetAddressesRequest)({startPath:t,n:i,flag:a,url:s.url,fwVersion:s.fwVersion,wallet:s.getActiveWallet(),sharedSecret:s.sharedSecret}),n=e.url,c=e.fwVersion,u=e.wallet,d=e.sharedSecret,l=(0,r.encodeGetAddressesRequest)({startPath:t,n:i,flag:a,fwVersion:c,wallet:u}),f=(0,r.encryptGetAddressesRequest)({payload:l,sharedSecret:d}),[4,(0,r.requestGetAddresses)(f,n)];case 1:return h=o.sent(),p=(0,r.decryptGetAddressesResponse)(h,d),m=p.decryptedData,g=p.newEphemeralPub,s.ephemeralPub=g,[2,(0,r.decodeGetAddresses)(m,a)]}}))}))};r.validateGetAddressesRequest=function(e){var t=e.startPath,r=e.n,n=e.flag,o=e.url,i=e.fwVersion,a=e.wallet,s=e.sharedSecret;return(0,u.validateStartPath)(t),(0,u.validateNAddresses)(r),(0,u.validateIsUInt4)(n),{url:(0,u.validateUrl)(o),fwVersion:(0,u.validateFwVersion)(i),wallet:(0,u.validateWallet)(a),sharedSecret:(0,u.validateSharedSecret)(s)}};r.encodeGetAddressesRequest=function(e){var r,n=e.fwVersion,o=e.startPath,i=e.n,c=e.wallet,u=e.flag,l=(0,s.getFwVersionConst)(n);if(!((l.getAddressFlags||[]).indexOf(u)>-1&&(u===s.EXTERNAL.GET_ADDR_FLAGS.ED25519_PUB||u===s.EXTERNAL.GET_ADDR_FLAGS.SECP256K1_PUB||u===s.EXTERNAL.GET_ADDR_FLAGS.BLS12_381_G1_PUB))&&!(0,d.isValidAssetPath)(o,l))throw new Error("Derivation path or flag is not supported. Try updating Lattice firmware.");var f=53;if(l.varAddrPathSzAllowed)f+=1;else if(5!==o.length)throw new Error("Your Lattice firmware only supports derivation paths with 5 indices. Please upgrade.");var h=t.alloc(f),p=0;c.uid.copy(h,p),p+=32,l.varAddrPathSzAllowed&&(h.writeUInt8(o.length,p),p+=1);for(var m=0;m<5;m++){if(m<=o.length){var g=null!==(r=o[m])&&void 0!==r?r:0;h.writeUInt32BE(g,p)}p+=4}var b,y=0;if(l.addrFlagsAllowed){y=l.getAddressFlags&&l.getAddressFlags.indexOf(u)>-1?u:0;var v=a.default.nibble.read(y),w=a.default.nibble.read(i);b=a.default.byte.write(v.concat(w))}else b=i;return h.writeUInt8(b,p),p++,h};r.encryptGetAddressesRequest=function(e){var t=e.payload,r=e.sharedSecret;return(0,c.encryptRequest)({requestCode:"GET_ADDRESSES",payload:t,sharedSecret:r})};r.requestGetAddresses=function(e,t){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,(0,c.request)({payload:e,url:t})]}))}))};r.decodeGetAddresses=function(e,t){var r=65,n=[],o=s.EXTERNAL.GET_ADDR_FLAGS,i=o.ED25519_PUB,a=o.SECP256K1_PUB,c=o.BLS12_381_G1_PUB,u=t===i||t===a||t===c;for(u&&(r+=1);r+4<s.decResLengths.getAddresses;)if(u){var d=e.slice(r,r+65),l=d.every((function(e){return 0===e}));l||t!==i?l||t!==c?l||n.push(d):n.push(d.slice(0,48)):n.push(d.slice(0,32)),r+=65}else{var f=e.slice(r,r+s.ADDR_STR_LEN);r+=s.ADDR_STR_LEN;var h=f.indexOf(0);h>0&&n.push(f.slice(0,h).toString())}return n};r.decryptGetAddressesResponse=function(e,t){var r=(0,c.decryptResponse)(e,s.decResLengths.getAddresses,t);return{decryptedData:r.decryptedData,newEphemeralPub:r.newEphemeralPub}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/getAddresses.js"}],[2517,{"../constants":2510,"../shared/functions":2525,"../shared/validators":2528,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.decodeGetKvRecordsResponse=r.decryptGetKvRecordsResponse=r.requestGetKvRecords=r.encryptGetKvRecordsRequest=r.encodeGetKvRecordsRequest=r.validateGetKvRequest=r.getKvRecords=void 0;var i=e("../constants"),a=e("../shared/functions"),s=e("../shared/validators");r.getKvRecords=function(e){var t=e.type,i=e.n,a=e.start,s=e.client;return n(this,void 0,void 0,(function(){var e,n,c,u,d,l,f,h,p,m,g,b,y;return o(this,(function(o){switch(o.label){case 0:return e=(0,r.validateGetKvRequest)({url:s.url,fwConstants:s.getFwConstants(),sharedSecret:s.sharedSecret,type:t,n:i,start:a}),n=e.url,c=e.sharedSecret,u=e.fwConstants,d=e.type,l=e.n,f=e.start,h=(0,r.encodeGetKvRecordsRequest)({type:d,n:l,start:f}),p=(0,r.encryptGetKvRecordsRequest)({payload:h,sharedSecret:c}),[4,(0,r.requestGetKvRecords)(p,n)];case 1:return m=o.sent(),g=(0,r.decryptGetKvRecordsResponse)(m,c),b=g.decryptedData,y=g.newEphemeralPub,s.ephemeralPub=y,[2,(0,r.decodeGetKvRecordsResponse)(b,u)]}}))}))};r.validateGetKvRequest=function(e){var t=e.url,r=e.fwConstants,n=e.sharedSecret,o=e.n,i=e.type,a=e.start,c=(0,s.validateUrl)(t),u=(0,s.validateFwConstants)(r),d=(0,s.validateSharedSecret)(n);if(!u.kvActionsAllowed)throw new Error("Unsupported. Please update firmware.");if(!o||o<1)throw new Error("You must request at least one record.");if(o>u.kvActionMaxNum)throw new Error("You may only request up to ".concat(u.kvActionMaxNum," records at once."));if(0!==i&&!i)throw new Error("You must specify a type.");if(0!==a&&!a)throw new Error("You must specify a type.");return{url:c,fwConstants:u,sharedSecret:d,type:i,n:o,start:a}};r.encodeGetKvRecordsRequest=function(e){var r=e.type,n=e.n,o=e.start,i=t.alloc(9);return i.writeUInt32LE(r,0),i.writeUInt8(n,4),i.writeUInt32LE(o,5),i};r.encryptGetKvRecordsRequest=function(e){var t=e.payload,r=e.sharedSecret;return(0,a.encryptRequest)({requestCode:"GET_KV_RECORDS",payload:t,sharedSecret:r})};r.requestGetKvRecords=function(e,t){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,(0,a.request)({payload:e,url:t})]}))}))};r.decryptGetKvRecordsResponse=function(e,t){var r=(0,a.decryptResponse)(e,i.decResLengths.getKvRecords,t);return{decryptedData:r.decryptedData,newEphemeralPub:r.newEphemeralPub}};r.decodeGetKvRecordsResponse=function(e,t){var r=65,n=parseInt(e.slice(r,r+4).toString("hex"),16);r+=4;var o=parseInt(e.slice(r,r+1).toString("hex"),16);if(r+=1,o>t.kvActionMaxNum)throw new Error("Too many records fetched. Firmware error.");for(var i=[],a=0;a<o;a++){var s={};s.id=parseInt(e.slice(r,r+4).toString("hex"),16),r+=4,s.type=parseInt(e.slice(r,r+4).toString("hex"),16),r+=4,s.caseSensitive=1===parseInt(e.slice(r,r+1).toString("hex"),16),r+=1;var c=parseInt(e.slice(r,r+1).toString("hex"),16);r+=1,s.key=e.slice(r,r+c-1).toString(),r+=t.kvKeyMaxStrSz+1;var u=parseInt(e.slice(r,r+1).toString("hex"),16);r+=1,s.val=e.slice(r,r+u-1).toString(),r+=t.kvValMaxStrSz+1,i.push(s)}return{records:i,total:n,fetched:o}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/getKvRecords.js"}],[2518,{"./addKvRecords":2512,"./connect":2513,"./fetchActiveWallet":2514,"./fetchEncData":2515,"./getAddresses":2516,"./getKvRecords":2517,"./pair":2519,"./removeKvRecords":2520,"./sign":2521},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),o(e("./addKvRecords"),r),o(e("./connect"),r),o(e("./fetchEncData"),r),o(e("./fetchActiveWallet"),r),o(e("./getAddresses"),r),o(e("./getKvRecords"),r),o(e("./pair"),r),o(e("./removeKvRecords"),r),o(e("./sign"),r)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/index.js"}],[2519,{"../constants":2510,"../shared/functions":2525,"../shared/utilities":2527,"../shared/validators":2528,"../util":2529,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.decryptPairResponse=r.requestPair=r.encryptPairRequest=r.encodePairRequest=r.pair=void 0;var i=e("../constants"),a=e("../shared/functions"),s=e("../shared/utilities"),c=e("../shared/validators"),u=e("../util");r.pair=function(e){var t=e.pairingSecret,i=e.client;return n(this,void 0,void 0,(function(){var e,n,a,s,u,d;return o(this,(function(o){switch(o.label){case 0:return e=(0,c.validateAppName)(i.name),n=(0,c.validateUrl)(i.url),a=(0,r.encodePairRequest)(i.key,t,e),s=(0,r.encryptPairRequest)({payload:a,sharedSecret:i.sharedSecret}),[4,(0,r.requestPair)(s,n)];case 1:return u=o.sent(),d=(0,r.decryptPairResponse)(u,i.sharedSecret).newEphemeralPub,i.isPaired=!0,i.ephemeralPub=d,[4,i.fetchActiveWallet()];case 2:return o.sent(),[2,i.hasActiveWallet()]}}))}))};r.encodePairRequest=function(e,r,n){var o=(0,s.getPubKeyBytes)(e),i=t.alloc(25);r.length>0&&i.write(n);var a=(0,u.generateAppSecret)(o,i,t.from(r)),c=e.sign(a),d=(0,u.toPaddedDER)(c);return t.concat([i,d])};r.encryptPairRequest=function(e){var t=e.payload,r=e.sharedSecret;return(0,a.encryptRequest)({requestCode:"FINALIZE_PAIRING",payload:t,sharedSecret:r})};r.requestPair=function(e,t){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,(0,a.request)({payload:e,url:t})]}))}))};r.decryptPairResponse=function(e,t){return(0,a.decryptResponse)(e,i.decResLengths.empty,t)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/pair.js"}],[2520,{"../constants":2510,"../shared/functions":2525,"../shared/validators":2528,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.decryptRemoveKvRecordsResponse=r.requestRemoveKvRecords=r.encryptRemoveKvRecordsRequest=r.encodeRemoveKvRecordsRequest=r.validateRemoveKvRequest=r.removeKvRecords=void 0;var i=e("../constants"),a=e("../shared/functions"),s=e("../shared/validators");r.removeKvRecords=function(e){var t=e.type,i=e.ids,a=e.client;return n(this,void 0,void 0,(function(){var e,n,s,c,u,d,l,f,h,p,m,g;return o(this,(function(o){switch(o.label){case 0:return e=(0,r.validateRemoveKvRequest)({url:a.url,fwConstants:a.getFwConstants(),sharedSecret:a.sharedSecret,type:t,ids:i}),n=e.url,s=e.sharedSecret,c=e.fwConstants,u=e.type,d=e.ids,l=(0,r.encodeRemoveKvRecordsRequest)({type:u,ids:d,fwConstants:c}),f=(0,r.encryptRemoveKvRecordsRequest)({payload:l,sharedSecret:s}),[4,(0,r.requestRemoveKvRecords)(f,n)];case 1:return h=o.sent(),p=(0,r.decryptRemoveKvRecordsResponse)(h,s),m=p.decryptedData,g=p.newEphemeralPub,a.ephemeralPub=g,[2,m]}}))}))};r.validateRemoveKvRequest=function(e){var t=e.url,r=e.fwConstants,n=e.sharedSecret,o=e.ids,i=e.type,a=(0,s.validateUrl)(t),c=(0,s.validateFwConstants)(r),u=(0,s.validateSharedSecret)(n);if(!c.kvActionsAllowed)throw new Error("Unsupported. Please update firmware.");if(!Array.isArray(o)||o.length<1)throw new Error("You must include one or more `ids` to removed.");if(o.length>c.kvRemoveMaxNum)throw new Error("Only up to ".concat(c.kvRemoveMaxNum," records may be removed at once."));if(0!==i&&!i)throw new Error("You must specify a type.");return{url:a,fwConstants:c,sharedSecret:u,type:i,ids:o}};r.encodeRemoveKvRecordsRequest=function(e){var r=e.type,n=e.ids,o=e.fwConstants,i=t.alloc(5+4*o.kvRemoveMaxNum);i.writeUInt32LE(r,0),i.writeUInt8(n.length,4);for(var a=0;a<n.length;a++){var s=parseInt(n[a]);i.writeUInt32LE(s,5+4*a)}return i};r.encryptRemoveKvRecordsRequest=function(e){var t=e.payload,r=e.sharedSecret;return(0,a.encryptRequest)({requestCode:"REMOVE_KV_RECORDS",payload:t,sharedSecret:r})};r.requestRemoveKvRecords=function(e,t){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,(0,a.request)({payload:e,url:t})]}))}))};r.decryptRemoveKvRecordsResponse=function(e,t){var r=(0,a.decryptResponse)(e,i.decResLengths.empty,t);return{decryptedData:r.decryptedData,newEphemeralPub:r.newEphemeralPub}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/removeKvRecords.js"}],[2521,{"../bitcoin":2506,"../constants":2510,"../ethereum":2511,"../genericSigning":2522,"../shared/functions":2525,"../shared/validators":2528,"../util":2529,buffer:1943,"hash.js":2671},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.decryptSignResponse=r.decodeSignResponse=r.requestSign=r.encryptSignRequest=r.encodeSignRequest=r.validateSignRequest=r.sign=void 0;var a=e("hash.js"),s=i(e("../bitcoin")),c=e("../constants"),u=i(e("../ethereum")),d=e("../genericSigning"),l=e("../shared/functions"),f=e("../shared/validators"),h=e("../util");r.sign=function(e){var t=e.data,i=e.currency,a=e.cachedData,s=e.nextCode,c=e.client;return n(this,void 0,void 0,(function(){var e,n,u,d,f,h,p,m,g,b,y,v,w,E,x,_,k,T,S;return o(this,(function(o){switch(o.label){case 0:return e=(0,r.validateSignRequest)({url:c.url,fwConstants:c.getFwConstants(),wallet:c.getActiveWallet(),sharedSecret:c.sharedSecret}),n=e.url,u=e.wallet,d=e.sharedSecret,f=e.fwConstants,h=(0,l.buildTransaction)({data:t,currency:i,fwConstants:f}),p=h.request,m=h.isGeneric,g=(0,r.encodeSignRequest)({request:p,fwConstants:f,wallet:u,cachedData:a,nextCode:s}),b=g.payload,y=g.hasExtraPayloads,v=(0,r.encryptSignRequest)({payload:b,sharedSecret:d}),[4,(0,r.requestSign)(v,n)];case 1:return w=o.sent(),y?(E=(0,r.decryptSignResponse)(w,d),x=E.decryptedData,_=E.newEphemeralPub,c.ephemeralPub=_,[2,c.sign({data:t,currency:i,cachedData:p,nextCode:x.slice(65,73)})]):(k=(0,r.decryptSignResponse)(w,d),T=k.decryptedData,S=k.newEphemeralPub,c.ephemeralPub=S,[2,(0,r.decodeSignResponse)({data:T,request:p,isGeneric:m,currency:i})])}}))}))};r.validateSignRequest=function(e){var t=e.url,r=e.fwConstants,n=e.sharedSecret,o=e.wallet;return{url:(0,f.validateUrl)(t),fwConstants:(0,f.validateFwConstants)(r),sharedSecret:(0,f.validateSharedSecret)(n),wallet:(0,f.validateWallet)(o)}};r.encodeSignRequest=function(e){var r,n,o,i,a,s=e.request,u=e.fwConstants,d=e.wallet,l=e.cachedData,h=e.nextCode;l&&h?(s=l,i=t.concat([h,s.extraDataPayloads.shift()]),a=c.signingSchema.EXTRA_DATA):(i=s.payload,a=s.schema);var p=t.alloc(2+u.reqMaxDataSz),m=0,g=s.extraDataPayloads&&Number(s.extraDataPayloads.length>0);p.writeUInt8(g,m),m+=1,p.writeUInt8(a,m),m+=1;var b=(0,f.validateWallet)(d);return null===(r=b.uid)||void 0===r||r.copy(p,m),m+=null!==(o=null===(n=b.uid)||void 0===n?void 0:n.length)&&void 0!==o?o:0,i.copy(p,m),{payload:p,hasExtraPayloads:g}};r.encryptSignRequest=function(e){var t=e.payload,r=e.sharedSecret;return(0,l.encryptRequest)({requestCode:"SIGN_TRANSACTION",payload:t,sharedSecret:r})};r.requestSign=function(e,t){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,(0,l.request)({payload:e,url:t})]}))}))};r.decodeSignResponse=function(e){var r,n=e.data,o=e.request,i=e.isGeneric,l=e.currency,f=65;if(l===c.CURRENCIES.BTC){var p=o,m=s.default.getAddressFormat(p.origData.changePath),g=n.slice(f,f+20);f+=20,r=s.default.getBitcoinAddress(g,m);for(var b=[],y=[],v=0;f<n.length&&48===n[f];){var w=f,E=f+2+n[f+1];y.push(n.slice(w,E));var x=33*v+825,_=33*(v+1)+825;b.push(n.slice(x,_)),f+=74,v+=1}var k={inputs:[],outputs:[]};k.outputs.push({value:p.origData.value,recipient:p.origData.recipient}),p.changeData.value>0&&k.outputs.push({value:p.changeData.value,recipient:r});for(var T=0;T<y.length;T++)k.inputs.push({hash:p.origData.prevOuts[T].txHash,index:p.origData.prevOuts[T].index,sig:y[T],pubkey:b[T],signerPath:p.origData.prevOuts[T].signerPath});var S=s.default.serializeTx(k),A=S,P=t.from((0,a.sha256)().update(t.from(A,"hex")).digest("hex"),"hex");return{tx:S,txHash:(0,a.sha256)().update(P).digest("hex"),changeRecipient:r,sigs:y}}if(l!==c.CURRENCIES.ETH||i){if(l===c.CURRENCIES.ETH_MSG){C=(0,h.parseDER)(n.slice(f,f+2+n[f+1]));f+=74;var I=n.slice(f,f+20),R=u.default.validateEthereumMsgResponse({signer:I,sig:C},o);return{sig:{v:R.v,r:R.r.toString("hex"),s:R.s.toString("hex")},signer:I}}return(0,d.parseGenericSigningResponse)(n,f,o)}var C=(0,h.parseDER)(n.slice(f,f+2+n[f+1]));f+=74;var j=n.slice(f,f+20),L=u.default.buildEthRawTx(o,C,j),B=L.rawTx,D=L.sigWithV;return{tx:"0x".concat(B),txHash:"0x".concat(u.default.hashTransaction(B)),sig:{v:D.v,r:D.r.toString("hex"),s:D.s.toString("hex")},signer:j}};r.decryptSignResponse=function(e,t){var r=(0,l.decryptResponse)(e,c.decResLengths.sign,t);return{decryptedData:r.decryptedData,newEphemeralPub:r.newEphemeralPub}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/functions/sign.js"}],[2522,{"./constants":2510,"./index":2523,"./util":2529,buffer:1943,"hash.js/lib/hash/sha":2675,"js-sha3":2628},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.getEncodedPayload=r.parseGenericSigningResponse=r.buildGenericSigningMsgRequest=void 0;var n=e("hash.js/lib/hash/sha"),o=e("js-sha3"),i=e("./constants"),a=e("./index"),s=e("./util");r.buildGenericSigningMsgRequest=function(e){var c=e.signerPath,u=e.curveType,d=e.hashType,l=e.encodingType,f=void 0===l?null:l,h=e.decoder,p=void 0===h?null:h,m=e.omitPubkey,g=void 0!==m&&m,b=e.fwConstants,y=e.blsDst,v=void 0===y?a.Constants.SIGNING.BLS_DST.BLS_DST_NUL:y,w=b.extraDataFrameSz,E=b.extraDataMaxFrames,x=b.prehashAllowed,_=b.genericSigning,k=b.varAddrPathSzAllowed,T=_.curveTypes,S=_.encodingTypes,A=_.hashTypes,P=_.baseDataSz,I=_.baseReqSz,R=_.calldataDecoding,C=(0,r.getEncodedPayload)(e.payload,f,S),j=C.encoding,L=C.payloadBuf,B=L,D=L.length,N=P+E*w;if(!D)throw new Error("Payload could not be handled.");if(!(_&&w&&E&&x))throw new Error("Unsupported. Please update your Lattice firmware.");if(!(0,s.existsIn)(u,T))throw new Error("Unsupported curve type.");if(!(0,s.existsIn)(d,A))throw new Error("Unsupported hash type.");var O=p&&R&&p.length<=R.maxSz,H=O&&L.length+p.length<=N;if(O&&H){var U=t.alloc(8+p.length);U.writeUInt32LE(R.reserved,0),U.writeUInt32LE(p.length,4),t.from(p).copy(U,8),L=t.concat([L,U])}if(u===T.ED25519){if(d!==A.NONE)throw new Error("Signing on ed25519 requires unhashed message");c.forEach((function(e){if(e<i.HARDENED_OFFSET)throw new Error("Signing on ed25519 requires all signer path indices be hardened.")}))}else if(u===T.BLS12_381_G2){var K=t.alloc(4);K.writeUInt32LE(v),L=t.concat([K,L]),D+=K.length}var M=t.alloc(I),G=0;M.writeUInt32LE(j,G),G+=4,M.writeUInt8(d,G),G+=1,M.writeUInt8(u,G),G+=1;var F=(0,s.buildSignerPathBuf)(c,k);F.copy(M,G),G+=F.length,M.writeUInt8(g?1:0,G),G+=1;var V=[],q=null,z=!1;if(L.length>P)if(x&&L.length>N){M.writeUInt16LE(L.length,G),G+=2,z=!0;var W=L.slice(0,D);if(d===A.NONE)throw new Error("Message too large to send and could not be prehashed (hashType=NONE).");if(d===A.KECCAK256)q=t.from((0,o.keccak256)(W),"hex");else{if(d!==A.SHA256)throw new Error("Unsupported hash type.");q=t.from((0,n.sha256)().update(W).digest("hex"),"hex")}}else{(0,s.splitFrames)(L.slice(P),w).forEach((function(e){var r=t.alloc(4);r.writeUInt32LE(e.length,0),V.push(t.concat([r,e]))}))}return z||(M.writeUInt16LE(D,G),G+=2),(q||L).copy(M,G),{payload:M,extraDataPayloads:V,schema:i.signingSchema.GENERAL_SIGNING,curveType:u,encodingType:f,hashType:d,omitPubkey:g,origPayloadBuf:B}};r.parseGenericSigningResponse=function(e,r,n){var o={pubkey:null,sig:null};if(n.curveType===a.Constants.SIGNING.CURVES.SECP256K1){if(n.omitPubkey)r+=65;else{var i=e.readUInt8(r);if(r+=1,2===i||3===i)o.pubkey=t.alloc(33),o.pubkey.writeUInt8(i,0),e.slice(r,r+32).copy(o.pubkey,1);else{if(4!==i)throw new Error("Bad compression byte in signing response.");o.pubkey=t.alloc(65),o.pubkey.writeUInt8(i,0),e.slice(r).copy(o.pubkey,1)}r+=64}if(o.sig=(0,s.parseDER)(e.slice(r,r+2+e[r+1])),o.sig.r=(0,s.fixLen)(o.sig.r,32),o.sig.s=(0,s.fixLen)(o.sig.s,32),n.encodingType===a.Constants.SIGNING.ENCODINGS.EVM){var c=(0,s.getV)(n.origPayloadBuf,o);o.sig.v=c.toArrayLike(t)}}else if(n.curveType===a.Constants.SIGNING.CURVES.ED25519)n.omitPubkey||(o.pubkey=t.alloc(32),e.slice(r,r+32).copy(o.pubkey)),r+=32,o.sig={r:e.slice(r,r+32),s:e.slice(r+32,r+64)};else{if(n.curveType!==a.Constants.SIGNING.CURVES.BLS12_381_G2)throw new Error("Unsupported curve.");n.omitPubkey||(o.pubkey=t.alloc(48),e.slice(r,r+48).copy(o.pubkey)),r+=48,o.sig=t.alloc(96),e.slice(r,r+96).copy(o.sig)}return o};r.getEncodedPayload=function(e,r,n){if(r||(r=a.Constants.SIGNING.ENCODINGS.NONE),!(0,s.existsIn)(r,n))throw new Error("Encoding not supported by Lattice firmware. You may want to update.");return{payloadBuf:"string"==typeof e&&"0x"===e.slice(0,2)?t.from(e.slice(2),"hex"):t.from(e),encoding:r}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/genericSigning.js"}],[2523,{"./calldata/index":2508,"./client":2509,"./constants":2510,"./util":2529},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Utils=r.Constants=r.Client=r.Calldata=void 0;var n=e("./calldata/index");Object.defineProperty(r,"Calldata",{enumerable:!0,get:function(){return n.CALLDATA}});var o=e("./client");Object.defineProperty(r,"Client",{enumerable:!0,get:function(){return o.Client}});var i=e("./constants");Object.defineProperty(r,"Constants",{enumerable:!0,get:function(){return i.EXTERNAL}});var a=e("./util");Object.defineProperty(r,"Utils",{enumerable:!0,get:function(){return a.EXTERNAL}})}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/index.js"}],[2524,{"../constants":2510},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.LatticeResponseError=void 0;var i=e("../constants"),a=function(e){function t(t,r){var n=this,o=function(e){var t=e.responseCode,r=e.errorMessage,n=[];return t&&n.push("".concat(i.responseMsgs[t])),r&&(n.push("Error Message: "),n.push(r)),n.join("\n")}({responseCode:t,errorMessage:r});return(n=e.call(this,o)||this).responseCode=t,n.errorMessage=r,n.name="LatticeResponseError",n.responseCode=t,n.errorMessage=r,n}return o(t,e),t}(Error);r.LatticeResponseError=a}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/shared/errors.js"}],[2525,{"../bitcoin":2506,"../constants":2510,"../ethereum":2511,"../genericSigning":2522,"../util":2529,"./errors":2524,"./predicates":2526,"./validators":2528,buffer:1943,"hash.js/lib/hash/sha":2675},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getEphemeralId=r.decryptResponse=r.retryWrapper=r.buildRetryWrapper=r.request=r.buildTransaction=r.encryptRequest=r.buildRequest=void 0;var s=e("hash.js/lib/hash/sha"),c=a(e("../bitcoin")),u=e("../constants"),d=a(e("../ethereum")),l=e("../genericSigning"),f=e("../util"),h=e("./errors"),p=e("./predicates"),m=e("./validators");r.buildRequest=function(e,r){var n=r&&t.isBuffer(r)?r.length+1:1;e===u.deviceCodes.ENCRYPTED_REQUEST&&(n=1+r.length);var o=0,i=t.alloc(n+8);o=i.writeUInt8(u.VERSION_BYTE,o),o=i.writeUInt8(u.REQUEST_TYPE_BYTE,o);var a=(0,f.randomBytes)(4);o=i.writeUInt32BE(parseInt("0x".concat(a.toString("hex"))),o),o=i.writeUInt16BE(n,o),o=i.writeUInt8(e,o),n>1&&(o=r.copy(i,o));var s=(0,f.checksum)(i),c=t.alloc(i.length+4);return o=i.copy(c),c.writeUInt32BE(s,o),c};r.encryptRequest=function(e){var n=e.payload,o=e.requestCode,i=e.sharedSecret,a=(0,r.getEphemeralId)(i),s=u.encReqCodes[o],c=t.concat([t.from([s]),n]),d=(0,f.checksum)(c),l=t.alloc(c.length+4);c.copy(l,0),l.writeUInt32LE(d,c.length);var h=(0,f.aes256_encrypt)(l,i),p=t.alloc(u.ENC_MSG_LEN+4);return p.writeUInt32LE(a,0),h.copy(p,4),(0,r.buildRequest)(u.deviceCodes.ENCRYPTED_REQUEST,p)};r.buildTransaction=function(e){var t=e.data,r=e.currency,o=e.fwConstants;if("ETH"===r&&(0,p.shouldUseEVMLegacyConverter)(o)){console.log("Using the legacy ETH signing path. This will soon be deprecated. "+"Please switch to general signing request.");var i=void 0;try{i=d.default.ethConvertLegacyToGenericReq(t)}catch(e){throw new Error("Could not convert legacy request. Please switch to a general signing "+"request. See gridplus-sdk docs for more information.")}return t={fwConstants:o,encodingType:u.EXTERNAL.SIGNING.ENCODINGS.EVM,curveType:u.EXTERNAL.SIGNING.CURVES.SECP256K1,hashType:u.EXTERNAL.SIGNING.HASHES.KECCAK256,signerPath:t.signerPath,payload:i},{request:(0,l.buildGenericSigningMsgRequest)(n(n({},t),{fwConstants:o})),isGeneric:!0}}return"ETH"===r?{request:d.default.buildEthereumTxRequest(n(n({},t),{fwConstants:o})),isGeneric:!1}:"ETH_MSG"===r?{request:d.default.buildEthereumMsgRequest(n(n({},t),{fwConstants:o})),isGeneric:!1}:"BTC"===r?{request:c.default.buildBitcoinTxRequest(n(n({},t),{fwConstants:o})),isGeneric:!1}:{request:(0,l.buildGenericSigningMsgRequest)(n(n({},t),{fwConstants:o})),isGeneric:!0}};r.request=function(e){var t=e.url,r=e.payload,n=e.timeout,a=void 0===n?6e4:n;return o(void 0,void 0,void 0,(function(){return i(this,(function(e){return[2,(0,f.fetchWithTimeout)(t,{method:"POST",body:JSON.stringify({data:r}),headers:{"Content-Type":"application/json"},timeout:a}).catch(m.validateRequestError).then((function(e){return e.json()})).then((function(e){if(!e||!e.message)throw new Error("Invalid response");if(200!==e.status)throw new Error("Error code ".concat(e.status,": ").concat(e.message));var t=(0,f.parseLattice1Response)(e.message),r=t.data,n=t.errorMessage,o=t.responseCode;if(n||o)throw new h.LatticeResponseError(o,n);return r}))]}))}))};r.buildRetryWrapper=function(e,t){return function(o,i){return(0,r.retryWrapper)({fn:o,params:n(n({},i),{client:e}),retries:t,client:e})}};r.retryWrapper=function(e){var t=e.fn,a=e.params,s=e.retries,c=e.client;return o(void 0,void 0,void 0,(function(){return i(this,(function(e){return[2,t(n({},a)).catch((function(e){return o(void 0,void 0,void 0,(function(){var n,o;return i(this,(function(i){switch(i.label){case 0:return n=e.errorMessage,o=e.responseCode,(n||o)&&s?(0,p.isDeviceBusy)(o)?[4,(u=3e3,new Promise((function(e){return setTimeout(e,u)})))]:[3,2]:[3,8];case 1:case 3:case 5:return i.sent(),[3,7];case 2:return!(0,p.isWrongWallet)(o)||c.skipRetryOnWrongWallet?[3,4]:[4,c.fetchActiveWallet()];case 4:return(0,p.isInvalidEphemeralId)(o)?[4,c.connect(c.deviceId)]:[3,6];case 6:case 8:throw e;case 7:return[2,(0,r.retryWrapper)({fn:t,params:a,retries:s-1,client:c})]}var u}))}))}))]}))}))};r.decryptResponse=function(e,t,r){if(!e||e.length<t)return{decryptedData:null,newEphemeralPub:null};var n=e.slice(0,u.ENC_MSG_LEN),o=(0,f.aes256_decrypt)(n,r);(0,m.validateResponse)(o),t+=65,(0,m.validateChecksum)(o,t);var i=o.slice(0,65).toString("hex");return{decryptedData:o,newEphemeralPub:(0,f.getP256KeyPairFromPub)(i)}};r.getEphemeralId=function(e){var r=t.from((0,s.sha256)().update(e).digest("hex"),"hex");return parseInt(r.slice(0,4).toString("hex"),16)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/shared/functions.js"}],[2526,{"../constants":2510,"./utilities":2527},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shouldUseEVMLegacyConverter=r.doesFetchWalletsOnLoad=r.isInvalidEphemeralId=r.isWrongWallet=r.isDeviceBusy=void 0;var n=e("../constants"),o=e("./utilities");r.isDeviceBusy=function(e){return e===n.responseCodes.RESP_ERR_DEV_BUSY||e===n.responseCodes.RESP_ERR_GCE_TIMEOUT};r.isWrongWallet=function(e){return e===n.responseCodes.RESP_ERR_WRONG_WALLET};r.isInvalidEphemeralId=function(e){return e===n.responseCodes.RESP_ERR_INVALID_EPHEM_ID};r.doesFetchWalletsOnLoad=function(e){return(0,o.isFWSupported)(e,{major:0,minor:14,fix:1})};r.shouldUseEVMLegacyConverter=function(e){return e.genericSigning&&e.genericSigning.encodingTypes&&e.genericSigning.encodingTypes.EVM}}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/shared/predicates.js"}],[2527,{"../constants":2510,buffer:1943},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.getPathStr=r.isFWSupported=r.parseWallets=r.getSharedSecret=r.getPubKeyBytes=void 0;var n=e("../constants");r.getPubKeyBytes=function(e,r){void 0===r&&(r=!1);var n=e.getPublic().encode("hex"),o=t.from(n,"hex");if(!0===r){var i=o.slice(1,33).reverse(),a=o.slice(33,65).reverse();return t.concat([o[0],i,a])}return o};r.getSharedSecret=function(e,r){return t.from(e.derive(r.getPublic()).toArray("be",32))};r.parseWallets=function(e){var t=0,r={internal:{uid:undefined,capabilities:undefined,name:undefined,external:!1},external:{uid:undefined,capabilities:undefined,name:undefined,external:!0}};return r.internal.uid=e.slice(t,t+32),t+=71,r.external.uid=e.slice(t,t+32),r};r.isFWSupported=function(e,t){var r=e.major,n=e.minor,o=e.fix,i=t.major,a=t.minor,s=t.fix;return r>i||r>=i&&n>a||r>=i&&n>=a&&o>=s};r.getPathStr=function(e){var t="m";return e.forEach((function(e){e>=n.HARDENED_OFFSET?t+="/".concat(e-n.HARDENED_OFFSET,"'"):t+="/".concat(e)})),t}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/shared/utilities.js"}],[2528,{"../constants":2510,"../util":2529,"lodash/isEmpty":2917},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.isValid4ByteResponse=r.isValidBlockExplorerResponse=r.validateRequestLength=r.validateKvRecord=r.validateKvRecords=r.validateActiveWallets=r.validateKey=r.validateSharedSecret=r.validateEphemeralPub=r.validateWallet=r.validateRequestError=r.validateChecksum=r.validateFwVersion=r.validateFwConstants=r.validateBaseUrl=r.validateUrl=r.validateResponse=r.validateAppName=r.validateEncryptRequestCode=r.validateDeviceId=r.validateStartPath=r.validateNAddresses=r.validateIsUInt4=r.validateValueExists=void 0;var o=e("../constants"),i=e("../util"),a=n(e("lodash/isEmpty"));r.validateValueExists=function(e){var t=Object.entries(e),r=t[0];if(!t[1][1])throw new Error("".concat(r," must be provided"))};r.validateIsUInt4=function(e){if("number"!=typeof e||!(0,i.isUInt4)(e))throw new Error("Must be an integer between 0 and 15 inclusive");return e};r.validateNAddresses=function(e){if(e>o.MAX_ADDR)throw new Error("You may only request ".concat(o.MAX_ADDR," addresses at once."))};r.validateStartPath=function(e){if(!e)throw new Error("Start path is required");if(e.length<2||e.length>5)throw new Error("Path must include between 2 and 5 indices")};r.validateDeviceId=function(e){if(!e)throw new Error("No device ID has been stored. Please connect with your device ID first.");return e};r.validateEncryptRequestCode=function(e){if(e&&o.encReqCodes[e]===undefined)throw new Error("Unknown encrypted request code.")};r.validateAppName=function(e){if(!e)throw new Error("Name is required.");if(e.length<5||e.length>24)throw new Error("Invalid length for name provided. Must be 5-24 characters.");return e};r.validateResponse=function(e){if(!e)throw new Error("Error decrypting response")};r.validateUrl=function(e){if(!e)throw new Error("Url does not exist. Please reconnect.");return e};r.validateBaseUrl=function(e){if(!e)throw new Error("Base URL is required.");return e};r.validateFwConstants=function(e){if(!e)throw new Error("Firmware constants do not exist. Please reconnect.");return e};r.validateFwVersion=function(e){if(!e||e.byteLength>4)throw new Error("Firmware version does not exist. Please reconnect.");return e};r.validateChecksum=function(e,t){var r=e.slice(0,t),n=parseInt("0x".concat(e.slice(t,t+4).toString("hex"))),o=(0,i.checksum)(r);if(n!==o)throw new Error("Checksum mismatch in response from Lattice (calculated ".concat(o,", wanted ").concat(n,")"))};r.validateRequestError=function(e){if("ECONNABORTED"===e.code&&"ETIME"===e.errno)throw new Error("Timeout waiting for device. Please ensure it is connected to the internet and try again in a minute.");throw new Error("Failed to make request to device:\n".concat(e.message))};r.validateWallet=function(e){if(!e||null===e)throw new Error("No active wallet.");return e};r.validateEphemeralPub=function(e){if(!e)throw new Error("`ephemeralPub` (ephemeral public key) is required. Please reconnect.");return e};r.validateSharedSecret=function(e){if(!e)throw new Error("Shared secret required. Please reconnect.");return e};r.validateKey=function(e){if(!e)throw new Error("Key is required. Please reconnect.");return e};r.validateActiveWallets=function(e){var t,r,n,i;if(!e||(null===(r=null===(t=null==e?void 0:e.internal)||void 0===t?void 0:t.uid)||void 0===r?void 0:r.equals(o.EMPTY_WALLET_UID))&&(null===(i=null===(n=null==e?void 0:e.external)||void 0===n?void 0:n.uid)||void 0===i?void 0:i.equals(o.EMPTY_WALLET_UID)))throw new Error("No active wallet.");return e};r.validateKvRecords=function(e,t){if(!t||!t.kvActionsAllowed)throw new Error("Unsupported. Please update firmware.");if("object"!=typeof e||Object.keys(e).length<1)throw new Error("One or more key-value mapping must be provided in `records` param.");if(Object.keys(e).length>t.kvActionMaxNum)throw new Error("Too many keys provided. Please only provide up to ".concat(t.kvActionMaxNum,"."));return e};r.validateKvRecord=function(e,t){var r=e.key,n=e.val;if("string"!=typeof r||String(r).length>t.kvKeyMaxStrSz)throw new Error("Key ".concat(r," too large. Must be <=").concat(t.kvKeyMaxStrSz," characters."));if("string"!=typeof n||String(n).length>t.kvValMaxStrSz)throw new Error("Value ".concat(n," too large. Must be <=").concat(t.kvValMaxStrSz," characters."));if(0===String(r).length||0===String(n).length)throw new Error("Keys and values must be >0 characters.");if(!o.ASCII_REGEX.test(r)||!o.ASCII_REGEX.test(n))throw new Error("Unicode characters are not supported.");return{key:r,val:n}};r.validateRequestLength=function(e,t){if(e.payload.length>t.reqMaxDataSz)throw new Error("Transaction is too large")};r.isValidBlockExplorerResponse=function(e){try{var t=JSON.parse(e.result);return!(0,a.default)(t)}catch(e){return!1}};r.isValid4ByteResponse=function(e){try{return!(0,a.default)(e.results)}catch(e){return!1}}}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/shared/validators.js"}],[2529,{".":2523,"./constants":2510,"./shared/validators":2528,"@ethereumjs/tx":2566,_process:3027,"aes-js":1671,"bignumber.js":2627,"bn.js":1900,buffer:1943,"crc-32":2034,elliptic:2095,"hash.js/lib/hash/sha":2675,"js-sha3":2628,"lodash/inRange":2911,"lodash/isInteger":2920,rlp:2629,secp256k1:2630},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t,n){(function(){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},s=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.EXTERNAL=r.getV=r.generateAppSecret=r.fetchCalldataDecoder=r.fetchWithTimeout=r.selectDefFrom4byteABI=r.isUInt4=r.randomBytes=r.existsIn=r.isAsciiStr=r.buildSignerPathBuf=r.getP256KeyPairFromPub=r.getP256KeyPair=r.parseDER=r.aes256_decrypt=r.aes256_encrypt=r.fixLen=r.ensureHexBuffer=r.splitFrames=r.isValidAssetPath=r.toPaddedDER=r.checksum=r.parseLattice1Response=void 0;var u,d=e("@ethereumjs/tx"),l=c(e("aes-js")),f=c(e("bignumber.js")),h=e("bn.js"),p=c(e("crc-32")),m=c(e("elliptic")),g=e("hash.js/lib/hash/sha"),b=e("js-sha3"),y=c(e("lodash/inRange")),v=c(e("lodash/isInteger")),w=e("rlp"),E=e("secp256k1"),x=e("."),_=e("./constants"),k=e("./shared/validators"),T=_.BIP_CONSTANTS.COINS,S=_.BIP_CONSTANTS.PURPOSES,A=m.default.ec;r.parseLattice1Response=function(e){var t={errorMessage:null,data:null},o=n.from(e,"hex"),i=0,a=o.readUInt8(i);if(i++,a!==_.VERSION_BYTE)return t.errorMessage="Incorrect protocol version. Please update your SDK",t;var s=o.readUInt8(i);if(i++,0!==s)return t.errorMessage="Incorrect response from Lattice1",t;o.readUInt32BE(i),i+=4;var c=o.readUInt16BE(i);i+=2;var u=o.slice(i,i+c);i+=c;var d=u.readUInt8(0);return d!==_.responseCodes.RESP_SUCCESS?(t.errorMessage="".concat(_.responseMsgs[d]?_.responseMsgs[d]:"Unknown Error"," (Lattice)"),t.responseCode=d,t):(t.data=u.slice(1,u.length),o.readUInt32BE(i)!==(0,r.checksum)(o.slice(0,o.length-4))?(t.errorMessage="Invalid checksum from device response",t.data=null,t):t)};r.checksum=function(e){return p.default.buf(e)>>>0};r.toPaddedDER=function(e){var t=n.alloc(74);return n.from(e.toDER()).copy(t),t};r.isValidAssetPath=function(e,t){var r=[S.ETH,S.BTC_LEGACY,S.BTC_WRAPPED_SEGWIT,S.BTC_SEGWIT],n=[T.ETH,T.BTC,T.BTC_TESTNET];return!((e[1]===T.BTC||e[1]===T.BTC_TESTNET)&&e[0]!==S.BTC_WRAPPED_SEGWIT&&!t.allowBtcLegacyAndSegwitAddrs)&&(r.indexOf(e[0])>=0&&(n.indexOf(e[1])>=0||[60,61,966,700,9006,9e3,1007,553,178,137,37310,108,40,889,1987,820,6060,1620,1313114,76,246529,246785,1001,227,916,464,2221,344,73799,246].indexOf(e[1]-_.HARDENED_OFFSET)>0))};r.splitFrames=function(e,t){for(var r=[],n=Math.ceil(e.length/t),o=0,i=0;i<n;i++)r.push(e.slice(o,o+t)),o+=t;return r};r.ensureHexBuffer=function(e,t){void 0===t&&(t=!0);try{if(null===e||0===e&&!0===t)return n.alloc(0);var r="number"==typeof e||function(e){var t=new f.default(e).toFixed().split(".").join(""),r=new String(e);return t.slice(0,8)===r.slice(0,8)}(e);return(e=r?"".concat(new f.default(e).toString(16)):"string"==typeof e&&"0x"===e.slice(0,2)?e.slice(2):e.toString("hex")).length%2>0&&(e="0".concat(e)),"00"!==e||r?n.from(e,"hex"):n.alloc(0)}catch(t){throw new Error("Cannot convert ".concat(e.toString()," to hex buffer (").concat(t.toString(),")"))}};r.fixLen=function(e,t){var r=n.alloc(t);return e.length<t?(e.copy(r,t-e.length),r):e.slice(-t)};r.aes256_encrypt=function(e,t){var r=n.from(_.AES_IV),o=new l.default.ModeOfOperation.cbc(t,r),i=e.length%16==0?e:l.default.padding.pkcs7.pad(e);return n.from(o.encrypt(i))};r.aes256_decrypt=function(e,t){var r=n.from(_.AES_IV),o=new l.default.ModeOfOperation.cbc(t,r);return n.from(o.decrypt(e))};r.parseDER=function(e){if(48!==e[0]||2!==e[2])throw new Error("Failed to decode DER signature");var t=3,r=e[t];t++;var n=e.slice(t,t+r);if(2!==e[t+=r])throw new Error("Failed to decode DER signature");var o=e[++t];return t++,{r:n,s:e.slice(t,t+o)}};r.getP256KeyPair=function(e){return u===undefined&&(u=new A("p256")),u.keyFromPrivate(e,"hex")};r.getP256KeyPairFromPub=function(e){return u===undefined&&(u=new A("p256")),u.keyFromPublic(e,"hex")};r.buildSignerPathBuf=function(e,t){var r=n.alloc(24),o=0;if(t&&e.length>5)throw new Error("Signer path must be <=5 indices.");if(!t&&5!==e.length)throw new Error("Your Lattice firmware only supports 5-index derivation paths. Please upgrade.");r.writeUInt32LE(e.length,o),o+=4;for(var i=0;i<5;i++)i<e.length?r.writeUInt32LE(e[i],o):r.writeUInt32LE(0,o),o+=4;return r};r.isAsciiStr=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)return!1;for(var r=t?[32,10]:[],n=0;n<e.length;n++){var o=e.charCodeAt(n);if(r.indexOf(o)<0&&(o<32||o>127))return!1}return!0};r.existsIn=function(e,t){return Object.keys(t).some((function(r){return t[r]===e}))};r.randomBytes=function(e){for(var t=n.alloc(e),r=0;r<e;r++)t[r]=Math.round(255*Math.random());return t};function P(e){return i(this,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,fetch(_.EXTERNAL_NETWORKS_BY_CHAIN_ID_URL).then((function(e){return e.json()}))];case 1:return(t=n.sent())?[2,t[e]]:[2,undefined];case 2:return r=n.sent(),console.warn("Fetching external networks failed.\n",r),[3,3];case 3:return[2]}}))}))}function I(e,t){var r;if(e.length>1&&console.warn("WARNING: There are multiple results. Using the first one."),e.sort((function(e,t){return new Date(e.created_at).getTime()-new Date(t.created_at).getTime()})).find((function(e){try{return!!(r=x.Calldata.EVM.parsers.parseCanonicalName(t,e.text_signature))}catch(e){return!1}})),r)return r;throw new Error("Could not find definition for selector")}function R(e,t){return i(this,void 0,void 0,(function(){var r,n,o,i,s,c,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,11,,12]),globalThis.caches&&globalThis.Request?[4,caches.open("gp-calldata")]:[3,9];case 1:return r=a.sent(),n=new Request(e,t),[4,r.match(n)];case 2:return(o=a.sent())?[2,o]:[3,3];case 3:return[4,fetch(n,t)];case 4:return i=a.sent(),s=i.clone(),[4,i.json()];case 5:return c=a.sent(),i.ok&&((0,k.isValidBlockExplorerResponse)(c)||(0,k.isValid4ByteResponse)(c))?[4,r.put(n,s)]:[3,7];case 6:return a.sent(),[2,r.match(n,t)];case 7:return[2,i];case 8:return[3,10];case 9:return[2,fetch(e,t)];case 10:return[3,12];case 11:throw u=a.sent(),console.error(u),u;case 12:return[2]}}))}))}function C(e,r){return i(this,void 0,void 0,(function(){var n;return a(this,(function(o){return n=function(e){var r=e.supportedChain,n=e.address,o=r.baseUrl,i=r.apiRoute;return"".concat(o,"/").concat(i,"&address=").concat(n)+(t.env.ETHERSCAN_KEY?"&apiKey=".concat(t.env.ETHERSCAN_KEY):"")}({address:e,supportedChain:r}),[2,R(n).then((function(e){return e.json()})).then((function(e){if(e&&e.result)return JSON.parse(e.result);throw new Error("Server response was malformed")})).catch((function(){throw new Error("Fetching data from external network failed")}))]}))}))}function j(e){return i(this,void 0,void 0,(function(){var t;return a(this,(function(r){switch(r.label){case 0:return t="https://www.4byte.directory/api/v1/signatures/?hex_signature=0x".concat(e),[4,fetch(t).then((function(e){return e.json()})).then((function(e){if(e&&e.results)return e.results;throw new Error("No results found")})).catch((function(e){throw new Error("Fetching data from 4byte failed: ".concat(e.message))}))];case 1:return[2,r.sent()]}}))}))}function L(e){return n.from((0,w.encode)(e))}function B(e,t){var r,o,c,u;return i(this,void 0,void 0,(function(){var i,d,l,f,h,p,m,g,b,y,v,w,E,_;return a(this,(function(a){switch(a.label){case 0:return[4,D(i=x.Calldata.EVM.processors.getNestedCalldata(e,t))];case 1:d=a.sent(),a.label=2;case 2:a.trys.push([2,22,23,28]),l=s(d.entries()),a.label=3;case 3:return[4,l.next()];case 4:if((f=a.sent()).done)return[3,21];if(h=f.value[0],!Array.isArray(d[h])||"string"==typeof d[h][0])return[3,18];a.label=5;case 5:a.trys.push([5,11,12,17]),c=void 0,p=s(d[h].entries()),a.label=6;case 6:return[4,p.next()];case 7:return(m=a.sent()).done?[3,10]:(g=m.value[0],null===d[h][g]?[3,9]:(b=d[h],y=g,[4,B(d[h][g],n.from(i[h][g].slice(2),"hex"))]));case 8:b[y]=a.sent(),a.label=9;case 9:return[3,6];case 10:return[3,17];case 11:return v=a.sent(),c={error:v},[3,17];case 12:return a.trys.push([12,,15,16]),m&&!m.done&&(u=p.return)?[4,u.call(p)]:[3,14];case 13:a.sent(),a.label=14;case 14:return[3,16];case 15:if(c)throw c.error;return[7];case 16:return[7];case 17:return[3,20];case 18:return null===d[h]?[3,20]:(w=d,E=h,[4,B(d[h],n.from(i[h].slice(2),"hex"))]);case 19:w[E]=a.sent(),a.label=20;case 20:return[3,3];case 21:return[3,28];case 22:return _=a.sent(),r={error:_},[3,28];case 23:return a.trys.push([23,,26,27]),f&&!f.done&&(o=l.return)?[4,o.call(l)]:[3,25];case 24:a.sent(),a.label=25;case 25:return[3,27];case 26:if(r)throw r.error;return[7];case 27:return[7];case 28:return[2,x.Calldata.EVM.processors.replaceNestedDefs(e,d)]}}))}))}function D(e){var t,r,n,o,c,u;return i(this,void 0,void 0,(function(){var i,d,l,f,h,p,m,g,b,y,v,w,E,x,_;return a(this,(function(a){switch(a.label){case 0:i=[],a.label=1;case 1:a.trys.push([1,26,27,32]),t=s(e),a.label=2;case 2:return[4,t.next()];case 3:if((r=a.sent()).done)return[3,25];if(null===(d=r.value))return[3,23];if(!Array.isArray(d))return[3,19];l=[],f=!0,a.label=4;case 4:a.trys.push([4,12,13,18]),c=void 0,h=s(d),a.label=5;case 5:return[4,h.next()];case 6:if((p=a.sent()).done)return[3,11];m=p.value,a.label=7;case 7:return a.trys.push([7,9,,10]),[4,j(g=m.slice(2,10))];case 8:return b=a.sent(),y=I(b,g),l.push(y),[3,10];case 9:return a.sent(),f=!1,l.push(null),[3,10];case 10:return[3,5];case 11:return[3,18];case 12:return v=a.sent(),c={error:v},[3,18];case 13:return a.trys.push([13,,16,17]),p&&!p.done&&(u=h.return)?[4,u.call(h)]:[3,15];case 14:a.sent(),a.label=15;case 15:return[3,17];case 16:if(c)throw c.error;return[7];case 17:return[7];case 18:return f?i.push(l):i.push(null),[3,22];case 19:return a.trys.push([19,21,,22]),[4,j(w=d.slice(2,10))];case 20:return E=a.sent(),x=I(E,w),i.push(x),[3,22];case 21:return a.sent(),i.push(null),[3,22];case 22:return[3,24];case 23:i.push(null),a.label=24;case 24:return[3,2];case 25:return[3,32];case 26:return _=a.sent(),n={error:_},[3,32];case 27:return a.trys.push([27,,30,31]),r&&!r.done&&(o=t.return)?[4,o.call(t)]:[3,29];case 28:a.sent(),a.label=29;case 29:return[3,31];case 30:if(n)throw n.error;return[7];case 31:return[7];case 32:return[2,i]}}))}))}function N(e,t,r,o){return void 0===o&&(o=!0),i(this,void 0,void 0,(function(){var i,s,c,u,d,l,f,h,p,m,g,b,y,v;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,15,,16]),!e||e.length<2)throw new Error("Data is either undefined or less than two bytes");if(i="string"==typeof e&&"0x"===e.slice(0,2),(s=i?n.from(e.slice(2),"hex"):n.from(e,"hex")).length<4)throw new Error("Data must contain at least 4 bytes of data to define the selector");return c=n.from(s.slice(0,4)).toString("hex"),u=Number(r),(d=_.NETWORKS_BY_CHAIN_ID[u])?(f=d,[3,3]):[3,1];case 1:return[4,P(u)];case 2:f=a.sent(),a.label=3;case 3:l=f,a.label=4;case 4:return a.trys.push([4,10,,11]),l?[4,C(t,l)]:[3,8];case 5:return h=a.sent(),p=x.Calldata.EVM.parsers.parseSolidityJSONABI(c,h),m=p.def,o?[4,B(m,s)]:[3,7];case 6:m=a.sent(),a.label=7;case 7:return[2,{abi:h,def:L(m)}];case 8:throw new Error("Chain (id: ".concat(u,") is not supported"));case 9:return[3,11];case 10:return g=a.sent(),console.warn(g.message,"\n","Falling back to 4byte"),[3,11];case 11:return[4,j(c)];case 12:return b=a.sent(),y=I(b,c),o?[4,B(y,s)]:[3,14];case 13:y=a.sent(),a.label=14;case 14:return[2,{abi:b,def:L(y)}];case 15:return v=a.sent(),console.warn("Fetching calldata failed: ".concat(v.message)),[3,16];case 16:return[2,{def:null,abi:null}]}}))}))}r.isUInt4=function(e){return(0,v.default)(e)&&(0,y.default)(e,0,16)},r.selectDefFrom4byteABI=I,r.fetchWithTimeout=function(e,t){return i(this,void 0,void 0,(function(){var r,n,i,s,c;return a(this,(function(a){switch(a.label){case 0:return r=t.timeout,n=void 0===r?8e3:r,i=new AbortController,s=setTimeout((function(){return i.abort()}),n),[4,fetch(e,o(o({},t),{signal:i.signal}))];case 1:return c=a.sent(),clearTimeout(s),[2,c]}}))}))},r.fetchCalldataDecoder=N;r.generateAppSecret=function(e,t,r){var o="string"==typeof e?n.from(e):e,i="string"==typeof t?n.from(t):t,a="string"==typeof r?n.from(r):r,s=n.concat([o,i,a]);return n.from((0,g.sha256)().update(s).digest("hex"),"hex")};r.getV=function(e,t){var r,o,i;if(n.isBuffer(e)){o=n.from((0,b.keccak256)(e),"hex");try{var a=(0,w.decode)(e);r=6===a.length?null:new h.BN(a[6]),i=0}catch(t){try{i=d.TransactionFactory.fromSerializedData(e)._type}catch(e){throw new Error("Could not recover V. Bad transaction data.")}}}else o=(i=e._type)?e.getMessageToSign(!0):(0,w.encode)(e.getMessageToSign(!1)),e.supports(d.Capability.EIP155ReplayProtection)&&(r=e.common.chainIdBN().toNumber());var s,c=new Uint8Array(n.concat([t.sig.r,t.sig.s])),u=new Uint8Array(t.pubkey),l=(0,E.ecdsaRecover)(c,0,o,!1),f=(0,E.ecdsaRecover)(c,1,o,!1),p=n.from(u).toString("hex"),m=n.from(l).toString("hex"),g=n.from(f).toString("hex");if(p===m)s=0;else{if(p!==g)throw new Error("Failed to recover V parameter. Bad signature or transaction data.");s=1}return i?new h.BN(s):r?r.muln(2).addn(35).addn(s):new h.BN(s).addn(27)},r.EXTERNAL={fetchCalldataDecoder:N,generateAppSecret:r.generateAppSecret,getV:r.getV}}).call(this)}).call(this,e("_process"),e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk",file:"node_modules/gridplus-sdk/dist/util.js"}],[2530,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"calaveras",chainId:123,networkId:123,defaultHardfork:"berlin",consensus:{type:"poa",algorithm:"clique",clique:{period:30,epoch:3e4}},comment:"The Calaveras testnet chain",url:"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/client-integration-testnets/calaveras.md",genesis:{hash:"0xeb9233d066c275efcdfed8037f4fc082770176aefdbcb7691c71da412a5670f2",gasLimit:"0x47b760",difficulty:"0x1",nonce:"0x0000000000000000",extraData:"0x00000000000000000000000000000000000000000000000000000000000000005211cea3870c7ba7c6c44b185e62eecdb864cd8c560228ce57d31efbf64c200b2c200aacec78cf17a7148e784fe95a7a750335f8b9572ee28d72e7650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",stateRoot:"0x664c93de37eb4a72953ea42b8c046cdb64c9f0b0bca5505ade8d970d49ebdb8c",timestamp:"0x60b3877f"},hardforks:[{name:"chainstart",block:0,forkHash:"0xe34c4aff"},{name:"homestead",block:0,forkHash:"0xe34c4aff"},{name:"dao",block:null,forkHash:"0xe34c4aff"},{name:"tangerineWhistle",block:0,forkHash:"0xe34c4aff"},{name:"spuriousDragon",block:0,forkHash:"0xe34c4aff"},{name:"byzantium",block:0,forkHash:"0xe34c4aff"},{name:"constantinople",block:0,forkHash:"0xe34c4aff"},{name:"petersburg",block:0,forkHash:"0xe34c4aff"},{name:"istanbul",block:0,forkHash:"0xe34c4aff"},{name:"berlin",block:0,forkHash:"0xe34c4aff"},{name:"london",block:500,forkHash:"0x173783e4"}],bootstrapNodes:[{ip:"3.21.156.138",port:30303,id:"39eb08bbfad87481553c471a63ff2a4b4885fffa4ff50f1cf46744d9ad6e2f764ede146fe4df563fa9ccda1a46b9b1a88fb08135e1bf1d71b320912499da773d",location:"",comment:"Calaveras bootnode 1"},{ip:"3.9.20.133",port:30303,id:"9e1096aa59862a6f164994cb5cb16f5124d6c992cdbf4535ff7dea43ea1512afe5448dca9df1b7ab0726129603f1a3336b631e4d7a1a44c94daddd03241587f9",location:"",comment:"Calaveras bootnode 2"}]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/chains/calaveras.json"}],[2531,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"goerli",chainId:5,networkId:5,defaultHardfork:"istanbul",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"Cross-client PoA test network",url:"https://github.com/goerli/testnet",genesis:{hash:"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a",timestamp:"0x5c51a607",gasLimit:10485760,difficulty:1,nonce:"0x0000000000000000",extraData:"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",stateRoot:"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},hardforks:[{name:"chainstart",block:0,forkHash:"0xa3f5ab08"},{name:"homestead",block:0,forkHash:"0xa3f5ab08"},{name:"dao",block:null,forkHash:"0xa3f5ab08"},{name:"tangerineWhistle",block:0,forkHash:"0xa3f5ab08"},{name:"spuriousDragon",block:0,forkHash:"0xa3f5ab08"},{name:"byzantium",block:0,forkHash:"0xa3f5ab08"},{name:"constantinople",block:0,forkHash:"0xa3f5ab08"},{name:"petersburg",block:0,forkHash:"0xa3f5ab08"},{name:"istanbul",block:1561651,forkHash:"0xc25efa5c"},{name:"berlin",block:4460644,forkHash:"0x757a1c47"},{name:"london",block:5062605,forkHash:"0xb8c6299d"}],bootstrapNodes:[{ip:"51.141.78.53",port:30303,id:"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a",location:"",comment:"Upstream bootnode 1"},{ip:"13.93.54.137",port:30303,id:"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b",location:"",comment:"Upstream bootnode 2"},{ip:"94.237.54.114",port:30313,id:"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291",location:"",comment:"Upstream bootnode 3"},{ip:"18.218.250.66",port:30313,id:"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949",location:"",comment:"Upstream bootnode 4"},{ip:"3.11.147.67",port:30303,id:"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91",location:"",comment:"Ethereum Foundation bootnode"},{ip:"51.15.116.226",port:30303,id:"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd",location:"",comment:"Goerli Initiative bootnode"},{ip:"51.15.119.157",port:30303,id:"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33",location:"",comment:"Goerli Initiative bootnode"},{ip:"51.15.119.157",port:40303,id:"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd",location:"",comment:"Goerli Initiative bootnode"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/chains/goerli.json"}],[2532,{"./calaveras.json":2530,"./goerli.json":2531,"./kovan.json":2533,"./mainnet.json":2534,"./rinkeby.json":2535,"./ropsten.json":2536},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.chains=r._getInitializedChains=void 0;var i=o(e("./mainnet.json")),a=o(e("./ropsten.json")),s=o(e("./rinkeby.json")),c=o(e("./kovan.json")),u=o(e("./goerli.json")),d=o(e("./calaveras.json"));function l(e){var t,r,o={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli",123:"calaveras"},l={mainnet:i.default,ropsten:a.default,rinkeby:s.default,kovan:c.default,goerli:u.default,calaveras:d.default};if(e)try{for(var f=n(e),h=f.next();!h.done;h=f.next()){var p=h.value,m=p.name;o[p.chainId.toString()]=m,l[m]=p}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return l.names=o,l}r._getInitializedChains=l,r.chains=l()}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/chains/index.js"}],[2533,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"kovan",chainId:42,networkId:42,defaultHardfork:"istanbul",consensus:{type:"poa",algorithm:"aura",aura:{}},comment:"Parity PoA test network",url:"https://kovan-testnet.github.io/website/",genesis:{hash:"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9",timestamp:null,gasLimit:6e6,difficulty:131072,nonce:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",extraData:"0x",stateRoot:"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},hardforks:[{name:"chainstart",block:0,forkHash:"0x010ffe56"},{name:"homestead",block:0,forkHash:"0x010ffe56"},{name:"dao",block:null,forkHash:"0x010ffe56"},{name:"tangerineWhistle",block:0,forkHash:"0x010ffe56"},{name:"spuriousDragon",block:0,forkHash:"0x010ffe56"},{name:"byzantium",block:5067e3,forkHash:"0x7f83c620"},{name:"constantinople",block:92e5,forkHash:"0xa94e3dc4"},{name:"petersburg",block:10255201,forkHash:"0x186874aa"},{name:"istanbul",block:14111141,forkHash:"0x7f6599a6"},{name:"berlin",block:null,forkHash:null},{name:"london",block:null,forkHash:null}],bootstrapNodes:[{ip:"116.203.116.241",port:30303,id:"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45",location:"",comment:"1"},{ip:"3.217.96.11",port:30303,id:"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0",location:"",comment:"2"},{ip:"108.61.170.124",port:30303,id:"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c",location:"",comment:"3"},{ip:"157.230.31.163",port:30303,id:"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0",location:"",comment:"4"}]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/chains/kovan.json"}],[2534,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"mainnet",chainId:1,networkId:1,defaultHardfork:"istanbul",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"The Ethereum main chain",url:"https://ethstats.net/",genesis:{hash:"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",timestamp:null,gasLimit:5e3,difficulty:17179869184,nonce:"0x0000000000000042",extraData:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",stateRoot:"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfc64ec04"},{name:"homestead",block:115e4,forkHash:"0x97c2c34c"},{name:"dao",block:192e4,forkHash:"0x91d1f948"},{name:"tangerineWhistle",block:2463e3,forkHash:"0x7a64da13"},{name:"spuriousDragon",block:2675e3,forkHash:"0x3edd5b10"},{name:"byzantium",block:437e4,forkHash:"0xa00bc324"},{name:"constantinople",block:728e4,forkHash:"0x668db0af"},{name:"petersburg",block:728e4,forkHash:"0x668db0af"},{name:"istanbul",block:9069e3,forkHash:"0x879d6e30"},{name:"muirGlacier",block:92e5,forkHash:"0xe029e991"},{name:"berlin",block:12244e3,forkHash:"0x0eb440f6"},{name:"london",block:12965e3,forkHash:"0xb715077d"}],bootstrapNodes:[{ip:"18.138.108.67",port:30303,id:"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666",location:"ap-southeast-1-001",comment:"bootnode-aws-ap-southeast-1-001"},{ip:"3.209.45.79",port:30303,id:"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de",location:"us-east-1-001",comment:"bootnode-aws-us-east-1-001"},{ip:"34.255.23.113",port:30303,id:"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758",location:"eu-west-1-001",comment:"bootnode-aws-eu-west-1-001"},{ip:"35.158.244.151",port:30303,id:"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8",location:"eu-central-1-001",comment:"bootnode-aws-eu-central-1-001"},{ip:"52.187.207.27",port:30303,id:"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a",location:"australiaeast-001",comment:"bootnode-azure-australiaeast-001"},{ip:"191.234.162.198",port:30303,id:"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1",location:"brazilsouth-001",comment:"bootnode-azure-brazilsouth-001"},{ip:"52.231.165.108",port:30303,id:"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8",location:"koreasouth-001",comment:"bootnode-azure-koreasouth-001"},{ip:"104.42.217.25",port:30303,id:"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f",location:"westus-001",comment:"bootnode-azure-westus-001"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/chains/mainnet.json"}],[2535,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"rinkeby",chainId:4,networkId:4,defaultHardfork:"istanbul",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"PoA test network",url:"https://www.rinkeby.io",genesis:{hash:"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177",timestamp:"0x58ee40ba",gasLimit:47e5,difficulty:1,nonce:"0x0000000000000000",extraData:"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",stateRoot:"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},hardforks:[{name:"chainstart",block:0,forkHash:"0x3b8e0691"},{name:"homestead",block:1,forkHash:"0x60949295"},{name:"dao",block:null,forkHash:null},{name:"tangerineWhistle",block:2,forkHash:"0x8bde40dd"},{name:"spuriousDragon",block:3,forkHash:"0xcb3a64bb"},{name:"byzantium",block:1035301,forkHash:"0x8d748b57"},{name:"constantinople",block:3660663,forkHash:"0xe49cab14"},{name:"petersburg",block:4321234,forkHash:"0xafec6b27"},{name:"istanbul",block:5435345,forkHash:"0xcbdb8838"},{name:"berlin",block:8290928,forkHash:"0x6910c8bd"},{name:"london",block:8897988,forkHash:"0x8e29f2f3"}],bootstrapNodes:[{ip:"52.169.42.101",port:30303,id:"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf",location:"",comment:"IE"},{ip:"52.3.158.184",port:30303,id:"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8",location:"",comment:"INFURA"},{ip:"159.89.28.211",port:30303,id:"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6",location:"",comment:"AKASHA"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/chains/rinkeby.json"}],[2536,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"ropsten",chainId:3,networkId:3,defaultHardfork:"istanbul",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"PoW test network",url:"https://github.com/ethereum/ropsten",genesis:{hash:"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d",timestamp:null,gasLimit:16777216,difficulty:1048576,nonce:"0x0000000000000042",extraData:"0x3535353535353535353535353535353535353535353535353535353535353535",stateRoot:"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},hardforks:[{name:"chainstart",block:0,forkHash:"0x30c7ddbc"},{name:"homestead",block:0,forkHash:"0x30c7ddbc"},{name:"dao",block:null,forkHash:null},{name:"tangerineWhistle",block:0,forkHash:"0x30c7ddbc"},{name:"spuriousDragon",block:10,forkHash:"0x63760190"},{name:"byzantium",block:17e5,forkHash:"0x3ea159c7"},{name:"constantinople",block:423e4,forkHash:"0x97b544f3"},{name:"petersburg",block:4939394,forkHash:"0xd6e2149b"},{name:"istanbul",block:6485846,forkHash:"0x4bc66396"},{name:"muirGlacier",block:7117117,forkHash:"0x6727ef90"},{name:"berlin",block:9812189,forkHash:"0xa157d377"},{name:"london",block:10499401,forkHash:"0x7119b6b3"}],bootstrapNodes:[{ip:"52.176.7.10",port:30303,id:"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606",location:"",comment:"US-Azure geth"},{ip:"52.176.100.77",port:30303,id:"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c",location:"",comment:"US-Azure parity"},{ip:"52.232.243.152",port:30303,id:"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f",location:"",comment:"Parity"},{ip:"192.81.208.223",port:30303,id:"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09",location:"",comment:"@gpip"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/chains/ropsten.json"}],[2537,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-1559",number:1559,comment:"Fee market change for ETH 1.0 chain",url:"https://eips.ethereum.org/EIPS/eip-1559",status:"Review",minimumHardfork:"berlin",requiredEIPs:[2930],gasConfig:{baseFeeMaxChangeDenominator:{v:8,d:"Maximum base fee change denominator"},elasticityMultiplier:{v:2,d:"Maximum block gas target elasticity"},initialBaseFee:{v:1e9,d:"Initial base fee on first EIP1559 block"}},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/1559.json"}],[2538,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2315",number:2315,comment:"Simple subroutines for the EVM",url:"https://eips.ethereum.org/EIPS/eip-2315",status:"Draft",minimumHardfork:"istanbul",gasConfig:{},gasPrices:{beginsub:{v:2,d:"Base fee of the BEGINSUB opcode"},returnsub:{v:5,d:"Base fee of the RETURNSUB opcode"},jumpsub:{v:10,d:"Base fee of the JUMPSUB opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/2315.json"}],[2539,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2537",number:2537,comment:"BLS12-381 precompiles",url:"https://eips.ethereum.org/EIPS/eip-2537",status:"Draft",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{Bls12381G1AddGas:{v:600,d:"Gas cost of a single BLS12-381 G1 addition precompile-call"},Bls12381G1MulGas:{v:12e3,d:"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},Bls12381G2AddGas:{v:4500,d:"Gas cost of a single BLS12-381 G2 addition precompile-call"},Bls12381G2MulGas:{v:55e3,d:"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},Bls12381PairingBaseGas:{v:115e3,d:"Base gas cost of BLS12-381 pairing check"},Bls12381PairingPerPairGas:{v:23e3,d:"Per-pair gas cost of BLS12-381 pairing check"},Bls12381MapG1Gas:{v:5500,d:"Gas cost of BLS12-381 map field element to G1"},Bls12381MapG2Gas:{v:11e4,d:"Gas cost of BLS12-381 map field element to G2"},Bls12381MultiExpGasDiscount:{v:[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],d:"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/2537.json"}],[2540,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2565",number:2565,comment:"ModExp gas cost",url:"https://eips.ethereum.org/EIPS/eip-2565",status:"Last call",minimumHardfork:"byzantium",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:3,d:"Gquaddivisor from modexp precompile for gas calculation"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/2565.json"}],[2541,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2718",comment:"Typed Transaction Envelope",url:"https://eips.ethereum.org/EIPS/eip-2718",status:"Draft",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/2718.json"}],[2542,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2929",comment:"Gas cost increases for state access opcodes",url:"https://eips.ethereum.org/EIPS/eip-2929",status:"Draft",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{coldsload:{v:2100,d:"Gas cost of the first read of storage from a given location (per transaction)"},coldaccountaccess:{v:2600,d:"Gas cost of the first read of a given address (per transaction)"},warmstorageread:{v:100,d:"Gas cost of reading storage locations which have already loaded 'cold'"},sstoreCleanGasEIP2200:{v:2900,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreNoopGasEIP2200:{v:100,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:100,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitRefundEIP2200:{v:19900,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanRefundEIP2200:{v:4900,d:"Once per SSTORE operation for resetting to the original non-zero value"},call:{v:0,d:"Base fee of the CALL opcode"},callcode:{v:0,d:"Base fee of the CALLCODE opcode"},delegatecall:{v:0,d:"Base fee of the DELEGATECALL opcode"},staticcall:{v:0,d:"Base fee of the STATICCALL opcode"},balance:{v:0,d:"Base fee of the BALANCE opcode"},extcodesize:{v:0,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:0,d:"Base fee of the EXTCODECOPY opcode"},extcodehash:{v:0,d:"Base fee of the EXTCODEHASH opcode"},sload:{v:0,d:"Base fee of the SLOAD opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/2929.json"}],[2543,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2930",comment:"Optional access lists",url:"https://eips.ethereum.org/EIPS/eip-2930",status:"Draft",minimumHardfork:"istanbul",requiredEIPs:[2718,2929],gasConfig:{},gasPrices:{accessListStorageKeyCost:{v:1900,d:"Gas cost per storage key in an Access List transaction"},accessListAddressCost:{v:2400,d:"Gas cost per storage key in an Access List transaction"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/2930.json"}],[2544,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3198",number:3198,comment:"BASEFEE opcode",url:"https://eips.ethereum.org/EIPS/eip-3198",status:"Review",minimumHardfork:"london",gasConfig:{},gasPrices:{basefee:{v:2,d:"Gas cost of the BASEFEE opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/3198.json"}],[2545,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3529",comment:"Reduction in refunds",url:"https://eips.ethereum.org/EIPS/eip-3529",status:"Draft",minimumHardfork:"berlin",requiredEIPs:[2929],gasConfig:{maxRefundQuotient:{v:5,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{selfdestructRefund:{v:0,d:"Refunded following a selfdestruct operation"},sstoreClearRefundEIP2200:{v:4800,d:"Once per SSTORE operation for clearing an originally existing storage slot"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/3529.json"}],[2546,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3541",comment:"Reject new contracts starting with the 0xEF byte",url:"https://eips.ethereum.org/EIPS/eip-3541",status:"Draft",minimumHardfork:"berlin",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/3541.json"}],[2547,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3554",comment:"Reduction in refunds",url:"Difficulty Bomb Delay to December 1st 2021",status:"Draft",minimumHardfork:"muirGlacier",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:95e5,d:"the amount of blocks to delay the difficulty bomb with"}}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/3554.json"}],[2548,{"./1559.json":2537,"./2315.json":2538,"./2537.json":2539,"./2565.json":2540,"./2718.json":2541,"./2929.json":2542,"./2930.json":2543,"./3198.json":2544,"./3529.json":2545,"./3541.json":2546,"./3554.json":2547},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.EIPs=void 0,r.EIPs={1559:e("./1559.json"),2315:e("./2315.json"),2537:e("./2537.json"),2565:e("./2565.json"),2718:e("./2718.json"),2929:e("./2929.json"),2930:e("./2930.json"),3198:e("./3198.json"),3529:e("./3529.json"),3541:e("./3541.json"),3554:e("./3554.json")}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/eips/index.js"}],[2549,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"berlin",comment:"HF targeted for July 2020 following the Muir Glacier HF",url:"https://eips.ethereum.org/EIPS/eip-2070",status:"Draft",eips:[2565,2929,2718,2930]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/berlin.json"}],[2550,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"byzantium",comment:"Hardfork with new precompiles, instructions and other protocol changes",url:"https://eips.ethereum.org/EIPS/eip-609",status:"Final",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:20,d:"Gquaddivisor from modexp precompile for gas calculation"},ecAdd:{v:500,d:"Gas costs for curve addition precompile"},ecMul:{v:4e4,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:1e5,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:8e4,d:"Gas costs regarding curve pairing precompile input length"},revert:{v:0,d:"Base fee of the REVERT opcode"},staticcall:{v:700,d:"Base fee of the STATICCALL opcode"},returndatasize:{v:2,d:"Base fee of the RETURNDATASIZE opcode"},returndatacopy:{v:3,d:"Base fee of the RETURNDATACOPY opcode"}},vm:{},pow:{minerReward:{v:"3000000000000000000",d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:3e6,d:"the amount of blocks to delay the difficulty bomb with"}}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/byzantium.json"}],[2551,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"chainstart",comment:"Start of the Ethereum main chain",url:"",status:"",gasConfig:{minGasLimit:{v:5e3,d:"Minimum the gas limit may ever be"},gasLimitBoundDivisor:{v:1024,d:"The bound divisor of the gas limit, used in update calculations"},maxRefundQuotient:{v:2,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{base:{v:2,d:"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},tierStep:{v:[0,2,3,5,8,10,20],d:"Once per operation, for a selection of them"},exp:{v:10,d:"Base fee of the EXP opcode"},expByte:{v:10,d:"Times ceil(log256(exponent)) for the EXP instruction"},sha3:{v:30,d:"Base fee of the SHA3 opcode"},sha3Word:{v:6,d:"Once per word of the SHA3 operation's data"},sload:{v:50,d:"Base fee of the SLOAD opcode"},sstoreSet:{v:2e4,d:"Once per SSTORE operation if the zeroness changes from zero"},sstoreReset:{v:5e3,d:"Once per SSTORE operation if the zeroness does not change from zero"},sstoreRefund:{v:15e3,d:"Once per SSTORE operation if the zeroness changes to zero"},jumpdest:{v:1,d:"Base fee of the JUMPDEST opcode"},log:{v:375,d:"Base fee of the LOG opcode"},logData:{v:8,d:"Per byte in a LOG* operation's data"},logTopic:{v:375,d:"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},create:{v:32e3,d:"Base fee of the CREATE opcode"},call:{v:40,d:"Base fee of the CALL opcode"},callStipend:{v:2300,d:"Free gas given at beginning of call"},callValueTransfer:{v:9e3,d:"Paid for CALL when the value transfor is non-zero"},callNewAccount:{v:25e3,d:"Paid for CALL when the destination address didn't exist prior"},selfdestructRefund:{v:24e3,d:"Refunded following a selfdestruct operation"},memory:{v:3,d:"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},quadCoeffDiv:{v:512,d:"Divisor for the quadratic particle of the memory cost equation"},createData:{v:200,d:""},tx:{v:21e3,d:"Per transaction. NOTE: Not payable on data of calls between transactions"},txCreation:{v:32e3,d:"The cost of creating a contract via tx"},txDataZero:{v:4,d:"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},txDataNonZero:{v:68,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},copy:{v:3,d:"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},ecRecover:{v:3e3,d:""},sha256:{v:60,d:""},sha256Word:{v:12,d:""},ripemd160:{v:600,d:""},ripemd160Word:{v:120,d:""},identity:{v:15,d:""},identityWord:{v:3,d:""},stop:{v:0,d:"Base fee of the STOP opcode"},add:{v:3,d:"Base fee of the ADD opcode"},mul:{v:5,d:"Base fee of the MUL opcode"},sub:{v:3,d:"Base fee of the SUB opcode"},div:{v:5,d:"Base fee of the DIV opcode"},sdiv:{v:5,d:"Base fee of the SDIV opcode"},mod:{v:5,d:"Base fee of the MOD opcode"},smod:{v:5,d:"Base fee of the SMOD opcode"},addmod:{v:8,d:"Base fee of the ADDMOD opcode"},mulmod:{v:8,d:"Base fee of the MULMOD opcode"},signextend:{v:5,d:"Base fee of the SIGNEXTEND opcode"},lt:{v:3,d:"Base fee of the LT opcode"},gt:{v:3,d:"Base fee of the GT opcode"},slt:{v:3,d:"Base fee of the SLT opcode"},sgt:{v:3,d:"Base fee of the SGT opcode"},eq:{v:3,d:"Base fee of the EQ opcode"},iszero:{v:3,d:"Base fee of the ISZERO opcode"},and:{v:3,d:"Base fee of the AND opcode"},or:{v:3,d:"Base fee of the OR opcode"},xor:{v:3,d:"Base fee of the XOR opcode"},not:{v:3,d:"Base fee of the NOT opcode"},byte:{v:3,d:"Base fee of the BYTE opcode"},address:{v:2,d:"Base fee of the ADDRESS opcode"},balance:{v:20,d:"Base fee of the BALANCE opcode"},origin:{v:2,d:"Base fee of the ORIGIN opcode"},caller:{v:2,d:"Base fee of the CALLER opcode"},callvalue:{v:2,d:"Base fee of the CALLVALUE opcode"},calldataload:{v:3,d:"Base fee of the CALLDATALOAD opcode"},calldatasize:{v:2,d:"Base fee of the CALLDATASIZE opcode"},calldatacopy:{v:3,d:"Base fee of the CALLDATACOPY opcode"},codesize:{v:2,d:"Base fee of the CODESIZE opcode"},codecopy:{v:3,d:"Base fee of the CODECOPY opcode"},gasprice:{v:2,d:"Base fee of the GASPRICE opcode"},extcodesize:{v:20,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:20,d:"Base fee of the EXTCODECOPY opcode"},blockhash:{v:20,d:"Base fee of the BLOCKHASH opcode"},coinbase:{v:2,d:"Base fee of the COINBASE opcode"},timestamp:{v:2,d:"Base fee of the TIMESTAMP opcode"},number:{v:2,d:"Base fee of the NUMBER opcode"},difficulty:{v:2,d:"Base fee of the DIFFICULTY opcode"},gaslimit:{v:2,d:"Base fee of the GASLIMIT opcode"},pop:{v:2,d:"Base fee of the POP opcode"},mload:{v:3,d:"Base fee of the MLOAD opcode"},mstore:{v:3,d:"Base fee of the MSTORE opcode"},mstore8:{v:3,d:"Base fee of the MSTORE8 opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"},jump:{v:8,d:"Base fee of the JUMP opcode"},jumpi:{v:10,d:"Base fee of the JUMPI opcode"},pc:{v:2,d:"Base fee of the PC opcode"},msize:{v:2,d:"Base fee of the MSIZE opcode"},gas:{v:2,d:"Base fee of the GAS opcode"},push:{v:3,d:"Base fee of the PUSH opcode"},dup:{v:3,d:"Base fee of the DUP opcode"},swap:{v:3,d:"Base fee of the SWAP opcode"},callcode:{v:40,d:"Base fee of the CALLCODE opcode"},return:{v:0,d:"Base fee of the RETURN opcode"},invalid:{v:0,d:"Base fee of the INVALID opcode"},selfdestruct:{v:0,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{stackLimit:{v:1024,d:"Maximum size of VM stack allowed"},callCreateDepth:{v:1024,d:"Maximum depth of call/create stack"},maxExtraDataSize:{v:32,d:"Maximum size extra data may be after Genesis"}},pow:{minimumDifficulty:{v:131072,d:"The minimum that the difficulty may ever be"},difficultyBoundDivisor:{v:2048,d:"The bound divisor of the difficulty, used in the update calculations"},durationLimit:{v:13,d:"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},epochDuration:{v:3e4,d:"Duration between proof-of-work epochs"},timebombPeriod:{v:1e5,d:"Exponential difficulty timebomb period"},minerReward:{v:"5000000000000000000",d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:0,d:"the amount of blocks to delay the difficulty bomb with"}}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/chainstart.json"}],[2552,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"constantinople",comment:"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)",url:"https://eips.ethereum.org/EIPS/eip-1013",status:"Final",gasConfig:{},gasPrices:{netSstoreNoopGas:{v:200,d:"Once per SSTORE operation if the value doesn't change"},netSstoreInitGas:{v:2e4,d:"Once per SSTORE operation from clean zero"},netSstoreCleanGas:{v:5e3,d:"Once per SSTORE operation from clean non-zero"},netSstoreDirtyGas:{v:200,d:"Once per SSTORE operation from dirty"},netSstoreClearRefund:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},netSstoreResetRefund:{v:4800,d:"Once per SSTORE operation for resetting to the original non-zero value"},netSstoreResetClearRefund:{v:19800,d:"Once per SSTORE operation for resetting to the original zero value"},shl:{v:3,d:"Base fee of the SHL opcode"},shr:{v:3,d:"Base fee of the SHR opcode"},sar:{v:3,d:"Base fee of the SAR opcode"},extcodehash:{v:400,d:"Base fee of the EXTCODEHASH opcode"},create2:{v:32e3,d:"Base fee of the CREATE2 opcode"}},vm:{},pow:{minerReward:{v:"2000000000000000000",d:"The amount a miner gets rewarded for mining a block"},difficultyBombDelay:{v:5e6,d:"the amount of blocks to delay the difficulty bomb with"}}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/constantinople.json"}],[2553,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"dao",comment:"DAO rescue hardfork",url:"https://eips.ethereum.org/EIPS/eip-779",status:"Final",gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/dao.json"}],[2554,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"homestead",comment:"Homestead hardfork with protocol and network changes",url:"https://eips.ethereum.org/EIPS/eip-606",status:"Final",gasConfig:{},gasPrices:{delegatecall:{v:40,d:"Base fee of the DELEGATECALL opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/homestead.json"}],[2555,{"./berlin.json":2549,"./byzantium.json":2550,"./chainstart.json":2551,"./constantinople.json":2552,"./dao.json":2553,"./homestead.json":2554,"./istanbul.json":2556,"./london.json":2557,"./muirGlacier.json":2558,"./petersburg.json":2559,"./spuriousDragon.json":2560,"./tangerineWhistle.json":2561},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hardforks=void 0,r.hardforks=[["chainstart",e("./chainstart.json")],["homestead",e("./homestead.json")],["dao",e("./dao.json")],["tangerineWhistle",e("./tangerineWhistle.json")],["spuriousDragon",e("./spuriousDragon.json")],["byzantium",e("./byzantium.json")],["constantinople",e("./constantinople.json")],["petersburg",e("./petersburg.json")],["istanbul",e("./istanbul.json")],["muirGlacier",e("./muirGlacier.json")],["berlin",e("./berlin.json")],["london",e("./london.json")]]}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/index.js"}],[2556,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"istanbul",comment:"HF targeted for December 2019 following the Constantinople/Petersburg HF",url:"https://eips.ethereum.org/EIPS/eip-1679",status:"Draft",gasConfig:{},gasPrices:{blake2Round:{v:1,d:"Gas cost per round for the Blake2 F precompile"},ecAdd:{v:150,d:"Gas costs for curve addition precompile"},ecMul:{v:6e3,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:45e3,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:34e3,d:"Gas costs regarding curve pairing precompile input length"},txDataNonZero:{v:16,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},sstoreSentryGasEIP2200:{v:2300,d:"Minimum gas required to be present for an SSTORE call, not consumed"},sstoreNoopGasEIP2200:{v:800,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:800,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitGasEIP2200:{v:2e4,d:"Once per SSTORE operation from clean zero to non-zero"},sstoreInitRefundEIP2200:{v:19200,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanGasEIP2200:{v:5e3,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreCleanRefundEIP2200:{v:4200,d:"Once per SSTORE operation for resetting to the original non-zero value"},sstoreClearRefundEIP2200:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},balance:{v:700,d:"Base fee of the BALANCE opcode"},extcodehash:{v:700,d:"Base fee of the EXTCODEHASH opcode"},chainid:{v:2,d:"Base fee of the CHAINID opcode"},selfbalance:{v:5,d:"Base fee of the SELFBALANCE opcode"},sload:{v:800,d:"Base fee of the SLOAD opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/istanbul.json"}],[2557,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"london",comment:"HF targeted for July 2021 following the Berlin fork",url:"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md",status:"Draft",eips:[1559,3198,3529,3541]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/london.json"}],[2558,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"muirGlacier",comment:"HF to delay the difficulty bomb",url:"https://eips.ethereum.org/EIPS/eip-2384",status:"Final",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:9e6,d:"the amount of blocks to delay the difficulty bomb with"}}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/muirGlacier.json"}],[2559,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"petersburg",comment:"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople",url:"https://eips.ethereum.org/EIPS/eip-1716",status:"Draft",gasConfig:{},gasPrices:{netSstoreNoopGas:{v:null,d:"Removed along EIP-1283"},netSstoreInitGas:{v:null,d:"Removed along EIP-1283"},netSstoreCleanGas:{v:null,d:"Removed along EIP-1283"},netSstoreDirtyGas:{v:null,d:"Removed along EIP-1283"},netSstoreClearRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetClearRefund:{v:null,d:"Removed along EIP-1283"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/petersburg.json"}],[2560,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"spuriousDragon",comment:"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit",url:"https://eips.ethereum.org/EIPS/eip-607",status:"Final",gasConfig:{},gasPrices:{expByte:{v:50,d:"Times ceil(log256(exponent)) for the EXP instruction"}},vm:{maxCodeSize:{v:24576,d:"Maximum length of contract code"}},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/spuriousDragon.json"}],[2561,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"tangerineWhistle",comment:"Hardfork with gas cost changes for IO-heavy operations",url:"https://eips.ethereum.org/EIPS/eip-608",status:"Final",gasConfig:{},gasPrices:{sload:{v:200,d:"Once per SLOAD operation"},call:{v:700,d:"Once per CALL operation & message call transaction"},extcodesize:{v:700,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:700,d:"Base fee of the EXTCODECOPY opcode"},balance:{v:400,d:"Base fee of the BALANCE opcode"},delegatecall:{v:700,d:"Base fee of the DELEGATECALL opcode"},callcode:{v:700,d:"Base fee of the CALLCODE opcode"},selfdestruct:{v:5e3,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/hardforks/tangerineWhistle.json"}],[2562,{"./chains":2532,"./eips":2548,"./hardforks":2555,buffer:1943,"crc-32":2034,"ethereumjs-util":2231,events:1944},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(r,"__esModule",{value:!0}),r.Hardfork=r.Chain=r.CustomChain=void 0;var s,c,u=e("events"),d=e("crc-32"),l=e("ethereumjs-util"),f=e("./chains"),h=e("./hardforks"),p=e("./eips");!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain"}(s=r.CustomChain||(r.CustomChain={})),function(e){e[e.Mainnet=1]="Mainnet",e[e.Ropsten=3]="Ropsten",e[e.Rinkeby=4]="Rinkeby",e[e.Kovan=42]="Kovan",e[e.Goerli=5]="Goerli",e[e.Calaveras=123]="Calaveras"}(r.Chain||(r.Chain={})),function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london"}(c=r.Hardfork||(r.Hardfork={}));var m=function(e){function r(t){var r,n,o=e.call(this)||this;return o._supportedHardforks=[],o._eips=[],o._customChains=null!==(r=t.customChains)&&void 0!==r?r:[],o._chainParams=o.setChain(t.chain),o.DEFAULT_HARDFORK=null!==(n=o._chainParams.defaultHardfork)&&void 0!==n?n:c.Istanbul,o._hardfork=o.DEFAULT_HARDFORK,t.supportedHardforks&&(o._supportedHardforks=t.supportedHardforks),t.hardfork&&o.setHardfork(t.hardfork),t.eips&&o.setEIPs(t.eips),o}return o(r,e),r.custom=function(e,t){var n;void 0===t&&(t={});var o=null!==(n=t.baseChain)&&void 0!==n?n:"mainnet",a=i({},r._getChainParams(o));if(a.name="custom-chain","string"!=typeof e)return new r(i({chain:i(i({},a),e)},t));if(e===s.PolygonMainnet)return r.custom({name:s.PolygonMainnet,chainId:137,networkId:137});if(e===s.PolygonMumbai)return r.custom({name:s.PolygonMumbai,chainId:80001,networkId:80001});if(e===s.ArbitrumRinkebyTestnet)return r.custom({name:s.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611});if(e===s.xDaiChain)return r.custom({name:s.xDaiChain,chainId:100,networkId:100});throw new Error("Custom chain "+e+" not supported")},r.forCustomChain=function(e,t,n,o){var a=r._getChainParams(e);return new r({chain:i(i({},a),t),hardfork:n,supportedHardforks:o})},r.isSupportedChainId=function(e){var t=f._getInitializedChains();return Boolean(t.names[e.toString()])},r._getChainParams=function(e,t){var r=f._getInitializedChains(t);if("number"==typeof e||l.BN.isBN(e)){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error("Chain with ID "+e+" not supported")}if(r[e])return r[e];throw new Error("Chain with name "+e+" not supported")},r.prototype.setChain=function(e){var t,n;if("number"==typeof e||"string"==typeof e||l.BN.isBN(e))this._chainParams=r._getChainParams(e,this._customChains);else{if("object"!=typeof e)throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var o=a(["networkId","genesis","hardforks","bootstrapNodes"]),i=o.next();!i.done;i=o.next()){var s=i.value;if(e[s]===undefined)throw new Error("Missing required chain parameter: "+s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this._chainParams=e}return this._chainParams},r.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks");var n=!1;try{for(var o=a(h.hardforks),i=o.next();!i.done;i=o.next()){i.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name "+e+" not supported")},r.prototype.getHardforkByBlockNumber=function(e){var t,r;e=l.toType(e,l.TypeOutput.BN);var n=c.Chainstart;try{for(var o=a(this.hardforks()),i=o.next();!i.done;i=o.next()){var s=i.value;null!==s.block&&(e.gte(new l.BN(s.block))&&(n=s.name))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},r.prototype.setHardforkByBlockNumber=function(e){e=l.toType(e,l.TypeOutput.BN);var t=this.getHardforkByBlockNumber(e);return this.setHardfork(t),t},r.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks")}else e=this._hardfork;return e},r.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var o=a(n),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.name===e)return s}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}throw new Error("Hardfork "+e+" not defined for chain "+this.chainName())},r.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=a(this._supportedHardforks),o=n.next();!o.done;o=n.next()){if(e===o.value)return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},r.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var o=function(t){if(!(t in p.EIPs))throw new Error(t+" not supported");var r=i.gteHardfork(p.EIPs[t].minimumHardfork);if(!r)throw new Error(t+" cannot be activated on hardfork "+i.hardfork()+", minimumHardfork: "+r);p.EIPs[t].requiredEIPs&&p.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error(t+" requires EIP "+r+", but is not included in the EIP list")}))},i=this;try{for(var s=a(e),c=s.next();!c.done;c=s.next()){o(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}this._eips=e},r.prototype.param=function(e,t){var r,n,o=null;try{for(var i=a(this._eips),s=i.next();!s.done;s=i.next()){var c=s.value;if(null!==(o=this.paramByEIP(e,t,c)))return o}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},r.prototype.paramByHardfork=function(e,t,r){var n,o,i,s;r=this._chooseHardfork(r);var c=null;try{for(var u=a(h.hardforks),d=u.next();!d.done;d=u.next()){var l=d.value;if(l[1].hasOwnProperty("eips")){var f=l[1].eips;try{for(var p=(i=void 0,a(f)),m=p.next();!m.done;m=p.next()){var g=m.value,b=this.paramByEIP(e,t,g);c=null!==b?b:c}}catch(e){i={error:e}}finally{try{m&&!m.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}}else{if(!l[1][e])throw new Error("Topic "+e+" not defined");l[1][e][t]!==undefined&&(c=l[1][e][t].v)}if(l[0]===r)break}}catch(e){n={error:e}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return c},r.prototype.paramByEIP=function(e,t,r){if(!(r in p.EIPs))throw new Error(r+" not supported");var n=p.EIPs[r];if(!(e in n))throw new Error("Topic "+e+" not defined");return n[e][t]===undefined?null:n[e][t].v},r.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),o=n[n.length-1].name;return this.paramByHardfork(e,t,o)},r.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=a(h.hardforks),o=n.next();!o.done;o=n.next()){var i=o.value[1];if(this.gteHardfork(i.name)&&"eips"in i&&i.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},r.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=l.toType(t,l.TypeOutput.BN);var o=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,o);var i=this.hardforkBlockBN(e);return!(!i||!t.gte(i))},r.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},r.prototype.hardforkGteHardfork=function(e,t,r){var n,o;void 0===r&&(r={});var i,s=r.onlyActive!==undefined&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),i=s?this.activeHardforks(null,r):this.hardforks();var c=-1,u=-1,d=0;try{for(var l=a(i),f=l.next();!f.done;f=l.next()){var h=f.value;h.name===e&&(c=d),h.name===t&&(u=d),d+=1}}catch(e){n={error:e}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return c>=u&&-1!==u},r.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},r.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,o;void 0===t&&(t={});var i=null!==(o=t.onlySupported)&&void 0!==o&&o;e=this._chooseHardfork(e,i);try{for(var s=a(this.hardforks()),c=s.next();!c.done;c=s.next()){var u=c.value;if(u.name===e&&null!==u.block)return!0}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!1},r.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var o=[],i=this.hardforks();try{for(var s=a(i),c=s.next();!c.done;c=s.next()){var u=c.value;if(null!==u.block){if(e!==undefined&&null!==e&&e<u.block)break;t.onlySupported&&!this._isSupportedHardfork(u.name)||o.push(u)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},r.prototype.activeHardfork=function(e,t){void 0===t&&(t={});var r=this.activeHardforks(e,t);if(r.length>0)return r[r.length-1].name;throw new Error("No (supported) active hardfork found")},r.prototype.hardforkBlock=function(e){return l.toType(this.hardforkBlockBN(e),l.TypeOutput.Number)},r.prototype.hardforkBlockBN=function(e){return e=this._chooseHardfork(e,!1),new l.BN(this._getHardfork(e).block)},r.prototype.isHardforkBlock=function(e,t){return e=l.toType(e,l.TypeOutput.BN),t=this._chooseHardfork(t,!1),this.hardforkBlockBN(t).eq(e)},r.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return null===t?null:l.toType(t,l.TypeOutput.Number)},r.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return this.hardforks().reduce((function(e,r){var n=new l.BN(r.block);return n.gt(t)&&null===e?n:e}),null)},r.prototype.isNextHardforkBlock=function(e,t){e=l.toType(e,l.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},r.prototype._calcForkHash=function(e){var r,n,o=t.from(this.genesis().hash.substr(2),"hex"),i=t.alloc(0),s=0;try{for(var c=a(this.hardforks()),u=c.next();!u.done;u=c.next()){var f=u.value,h=f.block;if(0!==h&&null!==h&&h!==s){var p=t.from(h.toString(16).padStart(16,"0"),"hex");i=t.concat([i,p])}if(f.name===e)break;s=h}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}var m=t.concat([o,i]);return"0x"+l.intToBuffer(d.buf(m)>>>0).toString("hex")},r.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block){throw new Error("No fork hash calculation possible for non-applied or future hardfork")}return t.forkHash!==undefined?t.forkHash:this._calcForkHash(e)},r.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},r.prototype.genesis=function(){return this._chainParams.genesis},r.prototype.hardforks=function(){return this._chainParams.hardforks},r.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},r.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},r.prototype.hardfork=function(){return this._hardfork},r.prototype.chainId=function(){return l.toType(this.chainIdBN(),l.TypeOutput.Number)},r.prototype.chainIdBN=function(){return new l.BN(this._chainParams.chainId)},r.prototype.chainName=function(){return this._chainParams.name},r.prototype.networkId=function(){return l.toType(this.networkIdBN(),l.TypeOutput.Number)},r.prototype.networkIdBN=function(){return new l.BN(this._chainParams.networkId)},r.prototype.eips=function(){return this._eips},r.prototype.consensusType=function(){return this._chainParams.consensus.type},r.prototype.consensusAlgorithm=function(){return this._chainParams.consensus.algorithm},r.prototype.consensusConfig=function(){return this._chainParams.consensus[this.consensusAlgorithm()]},r.prototype.copy=function(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)},r}(u.EventEmitter);r.default=m}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/common/dist.browser/index.js"}],[2563,{"./types":2569,"@ethereumjs/common":2625,"ethereumjs-util":2231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseTransaction=void 0;var a=i(e("@ethereumjs/common")),s=e("ethereumjs-util"),c=e("./types"),u=function(){function e(e){this.activeCapabilities=[],this.DEFAULT_CHAIN="mainnet",this.DEFAULT_HARDFORK="istanbul";var t=e.nonce,r=e.gasLimit,n=e.to,o=e.value,i=e.data,a=e.v,c=e.r,u=e.s,d=e.type;this._type=new s.BN(s.toBuffer(d)).toNumber();var l=s.toBuffer(""===n?"0x":n),f=s.toBuffer(""===a?"0x":a),h=s.toBuffer(""===c?"0x":c),p=s.toBuffer(""===u?"0x":u);this.nonce=new s.BN(s.toBuffer(""===t?"0x":t)),this.gasLimit=new s.BN(s.toBuffer(""===r?"0x":r)),this.to=l.length>0?new s.Address(l):undefined,this.value=new s.BN(s.toBuffer(""===o?"0x":o)),this.data=s.toBuffer(""===i?"0x":i),this.v=f.length>0?new s.BN(f):undefined,this.r=h.length>0?new s.BN(h):undefined,this.s=p.length>0?new s.BN(p):undefined,this._validateCannotExceedMaxInteger({nonce:this.nonce,gasLimit:this.gasLimit,value:this.value,r:this.r,s:this.s})}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given "+this.gasLimit+", need at least "+this.getBaseFee()),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n<this.data.length;n++)0===this.data[n]?r+=e:r+=t;return new s.BN(r)},e.prototype.toCreationAddress=function(){return this.to===undefined||0===this.to.buf.length},e.prototype.isSigned=function(){var e=this,t=e.v,r=e.r,n=e.s;return 0===this.type?!!(t&&r&&n):!(t===undefined||!r||!n)},e.prototype.verifySignature=function(){try{var e=this.getSenderPublicKey();return 0!==s.unpadBuffer(e).length}catch(e){return!1}},e.prototype.getSenderAddress=function(){return new s.Address(s.publicToAddress(this.getSenderPublicKey()))},e.prototype.sign=function(e){if(32!==e.length)throw new Error("Private key must be 32 bytes in length.");var t=!1;0===this.type&&this.common.gteHardfork("spuriousDragon")&&!this.supports(c.Capability.EIP155ReplayProtection)&&(this.activeCapabilities.push(c.Capability.EIP155ReplayProtection),t=!0);var r=this.getMessageToSign(!0),n=s.ecsign(r,e),o=n.v,i=n.r,a=n.s,u=this._processSignature(o,i,a);if(t){var d=this.activeCapabilities.indexOf(c.Capability.EIP155ReplayProtection);d>-1&&this.activeCapabilities.splice(d,1)}return u},e.prototype._getCommon=function(e,t){var r;if(t){var n=new s.BN(s.toBuffer(t));if(e){if(!e.chainIdBN().eq(n))throw new Error("The chain ID does not match the chain ID of Common");return e.copy()}return a.default.isSupportedChainId(n)?new a.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):a.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null==e?void 0:e.copy())&&void 0!==r?r:new a.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t){var r,i;void 0===t&&(t=53);try{for(var a=n(Object.entries(e)),c=a.next();!c.done;c=a.next()){var u=o(c.value,2),d=u[0],l=u[1];if(53===t){if(null==l?void 0:l.gt(s.MAX_INTEGER))throw new Error(d+" cannot exceed MAX_INTEGER, given "+l)}else{if(256!==t)throw new Error("unimplemented bits value");if(null==l?void 0:l.gte(s.TWO_POW256))throw new Error(d+" must be less than 2^256, given "+l)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},e}();r.BaseTransaction=u}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/dist.browser/baseTransaction.js"}],[2564,{"./baseTransaction":2563,"./types":2569,"./util":2570,buffer:1943,"ethereumjs-util":2231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(r,"__esModule",{value:!0});var s=e("ethereumjs-util"),c=e("./baseTransaction"),u=e("./types"),d=e("./util"),l=t.from(2..toString(16).padStart(2,"0"),"hex"),f=function(e){function r(t,r){var n,o;void 0===r&&(r={});var a=e.call(this,i(i({},t),{type:2}))||this;a.DEFAULT_HARDFORK="london";var c=t.chainId,l=t.accessList,f=t.maxFeePerGas,h=t.maxPriorityFeePerGas;if(a.common=a._getCommon(r.common,c),a.chainId=a.common.chainIdBN(),!a.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");a.activeCapabilities=a.activeCapabilities.concat([1559,2718,2930]);var p=d.AccessLists.getAccessListData(null!=l?l:[]);if(a.accessList=p.accessList,a.AccessListJSON=p.AccessListJSON,d.AccessLists.verifyAccessList(a.accessList),a.maxFeePerGas=new s.BN(s.toBuffer(""===f?"0x":f)),a.maxPriorityFeePerGas=new s.BN(s.toBuffer(""===h?"0x":h)),a._validateCannotExceedMaxInteger({maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas},256),a.maxFeePerGas.lt(a.maxPriorityFeePerGas))throw new Error("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");if(a.v&&!a.v.eqn(0)&&!a.v.eqn(1))throw new Error("The y-parity of the transaction should either be 0 or 1");if(a.common.gteHardfork("homestead")&&(null===(n=a.s)||void 0===n?void 0:n.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");return(null===(o=null==r?void 0:r.freeze)||void 0===o||o)&&Object.freeze(a),a}return o(r,e),Object.defineProperty(r.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){if(void 0===t&&(t={}),!e.slice(0,1).equals(l))throw new Error("Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: "+2+", received: "+e.slice(0,1).toString("hex"));var n=s.rlp.decode(e.slice(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return r.fromValuesArray(n,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),9!==e.length&&12!==e.length)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");var n=a(e,12),o=n[0],i=n[1],c=n[2],u=n[3],d=n[4],l=n[5],f=n[6],h=n[7],p=n[8],m=n[9],g=n[10],b=n[11];return new r({chainId:new s.BN(o),nonce:i,maxPriorityFeePerGas:c,maxFeePerGas:u,gasLimit:d,to:l,value:f,data:h,accessList:null!=p?p:[],v:m!==undefined?new s.BN(m):undefined,r:g,s:b},t)},r.prototype.getDataFee=function(){var t=e.prototype.getDataFee.call(this);return t.iaddn(d.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),t},r.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},r.prototype.raw=function(){return[s.bnToUnpaddedBuffer(this.chainId),s.bnToUnpaddedBuffer(this.nonce),s.bnToUnpaddedBuffer(this.maxPriorityFeePerGas),s.bnToUnpaddedBuffer(this.maxFeePerGas),s.bnToUnpaddedBuffer(this.gasLimit),this.to!==undefined?this.to.buf:t.from([]),s.bnToUnpaddedBuffer(this.value),this.data,this.accessList,this.v!==undefined?s.bnToUnpaddedBuffer(this.v):t.from([]),this.r!==undefined?s.bnToUnpaddedBuffer(this.r):t.from([]),this.s!==undefined?s.bnToUnpaddedBuffer(this.s):t.from([])]},r.prototype.serialize=function(){var e=this.raw();return t.concat([l,s.rlp.encode(e)])},r.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var r=this.raw().slice(0,9),n=t.concat([l,s.rlp.encode(r)]);return e?s.keccak256(n):n},r.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return s.keccak256(this.serialize())},r.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},r.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.v,o=r.r,i=r.s;try{return s.ecrecover(t,n.addn(27),s.bnToUnpaddedBuffer(o),s.bnToUnpaddedBuffer(i))}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var o={common:this.common};return r.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(t),s:new s.BN(n)},o)},r.prototype.toJSON=function(){var e=d.AccessLists.getAccessListJSON(this.accessList);return{chainId:s.bnToHex(this.chainId),nonce:s.bnToHex(this.nonce),maxPriorityFeePerGas:s.bnToHex(this.maxPriorityFeePerGas),maxFeePerGas:s.bnToHex(this.maxFeePerGas),gasLimit:s.bnToHex(this.gasLimit),to:this.to!==undefined?this.to.toString():undefined,value:s.bnToHex(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:this.v!==undefined?s.bnToHex(this.v):undefined,r:this.r!==undefined?s.bnToHex(this.r):undefined,s:this.s!==undefined?s.bnToHex(this.s):undefined}},r}(c.BaseTransaction);r.default=f}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/dist.browser/eip1559Transaction.js"}],[2565,{"./baseTransaction":2563,"./types":2569,"./util":2570,buffer:1943,"ethereumjs-util":2231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(r,"__esModule",{value:!0});var s=e("ethereumjs-util"),c=e("./baseTransaction"),u=e("./types"),d=e("./util"),l=t.from(1..toString(16).padStart(2,"0"),"hex"),f=function(e){function r(t,r){var n,o;void 0===r&&(r={});var a=e.call(this,i(i({},t),{type:1}))||this;a.DEFAULT_HARDFORK="berlin";var c=t.chainId,l=t.accessList,f=t.gasPrice;if(a.common=a._getCommon(r.common,c),a.chainId=a.common.chainIdBN(),!a.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");a.activeCapabilities=a.activeCapabilities.concat([2718,2930]);var h=d.AccessLists.getAccessListData(null!=l?l:[]);if(a.accessList=h.accessList,a.AccessListJSON=h.AccessListJSON,d.AccessLists.verifyAccessList(a.accessList),a.gasPrice=new s.BN(s.toBuffer(""===f?"0x":f)),a._validateCannotExceedMaxInteger({gasPrice:a.gasPrice}),a.v&&!a.v.eqn(0)&&!a.v.eqn(1))throw new Error("The y-parity of the transaction should either be 0 or 1");if(a.common.gteHardfork("homestead")&&(null===(n=a.s)||void 0===n?void 0:n.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");return(null===(o=null==r?void 0:r.freeze)||void 0===o||o)&&Object.freeze(a),a}return o(r,e),Object.defineProperty(r.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){if(void 0===t&&(t={}),!e.slice(0,1).equals(l))throw new Error("Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: "+1+", received: "+e.slice(0,1).toString("hex"));var n=s.rlp.decode(e.slice(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return r.fromValuesArray(n,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),8!==e.length&&11!==e.length)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");var n=a(e,11),o=n[0],i=n[1],c=n[2],u=n[3],d=n[4],l=n[5],f=n[6],h=n[7],p=n[8],m=n[9],g=n[10];return new r({chainId:new s.BN(o),nonce:i,gasPrice:c,gasLimit:u,to:d,value:l,data:f,accessList:null!=h?h:[],v:p!==undefined?new s.BN(p):undefined,r:m,s:g},t)},r.prototype.getDataFee=function(){var t=e.prototype.getDataFee.call(this);return t.iaddn(d.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),t},r.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},r.prototype.raw=function(){return[s.bnToUnpaddedBuffer(this.chainId),s.bnToUnpaddedBuffer(this.nonce),s.bnToUnpaddedBuffer(this.gasPrice),s.bnToUnpaddedBuffer(this.gasLimit),this.to!==undefined?this.to.buf:t.from([]),s.bnToUnpaddedBuffer(this.value),this.data,this.accessList,this.v!==undefined?s.bnToUnpaddedBuffer(this.v):t.from([]),this.r!==undefined?s.bnToUnpaddedBuffer(this.r):t.from([]),this.s!==undefined?s.bnToUnpaddedBuffer(this.s):t.from([])]},r.prototype.serialize=function(){var e=this.raw();return t.concat([l,s.rlp.encode(e)])},r.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var r=this.raw().slice(0,8),n=t.concat([l,s.rlp.encode(r)]);return e?s.keccak256(n):n},r.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return s.keccak256(this.serialize())},r.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},r.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.yParity,o=r.r,i=r.s;try{return s.ecrecover(t,n.addn(27),s.bnToUnpaddedBuffer(o),s.bnToUnpaddedBuffer(i))}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var o={common:this.common};return r.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(t),s:new s.BN(n)},o)},r.prototype.toJSON=function(){var e=d.AccessLists.getAccessListJSON(this.accessList);return{chainId:s.bnToHex(this.chainId),nonce:s.bnToHex(this.nonce),gasPrice:s.bnToHex(this.gasPrice),gasLimit:s.bnToHex(this.gasLimit),to:this.to!==undefined?this.to.toString():undefined,value:s.bnToHex(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:this.v!==undefined?s.bnToHex(this.v):undefined,r:this.r!==undefined?s.bnToHex(this.r):undefined,s:this.s!==undefined?s.bnToHex(this.s):undefined}},r}(c.BaseTransaction);r.default=f}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/dist.browser/eip2930Transaction.js"}],[2566,{"./eip1559Transaction":2564,"./eip2930Transaction":2565,"./legacyTransaction":2567,"./transactionFactory":2568,"./types":2569},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0});var i=e("./legacyTransaction");Object.defineProperty(r,"Transaction",{enumerable:!0,get:function(){return i.default}});var a=e("./eip2930Transaction");Object.defineProperty(r,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return a.default}});var s=e("./transactionFactory");Object.defineProperty(r,"TransactionFactory",{enumerable:!0,get:function(){return s.default}});var c=e("./eip1559Transaction");Object.defineProperty(r,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return c.default}}),o(e("./types"),r)}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/dist.browser/index.js"}],[2567,{"./baseTransaction":2563,"./types":2569,buffer:1943,"ethereumjs-util":2231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(r,"__esModule",{value:!0});var s=e("ethereumjs-util"),c=e("./types"),u=e("./baseTransaction"),d=function(e){function r(t,r){var n;void 0===r&&(r={});var o=e.call(this,i(i({},t),{type:0}))||this;if(o.common=o._validateTxV(o.v,r.common),o.gasPrice=new s.BN(s.toBuffer(""===t.gasPrice?"0x":t.gasPrice)),o._validateCannotExceedMaxInteger({gasPrice:o.gasPrice}),o.common.gteHardfork("spuriousDragon"))if(o.isSigned()){var a=o.v,u=o.common.chainIdBN().muln(2);(a.eq(u.addn(35))||a.eq(u.addn(36)))&&o.activeCapabilities.push(c.Capability.EIP155ReplayProtection)}else o.activeCapabilities.push(c.Capability.EIP155ReplayProtection);return(null===(n=null==r?void 0:r.freeze)||void 0===n||n)&&Object.freeze(o),o}return o(r,e),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){void 0===t&&(t={});var r=s.rlp.decode(e);if(!Array.isArray(r))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(r,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),6!==e.length&&9!==e.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");var n=a(e,9);return new r({nonce:n[0],gasPrice:n[1],gasLimit:n[2],to:n[3],value:n[4],data:n[5],v:n[6],r:n[7],s:n[8]},t)},r.prototype.raw=function(){return[s.bnToUnpaddedBuffer(this.nonce),s.bnToUnpaddedBuffer(this.gasPrice),s.bnToUnpaddedBuffer(this.gasLimit),this.to!==undefined?this.to.buf:t.from([]),s.bnToUnpaddedBuffer(this.value),this.data,this.v!==undefined?s.bnToUnpaddedBuffer(this.v):t.from([]),this.r!==undefined?s.bnToUnpaddedBuffer(this.r):t.from([]),this.s!==undefined?s.bnToUnpaddedBuffer(this.s):t.from([])]},r.prototype.serialize=function(){return s.rlp.encode(this.raw())},r.prototype._getMessageToSign=function(){var e=[s.bnToUnpaddedBuffer(this.nonce),s.bnToUnpaddedBuffer(this.gasPrice),s.bnToUnpaddedBuffer(this.gasLimit),this.to!==undefined?this.to.buf:t.from([]),s.bnToUnpaddedBuffer(this.value),this.data];return this.supports(c.Capability.EIP155ReplayProtection)&&(e.push(s.toBuffer(this.common.chainIdBN())),e.push(s.unpadBuffer(s.toBuffer(0))),e.push(s.unpadBuffer(s.toBuffer(0)))),e},r.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?s.rlphash(t):t},r.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},r.prototype.hash=function(){return s.rlphash(this.raw())},r.prototype.getMessageToVerifySignature=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this._getMessageToSign();return s.rlphash(e)},r.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this,n=r.v,o=r.r,i=r.s;try{return s.ecrecover(t,n,s.bnToUnpaddedBuffer(o),s.bnToUnpaddedBuffer(i),this.supports(c.Capability.EIP155ReplayProtection)?this.common.chainIdBN():undefined)}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var o=new s.BN(e);this.supports(c.Capability.EIP155ReplayProtection)&&o.iadd(this.common.chainIdBN().muln(2).addn(8));var i={common:this.common};return r.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:o,r:new s.BN(t),s:new s.BN(n)},i)},r.prototype.toJSON=function(){return{nonce:s.bnToHex(this.nonce),gasPrice:s.bnToHex(this.gasPrice),gasLimit:s.bnToHex(this.gasLimit),to:this.to!==undefined?this.to.toString():undefined,value:s.bnToHex(this.value),data:"0x"+this.data.toString("hex"),v:this.v!==undefined?s.bnToHex(this.v):undefined,r:this.r!==undefined?s.bnToHex(this.r):undefined,s:this.s!==undefined?s.bnToHex(this.s):undefined}},r.prototype._validateTxV=function(e,t){var r;if(e!==undefined&&!e.eqn(0)&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2);if(!(e.eq(n.addn(35))||e.eq(n.addn(36))))throw new Error("Incompatible EIP155-based V "+e.toString()+" and chain id "+t.chainIdBN().toString()+". See the Common parameter of the Transaction constructor to set the chain id.")}else{var o=void 0;o=e.subn(35).isEven()?35:36,r=e.subn(o).divn(2)}return this._getCommon(t,r)},r.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},r.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this.common.gteHardfork("spuriousDragon"),t=this.v,r=this.common.chainIdBN().muln(2);return(t.eq(r.addn(35))||t.eq(r.addn(36)))&&e},r}(u.BaseTransaction);r.default=d}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/dist.browser/legacyTransaction.js"}],[2568,{".":2566,"../../../../../is-buffer/index.js":2697,"ethereumjs-util":2231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0});var n=e("ethereumjs-util"),o=e("."),i=function(){function e(){}return e.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&e.type!==undefined){var r=new n.BN(n.toBuffer(e.type)).toNumber();if(0===r)return o.Transaction.fromTxData(e,t);if(1===r)return o.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return o.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type "+r+" not supported")}return o.Transaction.fromTxData(e,t)},e.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID "+e[0]+" unknown")}return 1559===r?o.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):o.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return o.Transaction.fromSerializedTx(e,t)},e.fromBlockBodyData=function(e,r){if(void 0===r&&(r={}),t.isBuffer(e))return this.fromSerializedData(e,r);if(Array.isArray(e))return o.Transaction.fromValuesArray(e,r);throw new Error("Cannot decode transaction: unknown type input")},e.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return o.Transaction;switch(e){case 1:return o.AccessListEIP2930Transaction;case 2:return o.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID "+e+" unknown")}},e}();r.default=i}).call(this)}).call(this,{isBuffer:e("../../../../../is-buffer/index.js")})}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/dist.browser/transactionFactory.js"}],[2569,{"ethereumjs-util":2231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.N_DIV_2=r.isAccessList=r.isAccessListBuffer=r.Capability=void 0;var n=e("ethereumjs-util");function o(e){if(0===e.length)return!0;var t=e[0];return!!Array.isArray(t)}!function(e){e[e.EIP155ReplayProtection=155]="EIP155ReplayProtection",e[e.EIP1559FeeMarket=1559]="EIP1559FeeMarket",e[e.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",e[e.EIP2930AccessLists=2930]="EIP2930AccessLists"}(r.Capability||(r.Capability={})),r.isAccessListBuffer=o,r.isAccessList=function(e){return!o(e)},r.N_DIV_2=new n.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/dist.browser/types.js"}],[2570,{"./types":2569,"ethereumjs-util":2231},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.AccessLists=void 0;var n=e("ethereumjs-util"),o=e("./types"),i=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&o.isAccessList(e)){t=e;for(var i=[],a=0;a<e.length;a++){for(var s=e[a],c=n.toBuffer(s.address),u=[],d=0;d<s.storageKeys.length;d++)u.push(n.toBuffer(s.storageKeys[d]));i.push([c,u])}r=i}else{r=null!=e?e:[];var l=[];for(a=0;a<r.length;a++){var f=r[a],h=n.bufferToHex(f[0]),p=[];for(s=0;s<f[1].length;s++)p.push(n.bufferToHex(f[1][s]));var m={address:h,storageKeys:p};l.push(m)}t=l}return{AccessListJSON:t,accessList:r}},e.verifyAccessList=function(e){for(var t=0;t<e.length;t++){var r=e[t],n=r[0],o=r[1];if(r[2]!==undefined)throw new Error("Access list item cannot have 3 elements. It can only have an address, and an array of storage slots.");if(20!=n.length)throw new Error("Invalid EIP-2930 transaction: address length should be 20 bytes");for(var i=0;i<o.length;i++)if(32!=o[i].length)throw new Error("Invalid EIP-2930 transaction: storage slot length should be 32 bytes")}},e.getAccessListJSON=function(e){for(var t=[],r=0;r<e.length;r++){for(var o=e[r],i={address:"0x"+n.setLengthLeft(o[0],20).toString("hex"),storageKeys:[]},a=o[1],s=0;s<a.length;s++){var c=a[s];i.storageKeys.push("0x"+n.setLengthLeft(c,32).toString("hex"))}t.push(i)}return t},e.getDataFeeEIP2930=function(e,t){for(var r=t.param("gasPrices","accessListStorageKeyCost"),n=t.param("gasPrices","accessListAddressCost"),o=0,i=0;i<e.length;i++){o+=e[i][1].length}return e.length*n+o*r},e}();r.AccessLists=i}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/dist.browser/util.js"}],[2571,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"goerli",chainId:5,networkId:5,defaultHardfork:"istanbul",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"Cross-client PoA test network",url:"https://github.com/goerli/testnet",genesis:{hash:"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a",timestamp:"0x5c51a607",gasLimit:10485760,difficulty:1,nonce:"0x0000000000000000",extraData:"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",stateRoot:"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},hardforks:[{name:"chainstart",block:0,forkHash:"0xa3f5ab08"},{name:"homestead",block:0,forkHash:"0xa3f5ab08"},{name:"tangerineWhistle",block:0,forkHash:"0xa3f5ab08"},{name:"spuriousDragon",block:0,forkHash:"0xa3f5ab08"},{name:"byzantium",block:0,forkHash:"0xa3f5ab08"},{name:"constantinople",block:0,forkHash:"0xa3f5ab08"},{name:"petersburg",block:0,forkHash:"0xa3f5ab08"},{name:"istanbul",block:1561651,forkHash:"0xc25efa5c"},{name:"berlin",block:4460644,forkHash:"0x757a1c47"},{name:"london",block:5062605,forkHash:"0xb8c6299d"},{name:"merge",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[{ip:"51.141.78.53",port:30303,id:"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a",location:"",comment:"Upstream bootnode 1"},{ip:"13.93.54.137",port:30303,id:"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b",location:"",comment:"Upstream bootnode 2"},{ip:"94.237.54.114",port:30313,id:"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291",location:"",comment:"Upstream bootnode 3"},{ip:"18.218.250.66",port:30313,id:"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949",location:"",comment:"Upstream bootnode 4"},{ip:"3.11.147.67",port:30303,id:"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91",location:"",comment:"Ethereum Foundation bootnode"},{ip:"51.15.116.226",port:30303,id:"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd",location:"",comment:"Goerli Initiative bootnode"},{ip:"51.15.119.157",port:30303,id:"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33",location:"",comment:"Goerli Initiative bootnode"},{ip:"51.15.119.157",port:40303,id:"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd",location:"",comment:"Goerli Initiative bootnode"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/chains/goerli.json"}],[2572,{"./goerli.json":2571,"./kovan.json":2573,"./mainnet.json":2574,"./rinkeby.json":2575,"./ropsten.json":2576,"./sepolia.json":2577},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.chains=r._getInitializedChains=void 0;var i=o(e("./mainnet.json")),a=o(e("./ropsten.json")),s=o(e("./rinkeby.json")),c=o(e("./kovan.json")),u=o(e("./goerli.json")),d=o(e("./sepolia.json"));function l(e){var t,r,o={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli",11155111:"sepolia"},l={mainnet:i.default,ropsten:a.default,rinkeby:s.default,kovan:c.default,goerli:u.default,sepolia:d.default};if(e)try{for(var f=n(e),h=f.next();!h.done;h=f.next()){var p=h.value,m=p.name;o[p.chainId.toString()]=m,l[m]=p}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return l.names=o,l}r._getInitializedChains=l,r.chains=l()}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/chains/index.js"}],[2573,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"kovan",chainId:42,networkId:42,defaultHardfork:"istanbul",consensus:{type:"poa",algorithm:"aura",aura:{}},comment:"Parity PoA test network",url:"https://kovan-testnet.github.io/website/",genesis:{hash:"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9",timestamp:null,gasLimit:6e6,difficulty:131072,nonce:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",extraData:"0x",stateRoot:"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},hardforks:[{name:"chainstart",block:0,forkHash:"0x010ffe56"},{name:"homestead",block:0,forkHash:"0x010ffe56"},{name:"tangerineWhistle",block:0,forkHash:"0x010ffe56"},{name:"spuriousDragon",block:0,forkHash:"0x010ffe56"},{name:"byzantium",block:5067e3,forkHash:"0x7f83c620"},{name:"constantinople",block:92e5,forkHash:"0xa94e3dc4"},{name:"petersburg",block:10255201,forkHash:"0x186874aa"},{name:"istanbul",block:14111141,forkHash:"0x7f6599a6"},{name:"berlin",block:24770900,forkHash:"0x1a0f10d9"},{name:"london",block:26741100,forkHash:"0x1ed20b71"},{name:"merge",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[{ip:"116.203.116.241",port:30303,id:"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45",location:"",comment:"1"},{ip:"3.217.96.11",port:30303,id:"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0",location:"",comment:"2"},{ip:"108.61.170.124",port:30303,id:"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c",location:"",comment:"3"},{ip:"157.230.31.163",port:30303,id:"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0",location:"",comment:"4"}]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/chains/kovan.json"}],[2574,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"mainnet",chainId:1,networkId:1,defaultHardfork:"istanbul",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"The Ethereum main chain",url:"https://ethstats.net/",genesis:{hash:"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",timestamp:null,gasLimit:5e3,difficulty:17179869184,nonce:"0x0000000000000042",extraData:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",stateRoot:"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfc64ec04"},{name:"homestead",block:115e4,forkHash:"0x97c2c34c"},{name:"dao",block:192e4,forkHash:"0x91d1f948"},{name:"tangerineWhistle",block:2463e3,forkHash:"0x7a64da13"},{name:"spuriousDragon",block:2675e3,forkHash:"0x3edd5b10"},{name:"byzantium",block:437e4,forkHash:"0xa00bc324"},{name:"constantinople",block:728e4,forkHash:"0x668db0af"},{name:"petersburg",block:728e4,forkHash:"0x668db0af"},{name:"istanbul",block:9069e3,forkHash:"0x879d6e30"},{name:"muirGlacier",block:92e5,forkHash:"0xe029e991"},{name:"berlin",block:12244e3,forkHash:"0x0eb440f6"},{name:"london",block:12965e3,forkHash:"0xb715077d"},{name:"arrowGlacier",block:13773e3,forkHash:"0x20c327fc"},{name:"grayGlacier",block:1505e4,forkHash:"0xf0afd0e3"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"merge",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[{ip:"18.138.108.67",port:30303,id:"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666",location:"ap-southeast-1-001",comment:"bootnode-aws-ap-southeast-1-001"},{ip:"3.209.45.79",port:30303,id:"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de",location:"us-east-1-001",comment:"bootnode-aws-us-east-1-001"},{ip:"34.255.23.113",port:30303,id:"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758",location:"eu-west-1-001",comment:"bootnode-aws-eu-west-1-001"},{ip:"35.158.244.151",port:30303,id:"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8",location:"eu-central-1-001",comment:"bootnode-aws-eu-central-1-001"},{ip:"52.187.207.27",port:30303,id:"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a",location:"australiaeast-001",comment:"bootnode-azure-australiaeast-001"},{ip:"191.234.162.198",port:30303,id:"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1",location:"brazilsouth-001",comment:"bootnode-azure-brazilsouth-001"},{ip:"52.231.165.108",port:30303,id:"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8",location:"koreasouth-001",comment:"bootnode-azure-koreasouth-001"},{ip:"104.42.217.25",port:30303,id:"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f",location:"westus-001",comment:"bootnode-azure-westus-001"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/chains/mainnet.json"}],[2575,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"rinkeby",chainId:4,networkId:4,defaultHardfork:"istanbul",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"PoA test network",url:"https://www.rinkeby.io",genesis:{hash:"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177",timestamp:"0x58ee40ba",gasLimit:47e5,difficulty:1,nonce:"0x0000000000000000",extraData:"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",stateRoot:"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},hardforks:[{name:"chainstart",block:0,forkHash:"0x3b8e0691"},{name:"homestead",block:1,forkHash:"0x60949295"},{name:"tangerineWhistle",block:2,forkHash:"0x8bde40dd"},{name:"spuriousDragon",block:3,forkHash:"0xcb3a64bb"},{name:"byzantium",block:1035301,forkHash:"0x8d748b57"},{name:"constantinople",block:3660663,forkHash:"0xe49cab14"},{name:"petersburg",block:4321234,forkHash:"0xafec6b27"},{name:"istanbul",block:5435345,forkHash:"0xcbdb8838"},{name:"berlin",block:8290928,forkHash:"0x6910c8bd"},{name:"london",block:8897988,forkHash:"0x8e29f2f3"},{name:"merge",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[{ip:"52.169.42.101",port:30303,id:"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf",location:"",comment:"IE"},{ip:"52.3.158.184",port:30303,id:"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8",location:"",comment:"INFURA"},{ip:"159.89.28.211",port:30303,id:"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6",location:"",comment:"AKASHA"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/chains/rinkeby.json"}],[2576,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"ropsten",chainId:3,networkId:3,defaultHardfork:"istanbul",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"PoW test network",url:"https://github.com/ethereum/ropsten",genesis:{hash:"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d",timestamp:null,gasLimit:16777216,difficulty:1048576,nonce:"0x0000000000000042",extraData:"0x3535353535353535353535353535353535353535353535353535353535353535",stateRoot:"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},hardforks:[{name:"chainstart",block:0,forkHash:"0x30c7ddbc"},{name:"homestead",block:0,forkHash:"0x30c7ddbc"},{name:"tangerineWhistle",block:0,forkHash:"0x30c7ddbc"},{name:"spuriousDragon",block:10,forkHash:"0x63760190"},{name:"byzantium",block:17e5,forkHash:"0x3ea159c7"},{name:"constantinople",block:423e4,forkHash:"0x97b544f3"},{name:"petersburg",block:4939394,forkHash:"0xd6e2149b"},{name:"istanbul",block:6485846,forkHash:"0x4bc66396"},{name:"muirGlacier",block:7117117,forkHash:"0x6727ef90"},{name:"berlin",block:9812189,forkHash:"0xa157d377"},{name:"london",block:10499401,forkHash:"0x7119b6b3"},{name:"merge",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[{ip:"52.176.7.10",port:30303,id:"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606",location:"",comment:"US-Azure geth"},{ip:"52.176.100.77",port:30303,id:"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c",location:"",comment:"US-Azure parity"},{ip:"52.232.243.152",port:30303,id:"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f",location:"",comment:"Parity"},{ip:"192.81.208.223",port:30303,id:"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09",location:"",comment:"@gpip"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/chains/ropsten.json"}],[2577,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"sepolia",chainId:11155111,networkId:11155111,defaultHardfork:"istanbul",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"PoW test network to replace Ropsten",url:"https://github.com/ethereum/go-ethereum/pull/23730",genesis:{hash:"0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9",timestamp:"0x6159af19",gasLimit:3e7,difficulty:131072,nonce:"0x0000000000000000",extraData:"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521",stateRoot:"0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfe3366e7"},{name:"homestead",block:0,forkHash:"0xfe3366e7"},{name:"tangerineWhistle",block:0,forkHash:"0xfe3366e7"},{name:"spuriousDragon",block:0,forkHash:"0xfe3366e7"},{name:"byzantium",block:0,forkHash:"0xfe3366e7"},{name:"constantinople",block:0,forkHash:"0xfe3366e7"},{name:"petersburg",block:0,forkHash:"0xfe3366e7"},{name:"istanbul",block:0,forkHash:"0xfe3366e7"},{name:"muirGlacier",block:0,forkHash:"0xfe3366e7"},{name:"berlin",block:0,forkHash:"0xfe3366e7"},{name:"london",block:0,forkHash:"0xfe3366e7"},{name:"merge",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[{ip:"18.168.182.86",port:30303,id:"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066",location:"",comment:"geth"},{ip:"52.14.151.177",port:30303,id:"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7",location:"",comment:"besu"}],dnsNetworks:[]}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/chains/sepolia.json"}],[2578,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-1153",number:1153,comment:"Transient Storage",url:"https://eips.ethereum.org/EIPS/eip-1153",status:"Review",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{tstore:{v:100,d:"Base fee of the TSTORE opcode"},tload:{v:100,d:"Base fee of the TLOAD opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/1153.json"}],[2579,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-1559",number:1559,comment:"Fee market change for ETH 1.0 chain",url:"https://eips.ethereum.org/EIPS/eip-1559",status:"Final",minimumHardfork:"berlin",requiredEIPs:[2930],gasConfig:{baseFeeMaxChangeDenominator:{v:8,d:"Maximum base fee change denominator"},elasticityMultiplier:{v:2,d:"Maximum block gas target elasticity"},initialBaseFee:{v:1e9,d:"Initial base fee on first EIP1559 block"}},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/1559.json"}],[2580,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2315",number:2315,comment:"Simple subroutines for the EVM",url:"https://eips.ethereum.org/EIPS/eip-2315",status:"Draft",minimumHardfork:"istanbul",gasConfig:{},gasPrices:{beginsub:{v:2,d:"Base fee of the BEGINSUB opcode"},returnsub:{v:5,d:"Base fee of the RETURNSUB opcode"},jumpsub:{v:10,d:"Base fee of the JUMPSUB opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/2315.json"}],[2581,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2537",number:2537,comment:"BLS12-381 precompiles",url:"https://eips.ethereum.org/EIPS/eip-2537",status:"Draft",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{Bls12381G1AddGas:{v:600,d:"Gas cost of a single BLS12-381 G1 addition precompile-call"},Bls12381G1MulGas:{v:12e3,d:"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},Bls12381G2AddGas:{v:4500,d:"Gas cost of a single BLS12-381 G2 addition precompile-call"},Bls12381G2MulGas:{v:55e3,d:"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},Bls12381PairingBaseGas:{v:115e3,d:"Base gas cost of BLS12-381 pairing check"},Bls12381PairingPerPairGas:{v:23e3,d:"Per-pair gas cost of BLS12-381 pairing check"},Bls12381MapG1Gas:{v:5500,d:"Gas cost of BLS12-381 map field element to G1"},Bls12381MapG2Gas:{v:11e4,d:"Gas cost of BLS12-381 map field element to G2"},Bls12381MultiExpGasDiscount:{v:[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],d:"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/2537.json"}],[2582,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2565",number:2565,comment:"ModExp gas cost",url:"https://eips.ethereum.org/EIPS/eip-2565",status:"Final",minimumHardfork:"byzantium",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:3,d:"Gquaddivisor from modexp precompile for gas calculation"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/2565.json"}],[2583,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2718",comment:"Typed Transaction Envelope",url:"https://eips.ethereum.org/EIPS/eip-2718",status:"Final",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/2718.json"}],[2584,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2929",comment:"Gas cost increases for state access opcodes",url:"https://eips.ethereum.org/EIPS/eip-2929",status:"Final",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{coldsload:{v:2100,d:"Gas cost of the first read of storage from a given location (per transaction)"},coldaccountaccess:{v:2600,d:"Gas cost of the first read of a given address (per transaction)"},warmstorageread:{v:100,d:"Gas cost of reading storage locations which have already loaded 'cold'"},sstoreCleanGasEIP2200:{v:2900,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreNoopGasEIP2200:{v:100,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:100,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitRefundEIP2200:{v:19900,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanRefundEIP2200:{v:4900,d:"Once per SSTORE operation for resetting to the original non-zero value"},call:{v:0,d:"Base fee of the CALL opcode"},callcode:{v:0,d:"Base fee of the CALLCODE opcode"},delegatecall:{v:0,d:"Base fee of the DELEGATECALL opcode"},staticcall:{v:0,d:"Base fee of the STATICCALL opcode"},balance:{v:0,d:"Base fee of the BALANCE opcode"},extcodesize:{v:0,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:0,d:"Base fee of the EXTCODECOPY opcode"},extcodehash:{v:0,d:"Base fee of the EXTCODEHASH opcode"},sload:{v:0,d:"Base fee of the SLOAD opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/2929.json"}],[2585,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-2930",comment:"Optional access lists",url:"https://eips.ethereum.org/EIPS/eip-2930",status:"Final",minimumHardfork:"istanbul",requiredEIPs:[2718,2929],gasConfig:{},gasPrices:{accessListStorageKeyCost:{v:1900,d:"Gas cost per storage key in an Access List transaction"},accessListAddressCost:{v:2400,d:"Gas cost per storage key in an Access List transaction"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/2930.json"}],[2586,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3198",number:3198,comment:"BASEFEE opcode",url:"https://eips.ethereum.org/EIPS/eip-3198",status:"Final",minimumHardfork:"london",gasConfig:{},gasPrices:{basefee:{v:2,d:"Gas cost of the BASEFEE opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3198.json"}],[2587,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3529",comment:"Reduction in refunds",url:"https://eips.ethereum.org/EIPS/eip-3529",status:"Final",minimumHardfork:"berlin",requiredEIPs:[2929],gasConfig:{maxRefundQuotient:{v:5,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{selfdestructRefund:{v:0,d:"Refunded following a selfdestruct operation"},sstoreClearRefundEIP2200:{v:4800,d:"Once per SSTORE operation for clearing an originally existing storage slot"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3529.json"}],[2588,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3540",number:3540,comment:"EVM Object Format (EOF) v1",url:"https://eips.ethereum.org/EIPS/eip-3540",status:"Review",minimumHardfork:"london",requiredEIPs:[3541],gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3540.json"}],[2589,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3541",comment:"Reject new contracts starting with the 0xEF byte",url:"https://eips.ethereum.org/EIPS/eip-3541",status:"Final",minimumHardfork:"berlin",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3541.json"}],[2590,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3554",comment:"Reduction in refunds",url:"Difficulty Bomb Delay to December 1st 2021",status:"Final",minimumHardfork:"muirGlacier",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:95e5,d:"the amount of blocks to delay the difficulty bomb with"}}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3554.json"}],[2591,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3607",number:3607,comment:"Reject transactions from senders with deployed code",url:"https://eips.ethereum.org/EIPS/eip-3607",status:"Final",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3607.json"}],[2592,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3651",number:3198,comment:"Warm COINBASE",url:"https://eips.ethereum.org/EIPS/eip-3651",status:"Review",minimumHardfork:"london",requiredEIPs:[2929],gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3651.json"}],[2593,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3670",number:3670,comment:"EOF - Code Validation",url:"https://eips.ethereum.org/EIPS/eip-3670",status:"Review",minimumHardfork:"london",requiredEIPs:[3540],gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3670.json"}],[2594,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3675",number:3675,comment:"Upgrade consensus to Proof-of-Stake",url:"https://eips.ethereum.org/EIPS/eip-3675",status:"Review",minimumHardfork:"london",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3675.json"}],[2595,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3855",number:3855,comment:"PUSH0 instruction",url:"https://eips.ethereum.org/EIPS/eip-3855",status:"Review",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{push0:{v:2,d:"Base fee of the PUSH0 opcode"}},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3855.json"}],[2596,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-3860",number:3860,comment:"Limit and meter initcode",url:"https://eips.ethereum.org/EIPS/eip-3860",status:"Review",minimumHardfork:"spuriousDragon",requiredEIPs:[],gasConfig:{},gasPrices:{initCodeWordCost:{v:2,d:"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},vm:{maxInitCodeSize:{v:49152,d:"Maximum length of initialization code when creating a contract"}},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/3860.json"}],[2597,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-4345",number:4345,comment:"Difficulty Bomb Delay to June 2022",url:"https://eips.ethereum.org/EIPS/eip-4345",status:"Final",minimumHardfork:"london",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:107e5,d:"the amount of blocks to delay the difficulty bomb with"}}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/4345.json"}],[2598,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-4399",number:4399,comment:"Supplant DIFFICULTY opcode with PREVRANDAO",url:"https://eips.ethereum.org/EIPS/eip-4399",status:"Review",minimumHardfork:"london",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/4399.json"}],[2599,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={name:"EIP-5133",number:5133,comment:"Delaying Difficulty Bomb to mid-September 2022",url:"https://eips.ethereum.org/EIPS/eip-5133",status:"Draft",minimumHardfork:"grayGlacier",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:114e5,d:"the amount of blocks to delay the difficulty bomb with"}}}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/5133.json"}],[26,{"../../../shared/constants/hardware-wallets":3405,"../../../shared/constants/network":3409,"../../../shared/constants/preferences":3411,"@metamask/obs-store":1298,"eth-sig-util":2172},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/obs-store"),o=e("eth-sig-util"),i=e("../../../shared/constants/network"),a=e("../../../shared/constants/hardware-wallets"),s=e("../../../shared/constants/preferences");r.default=class{constructor(e={}){const t={useBlockie:!1,useNonceField:!1,usePhishDetect:!0,dismissSeedBackUpReminder:!1,disabledRpcMethodPreferences:{eth_sign:!1},useMultiAccountBalanceChecker:!0,useTokenDetection:!1,useNftDetection:!1,useCurrencyRateCheck:!0,openSeaEnabled:!1,advancedGasFee:null,featureFlags:{showIncomingTransactions:!0},knownMethodData:{},currentLocale:e.initLangCode,identities:{},lostIdentities:{},forgottenPassword:!1,preferences:{autoLockTimeLimit:undefined,showFiatInTestnets:!1,showTestNetworks:!1,useNativeCurrencyAsPrimaryCurrency:!0,hideZeroBalanceTokens:!1},ipfsGateway:i.IPFS_DEFAULT_GATEWAY_URL,infuraBlocked:null,ledgerTransportType:window.navigator.hid?a.LedgerTransportTypes.webhid:a.LedgerTransportTypes.u2f,transactionSecurityCheckEnabled:!1,theme:s.ThemeType.os,...e.initState};this._onInfuraIsBlocked=e.onInfuraIsBlocked,this._onInfuraIsUnblocked=e.onInfuraIsUnblocked,this.store=new n.ObservableStore(t),this.store.setMaxListeners(13),this.tokenListController=e.tokenListController,this._subscribeToInfuraAvailability(),global.setPreference=(e,t)=>this.setFeatureFlag(e,t)}setPasswordForgotten(e){this.store.updateState({forgottenPassword:e})}setUseBlockie(e){this.store.updateState({useBlockie:e})}setUseNonceField(e){this.store.updateState({useNonceField:e})}setUsePhishDetect(e){this.store.updateState({usePhishDetect:e})}setUseMultiAccountBalanceChecker(e){this.store.updateState({useMultiAccountBalanceChecker:e})}setUseTokenDetection(e){this.store.updateState({useTokenDetection:e}),this.tokenListController.updatePreventPollingOnNetworkRestart(!e),e?this.tokenListController.start():(this.tokenListController.clearingTokenListData(),this.tokenListController.stop())}setUseNftDetection(e){this.store.updateState({useNftDetection:e})}setUseCurrencyRateCheck(e){this.store.updateState({useCurrencyRateCheck:e})}setOpenSeaEnabled(e){this.store.updateState({openSeaEnabled:e})}setAdvancedGasFee(e){this.store.updateState({advancedGasFee:e})}setTheme(e){this.store.updateState({theme:e})}setTransactionSecurityCheckEnabled(e){this.store.updateState({transactionSecurityCheckEnabled:e})}addKnownMethodData(e,t){const{knownMethodData:r}=this.store.getState();r[e]=t,this.store.updateState({knownMethodData:r})}setCurrentLocale(e){const t=["ar","dv","fa","he","ku"].includes(e)?"rtl":"auto";return this.store.updateState({currentLocale:e,textDirection:t}),t}setAddresses(e){const t=this.store.getState().identities,r=e.reduce(((e,r,n)=>{const o=t[r]||{};return e[r]={name:`Account ${n+1}`,address:r,...o},e}),{});this.store.updateState({identities:r})}removeAddress(e){const{identities:t}=this.store.getState();if(!t[e])throw new Error(`${e} can't be deleted cause it was not found`);if(delete t[e],this.store.updateState({identities:t}),e===this.getSelectedAddress()){const[e]=Object.keys(t);this.setSelectedAddress(e)}return e}addAddresses(e){const{identities:t}=this.store.getState();e.forEach((e=>{if(t[e])return;const r=Object.keys(t).length;t[e]={name:`Account ${r+1}`,address:e}})),this.store.updateState({identities:t})}syncAddresses(e){if(!Array.isArray(e)||0===e.length)throw new Error("Expected non-empty array of addresses. Error #11201");const{identities:t,lostIdentities:r}=this.store.getState(),n={};Object.keys(t).forEach((r=>{e.includes(r)||(n[r]=t[r],delete t[r])})),Object.keys(n).length>0&&Object.keys(n).forEach((e=>{r[e]=n[e]})),this.store.updateState({identities:t,lostIdentities:r}),this.addAddresses(e);let o=this.getSelectedAddress();return e.includes(o)||([o]=e,this.setSelectedAddress(o)),o}setSelectedAddress(e){const t=(0,o.normalize)(e),{identities:r}=this.store.getState(),n=r[t];if(!n)throw new Error(`Identity for '${t} not found`);n.lastSelected=Date.now(),this.store.updateState({identities:r,selectedAddress:t})}getSelectedAddress(){return this.store.getState().selectedAddress}async setAccountLabel(e,t){if(!e)throw new Error(`setAccountLabel requires a valid address, got ${String(e)}`);const r=(0,o.normalize)(e),{identities:n}=this.store.getState();return n[r]=n[r]||{},n[r].name=t,this.store.updateState({identities:n}),t}async setFeatureFlag(e,t){const r={...this.store.getState().featureFlags,[e]:t};return this.store.updateState({featureFlags:r}),r}async setPreference(e,t){const r={...this.getPreferences(),[e]:t};return this.store.updateState({preferences:r}),r}getPreferences(){return this.store.getState().preferences}getIpfsGateway(){return this.store.getState().ipfsGateway}async setIpfsGateway(e){return this.store.updateState({ipfsGateway:e}),e}setLedgerTransportPreference(e){return this.store.updateState({ledgerTransportType:e}),e}getLedgerTransportPreference(){return this.store.getState().ledgerTransportType}async setDismissSeedBackUpReminder(e){await this.store.updateState({dismissSeedBackUpReminder:e})}async setDisabledRpcMethodPreference(e,t){const r={...this.store.getState().disabledRpcMethodPreferences,[e]:t};this.store.updateState({disabledRpcMethodPreferences:r})}getRpcMethodPreferences(){return this.store.getState().disabledRpcMethodPreferences}_subscribeToInfuraAvailability(){this._onInfuraIsBlocked((()=>{this._setInfuraBlocked(!0)})),this._onInfuraIsUnblocked((()=>{this._setInfuraBlocked(!1)}))}_setInfuraBlocked(e){const{infuraBlocked:t}=this.store.getState();t!==e&&this.store.updateState({infuraBlocked:e})}}}}},{package:"$root$",file:"app/scripts/controllers/preferences.js"}],[2600,{"./1153.json":2578,"./1559.json":2579,"./2315.json":2580,"./2537.json":2581,"./2565.json":2582,"./2718.json":2583,"./2929.json":2584,"./2930.json":2585,"./3198.json":2586,"./3529.json":2587,"./3540.json":2588,"./3541.json":2589,"./3554.json":2590,"./3607.json":2591,"./3651.json":2592,"./3670.json":2593,"./3675.json":2594,"./3855.json":2595,"./3860.json":2596,"./4345.json":2597,"./4399.json":2598,"./5133.json":2599},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.EIPs=void 0,r.EIPs={1153:e("./1153.json"),1559:e("./1559.json"),2315:e("./2315.json"),2537:e("./2537.json"),2565:e("./2565.json"),2718:e("./2718.json"),2929:e("./2929.json"),2930:e("./2930.json"),3198:e("./3198.json"),3529:e("./3529.json"),3540:e("./3540.json"),3541:e("./3541.json"),3554:e("./3554.json"),3607:e("./3607.json"),3651:e("./3651.json"),3670:e("./3670.json"),3675:e("./3675.json"),3855:e("./3855.json"),3860:e("./3860.json"),4345:e("./4345.json"),4399:e("./4399.json"),5133:e("./5133.json")}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/eips/index.js"}],[2601,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={"0x0000000000000000000000000000000000000000":"0x1","0x0000000000000000000000000000000000000001":"0x1","0x0000000000000000000000000000000000000002":"0x1","0x0000000000000000000000000000000000000003":"0x1","0x0000000000000000000000000000000000000004":"0x1","0x0000000000000000000000000000000000000005":"0x1","0x0000000000000000000000000000000000000006":"0x1","0x0000000000000000000000000000000000000007":"0x1","0x0000000000000000000000000000000000000008":"0x1","0x0000000000000000000000000000000000000009":"0x1","0x000000000000000000000000000000000000000a":"0x1","0x000000000000000000000000000000000000000b":"0x1","0x000000000000000000000000000000000000000c":"0x1","0x000000000000000000000000000000000000000d":"0x1","0x000000000000000000000000000000000000000e":"0x1","0x000000000000000000000000000000000000000f":"0x1","0x0000000000000000000000000000000000000010":"0x1","0x0000000000000000000000000000000000000011":"0x1","0x0000000000000000000000000000000000000012":"0x1","0x0000000000000000000000000000000000000013":"0x1","0x0000000000000000000000000000000000000014":"0x1","0x0000000000000000000000000000000000000015":"0x1","0x0000000000000000000000000000000000000016":"0x1","0x0000000000000000000000000000000000000017":"0x1","0x0000000000000000000000000000000000000018":"0x1","0x0000000000000000000000000000000000000019":"0x1","0x000000000000000000000000000000000000001a":"0x1","0x000000000000000000000000000000000000001b":"0x1","0x000000000000000000000000000000000000001c":"0x1","0x000000000000000000000000000000000000001d":"0x1","0x000000000000000000000000000000000000001e":"0x1","0x000000000000000000000000000000000000001f":"0x1","0x0000000000000000000000000000000000000020":"0x1","0x0000000000000000000000000000000000000021":"0x1","0x0000000000000000000000000000000000000022":"0x1","0x0000000000000000000000000000000000000023":"0x1","0x0000000000000000000000000000000000000024":"0x1","0x0000000000000000000000000000000000000025":"0x1","0x0000000000000000000000000000000000000026":"0x1","0x0000000000000000000000000000000000000027":"0x1","0x0000000000000000000000000000000000000028":"0x1","0x0000000000000000000000000000000000000029":"0x1","0x000000000000000000000000000000000000002a":"0x1","0x000000000000000000000000000000000000002b":"0x1","0x000000000000000000000000000000000000002c":"0x1","0x000000000000000000000000000000000000002d":"0x1","0x000000000000000000000000000000000000002e":"0x1","0x000000000000000000000000000000000000002f":"0x1","0x0000000000000000000000000000000000000030":"0x1","0x0000000000000000000000000000000000000031":"0x1","0x0000000000000000000000000000000000000032":"0x1","0x0000000000000000000000000000000000000033":"0x1","0x0000000000000000000000000000000000000034":"0x1","0x0000000000000000000000000000000000000035":"0x1","0x0000000000000000000000000000000000000036":"0x1","0x0000000000000000000000000000000000000037":"0x1","0x0000000000000000000000000000000000000038":"0x1","0x0000000000000000000000000000000000000039":"0x1","0x000000000000000000000000000000000000003a":"0x1","0x000000000000000000000000000000000000003b":"0x1","0x000000000000000000000000000000000000003c":"0x1","0x000000000000000000000000000000000000003d":"0x1","0x000000000000000000000000000000000000003e":"0x1","0x000000000000000000000000000000000000003f":"0x1","0x0000000000000000000000000000000000000040":"0x1","0x0000000000000000000000000000000000000041":"0x1","0x0000000000000000000000000000000000000042":"0x1","0x0000000000000000000000000000000000000043":"0x1","0x0000000000000000000000000000000000000044":"0x1","0x0000000000000000000000000000000000000045":"0x1","0x0000000000000000000000000000000000000046":"0x1","0x0000000000000000000000000000000000000047":"0x1","0x0000000000000000000000000000000000000048":"0x1","0x0000000000000000000000000000000000000049":"0x1","0x000000000000000000000000000000000000004a":"0x1","0x000000000000000000000000000000000000004b":"0x1","0x000000000000000000000000000000000000004c":"0x1","0x000000000000000000000000000000000000004d":"0x1","0x000000000000000000000000000000000000004e":"0x1","0x000000000000000000000000000000000000004f":"0x1","0x0000000000000000000000000000000000000050":"0x1","0x0000000000000000000000000000000000000051":"0x1","0x0000000000000000000000000000000000000052":"0x1","0x0000000000000000000000000000000000000053":"0x1","0x0000000000000000000000000000000000000054":"0x1","0x0000000000000000000000000000000000000055":"0x1","0x0000000000000000000000000000000000000056":"0x1","0x0000000000000000000000000000000000000057":"0x1","0x0000000000000000000000000000000000000058":"0x1","0x0000000000000000000000000000000000000059":"0x1","0x000000000000000000000000000000000000005a":"0x1","0x000000000000000000000000000000000000005b":"0x1","0x000000000000000000000000000000000000005c":"0x1","0x000000000000000000000000000000000000005d":"0x1","0x000000000000000000000000000000000000005e":"0x1","0x000000000000000000000000000000000000005f":"0x1","0x0000000000000000000000000000000000000060":"0x1","0x0000000000000000000000000000000000000061":"0x1","0x0000000000000000000000000000000000000062":"0x1","0x0000000000000000000000000000000000000063":"0x1","0x0000000000000000000000000000000000000064":"0x1","0x0000000000000000000000000000000000000065":"0x1","0x0000000000000000000000000000000000000066":"0x1","0x0000000000000000000000000000000000000067":"0x1","0x0000000000000000000000000000000000000068":"0x1","0x0000000000000000000000000000000000000069":"0x1","0x000000000000000000000000000000000000006a":"0x1","0x000000000000000000000000000000000000006b":"0x1","0x000000000000000000000000000000000000006c":"0x1","0x000000000000000000000000000000000000006d":"0x1","0x000000000000000000000000000000000000006e":"0x1","0x000000000000000000000000000000000000006f":"0x1","0x0000000000000000000000000000000000000070":"0x1","0x0000000000000000000000000000000000000071":"0x1","0x0000000000000000000000000000000000000072":"0x1","0x0000000000000000000000000000000000000073":"0x1","0x0000000000000000000000000000000000000074":"0x1","0x0000000000000000000000000000000000000075":"0x1","0x0000000000000000000000000000000000000076":"0x1","0x0000000000000000000000000000000000000077":"0x1","0x0000000000000000000000000000000000000078":"0x1","0x0000000000000000000000000000000000000079":"0x1","0x000000000000000000000000000000000000007a":"0x1","0x000000000000000000000000000000000000007b":"0x1","0x000000000000000000000000000000000000007c":"0x1","0x000000000000000000000000000000000000007d":"0x1","0x000000000000000000000000000000000000007e":"0x1","0x000000000000000000000000000000000000007f":"0x1","0x0000000000000000000000000000000000000080":"0x1","0x0000000000000000000000000000000000000081":"0x1","0x0000000000000000000000000000000000000082":"0x1","0x0000000000000000000000000000000000000083":"0x1","0x0000000000000000000000000000000000000084":"0x1","0x0000000000000000000000000000000000000085":"0x1","0x0000000000000000000000000000000000000086":"0x1","0x0000000000000000000000000000000000000087":"0x1","0x0000000000000000000000000000000000000088":"0x1","0x0000000000000000000000000000000000000089":"0x1","0x000000000000000000000000000000000000008a":"0x1","0x000000000000000000000000000000000000008b":"0x1","0x000000000000000000000000000000000000008c":"0x1","0x000000000000000000000000000000000000008d":"0x1","0x000000000000000000000000000000000000008e":"0x1","0x000000000000000000000000000000000000008f":"0x1","0x0000000000000000000000000000000000000090":"0x1","0x0000000000000000000000000000000000000091":"0x1","0x0000000000000000000000000000000000000092":"0x1","0x0000000000000000000000000000000000000093":"0x1","0x0000000000000000000000000000000000000094":"0x1","0x0000000000000000000000000000000000000095":"0x1","0x0000000000000000000000000000000000000096":"0x1","0x0000000000000000000000000000000000000097":"0x1","0x0000000000000000000000000000000000000098":"0x1","0x0000000000000000000000000000000000000099":"0x1","0x000000000000000000000000000000000000009a":"0x1","0x000000000000000000000000000000000000009b":"0x1","0x000000000000000000000000000000000000009c":"0x1","0x000000000000000000000000000000000000009d":"0x1","0x000000000000000000000000000000000000009e":"0x1","0x000000000000000000000000000000000000009f":"0x1","0x00000000000000000000000000000000000000a0":"0x1","0x00000000000000000000000000000000000000a1":"0x1","0x00000000000000000000000000000000000000a2":"0x1","0x00000000000000000000000000000000000000a3":"0x1","0x00000000000000000000000000000000000000a4":"0x1","0x00000000000000000000000000000000000000a5":"0x1","0x00000000000000000000000000000000000000a6":"0x1","0x00000000000000000000000000000000000000a7":"0x1","0x00000000000000000000000000000000000000a8":"0x1","0x00000000000000000000000000000000000000a9":"0x1","0x00000000000000000000000000000000000000aa":"0x1","0x00000000000000000000000000000000000000ab":"0x1","0x00000000000000000000000000000000000000ac":"0x1","0x00000000000000000000000000000000000000ad":"0x1","0x00000000000000000000000000000000000000ae":"0x1","0x00000000000000000000000000000000000000af":"0x1","0x00000000000000000000000000000000000000b0":"0x1","0x00000000000000000000000000000000000000b1":"0x1","0x00000000000000000000000000000000000000b2":"0x1","0x00000000000000000000000000000000000000b3":"0x1","0x00000000000000000000000000000000000000b4":"0x1","0x00000000000000000000000000000000000000b5":"0x1","0x00000000000000000000000000000000000000b6":"0x1","0x00000000000000000000000000000000000000b7":"0x1","0x00000000000000000000000000000000000000b8":"0x1","0x00000000000000000000000000000000000000b9":"0x1","0x00000000000000000000000000000000000000ba":"0x1","0x00000000000000000000000000000000000000bb":"0x1","0x00000000000000000000000000000000000000bc":"0x1","0x00000000000000000000000000000000000000bd":"0x1","0x00000000000000000000000000000000000000be":"0x1","0x00000000000000000000000000000000000000bf":"0x1","0x00000000000000000000000000000000000000c0":"0x1","0x00000000000000000000000000000000000000c1":"0x1","0x00000000000000000000000000000000000000c2":"0x1","0x00000000000000000000000000000000000000c3":"0x1","0x00000000000000000000000000000000000000c4":"0x1","0x00000000000000000000000000000000000000c5":"0x1","0x00000000000000000000000000000000000000c6":"0x1","0x00000000000000000000000000000000000000c7":"0x1","0x00000000000000000000000000000000000000c8":"0x1","0x00000000000000000000000000000000000000c9":"0x1","0x00000000000000000000000000000000000000ca":"0x1","0x00000000000000000000000000000000000000cb":"0x1","0x00000000000000000000000000000000000000cc":"0x1","0x00000000000000000000000000000000000000cd":"0x1","0x00000000000000000000000000000000000000ce":"0x1","0x00000000000000000000000000000000000000cf":"0x1","0x00000000000000000000000000000000000000d0":"0x1","0x00000000000000000000000000000000000000d1":"0x1","0x00000000000000000000000000000000000000d2":"0x1","0x00000000000000000000000000000000000000d3":"0x1","0x00000000000000000000000000000000000000d4":"0x1","0x00000000000000000000000000000000000000d5":"0x1","0x00000000000000000000000000000000000000d6":"0x1","0x00000000000000000000000000000000000000d7":"0x1","0x00000000000000000000000000000000000000d8":"0x1","0x00000000000000000000000000000000000000d9":"0x1","0x00000000000000000000000000000000000000da":"0x1","0x00000000000000000000000000000000000000db":"0x1","0x00000000000000000000000000000000000000dc":"0x1","0x00000000000000000000000000000000000000dd":"0x1","0x00000000000000000000000000000000000000de":"0x1","0x00000000000000000000000000000000000000df":"0x1","0x00000000000000000000000000000000000000e0":"0x1","0x00000000000000000000000000000000000000e1":"0x1","0x00000000000000000000000000000000000000e2":"0x1","0x00000000000000000000000000000000000000e3":"0x1","0x00000000000000000000000000000000000000e4":"0x1","0x00000000000000000000000000000000000000e5":"0x1","0x00000000000000000000000000000000000000e6":"0x1","0x00000000000000000000000000000000000000e7":"0x1","0x00000000000000000000000000000000000000e8":"0x1","0x00000000000000000000000000000000000000e9":"0x1","0x00000000000000000000000000000000000000ea":"0x1","0x00000000000000000000000000000000000000eb":"0x1","0x00000000000000000000000000000000000000ec":"0x1","0x00000000000000000000000000000000000000ed":"0x1","0x00000000000000000000000000000000000000ee":"0x1","0x00000000000000000000000000000000000000ef":"0x1","0x00000000000000000000000000000000000000f0":"0x1","0x00000000000000000000000000000000000000f1":"0x1","0x00000000000000000000000000000000000000f2":"0x1","0x00000000000000000000000000000000000000f3":"0x1","0x00000000000000000000000000000000000000f4":"0x1","0x00000000000000000000000000000000000000f5":"0x1","0x00000000000000000000000000000000000000f6":"0x1","0x00000000000000000000000000000000000000f7":"0x1","0x00000000000000000000000000000000000000f8":"0x1","0x00000000000000000000000000000000000000f9":"0x1","0x00000000000000000000000000000000000000fa":"0x1","0x00000000000000000000000000000000000000fb":"0x1","0x00000000000000000000000000000000000000fc":"0x1","0x00000000000000000000000000000000000000fd":"0x1","0x00000000000000000000000000000000000000fe":"0x1","0x00000000000000000000000000000000000000ff":"0x1","0x4c2ae482593505f0163cdefc073e81c63cda4107":"0x152d02c7e14af6800000","0xa8e8f14732658e4b51e8711931053a8a69baf2b1":"0x152d02c7e14af6800000","0xd9a5179f091d85051d3c982785efd1455cec8699":"0x84595161401484a000000","0xe0a2bd4258d2768837baa26a28fe71dc079f84c7":"0x4a47e3c12448f4ad000000"}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/genesisStates/goerli.json"}],[2602,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={"0x0000000000000000000000000000000000000001":"0x1","0x0000000000000000000000000000000000000002":"0x1","0x0000000000000000000000000000000000000003":"0x1","0x0000000000000000000000000000000000000004":"0x1","0x00521965e7bd230323c423d96c657db5b79d099f":"0x100000000000000000000000000000000000000000000000000"}}}},{package:"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common",file:"node_modules/gridplus-sdk/node_modules/@ethereumjs/tx/node_modules/@ethereumjs/common/dist.browser/genesisStates/kovan.json"}]],[],{});