{"name":"bitcore-p2p","version":"10.0.3","keywords":["bitcoin","bitcore"],"license":"MIT","_id":"bitcore-p2p@10.0.3","homepage":"https://github.com/bitpay/bitcore-p2p#readme","bugs":{"url":"https://github.com/bitpay/bitcore-p2p/issues"},"dist":{"shasum":"25064a5ff48396c2f41e17b1c92814b48f902a67","tarball":"http://registry-npm.ywwl.com/bitcore-p2p/download/bitcore-p2p-10.0.3.tgz","fileCount":62,"integrity":"sha512-No2Sq6Dnt1Jd2mowmx7hHH/cicUHp3QPvEThguC6olPw5nC1dU0qJVBeXN0akmnJjCKLO+QmEbBYYSRC70pPXA==","signatures":[{"sig":"MEQCIFk2NOvNIiSoft6KUB4AK9Jp2jGcJu5UOOqD/n1U2mZDAiAtnUzV597eqoLbUJ1Sk3+8YopHo6arEaDg+2u/BviNQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":588122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNCf+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQeg//eMiRG8xgvu9FG5chxEG9HUihiXjhElF/CEfIbcHNbtk3UB9n\r\nQ8US3OX/Uk2rNRll7Bafzi3M4xL8ooHqkio/VKys9dDILXfdDO91+68TGJHg\r\nxl81Ctb73RHkvTrrpm2P/ocZqcGN/ArVwIPRJsQap7dz4T7ffxEYWek8RW/7\r\n/QOBKwWbXmtu6Z48E9ZgBGUGO1zm4VkrTYZyMZZdGM75uAnTU+JJ0Hn9RDir\r\n/zne18jUk2BdfEIiY69dF7Ity/eM/lpepYuxRSDiB0waF3OcsQfVlVddZV1P\r\nmysVEwRct/Y6foy8hpOr+o14MKYS23QAIeIrumQ0VpGQiHYetM2DsAJrVALR\r\nV+DkFrenNDvrpDxyYEWwTWmimAMfRupk7c/8+B2I3qRgs4G5e8M13HTtSJI8\r\ne2Z9RbtJpvRn4VrjjNak2V0pnhHL1/RRxoDqGohOBH9fTU5iHc45rDbX/B7O\r\n5xCDwL2EPIP2X/1oNGy4sDMAwYXQxw9YNa9CTJA4RAhosQA0HHUD6YyY7OW7\r\nKtArhIE3EL2r4RCR0kPj2PXHW7TpXTaWDxgjuy1ChT4j2GyVeOJk1vU39h3+\r\nq0oTUQnXSE4V7Cxz76UK8ve18ac8uoVeUiEMP1gj9PYgoN5qBZWnXgiJ5uBs\r\nfThqe5fnh+KKAs7Zjq2uJthT8+ChPzv/yLs=\r\n=qQBk\r\n-----END PGP SIGNATURE-----\r\n","size":205417,"noattachment":false,"key":"/bitcore-p2p/-/bitcore-p2p-10.0.3.tgz"},"main":"index.js","gitHead":"98611e6bb8be12be6667babfe857f73b8b0095c6","scripts":{"pub":"npm run build && npm publish","test":"gulp test","build":"gulp","test:ci":"npm run test","coverage":"gulp coverage"},"_npmUser":{"name":"nitsujlangston","email":"nitsujlangston@gmail.com"},"repository":{"url":"git+https://github.com/bitpay/bitcore-p2p.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.22.12+x64 (linux)","description":"Interface to the bitcoin P2P network for bitcore","directories":{},"_nodeVersion":"12.22.12","dependencies":{"buffers":"github:bitpay/node-buffers#v0.1.2-bitpay","bitcore-lib":"^10.0.3","bloom-filter":"^0.2.0","socks5-client":"^0.3.6"},"_hasShrinkwrap":false,"devDependencies":{"brfs":"^1.2.0","chai":"~1.10.0","gulp":"^4.0.0","sinon":"^1.12.2","bitcore-build":"^10.0.3"},"_npmOperationalInternal":{"tmp":"tmp/bitcore-p2p_10.0.3_1681139710294_0.8600505280575399","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":1681139710519,"maintainers":[{"name":"gasteve","email":"stephen@pairhome.net"},{"name":"nitsujlangston","email":"nitsujlangston@gmail.com"},{"name":"unusualbob","email":"unusualbob@gmail.com"}],"_cnpm_publish_time":1681139710519,"dist-tags":{"beta":"11.5.1","latest":"10.10.7"}}