{"version":3,"sources":["webpack:///./node_modules/web3-eth-ens/lib/resources/ABI/Resolver.js","webpack:///./node_modules/web3-eth-ens/lib/resources/ABI/Registry.js","webpack:///./node_modules/web3-eth/lib/getNetworkType.js","webpack:///./node_modules/web3-eth-iban/lib/index.js","webpack:///./node_modules/web3-eth-ens/lib/ENS.js","webpack:///./node_modules/web3-net/lib/index.js","webpack:///./node_modules/web3-eth-ens/lib/config.js","webpack:///./node_modules/web3-eth-personal/lib/index.js","webpack:///./node_modules/web3-eth-ens/lib/contracts/Registry.js","webpack:///./node_modules/web3-eth-ens/lib/lib/contentHash.js","webpack:///./node_modules/web3-eth/lib/index.js","webpack:///./node_modules/web3-eth-ens/lib/lib/ResolverMethodHandler.js","webpack:///./node_modules/web3-eth-ens/lib/index.js"],"names":["module","exports","callback","id","_this","this","net","getId","then","givenId","getBlock","genesis","returnValue","hash","catch","err","utils","BigNumber","iso13616Prepare","iban","A","charCodeAt","Z","toUpperCase","substr","split","map","n","code","join","mod9710","block","remainder","length","slice","parseInt","Iban","constructor","_iban","static","ib","isDirect","Error","toAddress","address","fromAddress","toString","isAddress","replace","padded","string","bytes","result","leftPad","fromBban","bban","checkDigit","countryCode","options","institution","identifier","isValid","test","isIndirect","checksum","client","base36","asBn","toChecksumAddress","config","formatters","Registry","ResolverMethodHandler","contenthash","ENS","eth","registryAddress","_detectedAddress","_lastSyncCheck","Object","defineProperty","get","enumerable","registry","set","value","inputAddressFormatter","prototype","supportsInterface","name","interfaceId","getResolver","resolver","isHexStrict","sha3","methods","call","error","setResolver","txConfig","setRecord","owner","ttl","setSubnodeRecord","label","setApprovalForAll","operator","approved","isApprovedForAll","recordExists","setSubnodeOwner","getTTL","setTTL","getOwner","setOwner","getAddress","resolverMethodHandler","method","setAddress","send","getPubkey","setPubkey","x","y","getContent","setContent","getContenthash","decode","setContenthash","encoded","encode","getMultihash","setMultihash","checkNetwork","async","now","Date","headAge","timestamp","networkType","getNetworkType","addr","addresses","core","Method","Net","packageInit","arguments","params","outputFormatter","hexToNumber","forEach","attachToObject","setRequestManager","_requestManager","addProviders","main","ropsten","rinkeby","goerli","interfaceIds","setAddr","pubkey","content","Personal","defaultAccount","defaultBlock","val","inputFormatter","inputTransactionFormatter","inputSignFormatter","Contract","namehash","PromiEvent","REGISTRY_ABI","RESOLVER_ABI","ens","self","contract","setProvider","currentProvider","console","warn","promiEvent","receipt","resolve","reject","eventEmitter","contentHash","decoded","protocolType","codec","getCodec","e","message","text","contentType","matched","match","fromIpfs","fromSwarm","helpers","Subscriptions","subscriptions","BaseContract","Accounts","abi","formatter","blockCall","args","indexOf","transactionFromBlockCall","uncleCall","getBlockTransactionCountCall","uncleCountCall","Eth","manager","personal","accounts","_provider","apply","defaultChain","defaultHardfork","defaultCommon","handleRevert","transactionBlockTimeout","transactionConfirmationBlocks","transactionPollingTimeout","transactionPollingInterval","blockHeaderTimeout","maxListenersWarningThreshold","setMaxListeners","clearSubscriptions","bind","removeSubscriptionById","removeSubscription","create","_ethAccounts","provider","outputSyncingFormatter","outputBigNumberFormatter","numberToHex","inputBlockNumberFormatter","inputDefaultBlockNumberFormatter","outputBlockFormatter","outputTransactionFormatter","outputTransactionReceiptFormatter","abiCoder","transformPayload","payload","reverse","inputCallFormatter","inputLogFormatter","outputLogFormatter","inputStorageKeysFormatter","outputProofFormatter","type","subscriptionName","subscriptionHandler","output","removed","emit","_isSyncing","setTimeout","clearTimeout","_isSyncingTimeout","currentBlock","highestBlock","errors","ensName","methodName","methodArguments","parent","preparedArguments","prepareArguments","checkInterfaceSupport","handleCall","sendOptions","handleSend","on","confirmationNumber","node","unshift","supported","ResolverMethodMissingError"],"mappings":"oHAuZAA,EAAOC,QAtZQ,CACX,CACI,YACA,OAAU,CACN,CACI,KAAQ,cACR,KAAQ,WAGhB,KAAQ,oBACR,QAAW,CACP,CACI,KAAQ,GACR,KAAQ,SAGhB,WACA,KAAQ,YAEZ,CACI,YACA,OAAU,CACN,CACI,KAAQ,OACR,KAAQ,WAEZ,CACI,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CAEA,IAAIa,KACJ,IACIA,QAAkB/L,EACbG,QACAP,kBAAkBwE,EAAa8G,IAC/B9K,OAET,MAAOjF,GACHsK,QAAQC,KAAK,uDAAyD1F,EAASlC,QAAQd,QAAU,OAErG,IAAK+O,EACD,MAAMf,EAAOgB,2BAA2BhM,EAASlC,QAAQd,QAASkO,KAG1E9Q,EAAOC,QAAUuE,G,kCCtMjB,IAAIE,EAAM,EAAQ,QAClB1E,EAAOC,QAAUyE","file":"js/chunk-vendors~55f5af56.721d3d8a.js","sourcesContent":["\"use strict\";\nvar RESOLVER = [\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"interfaceID\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"contentTypes\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ABI\",\n \"outputs\": [\n {\n \"name\": \"contentType\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"hash\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"setMultihash\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"multihash\",\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"x\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"y\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setPubkey\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"content\",\n \"outputs\": [\n {\n \"name\": \"ret\",\n \"type\": \"bytes32\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addr\",\n \"outputs\": [\n {\n \"name\": \"ret\",\n \"type\": \"address\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"contentType\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"setABI\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"name\": \"ret\",\n \"type\": \"string\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"name\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setName\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setContent\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"pubkey\",\n \"outputs\": [\n {\n \"name\": \"x\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"y\",\n \"type\": \"bytes32\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"addr\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setAddr\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"name\": \"ensAddr\",\n \"type\": \"address\"\n }\n ],\n \"payable\": false,\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"a\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AddrChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ContentChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"name\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NameChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"name\": \"contentType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ABIChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"x\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"y\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"hash\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"ContenthashChanged\",\n \"type\": \"event\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"contenthash\",\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"hash\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"setContenthash\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n];\nmodule.exports = RESOLVER;\n","\"use strict\";\nvar REGISTRY = [\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"resolver\",\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"label\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setSubnodeOwner\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"ttl\",\n \"type\": \"uint64\"\n }\n ],\n \"name\": \"setTTL\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ttl\",\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint64\"\n }\n ],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"resolver\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setResolver\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setOwner\",\n \"outputs\": [],\n \"payable\": false,\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"name\": \"label\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwner\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"resolver\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewResolver\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"name\": \"ttl\",\n \"type\": \"uint64\"\n }\n ],\n \"name\": \"NewTTL\",\n \"type\": \"event\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint64\",\n \"name\": \"ttl\",\n \"type\": \"uint64\"\n }\n ],\n \"name\": \"setRecord\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"constant\": true,\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"recordExists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"payable\": false,\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"label\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint64\",\n \"name\": \"ttl\",\n \"type\": \"uint64\"\n }\n ],\n \"name\": \"setSubnodeRecord\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n];\nmodule.exports = REGISTRY;\n","/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n */\n/**\n * @file getNetworkType.js\n * @author Fabian Vogelsteller \n * @date 2017\n */\n\"use strict\";\nvar getNetworkType = function (callback) {\n var _this = this, id;\n return this.net.getId()\n .then(function (givenId) {\n id = givenId;\n return _this.getBlock(0);\n })\n .then(function (genesis) {\n var returnValue = 'private';\n if (genesis.hash === '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3' &&\n id === 1) {\n returnValue = 'main';\n }\n if (genesis.hash === '0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d' &&\n id === 3) {\n returnValue = 'ropsten';\n }\n if (genesis.hash === '0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177' &&\n id === 4) {\n returnValue = 'rinkeby';\n }\n if (genesis.hash === '0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a' &&\n id === 5) {\n returnValue = 'goerli';\n }\n if (genesis.hash === '0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9' &&\n id === 42) {\n returnValue = 'kovan';\n }\n if (typeof callback === 'function') {\n callback(null, returnValue);\n }\n return returnValue;\n })\n .catch(function (err) {\n if (typeof callback === 'function') {\n callback(err);\n }\n else {\n throw err;\n }\n });\n};\nmodule.exports = getNetworkType;\n","/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file iban.js\n *\n * Details: https://github.com/ethereum/wiki/wiki/ICAP:-Inter-exchange-Client-Address-Protocol\n *\n * @author Marek Kotewicz \n * @date 2015\n */\n\"use strict\";\nconst utils = require('web3-utils');\nconst BigNumber = require('bn.js');\nconst leftPad = function (string, bytes) {\n let result = string;\n while (result.length < bytes * 2) {\n result = '0' + result;\n }\n return result;\n};\n/**\n * Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to\n * numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616.\n *\n * @method iso13616Prepare\n * @param {String} iban the IBAN\n * @returns {String} the prepared IBAN\n */\nconst iso13616Prepare = function (iban) {\n const A = 'A'.charCodeAt(0);\n const Z = 'Z'.charCodeAt(0);\n iban = iban.toUpperCase();\n iban = iban.substr(4) + iban.substr(0, 4);\n return iban.split('').map(function (n) {\n const code = n.charCodeAt(0);\n if (code >= A && code <= Z) {\n // A = 10, B = 11, ... Z = 35\n return code - A + 10;\n }\n else {\n return n;\n }\n }).join('');\n};\n/**\n * Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.\n *\n * @method mod9710\n * @param {String} iban\n * @returns {Number}\n */\nconst mod9710 = function (iban) {\n let remainder = iban;\n let block;\n while (remainder.length > 2) {\n block = remainder.slice(0, 9);\n remainder = parseInt(block, 10) % 97 + remainder.slice(block.length);\n }\n return parseInt(remainder, 10) % 97;\n};\n/**\n * This prototype should be used to create iban object from iban correct string\n *\n * @param {String} iban\n */\nclass Iban {\n constructor(iban) {\n this._iban = iban;\n }\n /**\n * This method should be used to create an ethereum address from a direct iban address\n *\n * @method toAddress\n * @param {String} iban address\n * @return {String} the ethereum address\n */\n static toAddress(ib) {\n ib = new Iban(ib);\n if (!ib.isDirect()) {\n throw new Error('IBAN is indirect and can\\'t be converted');\n }\n return ib.toAddress();\n }\n /**\n * This method should be used to create iban address from an ethereum address\n *\n * @method toIban\n * @param {String} address\n * @return {String} the IBAN address\n */\n static toIban(address) {\n return Iban.fromAddress(address).toString();\n }\n /**\n * This method should be used to create iban object from an ethereum address\n *\n * @method fromAddress\n * @param {String} address\n * @return {Iban} the IBAN object\n */\n static fromAddress(address) {\n if (!utils.isAddress(address)) {\n throw new Error('Provided address is not a valid address: ' + address);\n }\n address = address.replace('0x', '').replace('0X', '');\n const asBn = new BigNumber(address, 16);\n const base36 = asBn.toString(36);\n const padded = leftPad(base36, 15);\n return Iban.fromBban(padded.toUpperCase());\n }\n /**\n * Convert the passed BBAN to an IBAN for this country specification.\n * Please note that \"generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account\".\n * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits\n *\n * @method fromBban\n * @param {String} bban the BBAN to convert to IBAN\n * @returns {Iban} the IBAN object\n */\n static fromBban(bban) {\n const countryCode = 'XE';\n const remainder = mod9710(iso13616Prepare(countryCode + '00' + bban));\n const checkDigit = ('0' + (98 - remainder)).slice(-2);\n return new Iban(countryCode + checkDigit + bban);\n }\n /**\n * Should be used to create IBAN object for given institution and identifier\n *\n * @method createIndirect\n * @param {Object} options, required options are \"institution\" and \"identifier\"\n * @return {Iban} the IBAN object\n */\n static createIndirect(options) {\n return Iban.fromBban('ETH' + options.institution + options.identifier);\n }\n /**\n * This method should be used to check if given string is valid iban object\n *\n * @method isValid\n * @param {String} iban string\n * @return {Boolean} true if it is valid IBAN\n */\n static isValid(iban) {\n const i = new Iban(iban);\n return i.isValid();\n }\n ;\n /**\n * Should be called to check if iban is correct\n *\n * @method isValid\n * @returns {Boolean} true if it is, otherwise false\n */\n isValid() {\n return /^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban) &&\n mod9710(iso13616Prepare(this._iban)) === 1;\n }\n ;\n /**\n * Should be called to check if iban number is direct\n *\n * @method isDirect\n * @returns {Boolean} true if it is, otherwise false\n */\n isDirect() {\n return this._iban.length === 34 || this._iban.length === 35;\n }\n ;\n /**\n * Should be called to check if iban number if indirect\n *\n * @method isIndirect\n * @returns {Boolean} true if it is, otherwise false\n */\n isIndirect() {\n return this._iban.length === 20;\n }\n ;\n /**\n * Should be called to get iban checksum\n * Uses the mod-97-10 checksumming protocol (ISO/IEC 7064:2003)\n *\n * @method checksum\n * @returns {String} checksum\n */\n checksum() {\n return this._iban.substr(2, 2);\n }\n ;\n /**\n * Should be called to get institution identifier\n * eg. XREG\n *\n * @method institution\n * @returns {String} institution identifier\n */\n institution() {\n return this.isIndirect() ? this._iban.substr(7, 4) : '';\n }\n ;\n /**\n * Should be called to get client identifier within institution\n * eg. GAVOFYORK\n *\n * @method client\n * @returns {String} client identifier\n */\n client() {\n return this.isIndirect() ? this._iban.substr(11) : '';\n }\n ;\n /**\n * Should be called to get client direct address\n *\n * @method toAddress\n * @returns {String} ethereum address\n */\n toAddress() {\n if (this.isDirect()) {\n const base36 = this._iban.substr(4);\n const asBn = new BigNumber(base36, 36);\n return utils.toChecksumAddress(asBn.toString(16, 20));\n }\n return '';\n }\n ;\n toString() {\n return this._iban;\n }\n ;\n}\nmodule.exports = Iban;\n","/*\n This file is part of web3.js.\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file ENS.js\n *\n * @author Samuel Furter \n * @date 2018\n */\n\"use strict\";\nvar config = require('./config');\nvar formatters = require('web3-core-helpers').formatters;\nvar utils = require('web3-utils');\nvar Registry = require('./contracts/Registry');\nvar ResolverMethodHandler = require('./lib/ResolverMethodHandler');\nvar contenthash = require('./lib/contentHash');\n/**\n * Constructs a new instance of ENS\n *\n * @param {Eth} eth\n *\n * @constructor\n */\nfunction ENS(eth) {\n this.eth = eth;\n var registryAddress = null;\n this._detectedAddress = null;\n this._lastSyncCheck = null;\n Object.defineProperty(this, 'registry', {\n get: function () {\n return new Registry(this);\n },\n enumerable: true\n });\n Object.defineProperty(this, 'resolverMethodHandler', {\n get: function () {\n return new ResolverMethodHandler(this.registry);\n },\n enumerable: true\n });\n Object.defineProperty(this, 'registryAddress', {\n get: function () {\n return registryAddress;\n },\n set: function (value) {\n if (value === null) {\n registryAddress = value;\n return;\n }\n registryAddress = formatters.inputAddressFormatter(value);\n },\n enumerable: true\n });\n}\n/**\n * Returns true if the given interfaceId is supported and otherwise false.\n *\n * @method supportsInterface\n *\n * @param {string} name\n * @param {string} interfaceId\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nENS.prototype.supportsInterface = function (name, interfaceId, callback) {\n return this.getResolver(name).then(function (resolver) {\n if (!utils.isHexStrict(interfaceId)) {\n interfaceId = utils.sha3(interfaceId).slice(0, 10);\n }\n return resolver.methods.supportsInterface(interfaceId).call(callback);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n throw error;\n });\n};\n/**\n * Returns the Resolver by the given address\n *\n * @deprecated Please use the \"getResolver\" method instead of \"resolver\"\n *\n * @method resolver\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nENS.prototype.resolver = function (name, callback) {\n return this.registry.resolver(name, callback);\n};\n/**\n * Returns the Resolver by the given address\n *\n * @method getResolver\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nENS.prototype.getResolver = function (name, callback) {\n return this.registry.getResolver(name, callback);\n};\n/**\n * Does set the resolver of the given name\n *\n * @method setResolver\n *\n * @param {string} name\n * @param {string} address\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setResolver = function (name, address, txConfig, callback) {\n return this.registry.setResolver(name, address, txConfig, callback);\n};\n/**\n * Sets the owner, resolver, and TTL for an ENS record in a single operation.\n *\n * @method setRecord\n *\n * @param {string} name\n * @param {string} owner\n * @param {string} resolver\n * @param {string | number} ttl\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setRecord = function (name, owner, resolver, ttl, txConfig, callback) {\n return this.registry.setRecord(name, owner, resolver, ttl, txConfig, callback);\n};\n/**\n * Sets the owner, resolver and TTL for a subdomain, creating it if necessary.\n *\n * @method setSubnodeRecord\n *\n * @param {string} name\n * @param {string} label\n * @param {string} owner\n * @param {string} resolver\n * @param {string | number} ttl\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setSubnodeRecord = function (name, label, owner, resolver, ttl, txConfig, callback) {\n return this.registry.setSubnodeRecord(name, label, owner, resolver, ttl, txConfig, callback);\n};\n/**\n * Sets or clears an approval by the given operator.\n *\n * @method setApprovalForAll\n *\n * @param {string} operator\n * @param {boolean} approved\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setApprovalForAll = function (operator, approved, txConfig, callback) {\n return this.registry.setApprovalForAll(operator, approved, txConfig, callback);\n};\n/**\n * Returns true if the operator is approved\n *\n * @method isApprovedForAll\n *\n * @param {string} owner\n * @param {string} operator\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nENS.prototype.isApprovedForAll = function (owner, operator, callback) {\n return this.registry.isApprovedForAll(owner, operator, callback);\n};\n/**\n * Returns true if the record exists\n *\n * @method recordExists\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nENS.prototype.recordExists = function (name, callback) {\n return this.registry.recordExists(name, callback);\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method setSubnodeOwner\n *\n * @param {string} name\n * @param {string} label\n * @param {string} address\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setSubnodeOwner = function (name, label, address, txConfig, callback) {\n return this.registry.setSubnodeOwner(name, label, address, txConfig, callback);\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method getTTL\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.getTTL = function (name, callback) {\n return this.registry.getTTL(name, callback);\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method setTTL\n *\n * @param {string} name\n * @param {number} ttl\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setTTL = function (name, ttl, txConfig, callback) {\n return this.registry.setTTL(name, ttl, txConfig, callback);\n};\n/**\n * Returns the owner by the given name and current configured or detected Registry\n *\n * @method getOwner\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.getOwner = function (name, callback) {\n return this.registry.getOwner(name, callback);\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method setOwner\n *\n * @param {string} name\n * @param {string} address\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setOwner = function (name, address, txConfig, callback) {\n return this.registry.setOwner(name, address, txConfig, callback);\n};\n/**\n * Returns the address record associated with a name.\n *\n * @method getAddress\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.getAddress = function (name, callback) {\n return this.resolverMethodHandler.method(name, 'addr', []).call(callback);\n};\n/**\n * Sets a new address\n *\n * @method setAddress\n *\n * @param {string} name\n * @param {string} address\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setAddress = function (name, address, txConfig, callback) {\n return this.resolverMethodHandler.method(name, 'setAddr', [address]).send(txConfig, callback);\n};\n/**\n * Returns the public key\n *\n * @method getPubkey\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.getPubkey = function (name, callback) {\n return this.resolverMethodHandler.method(name, 'pubkey', [], null, callback).call(callback);\n};\n/**\n * Set the new public key\n *\n * @method setPubkey\n *\n * @param {string} name\n * @param {string} x\n * @param {string} y\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setPubkey = function (name, x, y, txConfig, callback) {\n return this.resolverMethodHandler.method(name, 'setPubkey', [x, y]).send(txConfig, callback);\n};\n/**\n * Returns the content\n *\n * @method getContent\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.getContent = function (name, callback) {\n return this.resolverMethodHandler.method(name, 'content', []).call(callback);\n};\n/**\n * Set the content\n *\n * @method setContent\n *\n * @param {string} name\n * @param {string} hash\n * @param {function} callback\n * @param {TransactionConfig} txConfig\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setContent = function (name, hash, txConfig, callback) {\n return this.resolverMethodHandler.method(name, 'setContent', [hash]).send(txConfig, callback);\n};\n/**\n * Returns the contenthash\n *\n * @method getContenthash\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.getContenthash = function (name, callback) {\n return this.resolverMethodHandler.method(name, 'contenthash', [], contenthash.decode).call(callback);\n};\n/**\n * Set the contenthash\n *\n * @method setContent\n *\n * @param {string} name\n * @param {string} hash\n * @param {function} callback\n * @param {TransactionConfig} txConfig\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setContenthash = function (name, hash, txConfig, callback) {\n var encoded;\n try {\n encoded = contenthash.encode(hash);\n }\n catch (err) {\n var error = new Error('Could not encode ' + hash + '. See docs for supported hash protocols.');\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n throw error;\n }\n return this.resolverMethodHandler.method(name, 'setContenthash', [encoded]).send(txConfig, callback);\n};\n/**\n * Get the multihash\n *\n * @method getMultihash\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.getMultihash = function (name, callback) {\n return this.resolverMethodHandler.method(name, 'multihash', []).call(callback);\n};\n/**\n * Set the multihash\n *\n * @method setMultihash\n *\n * @param {string} name\n * @param {string} hash\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nENS.prototype.setMultihash = function (name, hash, txConfig, callback) {\n return this.resolverMethodHandler.method(name, 'multihash', [hash]).send(txConfig, callback);\n};\n/**\n * Checks if the current used network is synced and looks for ENS support there.\n * Throws an error if not.\n *\n * @returns {Promise}\n */\nENS.prototype.checkNetwork = async function () {\n var now = new Date() / 1000;\n if (!this._lastSyncCheck || (now - this._lastSyncCheck) > 3600) {\n var block = await this.eth.getBlock('latest');\n var headAge = now - block.timestamp;\n if (headAge > 3600) {\n throw new Error(\"Network not synced; last block was \" + headAge + \" seconds ago\");\n }\n this._lastSyncCheck = now;\n }\n if (this.registryAddress) {\n return this.registryAddress;\n }\n if (!this._detectedAddress) {\n var networkType = await this.eth.net.getNetworkType();\n var addr = config.addresses[networkType];\n if (typeof addr === 'undefined') {\n throw new Error(\"ENS is not supported on network \" + networkType);\n }\n this._detectedAddress = addr;\n return this._detectedAddress;\n }\n return this._detectedAddress;\n};\nmodule.exports = ENS;\n","/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file index.js\n * @author Fabian Vogelsteller \n * @date 2017\n */\n\"use strict\";\nvar core = require('web3-core');\nvar Method = require('web3-core-method');\nvar utils = require('web3-utils');\nvar Net = function () {\n var _this = this;\n // sets _requestmanager\n core.packageInit(this, arguments);\n [\n new Method({\n name: 'getId',\n call: 'net_version',\n params: 0,\n outputFormatter: parseInt\n }),\n new Method({\n name: 'isListening',\n call: 'net_listening',\n params: 0\n }),\n new Method({\n name: 'getPeerCount',\n call: 'net_peerCount',\n params: 0,\n outputFormatter: utils.hexToNumber\n })\n ].forEach(function (method) {\n method.attachToObject(_this);\n method.setRequestManager(_this._requestManager);\n });\n};\ncore.addProviders(Net);\nmodule.exports = Net;\n","/*\n This file is part of web3.js.\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file config.js\n *\n * @author Samuel Furter \n * @date 2017\n */\n\"use strict\";\n/**\n * Source: https://docs.ens.domains/ens-deployments\n *\n * @type {{addresses: {main: string, rinkeby: string, goerli: string, ropsten: string}}}\n */\nvar config = {\n addresses: {\n main: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n ropsten: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n rinkeby: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n goerli: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n // These ids obtained at ensdomains docs:\n // https://docs.ens.domains/contract-developer-guide/writing-a-resolver\n interfaceIds: {\n addr: \"0x3b3b57de\",\n setAddr: \"0x3b3b57de\",\n pubkey: \"0xc8690233\",\n setPubkey: \"0xc8690233\",\n contenthash: \"0xbc1c58d1\",\n setContenthash: \"0xbc1c58d1\",\n content: \"0xd8389dc5\",\n setContent: \"0xd8389dc5\"\n }\n};\nmodule.exports = config;\n","/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file index.js\n * @author Fabian Vogelsteller \n * @date 2017\n */\n\"use strict\";\nvar core = require('web3-core');\nvar Method = require('web3-core-method');\nvar utils = require('web3-utils');\nvar Net = require('web3-net');\nvar formatters = require('web3-core-helpers').formatters;\nvar Personal = function Personal() {\n var _this = this;\n // sets _requestmanager\n core.packageInit(this, arguments);\n this.net = new Net(this);\n var defaultAccount = null;\n var defaultBlock = 'latest';\n Object.defineProperty(this, 'defaultAccount', {\n get: function () {\n return defaultAccount;\n },\n set: function (val) {\n if (val) {\n defaultAccount = utils.toChecksumAddress(formatters.inputAddressFormatter(val));\n }\n // update defaultBlock\n methods.forEach(function (method) {\n method.defaultAccount = defaultAccount;\n });\n return val;\n },\n enumerable: true\n });\n Object.defineProperty(this, 'defaultBlock', {\n get: function () {\n return defaultBlock;\n },\n set: function (val) {\n defaultBlock = val;\n // update defaultBlock\n methods.forEach(function (method) {\n method.defaultBlock = defaultBlock;\n });\n return val;\n },\n enumerable: true\n });\n var methods = [\n new Method({\n name: 'getAccounts',\n call: 'personal_listAccounts',\n params: 0,\n outputFormatter: utils.toChecksumAddress\n }),\n new Method({\n name: 'newAccount',\n call: 'personal_newAccount',\n params: 1,\n inputFormatter: [null],\n outputFormatter: utils.toChecksumAddress\n }),\n new Method({\n name: 'unlockAccount',\n call: 'personal_unlockAccount',\n params: 3,\n inputFormatter: [formatters.inputAddressFormatter, null, null]\n }),\n new Method({\n name: 'lockAccount',\n call: 'personal_lockAccount',\n params: 1,\n inputFormatter: [formatters.inputAddressFormatter]\n }),\n new Method({\n name: 'importRawKey',\n call: 'personal_importRawKey',\n params: 2\n }),\n new Method({\n name: 'sendTransaction',\n call: 'personal_sendTransaction',\n params: 2,\n inputFormatter: [formatters.inputTransactionFormatter, null]\n }),\n new Method({\n name: 'signTransaction',\n call: 'personal_signTransaction',\n params: 2,\n inputFormatter: [formatters.inputTransactionFormatter, null]\n }),\n new Method({\n name: 'sign',\n call: 'personal_sign',\n params: 3,\n inputFormatter: [formatters.inputSignFormatter, formatters.inputAddressFormatter, null]\n }),\n new Method({\n name: 'ecRecover',\n call: 'personal_ecRecover',\n params: 2,\n inputFormatter: [formatters.inputSignFormatter, null]\n })\n ];\n methods.forEach(function (method) {\n method.attachToObject(_this);\n method.setRequestManager(_this._requestManager);\n method.defaultBlock = _this.defaultBlock;\n method.defaultAccount = _this.defaultAccount;\n });\n};\ncore.addProviders(Personal);\nmodule.exports = Personal;\n","/*\n This file is part of web3.js.\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file Registry.js\n *\n * @author Samuel Furter \n * @date 2018\n */\n\"use strict\";\nvar Contract = require('web3-eth-contract');\nvar namehash = require('eth-ens-namehash');\nvar PromiEvent = require('web3-core-promievent');\nvar formatters = require('web3-core-helpers').formatters;\nvar utils = require('web3-utils');\nvar REGISTRY_ABI = require('../resources/ABI/Registry');\nvar RESOLVER_ABI = require('../resources/ABI/Resolver');\n/**\n * A wrapper around the ENS registry contract.\n *\n * @method Registry\n * @param {Ens} ens\n * @constructor\n */\nfunction Registry(ens) {\n var self = this;\n this.ens = ens;\n this.contract = ens.checkNetwork().then(function (address) {\n var contract = new Contract(REGISTRY_ABI, address);\n contract.setProvider(self.ens.eth.currentProvider);\n return contract;\n });\n}\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @deprecated Please use the \"getOwner\" method instead of \"owner\"\n *\n * @method owner\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nRegistry.prototype.owner = function (name, callback) {\n console.warn('Deprecated: Please use the \"getOwner\" method instead of \"owner\".');\n return this.getOwner(name, callback);\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method getOwner\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nRegistry.prototype.getOwner = function (name, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.owner(namehash.hash(name)).call();\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method setOwner\n *\n * @param {string} name\n * @param {string} address\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nRegistry.prototype.setOwner = function (name, address, txConfig, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.setOwner(namehash.hash(name), formatters.inputAddressFormatter(address)).send(txConfig);\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Returns the TTL of the given node by his name\n *\n * @method getTTL\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returnss {Promise}\n */\nRegistry.prototype.getTTL = function (name, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.ttl(namehash.hash(name)).call();\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method setTTL\n *\n * @param {string} name\n * @param {number} ttl\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nRegistry.prototype.setTTL = function (name, ttl, txConfig, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.setTTL(namehash.hash(name), ttl).send(txConfig);\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method setSubnodeOwner\n *\n * @param {string} name\n * @param {string} label\n * @param {string} address\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nRegistry.prototype.setSubnodeOwner = function (name, label, address, txConfig, callback) {\n var promiEvent = new PromiEvent(true);\n if (!utils.isHexStrict(label)) {\n label = utils.sha3(label);\n }\n this.contract.then(function (contract) {\n return contract.methods.setSubnodeOwner(namehash.hash(name), label, formatters.inputAddressFormatter(address)).send(txConfig);\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Sets the owner, resolver, and TTL for an ENS record in a single operation.\n *\n * @method setRecord\n *\n * @param {string} name\n * @param {string} owner\n * @param {string} resolver\n * @param {string | number} ttl\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nRegistry.prototype.setRecord = function (name, owner, resolver, ttl, txConfig, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.setRecord(namehash.hash(name), formatters.inputAddressFormatter(owner), formatters.inputAddressFormatter(resolver), ttl).send(txConfig);\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Sets the owner, resolver and TTL for a subdomain, creating it if necessary.\n *\n * @method setSubnodeRecord\n *\n * @param {string} name\n * @param {string} label\n * @param {string} owner\n * @param {string} resolver\n * @param {string | number} ttl\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nRegistry.prototype.setSubnodeRecord = function (name, label, owner, resolver, ttl, txConfig, callback) {\n var promiEvent = new PromiEvent(true);\n if (!utils.isHexStrict(label)) {\n label = utils.sha3(label);\n }\n this.contract.then(function (contract) {\n return contract.methods.setSubnodeRecord(namehash.hash(name), label, formatters.inputAddressFormatter(owner), formatters.inputAddressFormatter(resolver), ttl).send(txConfig);\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Sets or clears an approval by the given operator.\n *\n * @method setApprovalForAll\n *\n * @param {string} operator\n * @param {boolean} approved\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nRegistry.prototype.setApprovalForAll = function (operator, approved, txConfig, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.setApprovalForAll(formatters.inputAddressFormatter(operator), approved).send(txConfig);\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Returns true if the operator is approved\n *\n * @method isApprovedForAll\n *\n * @param {string} owner\n * @param {string} operator\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nRegistry.prototype.isApprovedForAll = function (owner, operator, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.isApprovedForAll(formatters.inputAddressFormatter(owner), formatters.inputAddressFormatter(operator)).call();\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Returns true if the record exists\n *\n * @method recordExists\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nRegistry.prototype.recordExists = function (name, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.recordExists(namehash.hash(name)).call();\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Returns the resolver contract associated with a name.\n *\n * @deprecated Please use the \"getResolver\" method instead of \"resolver\"\n *\n * @method resolver\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nRegistry.prototype.resolver = function (name, callback) {\n console.warn('Deprecated: Please use the \"getResolver\" method instead of \"resolver\".');\n return this.getResolver(name, callback);\n};\n/**\n * Returns the resolver contract associated with a name.\n *\n * @method getResolver\n *\n * @param {string} name\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {Promise}\n */\nRegistry.prototype.getResolver = function (name, callback) {\n var self = this;\n return this.contract.then(function (contract) {\n return contract.methods.resolver(namehash.hash(name)).call();\n }).then(function (address) {\n var contract = new Contract(RESOLVER_ABI, address);\n contract.setProvider(self.ens.eth.currentProvider);\n if (typeof callback === 'function') {\n // It's required to pass the contract to the first argument to be backward compatible and to have the required consistency\n callback(contract, contract);\n return;\n }\n return contract;\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n throw error;\n });\n};\n/**\n * Returns the address of the owner of an ENS name.\n *\n * @method setResolver\n *\n * @param {string} name\n * @param {string} address\n * @param {TransactionConfig} txConfig\n * @param {function} callback\n *\n * @callback callback callback(error, result)\n * @returns {PromiEvent}\n */\nRegistry.prototype.setResolver = function (name, address, txConfig, callback) {\n var promiEvent = new PromiEvent(true);\n this.contract.then(function (contract) {\n return contract.methods.setResolver(namehash.hash(name), formatters.inputAddressFormatter(address)).send(txConfig);\n }).then(function (receipt) {\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency\n callback(receipt, receipt);\n return;\n }\n promiEvent.resolve(receipt);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\nmodule.exports = Registry;\n","/*\nAdapted from ensdomains/ui\nhttps://github.com/ensdomains/ui/blob/3e62e440b53466eeec9dd1c63d73924eefbd88c1/src/utils/contents.js#L1-L85\n\nBSD 2-Clause License\n\nCopyright (c) 2019, Ethereum Name Service\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nvar contentHash = require('content-hash');\nfunction decode(encoded) {\n var decoded = null;\n var protocolType = null;\n var error = null;\n if (encoded && encoded.error) {\n return {\n protocolType: null,\n decoded: encoded.error\n };\n }\n if (encoded) {\n try {\n decoded = contentHash.decode(encoded);\n var codec = contentHash.getCodec(encoded);\n if (codec === 'ipfs-ns') {\n protocolType = 'ipfs';\n }\n else if (codec === 'swarm-ns') {\n protocolType = 'bzz';\n }\n else if (codec === 'onion') {\n protocolType = 'onion';\n }\n else if (codec === 'onion3') {\n protocolType = 'onion3';\n }\n else {\n decoded = encoded;\n }\n }\n catch (e) {\n error = e.message;\n }\n }\n return {\n protocolType: protocolType,\n decoded: decoded,\n error: error\n };\n}\nfunction encode(text) {\n var content, contentType;\n var encoded = false;\n if (!!text) {\n var matched = text.match(/^(ipfs|bzz|onion|onion3):\\/\\/(.*)/) || text.match(/\\/(ipfs)\\/(.*)/);\n if (matched) {\n contentType = matched[1];\n content = matched[2];\n }\n try {\n if (contentType === 'ipfs') {\n if (content.length >= 4) {\n encoded = '0x' + contentHash.fromIpfs(content);\n }\n }\n else if (contentType === 'bzz') {\n if (content.length >= 4) {\n encoded = '0x' + contentHash.fromSwarm(content);\n }\n }\n else if (contentType === 'onion') {\n if (content.length === 16) {\n encoded = '0x' + contentHash.encode('onion', content);\n }\n }\n else if (contentType === 'onion3') {\n if (content.length === 56) {\n encoded = '0x' + contentHash.encode('onion3', content);\n }\n }\n else {\n throw new Error('Could not encode content hash: unsupported content type');\n }\n }\n catch (err) {\n throw err;\n }\n }\n return encoded;\n}\nmodule.exports = {\n decode: decode,\n encode: encode\n};\n","/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n */\n/**\n * @file index.js\n * @author Fabian Vogelsteller \n * @date 2017\n */\n\"use strict\";\nvar core = require('web3-core');\nvar helpers = require('web3-core-helpers');\nvar Subscriptions = require('web3-core-subscriptions').subscriptions;\nvar Method = require('web3-core-method');\nvar utils = require('web3-utils');\nvar Net = require('web3-net');\nvar ENS = require('web3-eth-ens');\nvar Personal = require('web3-eth-personal');\nvar BaseContract = require('web3-eth-contract');\nvar Iban = require('web3-eth-iban');\nvar Accounts = require('web3-eth-accounts');\nvar abi = require('web3-eth-abi');\nvar getNetworkType = require('./getNetworkType.js');\nvar formatter = helpers.formatters;\nvar blockCall = function (args) {\n return (typeof args[0] === 'string' && args[0].indexOf('0x') === 0) ? \"eth_getBlockByHash\" : \"eth_getBlockByNumber\";\n};\nvar transactionFromBlockCall = function (args) {\n return (typeof args[0] === 'string' && args[0].indexOf('0x') === 0) ? 'eth_getTransactionByBlockHashAndIndex' : 'eth_getTransactionByBlockNumberAndIndex';\n};\nvar uncleCall = function (args) {\n return (typeof args[0] === 'string' && args[0].indexOf('0x') === 0) ? 'eth_getUncleByBlockHashAndIndex' : 'eth_getUncleByBlockNumberAndIndex';\n};\nvar getBlockTransactionCountCall = function (args) {\n return (typeof args[0] === 'string' && args[0].indexOf('0x') === 0) ? 'eth_getBlockTransactionCountByHash' : 'eth_getBlockTransactionCountByNumber';\n};\nvar uncleCountCall = function (args) {\n return (typeof args[0] === 'string' && args[0].indexOf('0x') === 0) ? 'eth_getUncleCountByBlockHash' : 'eth_getUncleCountByBlockNumber';\n};\nvar Eth = function Eth() {\n var _this = this;\n // sets _requestmanager\n core.packageInit(this, arguments);\n // overwrite package setRequestManager\n var setRequestManager = this.setRequestManager;\n this.setRequestManager = function (manager) {\n setRequestManager(manager);\n _this.net.setRequestManager(manager);\n _this.personal.setRequestManager(manager);\n _this.accounts.setRequestManager(manager);\n _this.Contract._requestManager = _this._requestManager;\n _this.Contract.currentProvider = _this._provider;\n return true;\n };\n // overwrite setProvider\n var setProvider = this.setProvider;\n this.setProvider = function () {\n setProvider.apply(_this, arguments);\n _this.setRequestManager(_this._requestManager);\n // Set detectedAddress/lastSyncCheck back to null because the provider could be connected to a different chain now\n _this.ens._detectedAddress = null;\n _this.ens._lastSyncCheck = null;\n };\n var handleRevert = false;\n var defaultAccount = null;\n var defaultBlock = 'latest';\n var transactionBlockTimeout = 50;\n var transactionConfirmationBlocks = 24;\n var transactionPollingTimeout = 750;\n var transactionPollingInterval = 1000;\n var blockHeaderTimeout = 10; // 10 seconds\n var maxListenersWarningThreshold = 100;\n var defaultChain, defaultHardfork, defaultCommon;\n Object.defineProperty(this, 'handleRevert', {\n get: function () {\n return handleRevert;\n },\n set: function (val) {\n handleRevert = val;\n // also set on the Contract object\n _this.Contract.handleRevert = handleRevert;\n // update handleRevert\n methods.forEach(function (method) {\n method.handleRevert = handleRevert;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'defaultCommon', {\n get: function () {\n return defaultCommon;\n },\n set: function (val) {\n defaultCommon = val;\n // also set on the Contract object\n _this.Contract.defaultCommon = defaultCommon;\n // update defaultBlock\n methods.forEach(function (method) {\n method.defaultCommon = defaultCommon;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'defaultHardfork', {\n get: function () {\n return defaultHardfork;\n },\n set: function (val) {\n defaultHardfork = val;\n // also set on the Contract object\n _this.Contract.defaultHardfork = defaultHardfork;\n // update defaultBlock\n methods.forEach(function (method) {\n method.defaultHardfork = defaultHardfork;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'defaultChain', {\n get: function () {\n return defaultChain;\n },\n set: function (val) {\n defaultChain = val;\n // also set on the Contract object\n _this.Contract.defaultChain = defaultChain;\n // update defaultBlock\n methods.forEach(function (method) {\n method.defaultChain = defaultChain;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'transactionPollingTimeout', {\n get: function () {\n return transactionPollingTimeout;\n },\n set: function (val) {\n transactionPollingTimeout = val;\n // also set on the Contract object\n _this.Contract.transactionPollingTimeout = transactionPollingTimeout;\n // update defaultBlock\n methods.forEach(function (method) {\n method.transactionPollingTimeout = transactionPollingTimeout;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'transactionPollingInterval', {\n get: function () {\n return transactionPollingInterval;\n },\n set: function (val) {\n transactionPollingInterval = val;\n // also set on the Contract object\n _this.Contract.transactionPollingInterval = transactionPollingInterval;\n // update defaultBlock\n methods.forEach(function (method) {\n method.transactionPollingInterval = transactionPollingInterval;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'transactionConfirmationBlocks', {\n get: function () {\n return transactionConfirmationBlocks;\n },\n set: function (val) {\n transactionConfirmationBlocks = val;\n // also set on the Contract object\n _this.Contract.transactionConfirmationBlocks = transactionConfirmationBlocks;\n // update defaultBlock\n methods.forEach(function (method) {\n method.transactionConfirmationBlocks = transactionConfirmationBlocks;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'transactionBlockTimeout', {\n get: function () {\n return transactionBlockTimeout;\n },\n set: function (val) {\n transactionBlockTimeout = val;\n // also set on the Contract object\n _this.Contract.transactionBlockTimeout = transactionBlockTimeout;\n // update defaultBlock\n methods.forEach(function (method) {\n method.transactionBlockTimeout = transactionBlockTimeout;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'blockHeaderTimeout', {\n get: function () {\n return blockHeaderTimeout;\n },\n set: function (val) {\n blockHeaderTimeout = val;\n // also set on the Contract object\n _this.Contract.blockHeaderTimeout = blockHeaderTimeout;\n // update defaultBlock\n methods.forEach(function (method) {\n method.blockHeaderTimeout = blockHeaderTimeout;\n });\n },\n enumerable: true\n });\n Object.defineProperty(this, 'defaultAccount', {\n get: function () {\n return defaultAccount;\n },\n set: function (val) {\n if (val) {\n defaultAccount = utils.toChecksumAddress(formatter.inputAddressFormatter(val));\n }\n // also set on the Contract object\n _this.Contract.defaultAccount = defaultAccount;\n _this.personal.defaultAccount = defaultAccount;\n // update defaultBlock\n methods.forEach(function (method) {\n method.defaultAccount = defaultAccount;\n });\n return val;\n },\n enumerable: true\n });\n Object.defineProperty(this, 'defaultBlock', {\n get: function () {\n return defaultBlock;\n },\n set: function (val) {\n defaultBlock = val;\n // also set on the Contract object\n _this.Contract.defaultBlock = defaultBlock;\n _this.personal.defaultBlock = defaultBlock;\n // update defaultBlock\n methods.forEach(function (method) {\n method.defaultBlock = defaultBlock;\n });\n return val;\n },\n enumerable: true\n });\n Object.defineProperty(this, 'maxListenersWarningThreshold', {\n get: function () {\n return maxListenersWarningThreshold;\n },\n set: function (val) {\n if (_this.currentProvider && _this.currentProvider.setMaxListeners) {\n maxListenersWarningThreshold = val;\n _this.currentProvider.setMaxListeners(val);\n }\n },\n enumerable: true\n });\n this.clearSubscriptions = _this._requestManager.clearSubscriptions.bind(_this._requestManager);\n this.removeSubscriptionById = _this._requestManager.removeSubscription.bind(_this._requestManager);\n // add net\n this.net = new Net(this);\n // add chain detection\n this.net.getNetworkType = getNetworkType.bind(this);\n // add accounts\n this.accounts = new Accounts(this);\n // add personal\n this.personal = new Personal(this);\n this.personal.defaultAccount = this.defaultAccount;\n // set warnings threshold\n this.maxListenersWarningThreshold = maxListenersWarningThreshold;\n // create a proxy Contract type for this instance, as a Contract's provider\n // is stored as a class member rather than an instance variable. If we do\n // not create this proxy type, changing the provider in one instance of\n // web3-eth would subsequently change the provider for _all_ contract\n // instances!\n var self = this;\n var Contract = function Contract() {\n BaseContract.apply(this, arguments);\n // when Eth.setProvider is called, call packageInit\n // on all contract instances instantiated via this Eth\n // instances. This will update the currentProvider for\n // the contract instances\n var _this = this;\n var setProvider = self.setProvider;\n self.setProvider = function () {\n setProvider.apply(self, arguments);\n core.packageInit(_this, [self]);\n };\n };\n Contract.setProvider = function () {\n BaseContract.setProvider.apply(this, arguments);\n };\n // make our proxy Contract inherit from web3-eth-contract so that it has all\n // the right functionality and so that instanceof and friends work properly\n Contract.prototype = Object.create(BaseContract.prototype);\n Contract.prototype.constructor = Contract;\n // add contract\n this.Contract = Contract;\n this.Contract.defaultAccount = this.defaultAccount;\n this.Contract.defaultBlock = this.defaultBlock;\n this.Contract.transactionBlockTimeout = this.transactionBlockTimeout;\n this.Contract.transactionConfirmationBlocks = this.transactionConfirmationBlocks;\n this.Contract.transactionPollingTimeout = this.transactionPollingTimeout;\n this.Contract.transactionPollingInterval = this.transactionPollingInterval;\n this.Contract.blockHeaderTimeout = this.blockHeaderTimeout;\n this.Contract.handleRevert = this.handleRevert;\n this.Contract._requestManager = this._requestManager;\n this.Contract._ethAccounts = this.accounts;\n this.Contract.currentProvider = this._requestManager.provider;\n // add IBAN\n this.Iban = Iban;\n // add ABI\n this.abi = abi;\n // add ENS\n this.ens = new ENS(this);\n var methods = [\n new Method({\n name: 'getNodeInfo',\n call: 'web3_clientVersion'\n }),\n new Method({\n name: 'getProtocolVersion',\n call: 'eth_protocolVersion',\n params: 0\n }),\n new Method({\n name: 'getCoinbase',\n call: 'eth_coinbase',\n params: 0\n }),\n new Method({\n name: 'isMining',\n call: 'eth_mining',\n params: 0\n }),\n new Method({\n name: 'getHashrate',\n call: 'eth_hashrate',\n params: 0,\n outputFormatter: utils.hexToNumber\n }),\n new Method({\n name: 'isSyncing',\n call: 'eth_syncing',\n params: 0,\n outputFormatter: formatter.outputSyncingFormatter\n }),\n new Method({\n name: 'getGasPrice',\n call: 'eth_gasPrice',\n params: 0,\n outputFormatter: formatter.outputBigNumberFormatter\n }),\n new Method({\n name: 'getFeeHistory',\n call: 'eth_feeHistory',\n params: 3,\n inputFormatter: [utils.numberToHex, formatter.inputBlockNumberFormatter, null]\n }),\n new Method({\n name: 'getAccounts',\n call: 'eth_accounts',\n params: 0,\n outputFormatter: utils.toChecksumAddress\n }),\n new Method({\n name: 'getBlockNumber',\n call: 'eth_blockNumber',\n params: 0,\n outputFormatter: utils.hexToNumber\n }),\n new Method({\n name: 'getBalance',\n call: 'eth_getBalance',\n params: 2,\n inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter],\n outputFormatter: formatter.outputBigNumberFormatter\n }),\n new Method({\n name: 'getStorageAt',\n call: 'eth_getStorageAt',\n params: 3,\n inputFormatter: [formatter.inputAddressFormatter, utils.numberToHex, formatter.inputDefaultBlockNumberFormatter]\n }),\n new Method({\n name: 'getCode',\n call: 'eth_getCode',\n params: 2,\n inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter]\n }),\n new Method({\n name: 'getBlock',\n call: blockCall,\n params: 2,\n inputFormatter: [formatter.inputBlockNumberFormatter, function (val) { return !!val; }],\n outputFormatter: formatter.outputBlockFormatter\n }),\n new Method({\n name: 'getUncle',\n call: uncleCall,\n params: 2,\n inputFormatter: [formatter.inputBlockNumberFormatter, utils.numberToHex],\n outputFormatter: formatter.outputBlockFormatter,\n }),\n new Method({\n name: 'getBlockTransactionCount',\n call: getBlockTransactionCountCall,\n params: 1,\n inputFormatter: [formatter.inputBlockNumberFormatter],\n outputFormatter: utils.hexToNumber\n }),\n new Method({\n name: 'getBlockUncleCount',\n call: uncleCountCall,\n params: 1,\n inputFormatter: [formatter.inputBlockNumberFormatter],\n outputFormatter: utils.hexToNumber\n }),\n new Method({\n name: 'getTransaction',\n call: 'eth_getTransactionByHash',\n params: 1,\n inputFormatter: [null],\n outputFormatter: formatter.outputTransactionFormatter\n }),\n new Method({\n name: 'getTransactionFromBlock',\n call: transactionFromBlockCall,\n params: 2,\n inputFormatter: [formatter.inputBlockNumberFormatter, utils.numberToHex],\n outputFormatter: formatter.outputTransactionFormatter\n }),\n new Method({\n name: 'getTransactionReceipt',\n call: 'eth_getTransactionReceipt',\n params: 1,\n inputFormatter: [null],\n outputFormatter: formatter.outputTransactionReceiptFormatter\n }),\n new Method({\n name: 'getTransactionCount',\n call: 'eth_getTransactionCount',\n params: 2,\n inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter],\n outputFormatter: utils.hexToNumber\n }),\n new Method({\n name: 'sendSignedTransaction',\n call: 'eth_sendRawTransaction',\n params: 1,\n inputFormatter: [null],\n abiCoder: abi\n }),\n new Method({\n name: 'signTransaction',\n call: 'eth_signTransaction',\n params: 1,\n inputFormatter: [formatter.inputTransactionFormatter]\n }),\n new Method({\n name: 'sendTransaction',\n call: 'eth_sendTransaction',\n params: 1,\n inputFormatter: [formatter.inputTransactionFormatter],\n abiCoder: abi\n }),\n new Method({\n name: 'sign',\n call: 'eth_sign',\n params: 2,\n inputFormatter: [formatter.inputSignFormatter, formatter.inputAddressFormatter],\n transformPayload: function (payload) {\n payload.params.reverse();\n return payload;\n }\n }),\n new Method({\n name: 'call',\n call: 'eth_call',\n params: 2,\n inputFormatter: [formatter.inputCallFormatter, formatter.inputDefaultBlockNumberFormatter],\n abiCoder: abi\n }),\n new Method({\n name: 'estimateGas',\n call: 'eth_estimateGas',\n params: 1,\n inputFormatter: [formatter.inputCallFormatter],\n outputFormatter: utils.hexToNumber\n }),\n new Method({\n name: 'submitWork',\n call: 'eth_submitWork',\n params: 3\n }),\n new Method({\n name: 'getWork',\n call: 'eth_getWork',\n params: 0\n }),\n new Method({\n name: 'getPastLogs',\n call: 'eth_getLogs',\n params: 1,\n inputFormatter: [formatter.inputLogFormatter],\n outputFormatter: formatter.outputLogFormatter\n }),\n new Method({\n name: 'getChainId',\n call: 'eth_chainId',\n params: 0,\n outputFormatter: utils.hexToNumber\n }),\n new Method({\n name: 'requestAccounts',\n call: 'eth_requestAccounts',\n params: 0,\n outputFormatter: utils.toChecksumAddress\n }),\n new Method({\n name: 'getProof',\n call: 'eth_getProof',\n params: 3,\n inputFormatter: [formatter.inputAddressFormatter, formatter.inputStorageKeysFormatter, formatter.inputDefaultBlockNumberFormatter],\n outputFormatter: formatter.outputProofFormatter\n }),\n new Method({\n name: 'getPendingTransactions',\n call: 'eth_pendingTransactions',\n params: 0,\n outputFormatter: formatter.outputTransactionFormatter\n }),\n new Method({\n name: 'createAccessList',\n call: 'eth_createAccessList',\n params: 2,\n inputFormatter: [formatter.inputTransactionFormatter, formatter.inputDefaultBlockNumberFormatter],\n }),\n // subscriptions\n new Subscriptions({\n name: 'subscribe',\n type: 'eth',\n subscriptions: {\n 'newBlockHeaders': {\n // TODO rename on RPC side?\n subscriptionName: 'newHeads',\n params: 0,\n outputFormatter: formatter.outputBlockFormatter\n },\n 'pendingTransactions': {\n subscriptionName: 'newPendingTransactions',\n params: 0\n },\n 'logs': {\n params: 1,\n inputFormatter: [formatter.inputLogFormatter],\n outputFormatter: formatter.outputLogFormatter,\n // DUBLICATE, also in web3-eth-contract\n subscriptionHandler: function (output) {\n if (output.removed) {\n this.emit('changed', output);\n }\n else {\n this.emit('data', output);\n }\n if (typeof this.callback === 'function') {\n this.callback(null, output, this);\n }\n }\n },\n 'syncing': {\n params: 0,\n outputFormatter: formatter.outputSyncingFormatter,\n subscriptionHandler: function (output) {\n var _this = this;\n // fire TRUE at start\n if (this._isSyncing !== true) {\n this._isSyncing = true;\n this.emit('changed', _this._isSyncing);\n if (typeof this.callback === 'function') {\n this.callback(null, _this._isSyncing, this);\n }\n setTimeout(function () {\n _this.emit('data', output);\n if (typeof _this.callback === 'function') {\n _this.callback(null, output, _this);\n }\n }, 0);\n // fire sync status\n }\n else {\n this.emit('data', output);\n if (typeof _this.callback === 'function') {\n this.callback(null, output, this);\n }\n // wait for some time before fireing the FALSE\n clearTimeout(this._isSyncingTimeout);\n this._isSyncingTimeout = setTimeout(function () {\n if (output.currentBlock > output.highestBlock - 200) {\n _this._isSyncing = false;\n _this.emit('changed', _this._isSyncing);\n if (typeof _this.callback === 'function') {\n _this.callback(null, _this._isSyncing, _this);\n }\n }\n }, 500);\n }\n }\n }\n }\n })\n ];\n methods.forEach(function (method) {\n method.attachToObject(_this);\n method.setRequestManager(_this._requestManager, _this.accounts); // second param is the eth.accounts module (necessary for signing transactions locally)\n method.defaultBlock = _this.defaultBlock;\n method.defaultAccount = _this.defaultAccount;\n method.transactionBlockTimeout = _this.transactionBlockTimeout;\n method.transactionConfirmationBlocks = _this.transactionConfirmationBlocks;\n method.transactionPollingTimeout = _this.transactionPollingTimeout;\n method.transactionPollingInterval = _this.transactionPollingInterval;\n method.handleRevert = _this.handleRevert;\n });\n};\n// Adds the static givenProvider and providers property to the Eth module\ncore.addProviders(Eth);\nmodule.exports = Eth;\n","/*\n This file is part of web3.js.\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file ResolverMethodHandler.js\n *\n * @author Samuel Furter \n * @date 2018\n */\n\"use strict\";\nvar PromiEvent = require('web3-core-promievent');\nvar namehash = require('eth-ens-namehash');\nvar errors = require('web3-core-helpers').errors;\nvar interfaceIds = require('../config').interfaceIds;\n/**\n * @param {Registry} registry\n * @constructor\n */\nfunction ResolverMethodHandler(registry) {\n this.registry = registry;\n}\n/**\n * Executes an resolver method and returns an eventifiedPromise\n *\n * @param {string} ensName\n * @param {string} methodName\n * @param {array} methodArguments\n * @param {function} callback\n * @returns {Object}\n */\nResolverMethodHandler.prototype.method = function (ensName, methodName, methodArguments, outputFormatter, callback) {\n return {\n call: this.call.bind({\n ensName: ensName,\n methodName: methodName,\n methodArguments: methodArguments,\n callback: callback,\n parent: this,\n outputFormatter: outputFormatter\n }),\n send: this.send.bind({\n ensName: ensName,\n methodName: methodName,\n methodArguments: methodArguments,\n callback: callback,\n parent: this\n })\n };\n};\n/**\n * Executes call\n *\n * @returns {eventifiedPromise}\n */\nResolverMethodHandler.prototype.call = function (callback) {\n var self = this;\n var promiEvent = new PromiEvent();\n var preparedArguments = this.parent.prepareArguments(this.ensName, this.methodArguments);\n var outputFormatter = this.outputFormatter || null;\n this.parent.registry.getResolver(this.ensName).then(async function (resolver) {\n await self.parent.checkInterfaceSupport(resolver, self.methodName);\n self.parent.handleCall(promiEvent, resolver.methods[self.methodName], preparedArguments, outputFormatter, callback);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Executes send\n *\n * @param {Object} sendOptions\n * @param {function} callback\n * @returns {eventifiedPromise}\n */\nResolverMethodHandler.prototype.send = function (sendOptions, callback) {\n var self = this;\n var promiEvent = new PromiEvent();\n var preparedArguments = this.parent.prepareArguments(this.ensName, this.methodArguments);\n this.parent.registry.getResolver(this.ensName).then(async function (resolver) {\n await self.parent.checkInterfaceSupport(resolver, self.methodName);\n self.parent.handleSend(promiEvent, resolver.methods[self.methodName], preparedArguments, sendOptions, callback);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent.eventEmitter;\n};\n/**\n * Handles a call method\n *\n * @param {eventifiedPromise} promiEvent\n * @param {function} method\n * @param {array} preparedArguments\n * @param {function} callback\n * @returns {eventifiedPromise}\n */\nResolverMethodHandler.prototype.handleCall = function (promiEvent, method, preparedArguments, outputFormatter, callback) {\n method.apply(this, preparedArguments).call()\n .then(function (result) {\n if (outputFormatter) {\n result = outputFormatter(result);\n }\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the second argument to be backwards compatible and to have the required consistency\n callback(result, result);\n return;\n }\n promiEvent.resolve(result);\n }).catch(function (error) {\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent;\n};\n/**\n * Handles a send method\n *\n * @param {eventifiedPromise} promiEvent\n * @param {function} method\n * @param {array} preparedArguments\n * @param {Object} sendOptions\n * @param {function} callback\n * @returns {eventifiedPromise}\n */\nResolverMethodHandler.prototype.handleSend = function (promiEvent, method, preparedArguments, sendOptions, callback) {\n method.apply(this, preparedArguments).send(sendOptions)\n .on('sending', function () {\n promiEvent.eventEmitter.emit('sending');\n })\n .on('sent', function () {\n promiEvent.eventEmitter.emit('sent');\n })\n .on('transactionHash', function (hash) {\n promiEvent.eventEmitter.emit('transactionHash', hash);\n })\n .on('confirmation', function (confirmationNumber, receipt) {\n promiEvent.eventEmitter.emit('confirmation', confirmationNumber, receipt);\n })\n .on('receipt', function (receipt) {\n promiEvent.eventEmitter.emit('receipt', receipt);\n promiEvent.resolve(receipt);\n if (typeof callback === 'function') {\n // It's required to pass the receipt to the second argument to be backwards compatible and to have the required consistency\n callback(receipt, receipt);\n }\n })\n .on('error', function (error) {\n promiEvent.eventEmitter.emit('error', error);\n if (typeof callback === 'function') {\n callback(error, null);\n return;\n }\n promiEvent.reject(error);\n });\n return promiEvent;\n};\n/**\n * Adds the ENS node to the arguments\n *\n * @param {string} name\n * @param {array} methodArguments\n *\n * @returns {array}\n */\nResolverMethodHandler.prototype.prepareArguments = function (name, methodArguments) {\n var node = namehash.hash(name);\n if (methodArguments.length > 0) {\n methodArguments.unshift(node);\n return methodArguments;\n }\n return [node];\n};\n/**\n *\n *\n * @param {Contract} resolver\n * @param {string} methodName\n *\n * @returns {Promise}\n */\nResolverMethodHandler.prototype.checkInterfaceSupport = async function (resolver, methodName) {\n // Skip validation for undocumented interface ids (ex: multihash)\n if (!interfaceIds[methodName])\n return;\n var supported = false;\n try {\n supported = await resolver\n .methods\n .supportsInterface(interfaceIds[methodName])\n .call();\n }\n catch (err) {\n console.warn('Could not verify interface of resolver contract at \"' + resolver.options.address + '\". ');\n }\n if (!supported) {\n throw errors.ResolverMethodMissingError(resolver.options.address, methodName);\n }\n};\nmodule.exports = ResolverMethodHandler;\n","/*\n This file is part of web3.js.\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file index.js\n *\n * @author Samuel Furter \n * @date 2018\n */\n\"use strict\";\nvar ENS = require('./ENS');\nmodule.exports = ENS;\n"],"sourceRoot":""}