1- # js- libp2p- kad-dht <!-- omit in toc -->
1+ # @ libp2p/ kad-dht <!-- omit in toc -->
22
3- [ ![ ] ( https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square )] ( http://ipn.io )
4- [ ![ ] ( https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square )] ( http://ipfs.io/ )
5- [ ![ ] ( https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square )] ( http://webchat.freenode.net/?channels=%23ipfs )
6- [ ![ Discourse posts] ( https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg )] ( https://discuss.libp2p.io )
7- [ ![ Build Status] ( https://github.com/libp2p/js-libp2p-kad-dht/actions/workflows/js-test-and-release.yml/badge.svg?branch=main )] ( https://github.com/libp2p/js-libp2p-kad-dht/actions/workflows/js-test-and-release.yml )
8- [ ![ Coverage Status] ( https://coveralls.io/repos/github/libp2p/js-libp2p-kad-dht/badge.svg?branch=master )] ( https://coveralls.io/github/libp2p/js-libp2p-kad-dht?branch=master )
9- [ ![ Dependency Status] ( https://david-dm.org/libp2p/js-libp2p-kad-dht.svg?style=flat-square )] ( https://david-dm.org/libp2p/js-libp2p-kad-dht )
10- [ ![ Bundle Size] ( https://flat.badgen.net/bundlephobia/minzip/libp2p-kad-dht )] ( https://bundlephobia.com/result?p=libp2p-kad-dht )
11- [ ![ js-standard-style] ( https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square )] ( https://github.com/feross/standard )
12- [ ![ standard-readme compliant] ( https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square )] ( https://github.com/RichardLitt/standard-readme )
13- ![ ] ( https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square )
14- ![ ] ( https://img.shields.io/badge/Node.js-%3E%3D6.0.0-orange.svg?style=flat-square )
3+ [ ![ libp2p.io] ( https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square )] ( http://libp2p.io/ )
4+ [ ![ IRC] ( https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square )] ( http://webchat.freenode.net/?channels=%23libp2p )
5+ [ ![ Discuss] ( https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square )] ( https://discuss.libp2p.io )
6+ [ ![ codecov] ( https://img.shields.io/codecov/c/github/libp2p/js-libp2p-kad-dht.svg?style=flat-square )] ( https://codecov.io/gh/libp2p/js-libp2p-kad-dht )
7+ [ ![ CI] ( https://img.shields.io/github/workflow/status/libp2p/js-libp2p-interfaces/test%20&%20maybe%20release/master?style=flat-square )] ( https://github.com/libp2p/js-libp2p-kad-dht/actions/workflows/js-test-and-release.yml )
158
16- > JavaScript implementation of the Kademlia DHT for libp2p, based on [ go-libp2p-kad-dht ] ( https://github.com/libp2p/go-libp2p-kad-dht ) .
9+ > JavaScript implementation of the Kad- DHT for libp2p
1710
18- ## Table of Contents <!-- omit in toc -->
11+ ## Table of contents <!-- omit in toc -->
1912
2013- [ Install] ( #install )
21- - [ npm] ( #npm )
2214 - [ Use in Node.js] ( #use-in-nodejs )
2315- [ API] ( #api )
2416 - [ Custom secondary DHT in libp2p] ( #custom-secondary-dht-in-libp2p )
2820- [ Spec] ( #spec )
2921- [ Contribute] ( #contribute )
3022- [ License] ( #license )
31- - [ Contribution] ( #contribution )
23+ - [ Contribution] ( #contribution )
24+
3225## Install
3326
34- ### npm
27+ ``` console
28+ $ npm i @libp2p/kad-dht
29+ ```
3530
3631``` sh
3732> npm i @libp2p/kad-dht
@@ -45,7 +40,7 @@ import { create } from '@libp2p/kad-dht'
4540
4641## API
4742
48- See https://libp2p.github.io/js-libp2p-kad-dht for the auto generated docs.
43+ See < https://libp2p.github.io/js-libp2p-kad-dht > for the auto generated docs.
4944
5045The libp2p-kad-dht module offers 3 APIs: Peer Routing, Content Routing and Peer Discovery.
5146
@@ -69,6 +64,7 @@ async function addDHT(libp2p) {
6964```
7065
7166Note that you may want to supply your own peer discovery function and datastore
67+
7268### Peer Routing
7369
7470[ ![ ] ( https://raw.githubusercontent.com/libp2p/interface-peer-routing/master/img/badge.png )] ( https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/peer-routing )
@@ -97,9 +93,9 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c
9793
9894Licensed under either of
9995
100- * Apache 2.0, ([ LICENSE-APACHE] ( LICENSE-APACHE ) / http://www.apache.org/licenses/LICENSE-2.0 )
101- * MIT ([ LICENSE-MIT] ( LICENSE-MIT ) / http://opensource.org/licenses/MIT )
96+ - Apache 2.0, ([ LICENSE-APACHE] ( LICENSE-APACHE ) / < http://www.apache.org/licenses/LICENSE-2.0 > )
97+ - MIT ([ LICENSE-MIT] ( LICENSE-MIT ) / < http://opensource.org/licenses/MIT > )
10298
103- ### Contribution
99+ ## Contribution
104100
105101Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
0 commit comments