{"name":"libp2p-mdns","version":"0.12.1","description":"Node.js libp2p mDNS discovery implementation for peer discovery","leadMaintainer":"Jacob Heun <jacobheun@gmail.com>","main":"src/index.js","scripts":{"lint":"aegir lint","coverage":"aegir coverage","test":"aegir test -t node","test:node":"aegir test -t node","release":"aegir release -t node --no-build","release-minor":"aegir release --type minor -t node --no-build","release-major":"aegir release --type major -t node --no-build","coverage-publish":"aegir coverage publish"},"pre-push":["lint","test"],"repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-mdns.git"},"keywords":["IPFS"],"license":"MIT","bugs":{"url":"https://github.com/libp2p/js-libp2p-mdns/issues"},"homepage":"https://github.com/libp2p/js-libp2p-mdns","devDependencies":{"aegir":"^17.1.1","async":"^2.6.1","chai":"^4.2.0","dirty-chai":"^2.0.1"},"dependencies":{"libp2p-tcp":"~0.13.0","multiaddr":"^5.0.2","multicast-dns":"^7.2.0","peer-id":"~0.12.0","peer-info":"~0.14.1"},"contributors":[{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Jacob Heun","email":"jake@andyet.net"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"emersion","email":"contact@emersion.fr"},{"name":"greenkeeperio-bot","email":"support@greenkeeper.io"},{"name":"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ","email":"victorbjelkholm@gmail.com"}],"gitHead":"7398c194bb4dce36cab7067e34f72a3d676b56f4","_id":"libp2p-mdns@0.12.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"jacobheun","email":"jacobheun@gmail.com"},"dist":{"integrity":"sha512-WH5ZaHHQ3cvSqvD+CHXo8r+O7shn589/+t6HKPWw79EEa9JyU9T/GWmDd+3VE+ff8PcjPtF3ROdSMei3QIZQUg==","shasum":"d49aaf8a67173352fd028eb3308d6b139c020a6a","tarball":"http://registry-npm.ywwl.com/libp2p-mdns/download/libp2p-mdns-0.12.1.tgz","fileCount":8,"unpackedSize":26222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+/flCRA9TVsSAnZWagAAPwYQAI1bKqqfCyNpny6j6s0p\n2X+vKEIcZunhOxG9AOzIubazdpJonhdYRkJVNNih/XQaMM3mVNUWw16Wkpug\n0KDCalrNKaK4PVc7IZx1WoLrFXutq70KpHBpyxIco9OG03eHCltAIOKdi7D1\nxvncPoxPjFwjmNUT06/j/GCLo3NkyZABrqxHklNWgFyhuSodxNSZmYV0WPLj\nIv6480aKlXLcYsZZFA4Lv3aQnOG0ME0FauX91flhu4/r1AgWdBlJ5gvxoLZk\nCxDnjQj7gQVRulzMUvwzgNlYVltgg8zojIBmFxDzZyjQJYrgo2eHq9dNfBf+\nA+C6+a6HXux7RguRWAd8ILZVIFesDgAsBubB2ifixG75Gv5Z29teploOi6bA\nezVPlkB4eoGGtv3CET3VNK0/+qI1azeWgv0j+5zUd9ZeOZlWaPJvjg0qYrJR\n6TrMkEfxDf3BYHwdwd6DZaNrA8/UW9IZCNuwQbwiiQjTAoKmKeTtUCljc1x/\n/PTeZDUxeZfxmdjrIJ0hbj95M/dm4f3ngLQrEoC4Nz/IIpqFTBiqZrn7SX1p\nFybxKv1fX/igzhuoIEPy1eKIZYp/Z1DvdFqFnv7bNY7bKmCc9KfTKRxq1KO6\nuV2J8JwKAYbi1we7GrAareBye2Jb9sxhRwHW7W68V3RvRvLqR1Ksch2b/zdw\nr3pu\r\n=NIbX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHXR/PoC4U1AymjA52Wpbc2w1xQqxCkykjdswK4qds6SAiEA6BYJzUAr7W0/0qkJln4Etwk2m+VBFmP9KmxXWVyEHNU="}],"size":8231,"noattachment":false,"key":"/libp2p-mdns/-/libp2p-mdns-0.12.1.tgz"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"},{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libp2p-mdns_0.12.1_1543239653328_0.8942779561351715"},"_hasShrinkwrap":false,"readme":"libp2p-mdns JavaScript implementation\n=====================================\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\n[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)\n[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)\n[![Discourse posts](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg)](https://discuss.libp2p.io)\n[![](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-mdns.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-mdns)\n[![](https://img.shields.io/travis/libp2p/js-libp2p-mdns.svg?style=flat-square)](https://travis-ci.com/libp2p/js-libp2p-mdns)\n[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-mdns.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-mdns)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> JavaScript libp2p MulticastDNS discovery implementation\n\n## Lead Maintainer\n\n[Jacob Heun](https://github.com/jacobheun)\n\n## Usage\n\n```JavaScript\nconst MDNS = require('libp2p-mdns')\n\nconst mdns = new MDNS(options)\n\nmdns.on('peer', (peerData) => {\n  console.log('Found a peer in the local network', peerData.id.toB58String(), peerData.multiaddrs)\n})\n\n// Broadcast for 20 seconds\nmdns.start()\nsetTimeout(() => mdns.stop(), 20 * 1000)\n```\n\n- options\n  - `peerId` - PeerId to announce\n  - `multiaddrs` - multiaddrs to announce\n  - `broadcast` - (true/false) announce our presence through mDNS, default `false`\n  - `interval` - query interval, default 10 * 1000 (10 seconds)\n  - `serviceTag` - name of the service announce , default 'ipfs.local`\n  - `compat` - enable/disable compatibility with go-libp2p-mdns, default `true`\n\n## MDNS messages\n\nA query is sent to discover the IPFS nodes on the local network\n\n```\n{ type: 'query',\n  questions: [ { name: 'ipfs.local', type: 'PTR' } ]\n}\n```\n\nWhen a query is detected, each IPFS node sends an answer about itself\n\n```\n[ { name: 'ipfs.local',\n    type: 'PTR',\n    class: 'IN',\n    ttl: 120,\n    data: 'QmNPubsDWATVngE3d5WDSNe7eVrFLuk38qb9t6vdLnu2aK.ipfs.local' },\n  { name: 'QmNPubsDWATVngE3d5WDSNe7eVrFLuk38qb9t6vdLnu2aK.ipfs.local',\n    type: 'SRV',\n    class: 'IN',\n    ttl: 120,\n    data:\n     { priority: 10,\n       weight: 1,\n       port: '20002',\n       target: 'LAPTOP-G5LJ7VN9' } },\n  { name: 'QmNPubsDWATVngE3d5WDSNe7eVrFLuk38qb9t6vdLnu2aK.ipfs.local',\n    type: 'TXT',\n    class: 'IN',\n    ttl: 120,\n    data: ['QmNPubsDWATVngE3d5WDSNe7eVrFLuk38qb9t6vdLnu2aK'] },\n  { name: 'LAPTOP-G5LJ7VN9',\n    type: 'A',\n    class: 'IN',\n    ttl: 120,\n    data: '127.0.0.1' },\n  { name: 'LAPTOP-G5LJ7VN9',\n    type: 'AAAA',\n    class: 'IN',\n    ttl: 120,\n    data: '::1' } ]\n```\n","publish_time":1543239653497,"_cnpm_publish_time":1543239653497,"dist-tags":{"beta":"0.15.0","latest":"0.18.0"}}