UNPKG

@venly/web3-provider

Version:

Venly enabled Web3 Provider for the web

2 lines 754 kB
/*! For license information please see index.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VenlyProvider=t():e.VenlyProvider=t()}(this,()=>(()=>{var __webpack_modules__={41(e,t,r){"use strict";var n=r(592)(),o=r(453),i=n&&o("%Object.defineProperty%",!0),s=o("%SyntaxError%"),a=o("%TypeError%"),u=r(5795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(i)i(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},47(e,t,r){const n=r(8317);e.exports=(e,t,r)=>n(e,t,r)>0},73(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76(e){"use strict";e.exports=Function.prototype.call},89(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cacheTypeForMethod=t.blockTagParamIndex=t.blockTagForRequest=t.canCache=t.cacheIdentifierForRequest=t.CacheStrategy=void 0;const n=(0,r(2068).configure)({bigint:!1,circularValue:Error});var o;function i(e){return a(e)!==o.Never}function s(e){switch(e){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":return 1;case"eth_getBlockByNumber":return 0;default:return}}function a(e){switch(e){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":case"test_permaCache":return o.Permanent;case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":case"test_forkCache":return o.Fork;case"eth_gasPrice":case"eth_blockNumber":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"test_blockCache":return o.Block;default:return o.Never}}!function(e){e.Block="block",e.Fork="fork",e.Never="never",e.Permanent="perma"}(o=t.CacheStrategy||(t.CacheStrategy={})),t.cacheIdentifierForRequest=function(e,t){var r;const o=t?function(e){if(!e.params)return[];const t=s(e.method);return void 0===t||!Array.isArray(e.params)||t>=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}(e):null!==(r=e.params)&&void 0!==r?r:[];return i(e.method)?`${e.method}:${n(o)}`:null},t.canCache=i,t.blockTagForRequest=function(e){if(!e.params)return;const t=s(e.method);return void 0===t||!Array.isArray(e.params)||t>=e.params.length?void 0:e.params[t]},t.blockTagParamIndex=s,t.cacheTypeForMethod=a},134(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralPopup=void 0;var n=r(1635),o=r(4012),i=n.__importDefault(r(2676)),s=n.__importDefault(r(8904)),a=r(578),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finishedEventType=o.EventTypes.POPUP_FINISHED,t.sendDataEventType=o.EventTypes.SEND_DATA,t}return n.__extends(t,e),t.openNewPopup=function(e,r,n,o){var i=new t("".concat(s.default.urls.connect,"/popup/general/init.html"),r,o);return window.addEventListener("beforeunload",function(){i.close()}),i.focus(),i.sendData(e,n&&JSON.parse(JSON.stringify(n))).catch(function(){i.close()}).finally(function(){o&&0==o.closePopup||(i.close(),a.DialogWindow.removeBackdrop(),a.DialogWindow.closeRefocusLayout())})},t.prototype.sendData=function(e,t){var r=this;return new Promise(function(n,o){r.onPopupMountedQueue.push(r.attachFinishedListener(n,o)),r.onPopupMountedQueue.push(r.sendDataToPopup(e,t)),r.processPopupMountedQueue()})},t.prototype.sendDataToPopup=function(e,t){var r=this;return function(){if(r.isOpen()){var n={action:e,bearerToken:r.bearerTokenProvider()};t&&(n.data=t),r.popupWindow.postMessage({type:r.sendDataEventType,params:n},s.default.urls.connect)}}},t}(i.default);t.GeneralPopup=u},169(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature=t.signTypedData=t.typedSignatureHash=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=t.SignTypedDataVersion=void 0;const n=r(8683),o=r(3256),i=r(6207),s=r(8746),a=r(9352),u=r(2019),c=r(4907);var l;function f(e,t){if(!Object.keys(l).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function h(e,t){(0,a.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);const r=BigInt(t),n=(0,i.getLength)(e),o=BigInt(2)**BigInt(n)-BigInt(1);return(0,a.assert)(r>=-o&&r<=o,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),r}function d(e){let t=BigInt(0);for(let r=0;r<e.length;r++){const n=BigInt(e.charCodeAt(r)-48);t*=BigInt(10),t+=n>=49?n-BigInt(49)+BigInt(10):n>=17?n-BigInt(17)+BigInt(10):n}return(0,s.padStart)((0,a.bigIntToBytes)(t),20)}function p(e,t,r,i,c){if(f(c,[l.V3,l.V4]),void 0!==e[r])return["bytes32",c===l.V4&&null==i?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,n.arrToBufArr)((0,u.keccak256)(y(r,i,e,c)))];if("function"===r)throw new Error('Unsupported or invalid type: "function"');if(void 0===i)throw new Error(`missing value for field ${t} of type ${r}`);if("address"===r){if("number"==typeof i)return["address",(0,s.padStart)((0,a.numberToBytes)(i),20)];if((0,a.isStrictHexString)(i))return["address",(0,a.add0x)(i)];if("string"==typeof i)return["address",d(i).subarray(0,20)]}if("bool"===r)return["bool",Boolean(i)];if("bytes"===r)return"number"==typeof i?i=(0,a.numberToBytes)(i):(0,a.isStrictHexString)(i)?i=(0,a.hexToBytes)(i):"string"==typeof i&&(i=(0,a.stringToBytes)(i)),["bytes32",(0,n.arrToBufArr)((0,u.keccak256)(i))];if(r.startsWith("bytes")&&"bytes"!==r&&!r.includes("["))return"number"==typeof i?i<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,a.bigIntToBytes)(BigInt(i))]:(0,a.isStrictHexString)(i)?["bytes32",(0,a.hexToBytes)(i)]:["bytes32",i];if(r.startsWith("int")&&!r.includes("[")){const e=h(r,i);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===r)return i="number"==typeof i?(0,a.numberToBytes)(i):(0,a.stringToBytes)(null!=i?i:""),["bytes32",(0,n.arrToBufArr)((0,u.keccak256)(i))];if(r.endsWith("]")){if(c===l.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const s=r.slice(0,r.lastIndexOf("[")),a=i.map(r=>p(e,t,s,r,c));return["bytes32",(0,n.arrToBufArr)((0,u.keccak256)((0,o.encode)(a.map(([e])=>e),a.map(([,e])=>e))))]}return[r,i]}function y(e,t,r,i){f(i,[l.V3,l.V4]);const s=["bytes32"],a=[b(e,r)];for(const n of r[e]){if(i===l.V3&&void 0===t[n.name])continue;const[e,o]=p(r,n.name,n.type,t[n.name],i);s.push(e),a.push(o)}return(0,n.arrToBufArr)((0,o.encode)(s,a))}function g(e,t){let r="";const n=m(e,t);n.delete(e);const o=[e,...Array.from(n).sort()];for(const e of o){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}function m(e,t,r=new Set){if("string"!=typeof e)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);const n=e.match(/^\w*/u);if([e]=n,r.has(e)||void 0===t[e])return r;r.add(e);for(const n of t[e])m(n.type,t,r);return r}function v(e,t,r,o){f(o,[l.V3,l.V4]);const i=y(e,t,r,o),s=(0,u.keccak256)(i);return(0,n.arrToBufArr)(s)}function b(e,t){const r=(0,a.stringToBytes)(g(e,t));return(0,n.arrToBufArr)((0,u.keccak256)(r))}function w(e){const r={};for(const n in t.TYPED_MESSAGE_SCHEMA.properties)e[n]&&(r[n]=e[n]);return"types"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function _(e,t){f(t,[l.V3,l.V4]);const r=w(e),{domain:n}=r;return v("EIP712Domain",n,{EIP712Domain:r.types.EIP712Domain},t)}function E(e,t){if((0,i.isArrayType)(e)&&Array.isArray(t)){const[r]=(0,i.getArrayType)(e);return t.map(e=>E(r,e))}if("address"===e){if("number"==typeof t)return(0,s.padStart)((0,a.numberToBytes)(t),20);if((0,a.isStrictHexString)(t))return(0,s.padStart)((0,a.hexToBytes)(t).subarray(0,20),20);if(t instanceof Uint8Array)return(0,s.padStart)(t.subarray(0,20),20)}if("bool"===e)return Boolean(t);if(e.startsWith("bytes")&&"bytes"!==e){const r=(0,i.getByteLength)(e);if("number"==typeof t)return t<0?new Uint8Array:(0,a.numberToBytes)(t).subarray(0,r);if((0,a.isStrictHexString)(t))return(0,a.hexToBytes)(t).subarray(0,r);if(t instanceof Uint8Array)return t.subarray(0,r)}if(e.startsWith("uint")&&"number"==typeof t)return Math.abs(t);if(e.startsWith("int")&&"number"==typeof t){const r=(0,i.getLength)(e);return BigInt.asIntN(r,BigInt(t))}return t}function A(e,t){return t.map(t=>{if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){const r=h(e,t);if(r>=BigInt(0))return(0,s.padStart)((0,a.bigIntToBytes)(r),32);const n=(0,i.getLength)(e),o=BigInt.asIntN(n,r);return(0,a.signedBigIntToBytes)(o,32)}return t})}function T(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(({name:e,type:t,value:r})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:(n=r,n.map(e=>"number"==typeof e?(0,s.padStart)((0,a.numberToBytes)(e),32):(0,a.isStrictHexString)(e)?(0,s.padStart)((0,a.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,s.padStart)(e.subarray(0,32),32):e))};var n;if(t.startsWith("int")&&(0,i.isArrayType)(t)){const[n,o]=(0,i.getArrayType)(t);return{name:e,type:`bytes32[${null!=o?o:""}]`,value:A(n,r)}}return{name:e,type:t,value:E(t,r)}}),l=r.map(e=>"bytes"!==e.type?e.value:(0,c.legacyToBuffer)(e.value)),f=r.map(e=>{if("function"===e.type)throw new Error('Unsupported or invalid type: "function"');return e.type}),h=e.map(e=>{if(!e.name)throw t;return`${e.type} ${e.name}`});return(0,n.arrToBufArr)((0,u.keccak256)((0,o.encodePacked)(["bytes32","bytes32"],[(0,u.keccak256)((0,o.encodePacked)(["string[]"],[h],!0)),(0,u.keccak256)((0,o.encodePacked)(f,l,!0))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(l=t.SignTypedDataVersion||(t.SignTypedDataVersion={})),t.TYPED_MESSAGE_SCHEMA={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"]},t.TypedDataUtils={encodeData:y,encodeType:g,findTypeDependencies:m,hashStruct:v,hashType:b,sanitizeData:w,eip712Hash:function(e,t){f(t,[l.V3,l.V4]);const r=w(e),o=[(0,a.hexToBytes)("1901")];return o.push(_(e,t)),"EIP712Domain"!==r.primaryType&&o.push(v(r.primaryType,r.message,r.types,t)),(0,n.arrToBufArr)((0,u.keccak256)((0,a.concatBytes)(o)))},eip712DomainHash:_},t.typedSignatureHash=function(e){const t=T(e);return(0,a.bytesToHex)(t)},t.signTypedData=function({privateKey:e,data:r,version:o}){if(f(o),(0,c.isNullish)(r))throw new Error("Missing data parameter");if((0,c.isNullish)(e))throw new Error("Missing private key parameter");const i=o===l.V1?T(r):t.TypedDataUtils.eip712Hash(r,o),s=(0,n.ecsign)(i,e);return(0,c.concatSig)((0,n.arrToBufArr)((0,a.bigIntToBytes)(s.v)),s.r,s.s)},t.recoverTypedSignature=function({data:e,signature:r,version:o}){if(f(o),(0,c.isNullish)(e))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing signature parameter");const i=o===l.V1?T(e):t.TypedDataUtils.eip712Hash(e,o),s=(0,c.recoverPublicKey)(i,r),u=(0,n.publicToAddress)(s);return(0,a.bytesToHex)(u)}},186(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.array=t.getTupleType=t.getArrayType=t.isArrayType=void 0;const n=r(9352),o=r(5961),i=r(7700),s=r(8746),a=r(3415),u=r(717),c=/^(?<type>.*)\[(?<length>\d*?)\]$/u;t.isArrayType=e=>c.test(e),t.getArrayType=e=>{const t=e.match(c);return(0,n.assert)(t?.groups?.type,new o.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):void 0]},t.getTupleType=(e,t)=>`(${new Array(t).fill(e).join(",")})`,t.array={isDynamic(e){const[r,n]=(0,t.getArrayType)(e);return void 0===n||(0,i.isDynamicParser)((0,i.getParser)(r),r)},isType:e=>(0,t.isArrayType)(e),getByteLength(e){(0,n.assert)((0,t.isArrayType)(e),new o.ParserError(`Expected an array type, but received "${e}".`));const[r,s]=(0,t.getArrayType)(e);return(0,i.isDynamicParser)(this,e)||void 0===s?32:u.tuple.getByteLength((0,t.getTupleType)(r,s))},encode({type:e,buffer:r,value:c,packed:l,tight:f}){const[h,d]=(0,t.getArrayType)(e);if((0,n.assert)(!l||!(0,t.isArrayType)(h),new o.ParserError("Cannot pack nested arrays.")),l&&(0,i.isDynamicParser)((0,i.getParser)(h),h))return(0,i.pack)({types:new Array(c.length).fill(h),values:c,byteArray:r,packed:l,arrayPacked:!0,tight:f});if(d)return(0,n.assert)(d===c.length,new o.ParserError(`Array length does not match type length. Expected a length of ${d}, but received ${c.length}.`)),u.tuple.encode({type:(0,t.getTupleType)(h,d),buffer:r,value:c,packed:a.fixedBytes.isType(h)&&f,tight:f});if(l)return(0,i.pack)({types:new Array(c.length).fill(h),values:c,byteArray:r,packed:a.fixedBytes.isType(h)&&f,arrayPacked:!0,tight:f});const p=(0,s.padStart)((0,n.numberToBytes)(c.length));return(0,i.pack)({types:new Array(c.length).fill(h),values:c,byteArray:(0,n.concatBytes)([r,p]),packed:l,tight:f})},decode({type:e,value:r,...s}){const[a,c]=(0,t.getArrayType)(e);if(c){const e=u.tuple.decode({type:(0,t.getTupleType)(a,c),value:r,...s});return(0,n.assert)(e.length===c,new o.ParserError(`Array length does not match type length. Expected a length of ${c}, but received ${e.length}.`)),e}const l=(0,n.bytesToNumber)(r.subarray(0,32));return(0,i.unpack)(new Array(l).fill(a),r.subarray(32))}}},251(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTransferRequestDto=void 0;var n=r(1635),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(r(2096).BuildTransferRequestBaseDto);t.BuildTransferRequestDto=o},252(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=void 0;const n=r(8683),o=r(4907);function i(e,t){const r=(0,n.hashPersonalMessage)((0,o.legacyToBuffer)(e));return(0,o.recoverPublicKey)(r,t)}t.personalSign=function({privateKey:e,data:t}){if((0,o.isNullish)(t))throw new Error("Missing data parameter");if((0,o.isNullish)(e))throw new Error("Missing privateKey parameter");const r=(0,o.legacyToBuffer)(t),i=(0,n.hashPersonalMessage)(r),s=(0,n.ecsign)(i,e);return(0,o.concatSig)((0,n.toBuffer)(s.v),s.r,s.s)},t.recoverPersonalSignature=function({data:e,signature:t}){if((0,o.isNullish)(e))throw new Error("Missing data parameter");if((0,o.isNullish)(t))throw new Error("Missing signature parameter");const r=i(e,t),s=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(s)},t.extractPublicKey=function({data:e,signature:t}){if((0,o.isNullish)(e))throw new Error("Missing data parameter");if((0,o.isNullish)(t))throw new Error("Missing signature parameter");return`0x${i(e,t).toString("hex")}`}},259(e){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},280(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTokenTransferRequestDto=void 0;var n=r(1635),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(r(2096).BuildTransferRequestBaseDto);t.BuildTokenTransferRequestDto=o},345(e,t,r){e.exports=r(7007).EventEmitter},363(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureRequestType=void 0,function(e){e.AETERNITY_RAW="AETERNITY_RAW",e.AETERNITY_TRANSACTION="AETERNITY_TRANSACTION",e.AVAC_EIP712="AVAC_712",e.AVAC_RAW="AVAC_RAW",e.AVAC_TRANSACTION="AVAC_TRANSACTION",e.BITCOIN_TRANSACTION="BITCOIN_TRANSACTION",e.BSC_EIP712="BSC_712",e.BSC_RAW="BSC_RAW",e.BSC_TRANSACTION="BSC_TRANSACTION",e.ETHEREUM_EIP712="ETHEREUM_712",e.ETHEREUM_RAW="ETHEREUM_RAW",e.ETHEREUM_TRANSACTION="ETHEREUM_TRANSACTION",e.GOCHAIN_RAW="GOCHAIN_RAW",e.GOCHAIN_TRANSACTION="GOCHAIN_TRANSACTION",e.HEDERA_HBAR_TRANSFER="HEDERA_HBAR_TRANSFER",e.HEDERA_RAW="HEDERA_RAW",e.IMX_RAW="IMX_RAW",e.LITECOIN_TRANSACTION="LITECOIN_TRANSACTION",e.MATIC_RAW="MATIC_RAW",e.MATIC_TRANSACTION="MATIC_TRANSACTION",e.NEO_MESSAGE="NEO_MESSAGE",e.NEO_NATIVE_TRANSACTION="NEO_NATIVE_TRANSACTION",e.NEO_RAW="NEO_RAW",e.TRC10_TRANSACTION="TRC10_TRANSACTION",e.TRON_RAW="TRON_RAW",e.TRON_TRANSACTION="TRON_TRANSACTION",e.VECHAIN_RAW="VECHAIN_RAW",e.VECHAIN_TRANSACTION="VECHAIN_TRANSACTION",e.ARBITRUM_RAW="ARBITRUM_RAW",e.ARBITRUM_TRANSACTION="ARBITRUM_TRANSACTION",e.XPLA_RAW="XPLA_RAW",e.XPLA_TRANSACTION="XPLA_TRANSACTION",e.BASE_RAW="BASE_RAW",e.BASE_TRANSACTION="BASE_TRANSACTION",e.BASE_EIP712="BASE_EIP712",e.OPTIMISM_EIP712="OPTIMISM_EIP712",e.OPTIMISM_RAW="OPTIMISM_RAW",e.OPTIMISM_TRANSACTION="OPTIMISM_TRANSACTION",e.SOLANA_TRANSACTION="SOLANA_TRANSACTION",e.SOLANA_RAW="SOLANA_RAW",e.SUI_TRANSACTION="SUI_TRANSACTION",e.SUI_RAW="SUI_RAW"}(r||(t.SignatureRequestType=r={}))},377(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumErc20TransactionRequest=void 0;var n=r(1635),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(r(4888).EthereumErcTokenTransactionRequest);t.EthereumErc20TransactionRequest=o},414(e){"use strict";e.exports=Math.round},453(e,t,r){"use strict";var n,o=r(9612),i=r(9383),s=r(1237),a=r(9290),u=r(9538),c=r(8068),l=r(9675),f=r(5345),h=r(1514),d=r(8968),p=r(6188),y=r(8002),g=r(5880),m=r(414),v=r(3093),b=Function,w=function(e){try{return b('"use strict"; return ('+e+").constructor;")()}catch(e){}},_=r(5795),E=r(655),A=function(){throw new l},T=_?function(){try{return A}catch(e){try{return _(arguments,"callee").get}catch(e){return A}}}():A,S=r(4039)(),R=r(3628),O=r(1064),I=r(8648),k=r(1002),x=r(76),P={},C="undefined"!=typeof Uint8Array&&R?R(Uint8Array):n,M={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":S&&R?R([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":P,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&R?R(R([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&R?R((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&R?R((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&R?R(""[Symbol.iterator]()):n,"%Symbol%":S?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":T,"%TypedArray%":C,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":k,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":O,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":y,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":v,"%Reflect.getPrototypeOf%":I};if(R)try{null.error}catch(e){var N=R(R(e));M["%Error.prototype%"]=N}var B=function e(t){var r;if("%AsyncFunction%"===t)r=w("async function () {}");else if("%GeneratorFunction%"===t)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=w("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&R&&(r=R(o.prototype))}return M[t]=r,r},j={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},L=r(6743),U=r(9957),F=L.call(x,Array.prototype.concat),D=L.call(k,Array.prototype.splice),q=L.call(x,String.prototype.replace),H=L.call(x,String.prototype.slice),$=L.call(x,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,V=function(e,t){var r,n=e;if(U(j,n)&&(n="%"+(r=j[n])[0]+"%"),U(M,n)){var o=M[n];if(o===P&&(o=B(n)),void 0===o&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return q(e,W,function(e,t,r,o){n[n.length]=r?q(o,z,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=V("%"+n+"%",t),i=o.name,s=o.value,a=!1,u=o.alias;u&&(n=u[0],D(r,F([0,1],u)));for(var f=1,h=!0;f<r.length;f+=1){var d=r[f],p=H(d,0,1),y=H(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===y||"'"===y||"`"===y)&&p!==y)throw new c("property names with quotes must have matching quotes");if("constructor"!==d&&h||(a=!0),U(M,i="%"+(n+="."+d)+"%"))s=M[i];else if(null!=s){if(!(d in s)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(_&&f+1>=r.length){var g=_(s,d);s=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[d]}else h=U(s,d),s=s[d];h&&!a&&(M[i]=s)}}return s}},487(e,t,r){"use strict";var n=r(6743),o=r(453),i=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),a=o("%Reflect.apply%",!0)||n.call(s,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,s,arguments);return u&&c&&u(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var f=function(){return a(n,i,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},493(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumContractCallExecutionRequest=void 0;var n=r(1635),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=[],t}return n.__extends(t,e),t}(r(3264).TransactionRequest);t.EthereumContractCallExecutionRequest=o},507(e,t,r){"use strict";var n=r(453),o=r(6556),i=r(8859),s=r(9675),a=n("%Map%",!0),u=o("Map.prototype.get",!0),c=o("Map.prototype.set",!0),l=o("Map.prototype.has",!0),f=o("Map.prototype.delete",!0),h=o("Map.prototype.size",!0);e.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new s("Side channel does not contain "+i(e))},delete:function(t){if(e){var r=f(e,t);return 0===h(e)&&(e=void 0),r}return!1},get:function(t){if(e)return u(e,t)},has:function(t){return!!e&&l(e,t)},set:function(t,r){e||(e=new a),c(e,t,r)}};return t}},516(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7007);function o(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout(()=>{throw e})}}class i extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(void 0!==n)r=r&&void 0===n.error;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const i=n[e];if(void 0===i)return!1;if("function"==typeof i)o(i,this,t);else{const e=i.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(i);for(let n=0;n<e;n+=1)o(r[n],this,t)}return!0}}t.default=i},525(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GochainTransactionRequest=void 0;var n=r(1635),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.data="0x",t}return n.__extends(t,e),t}(r(3264).TransactionRequest);t.GochainTransactionRequest=o},537(e,t,r){var n=r(5606),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),a=n[r];r<o;a=n[++r])m(a)||!E(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return e.apply(this,arguments)}};var s={},a=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+u+"$","i")}function c(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),h(n,e,n.depth)}function l(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function f(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return b(o)||(o=h(e,o,n)),o}var i=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var s=Object.keys(r),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),T(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(r);if(0===s.length){if(S(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return d(r)}var c,l="",f=!1,E=["{","}"];return y(r)&&(f=!0,E=["[","]"]),S(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(l=" "+RegExp.prototype.toString.call(r)),A(r)&&(l=" "+Date.prototype.toUTCString.call(r)),T(r)&&(l=" "+d(r)),0!==s.length||f&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s<a;++s)k(t,String(s))?i.push(p(e,t,r,n,String(s),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(p(e,t,r,n,o,!0))}),i}(e,r,n,a,s):s.map(function(t){return p(e,r,n,a,t,f)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,E)):E[0]+l+E[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,o,i){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),k(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(u.value)<0?(a=m(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map(function(e){return" "+e}).join("\n").slice(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),w(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function y(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return void 0===e}function _(e){return E(e)&&"[object RegExp]"===R(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===R(e)}function T(e){return E(e)&&("[object Error]"===R(e)||e instanceof Error)}function S(e){return"function"==typeof e}function R(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(a.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(9032),t.isArray=y,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=_,t.types.isRegExp=_,t.isObject=E,t.isDate=A,t.types.isDate=A,t.isError=T,t.types.isNativeError=T,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(1135);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[O((e=new Date).getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6698),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var x="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(x&&e[x]){var t;if("function"!=typeof(t=e[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(e,n){e?r(e):t(n)});try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),x&&Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=x,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,s=function(){return o.apply(i,arguments)};e.apply(this,t).then(function(e){n.nextTick(s.bind(null,null,e))},function(e){n.nextTick(P.bind(null,e,s))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o(e)),t}},547(e,t,r){const n=r(4739);e.exports=(e,t)=>new n(e,t).minor},561(e,t,r){"use strict";var n,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SafeEventEmitterProvider=void 0;const a=s(r(720));class u extends a.default{constructor({engine:e}){super(),n.set(this,void 0),this.sendAsync=(e,t)=>{i(this,n,"f").handle(e,t)},this.send=(e,t)=>{if("function"!=typeof t)throw new Error('Must provide callback to "send" method.');i(this,n,"f").handle(e,t)},o(this,n,e,"f"),e.on&&e.on("notification",e=>{this.emit("data",null,e)})}}t.SafeEventEmitterProvider=u,n=new WeakMap},571(e){function t(e){return null==e?e:Number.parseInt(e,16)}function r(e){return null==e?e:"0x"+e.toString(16)}function n(e,t){return new Promise((r,n)=>{e.sendAsync(t,(e,t)=>{e?n(e):t.error?n(t.error):t.result?r(t.result):n(new Error("Result was empty"))})})}e.exports=async function({provider:e,fromBlock:o,toBlock:i}){o||(o=i);const s=t(o),a=t(i),u=Array(a-s+1).fill().map((e,t)=>s+t).map(r);let c=await Promise.all(u.map(t=>async function(e,t,r){for(let t=0;t<3;t++)try{return await n(e,{id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:r})}catch(e){console.error(`provider.sendAsync failed: ${e.stack||e.message||e}`)}return null}(e,0,[t,!1])));return c=c.filter(e=>null!==e),c}},578(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogWindow=void 0;var n=r(1635),o=r(7430),i=r(8775),s=n.__importDefault(r(8904)),a=function(){function e(){}return e.openLoginDialog=function(e,t){return n.__awaiter(this,void 0,void 0,function(){var r,a=this;return n.__generator(this,function(u){switch(t.idpHint){case"google":r="".concat(s.default.urls.connect,"/modal/login/google");break;case"apple":r="".concat(s.default.urls.connect,"/modal/login/apple");break;case"twitter":case"arkane-twitter":r="".concat(s.default.urls.connect,"/modal/login/twitter");break;case"facebook":case"arkane-facebook":r="".concat(s.default.urls.connect,"/modal/login/facebook");break;case"password":r="".concat(s.default.urls.connect,"/modal/login/password");break;default:r="".concat(s.default.urls.connect,"/modal/login/none")}return[2,new Promise(function(s,u){fetch(r).then(function(e){return e.text()}).then(function(r){var c=a.createTemplate(r,e),l=c.overlayContainer,f=c.container,h=c.shadowRoot,d=t.idpHint;"register"===d?(a.showRefocusLayout(),o.Security.login(e,n.__assign(n.__assign({},t),{idpHint:d,windowMode:i.WindowMode.POPUP})).then(function(e){a.removeBackdrop(),a.closeRefocusLayout(),s(e)})):(l.appendChild(f),a.addAuthEventListeners(e,t,s,h),document.body.appendChild(l),a.addCloseListeners(h,u))})})]})})},e.openActionDialog=function(e,t){return n.__awaiter(this,void 0,void 0,function(){var r,o=this;return n.__generator(this,function(n){return r="".concat(s.default.urls.connect,"/modal/action/").concat(t),[2,new Promise(function(t,n){fetch(r).then(function(e){return e.text()}).then(function(r){var i=o.createTemplate(r,e),s=i.overlayContainer,a=i.container,u=i.shadowRoot;u.querySelector(".action-btn").addEventListener("click",function(){o.closeLoginDialog(),t(!0)}),s.appendChild(a),document.body.appendChild(s),o.addCloseListeners(u,n)})})]})})},e.addFonts=function(){if("undefined"!=typeof window){var e="".concat(s.default.urls.connect,"/static/css/connect/fonts.css");if(!document.querySelector('link[href="'.concat(e,'"]'))){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),t.setAttribute("type","text/css"),t.setAttribute("crossorigin","anonymous"),document.querySelector("head").appendChild(t)}}},e.addAnimationScript=function(e){var t="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.10.2/lottie.min.js";if(!document.querySelector('script[src="'.concat(t,'"]'))){var r=document.createElement("script");r.setAttribute("src",t),r.setAttribute("integrity","sha512-fTTVSuY9tLP+l/6c6vWz7uAQqd1rq3Q/GyKBN2jOZvJSLC5RjggSdboIFL1ox09/Ezx/AKwcv/xnDeYN9+iDDA=="),r.setAttribute("crossorigin","anonymous"),r.setAttribute("referrerpolicy","no-referrer"),document.querySelector("head").appendChild(r)}var n=setInterval(function(){var t=lottie;t&&(t.loadAnimation({container:e.querySelector(".animation"),renderer:"svg",loop:!0,autoplay:!0,path:"".concat(s.default.urls.connect,"/static/animations/login-animation.json")}),clearInterval(n))},100)},e.addAuthEventListeners=function(e,t,r,s){var a=this,u=s.querySelectorAll(".auth-action");Array.from(u).forEach(function(s){s.addEventListener("click",function(s){var u=s.target.dataset.idpHint||s.target.parentElement.dataset.idpHint;o.Security.login(e,n.__assign(n.__assign({},t),{idpHint:u,windowMode:i.WindowMode.POPUP})).then(function(e){a.removeBackdrop(),a.closeRefocusLayout(t.closePopup),r(e)}),a.closeLoginDialog(),a.showRefocusLayout()})});var c=s.querySelector(".select-another-option");c&&c.addEventListener("click",function(){a.closeLoginDialog(),a.removeBackdrop(),delete t.idpHint,r(a.openLoginDialog(e,t))})},e.addCloseListeners=function(e,t){var r=this,n=e.querySelector(".venly-connect-close-dialog");n&&n.addEventListener("click",function(){r.closeLoginDialog(),r.removeBackdrop(),t({status:"ABORTED",errors:[]})})},e.closeLoginDialog=function(){document.querySelectorAll(".venly-connect-dialog-container").forEach(function(e){return e.remove()})},e.removeBackdrop=function(){document.querySelectorAll(".overlay-container").forEach(function(e){return e.remove()})},e.showRefocusLayout=function(e,t){var r=this;fetch("".concat(s.default.urls.connect,"/modal/re-focus-layout")).then(function(e){return e.text()}).then(function(n){var o=r.createOverlayContainer(e),i=document.createElement("div"),s=i.attachShadow({mode:"open"});i.classList.add("venly-connect-refocus-container"),s.innerHTML=n,i.style.position="absolute",i.style.top="calc(50% - 218px)",i.style.left="calc(50% - 147.5px)",i.style.zIndex="2147483647";var a=document.querySelector(".overlay-container");a?a.appendChild(i):(o.appendChild(r.createBackdrop()),o.appendChild(i),document.body.appendChild(o)),r.addRefocusListeners(s,t)})},e.closeRefocusLayout=function(e){void 0===e&&(e=!0),document.querySelectorAll(".overlay-container").forEach(function(e){return e.remove()}),document.querySelectorAll(".venly-connect-refocus-container").forEach(function(e){return e.remove()}),e&&o.Security.closePopupWindow()},e.addRefocusListeners=function(e,t){void 0===t&&(t=o.Security.focusPopupWindow);var r=e.querySelector(".venly-connect-re-focus-wrapper .reopen-action");r&&r.addEventListener("click",function(){return t()})},e.createOverlayContainer=function(e){void 0===e&&(e="venly-overlay-container");var t=document.createElement("div");return t.id=e,t.classList.add("overlay-container"),t.style.position="fixed",t.style.zIndex="2147483647",t.style.top="0",t.style.left="0",t.style.height="100%",t.style.background="rgba(33, 37, 41, 0.70)",t.style.width="100%",t},e.createBackdrop=function(){var e=document.createElement("div");return e.classList.add("venly-connect-dialog-backdrop"),e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.zIndex="2147483647",e.style.backdropFilter="blur(5px)",e},e.createTemplate=function(e,t){var r=document.createElement("div"),n=r.attachShadow({mode:"open"});r.classList.add("venly-connect-dialog-container"),n.innerHTML=e,r.style.position="absolute",r.style.zIndex="2147483647",r.style.display="flex",r.style.justifyContent="center",r.style.width="100%",r.style.height="100%",n.querySelector(".connect-company-logo").src="".concat(s.default.urls.storage,"/clients/logos/").concat(t,".png");var o=this.createOverlayContainer();return o.appendChild(this.createBackdrop()),this.addFonts(),this.addAnimationScript(n),o.appendChild(r),{overlayContainer:o,container:r,shadowRoot:n}},e}();t.DialogWindow=a},592(e,t,r){"use strict";var n=r(453)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},655(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},668(e,t,r){const n=r(8317);e.exports=(e,t,r)=>n(e,t,r)>=0},676(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionResult=void 0;t.TransactionResult=function(){}},710(e,t,r){const n=r(8317);e.exports=(e,t,r)=>0!==n(e,t,r)},712(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcEngine=void 0;const o=n(r(516)),i=r(2203);class s extends o.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[o,i,a]=await s._runAllMiddleware(e,t,this._middleware);return i?(await s._runReturnHandlers(a),n(o)):r(async e=>{try{await s._runReturnHandlers(a)}catch(t){return e(t)}return e()})}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise(t=>{this._handle(e,(e,r)=>{t(r)})})}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:void 0,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc};let o=null;try{await this._processRequest(r,n)}catch(e){o=e}return o&&(delete n.result,n.error||(n.error=i.serializeError(o))),t(o,n)}async _processRequest(e,t){const[r,n,o]=await s._runAllMiddleware(e,t,this._middleware);if(s._checkForCompletion(e,t,n),await s._runReturnHandlers(o),r)throw r}static async _runAllMiddleware(e,t,r){const n=[];let o=null,i=!1;for(const a of r)if([o,i]=await s._runMiddleware(e,t,a,n),i)break;return[o,i,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise(o=>{const s=e=>{const r=e||t.error;r&&(t.error=i.serializeError(r)),o([r,!0])},u=r=>{t.error?s(t.error):(r&&("function"!=typeof r&&s(new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${a(e)}`,{request:e})),n.push(r)),o([null,!1]))};try{r(e,t,u,s)}catch(e){s(e)}})}static async _runReturnHandlers(e){for(const t of e)await new Promise((e,r)=>{t(t=>t?r(t):e())})}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(e)}`,{request:e});if(!r)throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(e)}`,{request:e})}}function a(e){return JSON.stringify(e,null,2)}t.JsonRpcEngine=s},717(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tuple=t.getTupleElements=void 0;const n=r(9352),o=r(5961),i=r(7700),s=/^\((.+)\)$/u;t.getTupleElements=e=>{(0,n.assert)(e.startsWith("(")&&e.endsWith(")"),new o.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));const t=[];let r="",i=0;for(let n=1;n<e.length-1;n++){const o=e[n];","===o&&0===i?(t.push(r.trim()),r=""):(r+=o,"("===o?i+=1:")"===o&&(i-=1))}return r.trim()&&t.push(r.trim()),t},t.tuple={isDynami