Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
feat(dht): add dht.findprovs spec
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Aug 9, 2016
1 parent 0deb6ad commit 818e2d1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion API/dht/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,19 @@ ipfs.dht.findPeer(id, function (err, peerInfo) {

##### `JavaScript` - ipfs.dht.findprovs(hash, [callback])

Where `hash` is a multihash.

`callback` must follow `function (err, peerInfos) {}` signature, where `err` is an error if the operation was not successful. `peerInfos` is an array of objects of type [PeerInfo](https://github.com/libp2p/js-peer-info)

If no `callback` is passed, a promise is returned.

Example:


```JavaScript
ipfs.dht.findProvs(hash, function (err, peerInfos) {
// peerInfo will contain the multiaddrs of that peer
})
```

#### `get`

Expand Down

0 comments on commit 818e2d1

Please sign in to comment.