{"_id":"delib","_rev":"128-6fafd41575f19b58a27f7bbeec041421","name":"delib","dist-tags":{"latest":"6.2.10"},"versions":{"6.2.6":{"name":"delib","version":"6.2.6","keywords":["web3","ethereum"],"author":{"name":"Zhiwen Huang","email":"zhiwen555@gmail.com"},"license":"MIT","_id":"delib@6.2.6","maintainers":[{"name":"zhiwenhuang","email":"zhiwen555@gmail.com"}],"homepage":"https://github.com/zhiwenh/delib#readme","bugs":{"url":"https://github.com/zhiwenh/delib/issues"},"bin":{"delib":"bin/delib"},"dist":{"shasum":"bc5275942312231c7431595aaa3e53b4b926710b","tarball":"https://registry.npmjs.org/delib/-/delib-6.2.6.tgz","fileCount":28,"integrity":"sha512-G3Of4Sjy9H8OhKfMBrXKXVvaZE7BZOnsKqgtiWFlOZzHhHct21jzkETBRkTy9iNSCVxCpvZGM4WyuoE7DVXnZQ==","signatures":[{"sig":"MEUCIEixtVDrXXRalM3dmLV2sMZKNAjxXEgtoI8Grr3g9eHQAiEA4Djc78Y/mgHDU1cG6ten84oi+pBapzQFH79k9E+w7hw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":159876},"main":"index.js","gitHead":"0c2def23773c83e4556c0f29260b273826822322","scripts":{"test":"node ./testing/tests/core.js"},"_npmUser":{"name":"zhiwenhuang","email":"zhiwen555@gmail.com"},"repository":{"url":"git+https://github.com/zhiwenh/delib.git","type":"git"},"_npmVersion":"10.8.3","description":"Simple Ethereum framework for DApps, smart contract creation, and smart contract interaction","directories":{},"_nodeVersion":"22.9.0","dependencies":{"solc":"0.8.6","web3":"1.3.6","ethers":"5.4.4","commander":"2.9.0","solc0.4.1":"npm:solc@0.4.1","solc0.4.2":"npm:solc@0.4.2","solc0.4.3":"npm:solc@0.4.3","solc0.4.4":"npm:solc@0.4.4","solc0.4.5":"npm:solc@0.4.5","solc0.4.6":"npm:solc@0.4.6","solc0.4.7":"npm:solc@0.4.7","solc0.4.8":"npm:solc@0.4.8","solc0.4.9":"npm:solc@0.4.9","solc0.5.0":"npm:solc@0.5.0","solc0.5.1":"npm:solc@0.5.1","solc0.5.2":"npm:solc@0.5.2","solc0.5.3":"npm:solc@0.5.3","solc0.5.4":"npm:solc@0.5.4","solc0.5.5":"npm:solc@0.5.5","solc0.5.6":"npm:solc@0.5.6","solc0.5.7":"npm:solc@0.5.7","solc0.5.8":"npm:solc@0.5.8","solc0.5.9":"npm:solc@0.5.9","solc0.6.0":"npm:solc@0.6.0","solc0.6.1":"npm:solc@0.6.1","solc0.6.2":"npm:solc@0.6.2","solc0.6.3":"npm:solc@0.6.3","solc0.6.4":"npm:solc@0.6.4","solc0.6.5":"npm:solc@0.6.5","solc0.6.6":"npm:solc@0.6.6","solc0.6.7":"npm:solc@0.6.7","solc0.6.8":"npm:solc@0.6.8","solc0.6.9":"npm:solc@0.6.9","solc0.7.0":"npm:solc@0.7.0","solc0.7.1":"npm:solc@0.7.1","solc0.7.2":"npm:solc@0.7.2","solc0.7.3":"npm:solc@0.7.3","solc0.7.4":"npm:solc@0.7.4","solc0.7.5":"npm:solc@0.7.5","solc0.7.6":"npm:solc@0.7.6","solc0.8.0":"npm:solc@0.8.0","solc0.8.1":"npm:solc@0.8.1","solc0.8.2":"npm:solc@0.8.2","solc0.8.3":"npm:solc@0.8.3","solc0.8.4":"npm:solc@0.8.4","solc0.8.5":"npm:solc@0.8.5","solc0.8.6":"npm:solc@0.8.6","solc0.4.10":"npm:solc@0.4.10","solc0.4.11":"npm:solc@0.4.11","solc0.4.13":"npm:solc@0.4.13","solc0.4.14":"npm:solc@0.4.14","solc0.4.15":"npm:solc@0.4.15","solc0.4.16":"npm:solc@0.4.16","solc0.4.17":"npm:solc@0.4.17","solc0.4.18":"npm:solc@0.4.18","solc0.4.19":"npm:solc@0.4.19","solc0.4.20":"npm:solc@0.4.20","solc0.4.21":"npm:solc@0.4.21","solc0.4.22":"npm:solc@0.4.22","solc0.4.23":"npm:solc@0.4.23","solc0.4.24":"npm:solc@0.4.24","solc0.4.25":"npm:solc@0.4.25","solc0.4.26":"npm:solc@0.4.26","solc0.5.10":"npm:solc@0.5.10","solc0.5.11":"npm:solc@0.5.11","solc0.5.12":"npm:solc@0.5.12","solc0.5.13":"npm:solc@0.5.13","solc0.5.14":"npm:solc@0.5.14","solc0.5.15":"npm:solc@0.5.15","solc0.5.16":"npm:solc@0.5.16","solc0.5.17":"npm:solc@0.5.17","solc0.6.10":"npm:solc@0.6.10","solc0.6.11":"npm:solc@0.6.11","solc0.6.12":"npm:solc@0.6.12","path-exists":"^3.0.0","es6-promisify":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.6.3","tapes":"^4.1.0","tap-spec":"^4.1.1"},"_npmOperationalInternal":{"tmp":"tmp/delib_6.2.6_1745539451406_0.25924840499589874","host":"s3://npm-registry-packages-npm-production"}},"6.2.7":{"name":"delib","version":"6.2.7","keywords":["web3","ethereum"],"author":{"name":"Zhiwen Huang","email":"zhiwen555@gmail.com"},"license":"ISC","_id":"delib@6.2.7","maintainers":[{"name":"zhiwenhuang","email":"zhiwen555@gmail.com"}],"homepage":"https://github.com/zhiwenh/delib#readme","bugs":{"url":"https://github.com/zhiwenh/delib/issues"},"bin":{"delib":"bin/delib"},"dist":{"shasum":"663cb7bde3cebded020ba02a2d68f8be132bcc6b","tarball":"https://registry.npmjs.org/delib/-/delib-6.2.7.tgz","fileCount":28,"integrity":"sha512-p+qMn1MPjHzli9HHaxEqvvkF8TOAPywKDdjyWDBeP/lc9AcCXAnip9zOh5ncWW5OR0m26znDdnUuMJWASmHMUw==","signatures":[{"sig":"MEYCIQDlLkQfAqXyOYRexIH0qVBjnKZUi/vQsmRiy07UgoNKswIhAIztmcWo6CuAjeCnYW5+e9wEeEgFcPLHyf4pw7ZK9np7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":159876},"main":"index.js","gitHead":"ff5348f592c37bac12f7d6a61a6946e4aa2a3150","scripts":{"test":"node ./testing/tests/core.js"},"_npmUser":{"name":"zhiwenhuang","email":"zhiwen555@gmail.com"},"repository":{"url":"git+https://github.com/zhiwenh/delib.git","type":"git"},"_npmVersion":"10.8.3","description":"Simple Ethereum framework for DApps, smart contract creation, and smart contract interaction","directories":{},"_nodeVersion":"22.9.0","dependencies":{"solc":"0.8.6","web3":"1.3.6","ethers":"5.4.4","commander":"2.9.0","solc0.4.1":"npm:solc@0.4.1","solc0.4.2":"npm:solc@0.4.2","solc0.4.3":"npm:solc@0.4.3","solc0.4.4":"npm:solc@0.4.4","solc0.4.5":"npm:solc@0.4.5","solc0.4.6":"npm:solc@0.4.6","solc0.4.7":"npm:solc@0.4.7","solc0.4.8":"npm:solc@0.4.8","solc0.4.9":"npm:solc@0.4.9","solc0.5.0":"npm:solc@0.5.0","solc0.5.1":"npm:solc@0.5.1","solc0.5.2":"npm:solc@0.5.2","solc0.5.3":"npm:solc@0.5.3","solc0.5.4":"npm:solc@0.5.4","solc0.5.5":"npm:solc@0.5.5","solc0.5.6":"npm:solc@0.5.6","solc0.5.7":"npm:solc@0.5.7","solc0.5.8":"npm:solc@0.5.8","solc0.5.9":"npm:solc@0.5.9","solc0.6.0":"npm:solc@0.6.0","solc0.6.1":"npm:solc@0.6.1","solc0.6.2":"npm:solc@0.6.2","solc0.6.3":"npm:solc@0.6.3","solc0.6.4":"npm:solc@0.6.4","solc0.6.5":"npm:solc@0.6.5","solc0.6.6":"npm:solc@0.6.6","solc0.6.7":"npm:solc@0.6.7","solc0.6.8":"npm:solc@0.6.8","solc0.6.9":"npm:solc@0.6.9","solc0.7.0":"npm:solc@0.7.0","solc0.7.1":"npm:solc@0.7.1","solc0.7.2":"npm:solc@0.7.2","solc0.7.3":"npm:solc@0.7.3","solc0.7.4":"npm:solc@0.7.4","solc0.7.5":"npm:solc@0.7.5","solc0.7.6":"npm:solc@0.7.6","solc0.8.0":"npm:solc@0.8.0","solc0.8.1":"npm:solc@0.8.1","solc0.8.2":"npm:solc@0.8.2","solc0.8.3":"npm:solc@0.8.3","solc0.8.4":"npm:solc@0.8.4","solc0.8.5":"npm:solc@0.8.5","solc0.8.6":"npm:solc@0.8.6","solc0.4.10":"npm:solc@0.4.10","solc0.4.11":"npm:solc@0.4.11","solc0.4.13":"npm:solc@0.4.13","solc0.4.14":"npm:solc@0.4.14","solc0.4.15":"npm:solc@0.4.15","solc0.4.16":"npm:solc@0.4.16","solc0.4.17":"npm:solc@0.4.17","solc0.4.18":"npm:solc@0.4.18","solc0.4.19":"npm:solc@0.4.19","solc0.4.20":"npm:solc@0.4.20","solc0.4.21":"npm:solc@0.4.21","solc0.4.22":"npm:solc@0.4.22","solc0.4.23":"npm:solc@0.4.23","solc0.4.24":"npm:solc@0.4.24","solc0.4.25":"npm:solc@0.4.25","solc0.4.26":"npm:solc@0.4.26","solc0.5.10":"npm:solc@0.5.10","solc0.5.11":"npm:solc@0.5.11","solc0.5.12":"npm:solc@0.5.12","solc0.5.13":"npm:solc@0.5.13","solc0.5.14":"npm:solc@0.5.14","solc0.5.15":"npm:solc@0.5.15","solc0.5.16":"npm:solc@0.5.16","solc0.5.17":"npm:solc@0.5.17","solc0.6.10":"npm:solc@0.6.10","solc0.6.11":"npm:solc@0.6.11","solc0.6.12":"npm:solc@0.6.12","path-exists":"^3.0.0","es6-promisify":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.6.3","tapes":"^4.1.0","tap-spec":"^4.1.1"},"_npmOperationalInternal":{"tmp":"tmp/delib_6.2.7_1745539749656_0.5825786263177677","host":"s3://npm-registry-packages-npm-production"}},"6.2.10":{"name":"delib","author":{"name":"Zhiwen Huang","email":"zhiwen555@gmail.com"},"version":"6.2.10","description":"Simple Ethereum framework for DApps, smart contract creation, and smart contract interaction","keywords":["web3","ethereum"],"repository":{"type":"git","url":"git+https://github.com/zhiwenh/delib.git"},"bugs":{"url":"https://github.com/zhiwenh/delib/issues"},"main":"index.js","bin":{"delib":"bin/delib"},"scripts":{"test":"node ./testing/tests/core.js"},"dependencies":{"commander":"2.9.0","es6-promisify":"4.1.0","ethers":"5.4.4","path-exists":"3.0.0","solc":"0.8.6","solc0.4.1":"npm:solc@0.4.1","solc0.4.10":"npm:solc@0.4.10","solc0.4.11":"npm:solc@0.4.11","solc0.4.13":"npm:solc@0.4.13","solc0.4.14":"npm:solc@0.4.14","solc0.4.15":"npm:solc@0.4.15","solc0.4.16":"npm:solc@0.4.16","solc0.4.17":"npm:solc@0.4.17","solc0.4.18":"npm:solc@0.4.18","solc0.4.19":"npm:solc@0.4.19","solc0.4.2":"npm:solc@0.4.2","solc0.4.20":"npm:solc@0.4.20","solc0.4.21":"npm:solc@0.4.21","solc0.4.22":"npm:solc@0.4.22","solc0.4.23":"npm:solc@0.4.23","solc0.4.24":"npm:solc@0.4.24","solc0.4.25":"npm:solc@0.4.25","solc0.4.26":"npm:solc@0.4.26","solc0.4.3":"npm:solc@0.4.3","solc0.4.4":"npm:solc@0.4.4","solc0.4.5":"npm:solc@0.4.5","solc0.4.6":"npm:solc@0.4.6","solc0.4.7":"npm:solc@0.4.7","solc0.4.8":"npm:solc@0.4.8","solc0.4.9":"npm:solc@0.4.9","solc0.5.0":"npm:solc@0.5.0","solc0.5.1":"npm:solc@0.5.1","solc0.5.10":"npm:solc@0.5.10","solc0.5.11":"npm:solc@0.5.11","solc0.5.12":"npm:solc@0.5.12","solc0.5.13":"npm:solc@0.5.13","solc0.5.14":"npm:solc@0.5.14","solc0.5.15":"npm:solc@0.5.15","solc0.5.16":"npm:solc@0.5.16","solc0.5.17":"npm:solc@0.5.17","solc0.5.2":"npm:solc@0.5.2","solc0.5.3":"npm:solc@0.5.3","solc0.5.4":"npm:solc@0.5.4","solc0.5.5":"npm:solc@0.5.5","solc0.5.6":"npm:solc@0.5.6","solc0.5.7":"npm:solc@0.5.7","solc0.5.8":"npm:solc@0.5.8","solc0.5.9":"npm:solc@0.5.9","solc0.6.0":"npm:solc@0.6.0","solc0.6.1":"npm:solc@0.6.1","solc0.6.10":"npm:solc@0.6.10","solc0.6.11":"npm:solc@0.6.11","solc0.6.12":"npm:solc@0.6.12","solc0.6.2":"npm:solc@0.6.2","solc0.6.3":"npm:solc@0.6.3","solc0.6.4":"npm:solc@0.6.4","solc0.6.5":"npm:solc@0.6.5","solc0.6.6":"npm:solc@0.6.6","solc0.6.7":"npm:solc@0.6.7","solc0.6.8":"npm:solc@0.6.8","solc0.6.9":"npm:solc@0.6.9","solc0.7.0":"npm:solc@0.7.0","solc0.7.1":"npm:solc@0.7.1","solc0.7.2":"npm:solc@0.7.2","solc0.7.3":"npm:solc@0.7.3","solc0.7.4":"npm:solc@0.7.4","solc0.7.5":"npm:solc@0.7.5","solc0.7.6":"npm:solc@0.7.6","solc0.8.0":"npm:solc@0.8.0","solc0.8.1":"npm:solc@0.8.1","solc0.8.2":"npm:solc@0.8.2","solc0.8.3":"npm:solc@0.8.3","solc0.8.4":"npm:solc@0.8.4","solc0.8.5":"npm:solc@0.8.5","solc0.8.7":"npm:solc@0.8.7","solc0.8.8":"npm:solc@0.8.8","solc0.8.9":"npm:solc@0.8.9","solc0.8.10":"npm:solc@0.8.10","solc0.8.11":"npm:solc@0.8.11","solc0.8.12":"npm:solc@0.8.12","solc0.8.13":"npm:solc@0.8.13","solc0.8.14":"npm:solc@0.8.14","solc0.8.15":"npm:solc@0.8.15","solc0.8.16":"npm:solc@0.8.16","solc0.8.17":"npm:solc@0.8.17","solc0.8.18":"npm:solc@0.8.18","solc0.8.19":"npm:solc@0.8.19","solc0.8.20":"npm:solc@0.8.20","solc0.8.21":"npm:solc@0.8.21","solc0.8.22":"npm:solc@0.8.22","solc0.8.23":"npm:solc@0.8.23","solc0.8.24":"npm:solc@0.8.24","solc0.8.25":"npm:solc@0.8.25","solc0.8.26":"npm:solc@0.8.26","solc0.8.27":"npm:solc@0.8.27","solc0.8.28":"npm:solc@0.8.28","solc0.8.29":"npm:solc@0.8.29","solc0.8.30":"npm:solc@0.8.30","solc0.8.31":"npm:solc@0.8.31","solc0.8.32":"npm:solc@0.8.32","solc0.8.33":"npm:solc@0.8.33","solc0.8.34":"npm:solc@0.8.34","solc0.8.35":"npm:solc@0.8.35","web3":"1.3.6"},"devDependencies":{"tap-spec":"^4.1.1","tape":"^4.6.3","tapes":"^4.1.0"},"license":"ISC","_id":"delib@6.2.10","gitHead":"75c9cd03d3e7c18483c30b2b968d4a1ac3e54e04","homepage":"https://github.com/zhiwenh/delib#readme","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-Q5cyDKUjcByipLBFIB1R4AF9BLz4mnpJWnI8xVHyQMxAplwtzaMnO//dFAqIkwbslWEEFQxQfocGa4S46yFVdA==","shasum":"7daec486e6bfd07630428e8257621431668779ba","tarball":"https://registry.npmjs.org/delib/-/delib-6.2.10.tgz","fileCount":28,"unpackedSize":160908,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDb50u9qEloBLKdmNIG65h8Tv4nhHrFu5HU5pX7If71OAiBWpbTfP29J0WMy2mdrl7PY25LfhTytSsGLvI5aKsJkCA=="}]},"_npmUser":{"name":"zhiwenhuang","email":"zhiwen555@gmail.com"},"directories":{},"maintainers":[{"name":"zhiwenhuang","email":"zhiwen555@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/delib_6.2.10_1780801772220_0.40006827762965935"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-25T00:04:11.405Z","modified":"2026-06-07T03:09:32.467Z","0.0.1":"2016-09-28T11:02:53.134Z","0.0.2":"2016-09-28T11:07:47.349Z","0.0.3":"2016-09-28T11:14:29.107Z","0.0.4":"2016-09-28T11:17:42.790Z","0.1.0":"2016-09-28T11:22:50.712Z","0.1.1":"2016-09-28T11:26:32.639Z","0.1.2":"2016-09-28T18:33:37.562Z","0.2.0":"2016-09-29T00:07:53.446Z","0.2.1":"2016-09-30T08:18:46.144Z","0.2.2":"2016-09-30T19:17:37.863Z","0.2.3":"2016-09-30T19:24:03.305Z","0.2.4":"2016-10-03T03:54:22.749Z","0.2.5":"2016-10-03T04:55:57.169Z","0.2.6":"2016-10-03T06:43:06.413Z","1.0.0":"2016-10-20T01:42:49.865Z","1.0.1":"2016-10-20T01:56:52.133Z","1.0.2":"2016-10-20T02:17:40.897Z","1.1.0":"2016-10-20T07:01:05.718Z","1.2.1":"2016-10-21T08:39:58.593Z","1.3.0":"2016-10-22T10:56:41.213Z","1.3.1":"2016-10-22T21:56:38.183Z","1.3.2":"2016-10-22T23:04:16.316Z","1.3.3":"2016-10-22T23:14:51.258Z","1.3.4":"2016-10-22T23:27:52.616Z","1.3.5":"2016-10-23T04:28:19.351Z","1.3.6":"2016-10-24T01:14:43.936Z","1.3.7":"2016-10-24T04:50:00.059Z","1.3.8":"2016-10-24T05:00:40.091Z","1.3.9":"2016-10-24T05:04:29.461Z","1.3.10":"2016-10-24T05:21:31.147Z","1.3.11":"2016-10-24T05:24:43.148Z","1.3.12":"2016-10-24T05:44:54.939Z","1.3.13":"2016-10-24T07:08:07.722Z","1.3.14":"2016-10-24T07:22:08.077Z","1.3.15":"2016-10-24T07:26:06.749Z","1.3.16":"2016-10-24T09:58:08.664Z","1.3.17":"2016-10-24T10:24:10.949Z","1.4.1":"2016-10-25T06:25:20.052Z","1.5.0":"2016-10-27T01:16:05.062Z","2.0.0":"2016-10-30T08:02:10.411Z","2.0.1":"2016-10-31T03:59:53.718Z","2.0.2":"2016-10-31T04:25:22.286Z","2.1.0":"2016-11-09T02:32:33.478Z","3.0.0":"2016-11-14T02:22:55.593Z","3.0.1":"2016-11-14T02:34:37.832Z","3.0.2":"2016-11-14T02:37:04.141Z","3.1.0":"2016-11-14T07:04:00.628Z","3.1.1":"2016-11-15T03:58:26.346Z","3.2.0":"2016-11-20T05:47:33.302Z","3.2.1":"2016-11-21T06:30:37.900Z","3.3.0":"2016-11-22T07:42:54.600Z","3.4.0":"2016-11-22T21:20:48.469Z","3.5.0":"2016-11-23T23:42:45.722Z","3.5.1":"2016-11-24T01:41:48.386Z","3.6.0":"2016-11-29T06:46:52.090Z","4.0.0":"2016-12-28T16:08:51.584Z","4.0.1":"2016-12-28T23:08:56.827Z","4.0.3":"2017-08-01T00:43:55.502Z","4.0.4":"2017-08-05T19:12:54.622Z","4.0.6":"2018-03-31T13:49:45.349Z","4.0.9":"2018-05-08T04:52:46.643Z","4.0.10":"2018-05-09T15:58:20.116Z","4.0.11":"2018-05-09T17:49:32.525Z","4.1.0":"2018-05-09T18:35:18.228Z","4.1.2":"2018-05-10T18:55:57.785Z","4.1.3":"2018-05-10T19:22:58.764Z","4.1.4":"2018-05-15T05:20:31.091Z","4.1.5":"2018-05-17T04:16:31.192Z","4.1.6":"2018-05-19T21:56:57.741Z","4.1.7":"2018-05-19T23:10:40.727Z","4.1.8":"2018-05-25T01:03:19.679Z","4.1.9":"2018-05-27T16:54:52.501Z","4.1.10":"2018-05-27T22:33:50.080Z","4.1.11":"2018-05-29T02:19:58.946Z","4.1.13":"2018-07-22T02:48:13.460Z","4.1.15":"2018-07-28T02:33:28.045Z","4.1.16":"2018-07-28T02:43:27.160Z","4.1.17":"2018-07-28T02:55:44.356Z","4.1.19":"2019-03-18T01:32:36.070Z","4.5.0":"2021-07-15T14:49:13.276Z","4.5.1":"2021-07-15T17:14:55.002Z","4.5.2":"2021-07-15T17:51:51.292Z","4.5.3":"2021-07-18T17:17:24.519Z","4.6.0":"2021-07-19T01:26:48.254Z","4.7.0":"2021-07-19T05:43:13.515Z","4.7.1":"2021-07-19T06:06:03.977Z","4.7.2":"2021-07-19T07:33:14.568Z","4.7.3":"2021-07-19T07:38:20.450Z","4.7.4":"2021-07-19T11:00:39.968Z","4.7.5":"2021-07-19T13:34:59.605Z","4.7.6":"2021-07-20T17:51:54.235Z","4.7.7":"2021-07-22T16:59:03.818Z","4.7.8":"2021-07-24T20:11:52.290Z","4.7.9":"2021-07-25T15:09:46.717Z","4.7.10":"2021-07-25T18:02:52.359Z","4.7.11":"2021-07-25T19:26:30.616Z","4.7.12":"2021-07-25T20:52:36.308Z","4.7.13":"2021-07-25T23:39:07.613Z","4.7.14":"2021-07-26T00:14:23.498Z","4.7.15":"2021-07-26T00:14:56.903Z","4.7.16":"2021-07-26T00:15:36.093Z","4.7.17":"2021-07-29T00:43:14.169Z","4.7.18":"2021-07-29T00:59:33.464Z","4.7.19":"2021-07-29T16:57:13.832Z","5.0.0":"2021-08-08T02:53:41.152Z","5.0.1":"2021-08-09T06:22:40.201Z","5.0.2":"2021-08-09T07:48:08.361Z","5.0.3":"2021-08-09T08:06:55.985Z","5.0.4":"2021-08-09T08:08:16.437Z","5.0.5":"2021-08-09T10:50:08.016Z","5.0.6":"2021-08-09T11:56:32.867Z","5.0.7":"2021-08-09T14:49:39.035Z","6.0.0":"2021-08-18T03:00:45.695Z","6.1.0":"2021-08-31T14:05:08.989Z","6.1.1":"2021-08-31T14:13:42.385Z","6.1.2":"2021-08-31T14:14:15.594Z","6.2.1":"2021-08-31T15:50:03.834Z","6.2.3":"2021-09-01T03:24:25.751Z","6.2.4":"2021-09-01T03:30:30.615Z","6.2.5":"2022-06-18T12:39:51.108Z","6.2.6":"2025-04-25T00:04:11.696Z","6.2.7":"2025-04-25T00:09:09.912Z","6.2.10":"2026-06-07T03:09:32.361Z"},"bugs":{"url":"https://github.com/zhiwenh/delib/issues"},"author":{"name":"Zhiwen Huang","email":"zhiwen555@gmail.com"},"license":"ISC","homepage":"https://github.com/zhiwenh/delib#readme","keywords":["web3","ethereum"],"repository":{"type":"git","url":"git+https://github.com/zhiwenh/delib.git"},"description":"Simple Ethereum framework for DApps, smart contract creation, and smart contract interaction","maintainers":[{"name":"zhiwenhuang","email":"zhiwen555@gmail.com"}],"readme":"# Delib\n\n![Delib Logo](/logo.jpg?raw=true \"Delib Logo\")\n\nSimple Ethereum framework for DApps, smart contract creation, and smart contract interaction.\n\nDelib is designed to be easy to learn and allow freedom when developing with Ethereum. Its features include:\n\n  * A promise based library that provides the core abstractions needed for building DApps on Ethereum.\n  * A command tool for smart contract interaction. It lets you compile, build, deploy, execute methods, and get their event logs.\n  * Option to automatically estimate your transaction gas costs for contract deployment and methods.\n  * The saving of deployed contract addresses to use or reference later.\n\n## Table of Contents\n  * [Installation and Setup](#install)\n  * [Usage](#usage)\n  * [Command Tool](#Cli)\n  * [Library](#Ethereum)\n  * [Example](#example)\n  * [Support](#support)\n  * [Command Tool API](#Cli+api)\n  * [Library API](#Ethereum+api)\n\n<a name=\"requirements\"></a>\n\n<a name=\"install\"></a>\n\n## Installation and Setup\n\n### Global install\n\nInstall globally to use the command tool.\n\n```\nnpm install -g delib\n```\n\n### Local install\n\nInstall locally to require the library.\n\n```\nnpm install delib --save\n```\n\nThen require the library in your scripts.\n\n```\nconst delib = require('delib');\n```\n\n### Project creation\n\nTo create a project call the following in the command line.\n\n```\ndelib init\n```\n\n<a name=\"projectStructure\"></a>\nThe project is structured like this:\n\n```\nproject/\n├── addresses/        - (addresses of deployed contracts)\n├── built/            - (built Solidity contracts)\n├── contracts/        - (Solidity contracts .sol)\n├── delib.js/         - (delib config file)\n```\n\nYou can have the init command create a custom project structure for you. If you pass in the option `--config` it will only create the config file. Open the file to set your own project file paths and then call `delib init` again.\n\nYou don't need to create a project to use Delib. More information is given in the usage section.\n\n### Configuration\nA file called `delib.js` gets made when you create a project. It contains your project's configuration options. Use this to adjust your project file paths, connection options, and default command transaction options. Delib supports solc 0.4.1 - 0.8.6. If you wish to add an account with a private key or mnemonic you may do so in the config file as well. Just\nadd your private key or mnemonic to the array and you can use the account to send transactions with the library and command tool.\n\nNote: In the web3 docs, which this framework uses to create and add accounts, there is a warning for web3's account methods:\nThis package has NOT been audited and might potentially be unsafe. Take precautions to clear memory properly, store the private keys safely, and test transaction receiving and sending functionality properly before using in production!\n\n```\n{\n  /** Project file paths */\n  paths: {\n    contract: './contracts', // Relative path to Solidity contracts\n    built: './built', // Relative path to built contracts\n    address: './addresses' // Relative path to deployed contract addresses\n  },\n\n  /** RPC connection options */\n  rpc: {\n    rpcPath: 'http://localhost:8545'\n  },\n\n  /** IPC connection options */\n  ipc: {\n    host: null // Relative path to IPC host\n  }\n\n  /** WS connection options */\n  ws: {\n    wsPath: 'ws://localhost:8545'\n  },\n\n  /** solc options. Supported versions: 0.4.1 - 0.8.6 **/\n  solc: {\n    version: '0.8.6'\n  },\n\n  /** Add accounts. The values of the array will be the private keys or\n  mnemonics of the accounts you wish to add  **/\n  accounts: [\n\n  ]\n};\n\n```\n\n<a name=\"usage\"></a>\n## Usage\n\n### Usage outside project\nDelib can be used outside a project. Outside a project file paths will be relative to your process point of entry. Connection options will also need to be specified. You can specify these with the library and pass them in as options if using the command tool.\n\n### Contract addresses\nYour contract's deployed addresses are saved in a plain text file with a file name of `ContractnameAddresses`. Each address is separated by a new line, and the most recent address is at the bottom of the list. The library and command tool use that address when no address is specified and you can manually add your own addresses to this file.\n\n### Library and command integration\nBuilding a contract with the command tool will allow it to be accessible with the library. Also, deploying a contract using the library will make the following command tool calls refer to the library's deployed address, and vice versa. You can deploy contracts and then quickly test whether your methods are working with commands.  \n\n<a name=\"Cli\"></a>\n# Command Tool\n\nThe command tool lets you interact with smart contracts both on and off the blockchain. It lets you compile and build Solidity contracts into a JavaScript file that you can then require. Then you can deploy the contract onto a blockchain and also execute methods and get event logs.\n\n### Set connection options and project paths\nThe default connection and file path options are taken from the `delib.js` config file. Outside a project all project paths will be relative to where you're calling the command, You can also specify connection options and paths as options.\n\n| Options | Type | Description |\n| --- | --- | --- |\n| `-r --rpchost` | `<value>` | RPC host |\n| `-h --rpcport` | `<port>` | RPC port |\n| `-c --ipchost` | `[path]` | Relative path to IPC host |\n| `-o --contract` | `<path>` | Path to contracts folder |\n| `-b --built` | `<path>` | Relative path to built contracts folder |\n| `-a --address` | `<path>` | Relative path to contract addresses folder |\n\n### Adjust transaction options\nThe default transaction options for the commands are located in ```delib.js```. You can also pass in your own transaction options.\n\n| Options | Type | Description |\n| --- | --- | --- |\n| `-i --account` | `<index>` | Account index to use for transaction |\n| `-f --from` | `<address>` | From transaction option. Replaces --account |\n| `-t --to` | `<address>` | To transaction option' |\n| `-v --value` | `<number>` | Value transaction option in wei |\n| `-g --gas` | `<number>` | Gas transaction option. Estimated if not given or set to 0 |\n| `-p --gasprice` | `<number>` | Gas price transaction option |\n| `-n --nonce` | `<number>` | Nonce transaction option |\n| `-m --maxgas` | `<number>` | Max gas allowed when estimating |\n\n\n### Build contract\n**delib compile `[files...]>`**\n\nCompile and build a Solidity contract with the file name ```Contract.sol```. If file name is left blank it will build all the contracts in the contracts folder.\n\n```\ndelib compile Contract\n```\n\n\n**delib build `[files...]>`**\n\nCompile and build  a Solidity contract with the file name ```Contract.sol```. If file name is left blank it will build all the contracts in the contracts folder.\n\n```\ndelib build Contract\n```\n\n### Deploy contract\n**delib deploy `<contractName> [args...]`**\n\nDeploy a contract and pass in two arguments for its constructor. If no gas amount is given it will be estimated for you.\n```\ndelib deploy Contract hello 30\n```\n\n### Deploy contract with library\n**delib deploy `<contractName> [args...] --links \"fileWhereLibraryIs:libraryName libraryContractAddress, fileWhereLibraryIs2:libraryName2 libraryContractAddress2, \"`**\n\n\n```\ndelib deploy Contract hello 30 --links \"libraryFile.sol:libraryName 0x6Fa3B5424DbA7e7dAb49f8d88bc51f2caD1cBcEb, libraryFile2.sol:libraryName 0x2e118C945Cf961D34757A4be26d7531Aa9D8c641\"\n```\n\n\n### Display built contracts\n**delib contracts**\n\nDisplays all built contracts\n```\ndelib contracts\n```\n\n### Display contract info\n**delib info `<contractName>`**\n\nShow all the contract methods along with their inputs and outputs, contract events, and the current address being used. Use this to not have to constantly reference your `.sol` contract file.\n```\ndelib info Contract\n```\n\n### Execute contract method\n**delib exec `<contractName> <methodName> [args...]`**\n\nExecute the method `setNumbers` on a deployed contract and pass in two numbers. The transaction options of 10000 gas with a gas value of 50000 are set as options. If no gas amount is given it will be estimated for you.\n```\ndelib exec Contract setNumbers 10 20 --gas 10000 --gasprice 50000\n```\n\nIf you only wish to call the method, which uses no gas because it doesn't change blockchain state, pass in the option `--call`. Labeling your Solidity method with constant makes it call automatically.\n\n```\ndelib exec Contract getNumbers --call\n```\n\n### Get the logs of an event\n**delib events `<contractName> <eventName>`**\n\nGet all the logs of an event called `numbersEvent`.\n```\ndelib events Contract numbersEvent\n```\n\nGet the logs from blocks 3 - 10 .\n```\ndelib events Contract numbersEvent --fromblock 3 --toblock 10\n```\n\nGet the logs from blocks 3 to latest.\n```\ndelib events Contract numbersEvent --fromblock 3\n```\n\nGet the logs from blocks 0 to 10.\n```\ndelib events Contract numbersEvent --toblock 10\n```\n\nGet the logs from 10 blocks back.\n```\ndelib events Contract numbersEvent --blocksback 10\n```\n\n### Watch for events\n**delib watch `<contractName> <eventName>`**\n\nWatch for events from `lettersEvent`.\n```\ndelib watch Contract lettersEvent\n```\n\n### Set the address of a contract\n**delib set `<contractName> <contractAddress>`**\n\nSet the address of a contract to use. This will set its address for both the command tool and library until another contract is deployed.\n\n```\ndelib set Contract 0xa9b15bfe1d4e7bed407a011e54af36462fa0e067\n```\n\n### Display all accounts\n**delib accounts**\n\nList all account addresses and indexes. The indexes can you used in the `--account` options, which takes the index of the account you wish to use.\n```\ndelib accounts\n```\n## [Command Tool API Link](#Cli+api)\n\n\n<a name=\"Ethereum\"></a>\n# Library\n\nThe library gives you the freedom to customize your DApp development to fit your specific needs. You can easily write your own contract migration scripts, interact with contracts from within your app, and write contract tests.\n\n### File paths\n**delib.paths**\n\nTo specify your own file paths use the `delib.paths` object. Inside a project the paths will be relative to your project root (where `delib.js` is located). Outside a project they will be relative to your process point of entry.\n\n```\ndelib.paths.contract = 'relative path to contract folder';\n\ndelib.paths.built = 'relative path to built folder';\n\ndelib.paths.address = relative path to addresses folder';\n```\n\n### Connections\nYour project's `delib.js` file sets up your RPC and IPC connections. You can also pass in connection options as arguments.\n\n#### RPC provider\n**delib.init(rpcPath)**\n\nTo connect with the options in `delib.js`:\n\n```\ndelib.init();\n```\nSpecify your own connection arguments by passing in a RPC host and a RPC port number.\n\n```\ndelib.init('http://localhost:8545');\n```\n\n#### IPC provider\n**delib.initIPC(ipcPath)**\n\n```\ndelib.initIPC();\n```\n\nYou can pass in an IPC path as an argument.\n\n```\ndelib.initIPC('<path>/<to>/geth.ipc'); // To use the IPC provider to perform transaction you will need to changeProviders\n```\n\n#### WS provider\n**delib.initws(wsPath)**\n\n```\ndelib.initws('ws://localhost:8545');\n```\n\n#### Close WS connection\n**delib.closeWSConnection()**\n\n```\ndelib.closeWSConnection();\n```\n\n### Adjust options\n**delib.account**  \n**delib.accountIndex**   \n**delib.options**  \n\nTo choose the default account to use for transactions use `delib.account`.\n\nTo choose a default account index for transactions use `delib.accountIndex`. The index corresponds to the `delib.getAccounts()` array. `delib.getAccounts()` gets the accounts from the web3.eth.getAccounts() method and 'web3.eth.accounts.wallet'. By default `delib.accountIndex` is 0.\n\n`delib.options` contains the default options for your transactions. It contains the Ethereum transaction options as well as Delib options. These options can be passed into deploy or contract method calls, and they'll overwrite the defaults.\n\nYou can pass in an `accountIndex` option in your deploy or contract method transactions and it'll use that account index for your transaction.\n\nIf a `gas` option of 0 is specified gas will be estimated for you, and `maxGas` is the max gas allowed in transactions.\n\n\n```\ndelib.options = {\n  /** Default transaction options */\n  from: undefined,\n  to: undefined,\n  value: undefined,\n  gas: 0,\n  gasPrice: undefined,\n  gasLimit: 0,\n  data: undefined,\n  nonce: undefined,\n\n  /** Default delib options*/\n  accountIndex: undefined,\n  maxGas: undefined  \n};\n```\n\n### Create account\n**delib.createAccount(entropy)**  \n\nNote: In the web3 docs, which this framework uses to create and add accounts, there is a warning for web3's account methods:\nThis package has NOT been audited and might potentially be unsafe. Take precautions to clear memory properly, store the private keys safely, and test transaction receiving and sending functionality properly before using in production!\n\nCreates an account. The account is added to the returned account list from `delib.getAccounts` and can be used in all transactions in delib. The accounts are stored in `web3.eth.accounts.wallet`. Returns an account object containing:\n\nThe returned object:\nindex - number: Account index used in delib.\naddress - string: Account address.\nprivateKey - string: The accounts private key.\nsignTransaction(tx [, callback]) - Function: Function to sign transactions.\nsign(data) - Function: Function to sign transactions.\n\n```\ndelib.createAccount()\n  .then(key => {\n\n  })\n```\n\n### Add accounts\n**delib.addAccount(privateKeyOrMnemonic)**  \n\nNote: In the web3 docs, which this framework uses to create and add accounts, there is a warning for web3's account methods:\nThis package has NOT been audited and might potentially be unsafe. Take precautions to clear memory properly, store the private keys safely, and test transaction receiving and sending functionality properly before using in production!\n\nAdd an account to the delib account list. The account will then be able to make transactions by setting a from option in the transaction options or by setting an accountIndex option. The accounts are stored in `web3.eth.accounts.wallet`.\n\nThe returned object:\nindex - number: Account index used in delib.\naddress - string: Account address.\nprivateKey - string: The accounts private key.\nsignTransaction(tx [, callback]) - Function: Function to sign transactions.\nsign(data) - Function: Function to sign transactions.\n\n```\ndelib.addAccount('privateKey')\n  .then(key => {\n\n  })\n```\n\n### Get a list of all available accounts\n**delib.getAccounts()**  \nThis method returns a list of all available accounts. The accounts are taken from the default web3 storage as well as `web3.eth.accounts.wallet`.\n\n```\ndelib.getAccounts()\n  .then(accounts => {\n    console.log(accounts)\n  })\n  .catch(err => {\n    console.log(err)\n  })\n```\n\n### Transfer Ether from one account to another account\n**delib.transfer(toAccount, value, options)**  \n\nTransfers Ether from one account to another account. `toAccount` is the address of the account you are trying to send Ether to, `value` is the value in wei, and options are the optional transaction options you can send with the transaction.\n\n```\ndelib.transfer('0x08217011BF7DeeeEECBDA8a8a61A8035ca206e99', 10, {})\n```\n\n### Get the balance of a account\n**delib.balanceOf(accountOrIndex)**  \nGets the balance of an account based on its address or its index in `delib.getAccounts()`\n\n```\ndelib.balanceOf(1)\n  .then(balance => {\n    console.log(balance); // balance of the account with the index 1\n  })\n  .catch(err => {\n    console.log(err)\n  })\n\n\ndelib.balanceOf('0x08217011BF7DeeeEECBDA8a8a61A8035ca206e99')\n  .then(balance => {\n    console.log(balance); // balance of the account with the address of 0x08217011BF7DeeeEECBDA8a8a61A8035ca206e99\n  })\n  .catch(err => {\n    console.log(err)\n  })\n```\n\n### compile contracts\n**delib.compile(contractFiles, contractPath, buildPath)**\n\nPass in a file name or an array of file names you wish you build from your project's `contracts/` folder to your project's `built/` folder. If `contractFiles` is left blank will compile all contracts in contracts folder.\n\n```\ndelib.build('Test')\n  .then(contracts => {\n    console.log(contracts); // An array of all the contracts built.\n  });\n```\n\n### Build contracts\n**delib.build(contractFiles, contractPath, buildPath)**\n\nPass in a file name or an array of file names you wish you build from your project's `contracts/` folder to your project's `built/` folder. If `contractFiles` is left blank\nwill compile all contracts in contracts folder.\n\n```\ndelib.build('Test')\n  .then(contracts => {\n    console.log(contracts); // An array of all the contracts built.\n  });\n```\n\n### Get the info of a contract\n**delib.getContractInfo(contractName)**\n\nGets the info of a built contract. It returns an object containing the contracts name, abi, metadata, and bytecode.\n\n```\nconst contractInfo = delib.getContractInfo('Test');\n\n```\n\n### Deploy contracts\n**delib.deploy(contractName, args, options, links)**\n\nThe addresses of your deployed contracts are saved in your project's `addresses/` folder. Passing in an array for the constructor arguments is optional, however to pass in an options object you will need to pass in an empty arguments array. The promise returns an instance of the contract which you can use to make method calls.\n\nTo deploy a contract, estimate gas amount, and call a method on the instance:\n\n```\noptions = {\n  gas: 0 // Set gas at 0 to have it estimated for you\n}\n\ndelib.deploy('Test', [arg1, arg2, arg3], options)\n  .then(instance => {\n    const address = instance.address;\n\n    return instance.testMethod();\n  })\n  .then(tx => {\n\n  })\n  .catch(err => {\n\n  });\n```\n\nYou can estimate the gas usage for deploying a contract.\n\n**delib.deploy.estimate(contractName, args, options)**\n\n```\ndelib.deploy.estimate('Test', [arg1, arg2, arg3])\n  .then(gasEstimate => {\n\n  })\n  .catch(err => {\n\n  });\n```\n\nYou can get an array of all previously deployed addresses with `delib.contracts.addresses.getAll('contractName')`. The most recently deployed address is the array's last index. Use this to access previously deploy contracts.\n\n### Deploy contracts with a library\n**delib.deploy(contractName, args, options, links)**\n\nTo deploy contracts with a library have the links parameter property be an object with the file name of where the library is stored, :, plus the library name. The value of the object will be the library address. Example: `{'fileName:libraryName': contractAddress}`\n\n```\noptions = {\n  gas: 0 // Set gas at 0 to have it estimated for you\n}\n\ndelib.deploy('Test', [arg1, arg2, arg3], options, links)\n  .then(instance => {\n    const address = instance.address;\n\n    return instance.testMethod();\n  })\n  .then(tx => {\n\n  })\n  .catch(err => {\n\n  });\n```\n\n### Execute contract methods\n**delib.exec(contractName)**  \n**delib.execAt(contractName, contractAddress)**\n\nIt will perform a transaction (which requires gas) or if it will just call and return a value by whether or not you labeled your function with constant in your Solidity contract.\n\nTo call a contract at the address you last deployed it:\n\n```\noptions = {\n  gas: 0 // Gas set at 0 will be estimated\n};\n\ndelib.exec('Test').testMethod(arg1, arg2, options)\n  .then(tx => {\n\n  })\n  .catch(err => {\n\n  });\n```\n\nYou can estimate the gas usage for calling a contract method.\n\n**delib.exec(contractName).estimate**  \n**delib.execAt(contractName, contractAddress).estimate**\n\n```\ndelib.exec('Test').estimate.testMethod(arg1, arg2)\n  .then(gasEstimate => {\n\n  })\n  .catch(err => {\n\n  })\n```\n\n### Get event logs\n**delib.events(contractName, eventName, blockOptions, filter)**  \n**delib.eventsAt(contractName, contractAddress, eventName, blocksBack, filter)**\n\nThe code below gets the logs from an event called testEvent on the contract Test. It searches the last 100 blocks. To have it search all blocks pass in `'all'` instead of a number.\n\n```\ndelib.events('Test', 'testEvent', {fromBlock: 100, toBlock: 'latest'})\n  .then(logs => {\n\n  })\n  .catch(err => {\n\n  });\n```\n\n### Watch events\n**delib.watch(contractName, eventName, options, callback)**  \n**delib.watchAt(contractName, contractAddress, eventName, options, callback)**\n\nYou can watch a contract for when it gets a new event.\n\n```\ndelib.watch('Test', 'testEvent', {}, function(err, log) {\n  if (!err) {\n    // Do something with the log  \n  }\n});\n```\n\nTo stop the watch listener set the watch method to a variable and call `.stop()` on it.\n\n```\nconst watch = delib.watch('Test', 'testEvent', {}, function(err, log) {\n  if (!err) {\n    // Do something with the log  \n  }\n});\n\nwatch.stop(); // Stops the event listener\n```\n\n## [Library API Link](#Ethereum+api)\n\n\n<a name=\"example\"></a>\n# Example\n\n\nInitialize the project structure.\n```\ndelib init\n```\n\nInstall the delib package\n```\nnpm install delib --save\n```\n\nCreate a contract file called ```Messages.sol``` in the `contracts/` folder. This contract sets and stores a simple message that can be watched for or retrieved.\n```\n// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.6;\n\ncontract Messages {\n\n  event messageEvent(\n    string _message\n  );\n\n  address owner;\n  string message;\n\n  constructor(string memory _message) {\n    owner = msg.sender;\n    message = _message;\n  }\n\n  function getOwner() public view returns (address) {\n    return owner;\n  }\n\n  function setMessage(string memory _message) public {\n    message = _message;\n    emit messageEvent(_message);\n  }\n\n  function getMessage() public view returns (string memory) {\n    return message;\n  }\n}\n\n```\n\nCompile ```Messages.sol``` with the command tool.\n```\ndelib compile\n```\nA file called ```Messages.json``` will be created in the `built/` folder.\n\nDeploy Messages using a command with arguments for the constructor. Gas will be estimated for you.\n```\ndelib deploy Messages hello\n```\nA file called ```MessagesAddresss``` will be created in your `addresses/` folder with the deployed contract's address.\n\nWatch for a message being set:\n```\ndelib watch Messages messageEvent\n```\n\nCreate a file called `script.js`\n\n```\nconst delib = require('delib');\n\nasync function  main() {\n  delib.init();\n\n  delib.options = {\n    value: 0,\n    gas: 100000,\n  };\n\n  // Call a method on the contract Messages\n  const message1 = await delib.exec('Messages').call.getMessage()\n  console.log(message1);\n\n  // Call another method with your 2nd account and pass in options\n  delib.accountIndex = 1;\n\n  await delib.exec('Messages').setMessage('coffee', {gas: 0});\n\n  const message2 = await delib.exec('Messages').call.getMessage();\n  console.log(message2);\n}\n\nmain();\n```\n\nThis script sets a message on the contract and calls it again to get the message saved.\n\nUpon running the script, your command for watching for messages set should show:\n```\nWatching for events:\n{\n  logIndex: 0,\n  transactionIndex: 0,\n  transactionHash: '0xd1ddb1ffd3cdac21f9c4910081df28bbd0072ded49ab187a2572cc5983c1491f',\n  blockHash: '0xa1eb723a97585cb3e05662235bf0ce14dc5afb723366ce1c416a4338ab2dd654',\n  blockNumber: 375,\n  address: '0x08217011BF7DeeeEECBDA8a8a61A8035ca206e99',\n  type: 'mined',\n  id: 'log_672dc7c1',\n  returnValues: Result { '0': 'coffee', _message: 'coffee' },\n  event: 'messageEvent',\n  signature: '0x9fd40b777a67006201b62c0025adca7fed13f4f97a8c97e859b02a025adad78f',\n  raw: {\n    data: '0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006636f666665650000000000000000000000000000000000000000000000000000',\n    topics: [\n      '0x9fd40b777a67006201b62c0025adca7fed13f4f97a8c97e859b02a025adad78f'\n    ]\n  }\n}\n```\n\nYou can then call methods on Messages in the command line.\n\n```\ndelib exec Messages getMessage --call\nResponse: coffee\n```\n\nThen you can set another message with the command line. Gas will be estimated for the following transaction.\n\n```\ndelib exec Messages setMessage apples\nResponse: {\n  transactionHash: '0x0890c0deaccfc938a3bf7bc9b54f916cf9bfb6efa1970137cfa360b2683fe3a4',\n  transactionIndex: 0,\n  blockHash: '0xb07cebf4d19adc8731876e4e7bdd0b8fe131a301680a3c6abe693d34a05040bd',\n  blockNumber: 377,\n  from: '0x4488ce366ebe9bab151c050ed8a4b4b1a221da73',\n  to: '0x08217011bf7deeeeecbda8a8a61a8035ca206e99',\n  gasUsed: 31624,\n  cumulativeGasUsed: 31624,\n  contractAddress: null,\n  logs: [\n    {\n      logIndex: 0,\n      transactionIndex: 0,\n      transactionHash: '0x0890c0deaccfc938a3bf7bc9b54f916cf9bfb6efa1970137cfa360b2683fe3a4',\n      blockHash: '0xb07cebf4d19adc8731876e4e7bdd0b8fe131a301680a3c6abe693d34a05040bd',\n      blockNumber: 377,\n      address: '0x08217011BF7DeeeEECBDA8a8a61A8035ca206e99',\n      data: '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000066170706c65730000000000000000000000000000000000000000000000000000',\n      topics: [Array],\n      type: 'mined',\n      id: 'log_431d7908'\n    }\n  ],\n  status: true,\n  logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000100000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'\n}\n```\n\n```\ndelib exec Messages getMessage --call\nResponse: apples\n```\n\nGo here for more example code: https://github.com/zhiwenh/delib/blob/master/testing/tests/core.js\n\n<a name=\"support\"></a>\n# Support\n\nIf you found Delib useful please leave a star on [GitHub](https://github.com/zhiwenh/delib) or give feedback!\n\n# API Reference\n\n<a name=Cli+api></a>\n## Command Tool\n* [Cli](#Cli+api)\n    * [init](#Cli+init)\n    * [compile `[files...]`](#Cli+compile)\n    * [build `[files...]`](#Cli+build)\n    * [deploy `<contractName> [args...]`](#Cli+deploy)\n    * [exec `<contractName> <methodName> [args...]`](#Cli+exec)\n    * [events `<contractName> <eventName> [fromBlock]`](#Cli+events)\n    * [watch `<contractName> <eventName>`](#Cli+watch)\n    * [accounts](#Cli+accounts)\n    * [contracts](#Cli+contracts)\n    * [info `<contractName>`](#Cli+info)\n    * [set `<contractName> <contractAddress>`](#Cli+set)\n\n<a name=\"Cli+init\"></a>\n#### delib init `-c --config`\nCreate the config file ```delib.js``` and the [project structure](#projectStructure).\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `-c --config` | `--` | If used the command will only create the delib.js config file |\n\n<a name=\"Cli+compile\"></a>\n#### delib compile `[files...] -h --rpchost <value>, -r --rpcport <port>, -c --ipchost [path], -o --contract <path>, -b --built <path>`\nCompile and build a Solidity smart contract ```.sol``` into a JavaScript file ```.sol.js``` that you can require. File paths are set in the `delib.js` config file or passed in as command line options. By default these are your project's `contracts/` and `built/` folders.\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `[files...]` | `string` | Names of Solidity contract |\n| `-r --rpchost` | `<value>` | RPC host |\n| `-h --rpcport` | `<port>` | RPC port |\n| `-c --ipchost` | `[path]` | Relative path to IPC host |\n| `-o --contract` | `<path>` | Path to contracts folder |\n| `-b --built` | `<path>` | Path to build contracts folder |\n\n<a name=\"Cli+build\"></a>\n#### delib build `[files...] -h --rpchost <value>, -r --rpcport <port>, -c --ipchost [path], -o --contract <path>, -b --built <path>`\nCompile and build a Solidity smart contract ```.sol``` into a JavaScript file ```.sol.js``` that you can require. File paths are set in the `delib.js` config file or passed in as command line options. By default these are your project's `contracts/` and `built/` folders.\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `[files...]` | `string` | Names of Solidity contract |\n| `-r --rpchost` | `<value>` | RPC host |\n| `-h --rpcport` | `<port>` | RPC port |\n| `-c --ipchost` | `[path]` | Relative path to IPC host |\n| `-o --contract` | `<path>` | Path to contracts folder |\n| `-b --built` | `<path>` | Path to build contracts folder |\n\n<a name=\"Cli+deploy\"></a>\n#### delib deploy `<contractName> [args...], -i --account <index>, -f --from <address>, -t --to <address>, --links \"libraryFileName:libraryName libraryContractAddress\", -v --value <number>, -g --gas <number>, -p --gasprice <number>, -n --nonce <number>, -m --maxgas <number>, -h --rpchost <value>, -r --rpcport <port>, -c --ipchost [path], -b --built <path>, -a --address <path>`\nDeploy a built Solidity smart contract and save its address for later use with the CLI or library. File paths are set in the `delib.js` config file or passed in as command line options. By default these are your project's `built/` and `addresses/` folders.\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `<contractName>` | `string` | Name of built contract |\n| `[...args]` | `strings` | Arguments to pass into method |\n| `-i --account` | `<index>` | Account to use for transaction. Takes the account index |\n| `-f --from` | `<address>` | From transaction option. Replaces --account |\n| `-t --to` | `<address>` | To transaction option' |\n| `--links` | `\"libraryFileName:libraryName libraryContractAddress\"` | Library links of the contract' |\n| `-v --value` | `<number>` | Value transaction option in wei |\n| `-g --gas` | `<number>` | Gas transaction option. Estimated if not given or set to 0 |\n| `-p --gasprice` | `<number>` | Gas price transaction option |\n| `-n --nonce` | `<number>` | Nonce transaction option |\n| `-m --maxgas` | `<number>` | Max gas allowed when estimating |\n| `-r --rpchost` | `<value>` | RPC host |\n| `-h --rpcport` | `<port>` | RPC port |\n| `-c --ipchost` | `[path]` | Relative path to IPC host |\n| `-b --built` | `<path>` | Relative path to built contracts folder |\n| `-a --address` | `<path>` | Relative path to contract addresses folder |\n\n<a name=\"Cli+exec\"></a>\n#### delib exec `<contractName> <methodName> [args...], -i --account <index>, -f --from <address>, -t --to <address>, -v --value <number>, -g --gas <number>, -p --gasprice <number>, -n --nonce <number>, -m --maxgas <number>, -h --rpchost <value>, -r --rpcport <port>, -c --ipchost [path], -b --built <path>, -a --address <path> --call`\nPerform a transaction or call a deployed contract's method. You can pass in a list of arguments. The most recent deployed contract address or set command address will be used.\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `<contractName>` | `string` | Name of built contract |\n| `<methodName>` | `string` | Contract method name |\n| `[...args]` | `strings` | Arguments to pass into method |\n| `-i --account` | `<index>` | Account to use for transaction. Takes the account index |\n| `-f --from` | `<address>` | From transaction option. Replaces --account |\n| `-t --to` | `<address>` | To transaction option' |\n| `-v --value` | `<number>` | Value transaction option in wei |\n| `-g --gas` | `<number>` | Gas transaction option. Estimated if not given or set to 0 |\n| `-p --gasprice` | `<number>` | Gas price transaction option |\n| `-n --nonce` | `<number>` | Nonce transaction option |\n| `-m --maxgas` | `<number>` | Max gas allowed when estimating |\n| `-r --rpchost` | `<value>` | RPC host |\n| `-h --rpcport` | `<port>` | RPC port |\n| `-c --ipchost` | `[path]` | Relative path to IPC host |\n| `-b --built` | `<path>` | Relative path to built contracts folder |\n| `-a --address` | `<path>` | Relative path to contract addresses folder |\n| `--call` | `--` | Forces method execution with a call |\n\n<a name=\"Cli+events\"></a>\n#### delib events `<contractName> <eventName> [blocksBack], -h --rpchost <value>, -r --rpcport <port>, -c --ipchost [path], -b --built <path>, -a --address <path>`\nGet the logs of a deployed contract's event. By default it gets all logs starting from block 0. You can pass in how many blocks back you wish to get logs from.\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `<contractName>` | `number` | Name of built contract |\n| `<eventName>` | `string` | Contract event name |\n| `[blocksBack]` | `number` | Number of blocks back to get logs from |\n| `-r --rpchost` | `<value>` | RPC host |\n| `-h --rpcport` | `<port>` | RPC port |\n| `-c --ipchost` | `[path]` | Relative path to IPC host |\n| `-f --fromblock` | `number` | From block to get events from |\n| `-t --toblock` | `number` | From block to get events from |\n.option('-f --fromblock <number>', To block to get events from)\n\n<a name=\"Cli+watch\"></a>\n### delib watch `<contractName> <eventName>, -h --rpchost <value>, -r --rpcport <port>, -c --ipchost [path], -b --built <path>, -a --address <path>`\nWatch for events\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `<contractName>` | `number` | Name of built contract |\n| `<eventName>` | `string` | Contract event name |\n| `[blocksBack]` | `number` | Number of blocks back to get logs from |\n| `-r --rpchost` | `<value>` | RPC host |\n| `-h --rpcport` | `<port>` | RPC port |\n| `-c --ipchost` | `[path]` | Relative path to IPC host |\n\n<a name=\"Cli+accounts\"></a>\n#### delib accounts\nRetrieves a list of all accounts and displays their indexes as well. The indexes can be used in the `--account` option which takes the index of the account you wish to use.\n\n<a name=\"Cli+contracts\"></a>\n#### delib contracts `-b --built <path>`\nRetrieves a list of all built contracts.\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `-b --built` | `<path>` | Relative path to built contracts folder |\n\n<a name=\"Cli+info\"></a>\n#### delib info `<contractName>, -b --built <path>, -a --address <path>`\nShow contract info such as methods, events, and currently used address. It displays the method inputs, outputs, constant modifier, and payable modifier. It also displays the event args.\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `<contractName>` | `string` | Name of built contract |\n| `<contractAddress>` | `string` | The address to bind to the contract |\n| `-b --built` | `<path>` | Relative path to built contracts folder |\n| `-a --address` | `<path>` | Relative path to contract addresses |\n\n<a name=\"Cli+set\"></a>\n#### delib set `<contractName> <contractAddress>, -a --address <path>`\nSet the address of a contract to use.\n\n| Params | Type | Description |\n| --- | --- | --- |\n| `<contractName>` | `string` | Name of built contract |\n| `<contractAddress>` | `string` | The address to bind to the contract |\n| `-a --address` | `<path>` | Relative path to contract addresses |\n\n## Library\n* [delib](#delib+api)\n    * [.web3](#delib+web3)\n    * [.connectionType](#delib+connectType)\n    * [.gasAdjust](#delib+gasAdjust)\n    * [.options](#delib+options)\n    * [.accountIndex](#delib+accountIndex)\n    * [.paths](#delib+paths)\n      * [.contract](#delib+paths)\n      * [.built](#delib+paths)\n      * [.address](#delib+paths)\n    * [.addresses](#delib+addresses) ⇒ <code>Array</code>\n      * [.set(name, address)](#delib+addresses+set) ⇒ <code>number</code>\n      * [.get(name, index)](#delib+addresses+get) ⇒ <code>string</code>\n      * [.getAll(name)](#delib+addresses+getAll) ⇒ <code>Array</code>\n    * [.init(rpcPath)](#delib+init) ⇒ <code>Web3</code>\n    * [.initIPC(ipcPath)](#delib+initIPC) ⇒ <code>Web3</code>\n    * [.initws(wsPath)](#delib+initws) ⇒ <code>Web3</code>\n    * [.closeWSConnnection()](#delib+closeWSConnnection) ⇒ <code></code>\n    * [.addAccount(privateKeyOrMnemonic)](#delib+addAccount) ⇒ <code>Promise</code> ⇒ <code>Object</code>\n    * [.getAccounts()](#delib+getAccounts) ⇒ <code>Array</code>\n    * [.changeProvider(type, path)](#delib+changeProvider) ⇒ <code>Web3</code>\n    * [.balanceOf(accountOrIndex)](#delib+balanceOf) ⇒ <code>Number</code>\n    * [.transfer(toAccount, value, options)](#delib+transfer) ⇒ <code>Object</code>\n    * [.createAccount(entropy)](#delib+createAccount) ⇒ <code>Object</code>\n    * [.compile(contractFiles, contractPath, buildPath)](#delib+compile)\n    * [.build(contractFiles, contractPath, buildPath)](#delib+build)\n    * [.getContractInfo(contractName)](#delib+getContractInfo)\n    * [.deploy(contractName, args, options)](#delib+deploy) ⇒ <code>Promise</code> ⇒ <code>Object</code>\n      * [deploy.estimate(contractName, args, options)](#delib+deploy+estimate) ⇒ <code>Promise</code> ⇒ <code>number</code>\n    * [.exec(contractName)](#delib+exec) ⇒ <code>ContractInstance</code>\n      * [.exec(contractName).estimate](#delib+exec+estimate) ⇒ <code>ContractInstance</code>\n    * [.execAt(contractName, contractAddress)](#delib+execAt) ⇒ <code>ContractInstance</code>\n      * [.execAt(contractName, contractAddress).estimate](#delib+execAt+estimate) ⇒ <code>ContractInstance</code>\n    * [.events(contractName, eventName, blockOptions, filter)](#delib+events) ⇒ <code>Promise</code> ⇒ <code>Array</code>\n    * [.eventsAt(contractName, contractAddress, eventName, blockOptions, filter)](#delib+eventsAt) ⇒ <code>Promise</code> ⇒ <code>Array</code>\n    * [.watch(contractName, eventName, filter, callback)](#Ethereum+watch) ⇒ <code>Object</code>\n    * [.watchAt(contractName, contractAddress, eventName, filter, callback)](#delib+watchAt) ⇒ <code>Object</code>\n\n\n<a name=\"delib+web3\"></a>\n#### delib.web3\nThe Web3 object being used as the current provider. Will first need to initialize a connection with `delib.init()` or `delib.initIPC()`;\n\n<a name=\"delib+gasAdjust\"></a>\n#### delib.gasAdjust\nThe amount to adjust gas when doing automatic gas estimates. Default is 0. It's calculated by this formula:\n```\ngasEstimate = gasEstimate + gasEstimate * gasAdjust\n```\n\n<a name=\"delib+accountIndex\"></a>\n#### delib.accountIndex\nThe default index of the account used for transactions. The index uses the web3.eth.accounts array to get the account address. This can be overwritten by setting an address in `delib.options.from`, setting a `from` property in transaction options, or setting an `accountIndex` property (also an account index) in transaction options.\n\n<a name=\"delib+options\"></a>\n#### delib.options\nThe default options for `delib` methods. This object contains the default transaction options as well as the default delib options. If `gas` is 0 or null then it will be estimated automatically for each transaction. `maxGas` is the max gas allowed when estimating gas. Leave `from` null to get the address from `delib.account` or `account`. You can pass any of these properties inside the options object for deploy or exec transactions.  \n\n```\n{\n  /** Default transaction options */\n  from: undefined,\n  to: undefined,\n  value: undefined,\n  gas: 0,\n  gasPrice: undefined,\n  data: undefined,\n  nonce: undefined,\n\n  /** Default delib options*/\n  account: undefined,\n  maxGas: undefined\n}\n```\n\n<a name=\"delib+paths\"></a>\n#### delib.paths\nAn object that contains the paths to the Solidity contracts, built contracts, and contract addresses. If using delib in a project these paths will be relative to your project root, otherwise they will be relative to your scripts. Assign paths to this object if you don't want to create a project or if you want to customize the paths.\n\n```\ndelib.paths = {\n  solidity: 'path to solidity contracts',\n  built: 'path to built contracts',\n  addresses: 'path to contract addresses'\n}\n```\n\n<a name=\"delib+addresses+set\"></a>\n#### delib.addresses.set(name, address)\nSet an address for a contract to use for future transactions. It appends it to the addresses file of that particular contract, or creates it if it doesn't exist.\n\n**Returns**: <code>number</code> - The index of the set address.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | <code>string</code> | Name of built contract |\n| address | <code>string</code> | The address of the contract |\n\n<a name=\"delib+addresses+get\"></a>\n#### delib.addresses.get(name, index)\nRetrieves the addresses file of a contract and gets a deployed contract address based on index. If no index parameter is given it will return the latest address, which is at the bottom of the addresses file.\n\n**Returns**: <code>Object</code> - Object that contains the contract address.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | <code>string</code> | Name of built contract |\n| index | <code>number</code> | The index of the contract address |\n\n<a name=\"Ethereum+addresses+getAll\"></a>\n#### delib.delib.getAll(name)\nRetrieves the addresses file of a contract and return an array of all its deployed addresses.\n\n**Returns**: <code>Array</code> - An array of deployed contract addresses.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | <code>string</code> | Name of built contract |\n\n<a name=\"delib+init\"></a>\n#### delib.init(rpcPath) ⇒ <code>Web3</code>\nInitializes a RPC connection with an Ethereum node. The RPC provider can be set in the ```delib.js``` config file or you can pass it in as arguments. This needs to be called before performing any methods that interact with an Ethereum node.\n\n**Returns**: <code>Web3</code> - The Web3 object delib uses for its RPC connection.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| rpcPath | <code>string</code> | The path to the RPC port. For example: `http://localhost:8545`. |\n\n<a name=\"delib+initIPC\"></a>\n#### delib.initIPC(ipcPath) ⇒ <code>Web3</code>\nInitializes an IPC connection with an Ethereum node. The IPC provider can be set in the ```delib.js``` config file or you can pass it in as an argument. This needs to be called before using IPC functionality such as creating or unlocking an account. This returns a Web3 object connected via IPC that you call web3.personal and web3.admin methods on.\n\n**Returns**: <code>Web3</code> - The Web3 object delib uses for its IPC connection.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| ipcPath | <code>string</code> | Path to the IPC provider. Example for Unix: process.env.HOME + '/Library/Ethereum/geth.ipc'. Optional. |\n\n<a name=\"delib+initws\"></a>\n#### delib.initws(wsPath) ⇒ <code>Web3</code>\nInitializes a WS connection with an Ethereum node.\n\n**Returns**: <code>Web3</code> - The Web3 object delib uses for its websocket. connection\n\n| Param | Type | Description |\n| --- | --- | --- |\n| wsPath | <code>string</code> | WS connection path |\n\n<a name=\"delib+closeWSConnnection\"></a>\n#### delib.closeWSConnnection(wsPath)\nCloses the web3 websocket connection.\n\n<a name=\"delib+addAccount\"></a>\n#### delib.addAccount(privateKeyOrMnemonic) ⇒ <code>Object</code>\nAdds an account to delib and web3 that can be to used to send transactions. Uses web3.eth.accounts.wallet.add to add the account to web3.\n\n**Returns**: <code>Promise</code> ⇒ <code>Object</code> - Returns an account object\n\n| Param | Type | Description |\n| --- | --- | --- |\n| privateKeyOrMnemonic | <code>string</code> | The private key or mnemonic of the account you wish to add |\n\nThe returned object:\nindex - number: Account index used in delib.\naddress - string: Account address.\nprivateKey - string: The accounts private key.\nsignTransaction(tx [, callback]) - Function: Function to sign transactions.\nsign(data) - Function: Function to sign transactions.\n\n<a name=\"delib+getAccounts\"></a>\n#### delib.getAccounts() ⇒ <code>Array</code>\nGets all the accounts in web3. This includes the accounts retrieved when using the web3.eth.getAccounts() method and the accounts in the web3.eth.accounts.wallet.\n\n**Returns**: <code>Array</code> - An array of account addresses.\n\n\n<a name=\"delib+changeProvider\"></a>\n#### delib.changeProvider(type, path) ⇒ <code>Web3</code>\nChanges web3 provider.\n\n**Returns**: <code>Web3</code> - The Web3 object delib uses for its connection.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>string</code> | Type of provider to use.\n| path | <code>string</code> | Path to the provider.\n\n<a name=\"delib+balanceOf\"></a>\n#### delib.balanceOf(accountOrIndex) ⇒ <code>Number</code>\nGets the balance of an account by its address or index in the delib.getAccounts() account array.\n\n**Returns**: <code>Number</code> - The balance of the account\n\n| Param | Type | Description |\n| --- | --- | --- |\n| accountOrIndex | <code>string</code> | The account address or account index of the account you wish to get the balance of. |\n\n<a name=\"delib+transfer\"></a>\n#### delib.transfer(toAccount, value, options) ⇒ <code>Object</code>\nTransfers Ether from one account to another.\n\n**Returns**: <code>Object</code> - The transaction response.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| toAccount | <code>string</code> | The account address you wish to transfer Ether to. |\n| value | <code>number</code> | In value in wei of the balance you wish to send. |\n| options | <code>Object</code> | Options to include in the transaction. |\n\n<a name=\"delib+createAccount\"></a>\n#### delib.createAccount(entropy) ⇒ <code>Object</code>\nCreates an account and returns to you an account object. Uses `web3.eth.accounts.create` to create the account.\n\n**Returns**: <code>Object</code> - The transaction response.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| entropy | <code>string</code> | A random string to increase entropy. If given it should be at least 32 characters. If none is given a random string will be generated using randomhex. |\n\nThe returned object:\nindex - number: Account index used in delib.\naddress - string: Account address.\nprivateKey - string: The accounts private key.\nsignTransaction(tx [, callback]) - Function: Function to sign transactions.\nsign(data) - Function: Function to sign transactions.\n\n\n<a name=\"delib+compile\"></a>\n#### delib.compile(contractFiles, contractPath, buildPath)\nBuild a Solidity contract.\n\n**Returns**: <code>Array</code> - Contracts built.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractFiles | <code>array</code> | Array of contract file names in the contracts folder |\n| contractPath | <code>string</code> | Optional. Directory path where contract files are located. If none is given the directory path will be retrieved from `delib.js` or the `contracts.paths` object |\n| buildPath | <code>string</code> | Optional. Directory path where built contracts will be put. If none is given the directory path will be retrieved from `delib.js` or the `contracts.paths` object. |\n\n<a name=\"delib+build\"></a>\n#### delib.build(contractFiles, contractPath, buildPath)\nBuild a Solidity contract.\n\n**Returns**: <code>Array</code> - Contracts built.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractFiles | <code>array</code> | Array of contract file names in the contracts folder |\n| contractPath | <code>string</code> | Optional. Directory path where contract files are located. If none is given the directory path will be retrieved from `delib.js` or the `contracts.paths` object |\n| buildPath | <code>string</code> | Optional. Directory path where built contracts will be put. If none is given the directory path will be retrieved from `delib.js` or the `contracts.paths` object. |\n\n<a name=\"delib+getContractInfo\"></a>\n#### delib.getContractInfo(contractName)\nGets the info of a built contract.\n\n**Returns**: <code>Object</code> - An object containing a built contracts name, abi, metadata, and bytecode.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | The contract's name |\n\n<a name=\"delib+deploy\"></a>\n#### delib.deploy(contractName, args, options, links) ⇒ <code>Promise</code> ⇒ <code>ContractInstance</code>  \nDeploy a built contract. If you have `delib.options` value set to 0 or pass in the option then your gas cost will be automatically estimated. The address is saved in your project's `addresses/` folder and will be used for future contract calls and transactions.\n\n**Returns**: <code>Promise</code> - An object containing deployed contract details.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of built contract located in the directory provided in delib.js |\n| args | <code>Array</code> | Arguments to be passed into the deployed contract as initial parameters. |\n| options | <code>Object</code> | Transaction options. |\n| links | <code>Object</code> | Links to libraries. Property is the library file name, :, then library name. The value is the library contract address |\n\n<a name=\"v+deploy+estimate\"></a>\n#### delib.deploy.estimate(contractName, args, options) ⇒ <code>Promise</code> ⇒ <code>number</code>\nEstimate the gas usage for deploying a contract.\n\n**Returns**: <code>Promise</code> - The response contains the estimated gas cost.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of built contract located in the directory provided in delib.js |\n| args | <code>Array</code> | Arguments to be passed into the deployed contract as initial parameters. |\n| options | <code>Object</code> | Transaction options. |\n\n<a name=\"delib+exec\"></a>\n#### delib.exec(contractName) ⇒ <code>ContractInstance</code>\nCalls or performs a transaction on a deployed contract. Will take the address provided in the config file. If you have `delib.options` value set to 0 or pass in the option into the contract method call your gas cost will be automatically estimated.\n\n**Returns**: <code>Contract</code> - Contract instance that you can call methods with.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of deployed contract |\n\n<a name=\"delib+exec+estimate\"></a>\n#### delib.exec(contractName).estimate ⇒ <code>Promise</code> ⇒ <code>number</code>\nCalls a deployed contract and methods called on the returned contract will return an estimated gas usage value.\n\n**Returns**: <code>number</code> - Contract instance that you can estimate the gas usage of methods with.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of deployed contract |\n\n<a name=\"Ethereum+execAt\"></a>\n#### delib.execAt(contractName, contractAddress) ⇒ <code>ContractInstance</code>\nCalls a deployed contract at a specific address. If you have `delib.options` value set to 0 or pass it in as an option your gas cost will be automatically estimated.\n\n**Returns**: <code>Contract</code> - Contract instance that you can call methods with.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of built contract located in the directory provided in delib.js. |\n| contractAddress | <code>string</code> | Address of the contract. |\n\n\n<a name=\"delib+execAt+estimate\"></a>\n#### delib.execAt(contractName, contractAddress).estimate ⇒ <code>Promise</code> ⇒ <code>number</code>\nCalls a deployed contract at a specified address and methods called on the contract will return the estimated gas usage.\n\n**Returns**: <code>Contract</code> - Contract instance that you can estimate the gas usage of methods with.\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of built contract located in the directory provided in delib.js. |\n| contractAddress | <code>string</code> | Address of the contract. |\n\n\n<a name=\"delib+events\"></a>\n#### delib.events(contractName, eventName, blockOptoins, filter) ⇒ <code>Promise</code>\nGets the event logs of an event.\n\n**Returns**: <code>Promise</code> => <code>Array</code> - Promise response contains an array event logs.    \n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of built contract. |\n| eventName | <code>string</code> | The name of the event method. |\n| blockOptions | <code>Object</code> | An object with keys of fromBlock and toBlock. Example: {fromBlock: 100, toBlock: 200}.\n| filter | <code>Object</code> | Object to filter the event logs. The filter properties can be ordinary values, an array of values, or a callback function. If it's just a value then it must match with the log's value or it's filtered. If it's an array one of the values must match. The callbacks take the log value as a parameter and it must return true. The filter's `address` property by default is the contract address. |\n\n<a name=\"delib+eventsAt\"></a>\n#### delib.eventsAt(contractName, contractAddress, eventName, blocksBack, filter) ⇒ <code>Promise</code>\nGets the event logs for an event.\n\n**Returns**: <code>Promise</code> => <code>Array</code> - Promise response contains an array event logs.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of built contract. |\n| contractAddress | <code>string</code> | Address of the contract. |\n| eventName | <code>string</code> | The name of the event method. |\n| blockOptions | <code>number</code> | An object with keys of fromBlock and toBlock. Example: {fromBlock: 100, toBlock: 200}.\n| filter | <code>Object</code> | Object to filter the event logs. The filter properties can be ordinary values, an array of values, or a callback function. If it's just a value then it must match with the log's value or it's filtered. If it's an array one of the values must match. The callbacks take the log value as a parameter and it must return true. The filter's `address` property by default is the contract address. |\n\n<a name=\"delib+watch\"></a>\n#### delib.watch(contractName, eventName, options, callback)\nSet up a listener to watch for new events. To stop the listener set the watch method to a variable and call `watch.stop()`.\n\n**Returns** <code>Object</code>\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of built contract. |\n| eventName | <code>string</code> | The name of the event method. |\n| filter | <code>Object</code> | Object to filter the event logs. The filter properties can be ordinary values, an array of values, or a callback function. If it's just a value then it must match with the log's value or it's filtered. If it's an array one of the values must match. The callbacks take the log value as a parameter and it must return true. The filter's `address` property by default is the contract address. Optional: you may pass the callback in its place. Can also set a fromBlock value. If not set it will default to the current block number.|\n| callback | <code>Function</code>  | Callback to watch the events with. Takes parameters err and log. |\n\n<a name=\"delib+watch\"></a>\n#### delib.watchAt(contractName, contractAddress, eventName, options, callback)\nSet up a listener to watch for new events. To stop the listener set the watch method to a variable and call `watch.stop()`. Need a websocket connection to be able to watch for events.\n\n**Returns** <code>Object</code>\n\n| Param | Type | Description |\n| --- | --- | --- |\n| contractName | <code>string</code> | Name of built contract. |\n| contractAddress | <code>string</code> | Address of the contract. |\n| eventName | <code>string</code> | The name of the event method. |\n| options | <code>Object</code> | bject to filter the event logs. The filter properties can be ordinary values, an array of values, or a callback function. If it's just a value then it must match with the log's value or it's filtered. If it's an array one of the values must match. The callbacks take the log value as a parameter and it must return true. The filter's `address` property by default is the contract address. Optional: you may pass the callback in its place. Can also set a fromBlock value. If not set it will default to the current block number.|\n","readmeFilename":"README.md"}