From c23f147bda3fe2ba0da111bedda5a42437a9b090 Mon Sep 17 00:00:00 2001 From: David Dias Date: Sun, 9 Jul 2017 11:42:11 +0100 Subject: [PATCH] docs: fix API docs --- README.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 25ca9e05..baa5109c 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ class Node extends libp2p { ] }, discovery: [ - new MulticastDNS(peerInfo, 'your-identifier') + new MulticastDNS(peerInfo) ], // DHT is passed as its own enabling PeerRouting, ContentRouting and DHT itself components dht: DHT @@ -182,19 +182,6 @@ class Node extends libp2p { - `key`: Buffer -#### `libp2p.dht.put(key, value, callback)` - -- `key`: Buffer -- `value`: Buffer - -#### `libp2p.dht.get(key, callback)` - -- `key`: Buffer - -#### `libp2p.dht.getMany(key, nVals, callback)` - -- `key`: Buffer -- `nVals`: Number #### `libp2p.handle(protocol, handlerFunc [, matchFunc])` @@ -228,7 +215,7 @@ class Node extends libp2p { - `peer`: instance of [PeerInfo][] -#### `libp2p.isOn()` +#### `libp2p.isStarted()` > Check if libp2p is started @@ -246,6 +233,24 @@ class Node extends libp2p { --------------------- +`DHT methods exposed` + +#### `libp2p.dht.put(key, value, callback)` + +- `key`: Buffer +- `value`: Buffer + +#### `libp2p.dht.get(key, callback)` + +- `key`: Buffer + +#### `libp2p.dht.getMany(key, nVals, callback)` + +- `key`: Buffer +- `nVals`: Number + +--------------------- + `SOON™` #### `libp2p.findPeers`