{"name":"bitcore-p2p","version":"0.8.7","keywords":["bitcoin","bitcore"],"author":{"name":"BitPay","email":"dev@bitpay.com"},"license":"MIT","_id":"bitcore-p2p@0.8.7","contributors":[{"name":"Esteban Ordano","email":"eordano@gmail.com"}],"homepage":"https://github.com/bitpay/bitcore-p2p","bugs":{"url":"https://github.com/bitpay/bitcore-p2p/issues"},"dist":{"shasum":"d0deaabb5513c2400f046200bcd9083b55c0132e","tarball":"http://registry-npm.ywwl.com/bitcore-p2p/download/bitcore-p2p-0.8.7.tgz","integrity":"sha512-OWOnswBlE6E+m1uZ+8sLnUSXiPylpRTW4RQ9zZS4xlfpv9rlTYt5HDgVs6k4azKUvn93zb3/6AFej21gLfLzhw==","signatures":[{"sig":"MEYCIQDFkr4bXtkPWVHB3vIdVkdTQvER2leO1kxxdfzEewJRpgIhAMXgmyDI0P9GXlu4qlq+h2cdsGx2E4gkV9zxyAFhd/S+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":21046,"noattachment":false,"key":"/bitcore-p2p/-/bitcore-p2p-0.8.7.tgz"},"main":"index.js","_from":".","_shasum":"d0deaabb5513c2400f046200bcd9083b55c0132e","gitHead":"9ab04977c6a77fdf504703fa40d112945538367f","scripts":{"lint":"gulp lint","test":"gulp test","build":"gulp","coverage":"gulp coverage"},"_npmUser":{"name":"eordano","email":"eordano@gmail.com"},"repository":{"url":"https://github.com/bitpay/bitcore-p2p.git","type":"git"},"_npmVersion":"2.1.9","description":"Interface to the bitcoin P2P network for bitcore","directories":{},"_nodeVersion":"0.10.33","dependencies":{"buffers":"^0.1.1","bufferput":"^0.1.2","bitcore-base":"~0.8.5","socks5-client":"^0.3.6"},"devDependencies":{"chai":"~1.10.0","gulp":"^3.8.10","karma":"^0.12.28","mocha":"~2.0.1","plato":"^1.3.0","sinon":"^1.12.2","gulp-git":"^0.5.5","istanbul":"^0.3.5","gulp-bump":"^0.1.11","gulp-util":"=3.0.1","browserify":"~6.3.3","gulp-mocha":"^2.0.0","gulp-shell":"^0.2.10","gulp-jshint":"^1.9.0","gulp-rename":"^1.2.0","gulp-uglify":"^1.0.2","karma-mocha":"^0.1.9","run-sequence":"^1.0.2","gulp-coveralls":"^0.1.3","karma-firefox-launcher":"^0.1.3"},"readme":"# Bitcore P2P\n\n[![NPM Package](https://img.shields.io/npm/v/bitcore-p2p.svg?style=flat-square)](https://www.npmjs.org/package/bitcore-p2p)\n[![Build Status](https://img.shields.io/travis/bitpay/bitcore-p2p.svg?branch=master&style=flat-square)](https://travis-ci.org/bitpay/bitcore-p2p)\n[![Coverage Status](https://img.shields.io/coveralls/bitpay/bitcore-p2p.svg?style=flat-square)](https://coveralls.io/r/bitpay/bitcore-p2p?branch=master)\n\n**The peer-to-peer networking protocol for BTC.**\n\n`bitcore-p2p` adds [Bitcoin protocol](https://en.bitcoin.it/wiki/Protocol_documentation) support for Bitcore.\n\nSee [the main bitcore repo](https://github.com/bitpay/bitcore) for more information.\n\n## Getting Started\n\n```sh\nnpm install bitcore-p2p\n```\n\nIn order to connect to the Bitcoin network, you'll need to know the IP address of at least one node of the network, or use [Pool](./docs/pool.md) to discover peers using a DNS seed.\n\n```javascript\nvar Peer = require('bitcore-p2p').Peer;\n\nvar peer = new Peer({host: '127.0.0.1'});\n\npeer.on('ready', function() {\n  // peer info\n  console.log(peer.version, peer.subversion, peer.bestHeight);\n});\npeer.on('disconnect', function() {\n  console.log('connection closed');\n});\npeer.connect();\n```\n\nThen, you can get information from other peers by using:\n\n```javascript\n// handle events\npeer.on('inv', function(message) {\n  // message.inventory[]\n});\npeer.on('tx', function(message) {\n  // message.transaction\n});\n```\n\nTake a look at this [guide](./docs/peer.md) on the usage of the `Peer` class.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/bitpay/bitcore/blob/master/CONTRIBUTING.md) on the main bitcore repo for information about how to contribute.\n\n## License\n\nCode released under [the MIT license](https://github.com/bitpay/bitcore/blob/master/LICENSE).\n\nCopyright 2013-2019 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.\n","publish_time":1419881392062,"maintainers":[{"name":"gasteve","email":"stephen@pairhome.net"},{"name":"nitsujlangston","email":"nitsujlangston@gmail.com"},{"name":"unusualbob","email":"unusualbob@gmail.com"}],"_cnpm_publish_time":1419881392062,"dist-tags":{"beta":"11.5.1","latest":"10.10.7"}}