{"_id":"hyperdht","_rev":"237054","name":"hyperdht","description":"The DHT powering Hyperswarm","dist-tags":{"latest":"6.5.2"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"time":{"modified":"2023-03-24T16:32:58.000Z","created":"2016-09-15T15:42:11.265Z","6.5.2":"2023-03-16T08:33:13.034Z","1.3.2":"2018-09-18T21:56:17.269Z","1.3.1":"2018-09-18T00:44:35.590Z","1.3.0":"2017-04-22T10:35:32.965Z","1.2.0":"2017-02-05T05:49:58.348Z","1.1.0":"2017-02-05T05:13:15.139Z","1.0.0":"2017-02-05T05:05:02.943Z","0.0.0":"2016-09-15T15:42:11.265Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/hyperdht.git"},"versions":{"6.5.2":{"name":"hyperdht","version":"6.5.2","description":"The DHT powering Hyperswarm","main":"index.js","browser":"browser.js","bin":{"hyperdht":"bin.js"},"dependencies":{"@hyperswarm/secret-stream":"^6.0.0","b4a":"^1.3.1","bogon":"^1.0.0","compact-encoding":"^2.4.1","compact-encoding-net":"^1.0.1","debugging-stream":"^2.0.0","dht-rpc":"^6.7.0","events":"^3.3.0","hypercore-crypto":"^3.3.0","noise-curve-ed":"^2.0.0","noise-handshake":"^3.0.0","record-cache":"^1.1.1","safety-catch":"^1.0.1","sodium-universal":"^4.0.0","xache":"^1.1.0"},"devDependencies":{"brittle":"^3.0.0","keypear":"^1.1.1","standard":"^16.0.4"},"scripts":{"test":"standard && node test/all.js","test:generate":"brittle -r test/all.js test/*.js","lint":"standard"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","directories":{"lib":"lib","test":"test"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/hyperdht.git"},"keywords":[],"bugs":{"url":"https://github.com/holepunchto/hyperdht/issues"},"homepage":"https://github.com/holepunchto/hyperdht#readme","standard":{"ignore":["**/*.mjs"]},"gitHead":"5b1a5922979cfa26734a8d9c7f024fabc867341d","_id":"hyperdht@6.5.2","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"0f19a746a519ba40275b8bb8539b1414a1a87734","size":28712,"noattachment":false,"key":"/hyperdht/-/hyperdht-6.5.2.tgz","tarball":"http://name.csiicloud.com:7001/hyperdht/download/hyperdht-6.5.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyperdht_6.5.2_1678955592845_0.30238509999563745"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-03-16T08:33:13.034Z","publish_time":1678955593034,"_cnpm_publish_time":1678955593034},"1.3.2":{"name":"hyperdht","version":"1.3.2","description":"A DHT that supports peer discovery and distributed hole punching","main":"index.js","dependencies":{"buffer-equals":"^1.0.4","dht-rpc":"^3.0.1","inherits":"^2.0.3","ipv4-peers":"^1.1.1","minimist":"^1.2.0","protocol-buffers":"^3.2.1","unordered-set":"^2.0.0"},"devDependencies":{"standard":"^8.0.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/hyperdht.git"},"scripts":{"test":"standard"},"bin":{"hyperdht":"./bin.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/hyperdht/issues"},"homepage":"https://github.com/mafintosh/hyperdht","gitHead":"fcbae09f1495046c3cad6732b5de54073f3bfb83","_id":"hyperdht@1.3.2","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"fdd7f0a66c1963bb431f35100f844c580cd98be5","size":5709,"noattachment":false,"key":"/hyperdht/-/hyperdht-1.3.2.tgz","tarball":"http://name.csiicloud.com:7001/hyperdht/download/hyperdht-1.3.2.tgz"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyperdht_1.3.2_1537307777050_0.41039706705069245"},"_hasShrinkwrap":false,"publish_time":1537307777269,"_cnpm_publish_time":1537307777269,"_cnpmcore_publish_time":"2021-12-17T00:24:17.016Z"},"1.3.1":{"name":"hyperdht","version":"1.3.1","description":"A DHT that supports peer discovery and distributed hole punching","main":"index.js","dependencies":{"buffer-equals":"^1.0.4","dht-rpc":"^2.3.0","inherits":"^2.0.3","ipv4-peers":"^1.1.1","minimist":"^1.2.0","protocol-buffers":"^3.2.1","unordered-set":"^2.0.0"},"devDependencies":{"standard":"^8.0.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/hyperdht.git"},"scripts":{"test":"standard"},"bin":{"hyperdht":"./bin.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/hyperdht/issues"},"homepage":"https://github.com/mafintosh/hyperdht","gitHead":"fe1ed1f3b2d04271335fc316e0bb19c1f8b582f4","_id":"hyperdht@1.3.1","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"f907e7ce20872ec057484a09d3d3c6fc56137a21","size":5710,"noattachment":false,"key":"/hyperdht/-/hyperdht-1.3.1.tgz","tarball":"http://name.csiicloud.com:7001/hyperdht/download/hyperdht-1.3.1.tgz"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyperdht_1.3.1_1537231475459_0.05054887952448883"},"_hasShrinkwrap":false,"publish_time":1537231475590,"_cnpm_publish_time":1537231475590,"_cnpmcore_publish_time":"2021-12-17T00:24:17.234Z"},"1.3.0":{"name":"hyperdht","version":"1.3.0","description":"A DHT that supports peer discovery and distributed hole punching","main":"index.js","dependencies":{"buffer-equals":"^1.0.4","dht-rpc":"^2.3.0","inherits":"^2.0.3","ipv4-peers":"^1.1.1","minimist":"^1.2.0","protocol-buffers":"^3.2.1","unordered-set":"^2.0.0"},"devDependencies":{"standard":"^8.0.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/hyperdht.git"},"scripts":{"test":"standard"},"bin":{"hyperdht":"./bin.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/hyperdht/issues"},"homepage":"https://github.com/mafintosh/hyperdht","gitHead":"c440f3d759ff219351e0013e3c575ecdb7501715","_id":"hyperdht@1.3.0","_shasum":"5b91a0e8ba77c117c5f34387e5c7e31e3d632ecc","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"5b91a0e8ba77c117c5f34387e5c7e31e3d632ecc","size":5543,"noattachment":false,"key":"/hyperdht/-/hyperdht-1.3.0.tgz","tarball":"http://name.csiicloud.com:7001/hyperdht/download/hyperdht-1.3.0.tgz"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hyperdht-1.3.0.tgz_1492857331112_0.32416189392097294"},"directories":{},"publish_time":1492857332965,"_hasShrinkwrap":false,"_cnpm_publish_time":1492857332965,"_cnpmcore_publish_time":"2021-12-17T00:24:17.460Z"},"1.2.0":{"name":"hyperdht","version":"1.2.0","description":"A DHT that supports peer discovery and distributed hole punching","main":"index.js","dependencies":{"buffer-equals":"^1.0.4","dht-rpc":"^2.3.0","inherits":"^2.0.3","ipv4-peers":"^1.1.1","minimist":"^1.2.0","protocol-buffers":"^3.2.1","unordered-set":"^2.0.0"},"devDependencies":{"standard":"^8.0.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/hyperdht.git"},"scripts":{"test":"standard"},"bin":{"hyperdht":"./bin.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/hyperdht/issues"},"homepage":"https://github.com/mafintosh/hyperdht","gitHead":"8fbdf828ff649f9d0435627df1ac10b3fcde2be7","_id":"hyperdht@1.2.0","_shasum":"85e8e0ccd7624f9ac28e410e3c37db7a165e8824","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"85e8e0ccd7624f9ac28e410e3c37db7a165e8824","size":5508,"noattachment":false,"key":"/hyperdht/-/hyperdht-1.2.0.tgz","tarball":"http://name.csiicloud.com:7001/hyperdht/download/hyperdht-1.2.0.tgz"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/hyperdht-1.2.0.tgz_1486273796407_0.36596730002202094"},"directories":{},"publish_time":1486273798348,"_hasShrinkwrap":false,"_cnpm_publish_time":1486273798348,"_cnpmcore_publish_time":"2021-12-17T00:24:17.714Z"},"1.1.0":{"name":"hyperdht","version":"1.1.0","description":"A DHT that supports peer discovery and distributed hole punching","main":"index.js","dependencies":{"buffer-equals":"^1.0.4","dht-rpc":"^2.2.0","inherits":"^2.0.3","ipv4-peers":"^1.1.1","minimist":"^1.2.0","protocol-buffers":"^3.2.1","unordered-set":"^2.0.0"},"devDependencies":{"standard":"^8.0.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/hyperdht.git"},"scripts":{"test":"standard"},"bin":{"hyperdht":"./bin.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/hyperdht/issues"},"homepage":"https://github.com/mafintosh/hyperdht","gitHead":"438d01fb93bb9b7f53a6e8c8eaaf070d52118345","_id":"hyperdht@1.1.0","_shasum":"4e3e732a74082e1a97fa872e60d23f988c0d1a7c","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"4e3e732a74082e1a97fa872e60d23f988c0d1a7c","size":5395,"noattachment":false,"key":"/hyperdht/-/hyperdht-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/hyperdht/download/hyperdht-1.1.0.tgz"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hyperdht-1.1.0.tgz_1486271594894_0.0289267695043236"},"directories":{},"publish_time":1486271595139,"_hasShrinkwrap":false,"_cnpm_publish_time":1486271595139,"_cnpmcore_publish_time":"2021-12-17T00:24:17.906Z"},"1.0.0":{"name":"hyperdht","version":"1.0.0","description":"A DHT that supports peer discovery and distributed hole punching","main":"index.js","dependencies":{"buffer-equals":"^1.0.4","dht-rpc":"^2.2.0","inherits":"^2.0.3","ipv4-peers":"^1.1.1","minimist":"^1.2.0","protocol-buffers":"^3.2.1","unordered-set":"^2.0.0"},"devDependencies":{"standard":"^8.0.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/hyperdht.git"},"scripts":{"test":"standard"},"bin":{"hyperdht":"./bin.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/hyperdht/issues"},"homepage":"https://github.com/mafintosh/hyperdht","gitHead":"2a104d54c2b950885a9e94b09c0198e8b543cb89","_id":"hyperdht@1.0.0","_shasum":"894907fa6bad188b082982d9cc3c9324d85c9f75","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"894907fa6bad188b082982d9cc3c9324d85c9f75","size":5312,"noattachment":false,"key":"/hyperdht/-/hyperdht-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/hyperdht/download/hyperdht-1.0.0.tgz"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/hyperdht-1.0.0.tgz_1486271101024_0.39437607675790787"},"directories":{},"publish_time":1486271102943,"_hasShrinkwrap":false,"_cnpm_publish_time":1486271102943,"_cnpmcore_publish_time":"2021-12-17T00:24:18.141Z"},"0.0.0":{"name":"hyperdht","version":"0.0.0","description":"WIP dht based on kademlia, with a focus on extensibility + modularity","main":"index.js","dependencies":{"inherits":"^2.0.3","ipv4-peers":"^1.1.1","k-bucket":"^3.2.1","protocol-buffers":"^3.1.6"},"devDependencies":{"standard":"^8.0.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/hyperdht.git"},"scripts":{"test":"standard"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/hyperdht/issues"},"homepage":"https://github.com/mafintosh/hyperdht","gitHead":"8b7592a2a1d6f466cf9ef2cab91201988a04162b","_id":"hyperdht@0.0.0","_shasum":"2677342cf54801703f96380cb8c66514a5856188","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.4.3","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"2677342cf54801703f96380cb8c66514a5856188","size":5151,"noattachment":false,"key":"/hyperdht/-/hyperdht-0.0.0.tgz","tarball":"http://name.csiicloud.com:7001/hyperdht/download/hyperdht-0.0.0.tgz"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/hyperdht-0.0.0.tgz_1473954129892_0.4549643495120108"},"directories":{},"publish_time":1473954131265,"_hasShrinkwrap":false,"_cnpm_publish_time":1473954131265,"_cnpmcore_publish_time":"2021-12-17T00:24:18.510Z"}},"readme":"# hyperdht\n\n### [See the full API docs at docs.holepunch.to](https://docs.holepunch.to/building-blocks/hyperswarm#dht)\n\nThe DHT powering Hyperswarm\n\n```\nnpm install hyperdht\n```\n\nBuilt on top of [dht-rpc](https://github.com/mafintosh/dht-rpc).\n\nThe Hyperswarm DHT uses a series of holepunching techniques to make sure connectivity works on most networks,\nand is mainly used to facilitate finding and connecting to peers using end to end encrypted Noise streams.\n\n## Usage\n\nTo try it out, first instantiate a DHT instance\n\n``` js\nimport DHT from 'hyperdht'\n\nconst node = new DHT()\n```\n\nThen on one computer listen for connections\n\n``` js\n// create a server to listen for secure connections\nconst server = node.createServer()\n\nserver.on('connection', function (socket) {\n  // socket is E2E encrypted between you and the other peer\n  console.log('Remote public key', socket.remotePublicKey)\n\n  // pipe it somewhere like any duplex stream\n  process.stdin.pipe(socket).pipe(process.stdout)\n})\n\n// make a ed25519 keypair to listen on\nconst keyPair = DHT.keyPair()\n\n// this makes the server accept connections on this keypair\nawait server.listen(keyPair)\n```\n\nThen on another connect to the computer using the public key of the key-pair it is listening on\n\n``` js\n// publicKey here is keyPair.publicKey from above\nconst socket = anotherNode.connect(publicKey)\n\nsocket.on('open', function () {\n  // socket fully open with the other peer\n})\n\n// pipe it somewhere like any duplex stream\nprocess.stdin.pipe(socket).pipe(process.stdout)\n```\n\n## API\n\n#### `const node = new DHT([options])`\n\nCreate a new DHT node.\n\nOptions include:\n\n```js\n{\n  // Optionally overwrite the default bootstrap servers, just need to be an array of any known dht node(s)\n  // Defaults to ['node1.hyperdht.org:49737', 'node2.hyperdht.org:49737', 'node3.hyperdht.org:49737']\n  bootstrap: ['host:port'],\n  keyPair // set the default key pair to use for server.listen and connect\n}\n```\n\nSee [dht-rpc](https://github.com/mafintosh/dht-rpc) for more options as HyperDHT inherits from that.\n\n*Note:* The default bootstrap servers are publicly served on behalf of the commons. To run a fully isolated DHT, start one or more dht nodes with an empty bootstrap array (`new DHT({bootstrap:[]})`) and then use the addresses of those nodes as the `bootstrap` option in all other dht nodes. You'll need at least one persistent node for the network to be completely operational.\n\n#### `keyPair = DHT.keyPair([seed])`\n\nUse this method to generate the required keypair for DHT operations.\n\nReturns an object with `{publicKey, secretKey}`. `publicKey` holds a public key buffer, `secretKey` holds a private key buffer.\n\nIf you pass any options they are forwarded to dht-rpc.\n\n#### `await node.destroy([options])`\n\nFully destroy this DHT node.\n\nThis will also unannounce any running servers.\nIf you want to force close the node without waiting for the servers to unannounce pass `{ force: true }`.\n\n#### `node = DHT.bootstrapper(port, host, [options])`\n\nIf you want to run your own Hyperswarm network use this method to easily create a bootstrap node.\n\n## Creating P2P servers\n\n#### `const server = node.createServer([options], [onconnection])`\n\nCreate a new server for accepting incoming encrypted P2P connections.\n\nOptions include:\n\n```js\n{\n  firewall (remotePublicKey, remoteHandshakePayload) {\n    // validate if you want a connection from remotePublicKey\n    // if you do return false, else return true\n    // remoteHandshakePayload contains their ip and some more info\n    return true\n  }\n}\n```\n\nYou can run servers on normal home computers, as the DHT will UDP holepunch connections for you.\n\n#### `await server.listen(keyPair)`\n\nMake the server listen on a keyPair.\nTo connect to this server use keyPair.publicKey as the connect address.\n\n#### `server.refresh()`\n\nRefresh the server, causing it to reannounce its address. This is automatically called on network changes.\n\n#### `server.on('connection', socket)`\n\nEmitted when a new encrypted connection has passed the firewall check.\n\n`socket` is a [NoiseSecretStream](https://github.com/holepunchto/hyperswarm-secret-stream) instance.\n\nYou can check who you are connected to using `socket.remotePublicKey` and `socket.handshakeHash` contains a unique hash representing this crypto session (same on both sides).\n\n#### `server.on('listening')`\n\nEmitted when the server is fully listening on a keyPair.\n\n#### `server.address()`\n\nReturns an object containing the address of the server:\n\n```js\n{\n  host, // external IP of the server,\n  port, // external port of the server if predictable,\n  publicKey // public key of the server\n}\n```\n\nYou can also get this info from `node.remoteAddress()` minus the public key.\n\n#### `await server.close()`\n\nStop listening.\n\n#### `server.on('close')`\n\nEmitted when the server is fully closed.\n\n## Connecting to P2P servers\n\n#### `const socket = node.connect(remotePublicKey, [options])`\n\nConnect to a remote server. Similar to `createServer` this performs UDP holepunching for P2P connectivity.\n\nOptions include:\n\n```js\n{\n  nodes: [...], // optional array of close dht nodes to speed up connecting\n  keyPair // optional key pair to use when connection (defaults to node.defaultKeyPair)\n}\n```\n\n#### `socket.on('open')`\n\nEmitted when the encrypted connection has been fully established with the server.\n\n#### `socket.remotePublicKey`\n\nThe public key of the remote peer.\n\n#### `socket.publicKey`\n\nThe public key of the local socket.\n\n## Additional peer discovery\n\n#### `const stream = node.lookup(topic, [options])`\n\nLook for peers in the DHT on the given topic. Topic should be a 32 byte buffer (normally a hash of something).\n\nThe returned stream looks like this\n\n```js\n{\n  // Who sent the response?\n  from: { id, host, port },\n  // What address they responded to (i.e. your address)\n  to: { host, port },\n  // List of peers announcing under this topic\n  peers: [ { publicKey, nodes: [{ host, port }, ...] } ]\n}\n```\n\nTo connect to the peers you should afterwards call `connect` with those public keys.\n\nIf you pass any options they are forwarded to dht-rpc.\n\n#### `const stream = node.announce(topic, keyPair, [relayAddresses], [options])`\n\nAnnounce that you are listening on a key-pair to the DHT under a specific topic.\n\nWhen announcing you'll send a signed proof to peers that you own the key-pair and wish to announce under the specific topic. Optionally you can provide up to 3 nodes, indicating which DHT nodes can relay messages to you - this speeds up connects later on for other users.\n\nAn announce does a parallel lookup so the stream returned looks like the lookup stream.\n\nCreating a server using `dht.createServer` automatically announces itself periodically on the key-pair it is listening on. When announcing the server under a specific topic, you can access the nodes it is close to using `server.nodes`.\n\nIf you pass any options they are forwarded to dht-rpc.\n\n#### `await node.unannounce(topic, keyPair, [options])`\n\nUnannounce a key-pair.\n\nIf you pass any options they are forwarded to dht-rpc.\n\n## Mutable/immutable records\n\n#### `{ hash, closestNodes } = await node.immutablePut(value, [options])`\n\nStore an immutable value in the DHT. When successful, the hash of the value is returned.\n\nIf you pass any options they are forwarded to dht-rpc.\n\n#### `{ value, from } = await node.immutableGet(hash, [options])`\n\nFetch an immutable value from the DHT. When successful, it returns the value corresponding to the hash.\n\nIf you pass any options they are forwarded to dht-rpc.\n\n#### `await { publicKey, closestNodes, seq, signature } = node.mutablePut(keyPair, value, [options])`\n\nStore a mutable value in the DHT.\n\nIf you pass any options they are forwarded to dht-rpc.\n\n#### `await { value, from, seq, signature } = node.mutableGet(publicKey, [options])`\n\nFetch a mutable value from the DHT.\n\nOptions:\n\n* `seq` - OPTIONAL, default `0`, a number which will only return values with corresponding `seq` values that are greater than or equal to the supplied `seq` option.\n* `latest` - OPTIONAL - default `false`, a boolean indicating whether the query should try to find the highest seq before returning, or just the first verified value larger than `options.seq` it sees.\n\nAny additional options you pass are forwarded to dht-rpc.\n\n## Additional API\n\nSee [dht-rpc](https://github.com/mafintosh/dht-rpc) for the additional APIs the DHT exposes.\n\n## CLI\n\nYou can start a DHT node in the command line, with the bundled cli tool:\n\n```sh\nnpm install -g hyperdht\nhyperdht # runs a DHT node\nhyperdht --bootstrap # runs a DHT node with bootstrap settings\nhyperdht --nodes 5 # runs 5 nodes\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/holepunchto/hyperdht#readme","bugs":{"url":"https://github.com/holepunchto/hyperdht/issues"},"license":"MIT"}