{"name":"bitcore-p2p","version":"9.0.0","keywords":["bitcoin","bitcore"],"license":"MIT","_id":"bitcore-p2p@9.0.0","homepage":"https://github.com/bitpay/bitcore-p2p#readme","bugs":{"url":"https://github.com/bitpay/bitcore-p2p/issues"},"dist":{"shasum":"728345fcefdc3c9a6e8b37cb953228207bd30546","tarball":"http://registry-npm.ywwl.com/bitcore-p2p/download/bitcore-p2p-9.0.0.tgz","fileCount":62,"integrity":"sha512-IAAS0aoWP9FBmHDl28dJ+hRBjzqucoShpeilPhQb5ErXzwsfUrUCeyOYySxetqxYyec4mY/EDXDZSCRSp3sG1A==","signatures":[{"sig":"MEUCIQCZrm0MeHq5xatBBOiJyV/RmEprpDVCaOAULNeNjDFhOwIgQxTlcyzQuB4u4FiKyoHfENM+nRP7TDzHY0Y/rj65XOs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":588119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj99sVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmol+g//T5QxnL4RqJscWjsf2wp0wC7veiO+uDgmM2Sfflp7y62cM74q\r\nbrsTcXo9iGaGscF8200zYcs74CYzdbQ/oMPMe/cIXuvOb9Z2VY6ctP+ZlOL0\r\nMKfl6iX1ZC9FhXoZmHKhGHMLc3NIKirI2aqmSlys2FRtgxJTrKEglpk+CkVe\r\n4LzlROMefTbwzaVA7jd2+lIw+Ljj3Nk1w6QlQ/R3/tooBzDWgdQpeB1V350l\r\neBEaTIc2SV9dmeG+Dr9uSlhp/JBVYLU7pDpTby5u6B2Usf1cMEfVTjTcY5gn\r\n/bhU3H1SI4hwuiR3E/2qiLSYPn7w5Zz3tdTmaF0dSOwzCNQia2abSikosA+G\r\nFCQOS3hFMreuKhl2E/f1qiEJWc1yxuEUo2bnBZ6FX3Krd2jYBJEjCu6m99yU\r\n1xOn5dsPvCyemzO54Sd6LbPWLsFOhd51RGRcXKVxQRu/R9N1b7uhF1WMmr/t\r\npXU2yxeotJ8hG3D+fgQcIAAqnskKCA6hR7S5cM/s+eTKaiAy76JfrRIdNdOc\r\nn+/4aIP3Yj5t5de15PeHGDiHULuvmmQF9e9WdsNq7Bm8B7pjBwpj6hfPEkBY\r\nTRyVkKzbrQrPpdxbZ9n6Y/Kedq/mBNOc8RqEI2CWXEENbg79DdajlW2/dWJE\r\nVaL9RmcEisccCVsVe9U1GDM0Qvsr4FhykCw=\r\n=Gfx/\r\n-----END PGP SIGNATURE-----\r\n","size":205402,"noattachment":false,"key":"/bitcore-p2p/-/bitcore-p2p-9.0.0.tgz"},"main":"index.js","gitHead":"67bb5348bde5e6e639047aea205a9978c8c0d2a5","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/6.5.1/node@v18.14.2+x64 (linux)","description":"Interface to the bitcoin P2P network for bitcore","directories":{},"_nodeVersion":"18.14.2","dependencies":{"buffers":"github:bitpay/node-buffers#v0.1.2-bitpay","bitcore-lib":"^9.0.0","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":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bitcore-p2p_9.0.0_1677187861350_0.8707422074713673","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":1677187861529,"maintainers":[{"name":"gasteve","email":"stephen@pairhome.net"},{"name":"nitsujlangston","email":"nitsujlangston@gmail.com"},{"name":"unusualbob","email":"unusualbob@gmail.com"}],"_cnpm_publish_time":1677187861529,"dist-tags":{"beta":"11.5.1","latest":"10.10.7"}}