{"name":"bitcore-p2p","version":"8.0.0","keywords":["bitcoin","bitcore"],"license":"MIT","_id":"bitcore-p2p@8.0.0","homepage":"https://github.com/bitpay/bitcore-p2p#readme","bugs":{"url":"https://github.com/bitpay/bitcore-p2p/issues"},"dist":{"shasum":"aae14b6b9dc3591b7c520ab542c10b1ab8d89735","tarball":"http://registry-npm.ywwl.com/bitcore-p2p/download/bitcore-p2p-8.0.0.tgz","fileCount":61,"integrity":"sha512-/58AbwDfa2YXhGaiW966BaxewOI6AKPYUEkS/0oYB+GmdY17qQD8Qpzc8LAUcWQbnXy4ssXwtqc5FGY6q/1UoA==","signatures":[{"sig":"MEUCIFDoIZvuyeEjM+EZH8TYR1aEzEDpv9W1TsqlV340ZCI3AiEA58BYVFwVqOi36LaMfrd6XrSvq8FZ95HnAWear1V/Dog=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa6PesCRA9TVsSAnZWagAAd8oP/1A1LLCmEIjqwPyk38t6\n919AVSDPa6+a7dS3jt9/6i3UphisFubn1ckwkUYy8AAUdhJ6mfI0nWDgbXBS\nmDYKfL/pEBcvIu+tCl0uUqIpXbYdGdS2Xv2NxltluEwC42HIJVWJ2v7L7Ush\npglt6wfSx0SBnPFAQ6Dd7bFHwVXA4CC+1dlza9tpksKiQC9T/jzm+oCUfXit\nYFctXKAVcNymr1Yn1NpepdgdulVSFQCGC4nophq0RVfaL8HN+AZcC7GKyFuA\nIeiwz+OKC1RGGCjI2hxcRN8izyWpkk8utw1voxBqB0+UQpFze46NibhOV70M\nQqFtZ9fd5H46QtsIMVvdyprYTpwGh9WRtqtzZnYN79CI9iZQ3YemHp8ffBYe\n725w0PFD4d93vX1IgqyH3ekgpZjKO4CbpVdKmZDG75oOvrR9fUSQY2xFDVjC\ncygnuKoNLKgW1e9NDaXcHuRutJadt1HxUVoVDor7Zk3GFVxR3wO+9XgL7ntl\ndMOrB64oU81zQECUX1QT4NmN9ZqWTCQLqY6HgWqPfytE79crlMH0jzOUQOKm\nyTdY6i4FXNXoCaAOYCf9l27xds8XmzCyhh1u+GLjW/Yt3Qpw0rF+jox9sdNd\nINcAjf9USKhjNbQfegIZrUyzrgwk9tTXaxb21P7yyeFEYKqpLS9QJWVAq9ju\nQA0b\r\n=bDhr\r\n-----END PGP SIGNATURE-----\r\n","size":204578,"noattachment":false,"key":"/bitcore-p2p/-/bitcore-p2p-8.0.0.tgz"},"main":"index.js","gitHead":"803df52ef80b325ba7baddada22d377682fb34cf","scripts":{"lint":"gulp lint","test":"gulp test:node","build":"gulp","coverage":"gulp coverage"},"_npmUser":{"name":"micahriggan","email":"micahriggan@gmail.com"},"repository":{"url":"git+https://github.com/bitpay/bitcore-p2p.git","type":"git"},"_npmVersion":"5.6.0","description":"Interface to the bitcoin P2P network for bitcore","directories":{},"_nodeVersion":"8.9.4","dependencies":{"bcoin":"1.0.0-beta.12","buffers":"github:bitpay/node-buffers#v0.1.2-bitpay","bitcore-lib":"^8.0.0","bloom-filter":"^0.2.0","socks5-client":"^0.3.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"brfs":"^1.2.0","chai":"~1.10.0","gulp":"^3.8.10","sinon":"^1.12.2","bitcore-build":"git://github.com/bitpay/bitcore-build.git"},"_npmOperationalInternal":{"tmp":"tmp/bitcore-p2p_8.0.0_1525217195556_0.316978065171329","host":"s3://npm-registry-packages"},"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":1525217195900,"maintainers":[{"name":"gasteve","email":"stephen@pairhome.net"},{"name":"nitsujlangston","email":"nitsujlangston@gmail.com"},{"name":"unusualbob","email":"unusualbob@gmail.com"}],"_cnpm_publish_time":1525217195900,"dist-tags":{"beta":"11.5.1","latest":"10.10.7"}}