libp2p-kad-dht
JavaScript implementation of the Kad-DHT for libp2p
Last updated 5 years ago by vascosantos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install libp2p-kad-dht 
SYNC missed versions from official npm registry.

js-libp2p-kad-dht

Discourse posts Build status Coverage Status Dependency Status Bundle Size js-standard-style standard-readme compliant

JavaScript implementation of the Kademlia DHT for libp2p, based on go-libp2p-kad-dht.

Lead Maintainer

Vasco Santos.

Table of Contents

Install

npm

> npm i libp2p-kad-dht

Use in Node.js

import { create } from 'libp2p-kad-dht'

API

See https://libp2p.github.io/js-libp2p-kad-dht for the auto generated docs.

The libp2p-kad-dht module offers 3 APIs: Peer Routing, Content Routing and Peer Discovery.

Custom secondary DHT in libp2p

import { create } from 'libp2p-kad-dht'

/**
 * @param {Libp2p} libp2p
 */
async function addDHT(libp2p) {
    const customDHT = create({
        libp2p,
        protocolPrefix: '/custom'
    })
    await customDHT.start()

    return customDHT
}

Note that you may want to supply your own peer discovery function and datastore

Peer Routing

Content Routing

Peer Discovery

Spec

js-libp2p-kad-dht follows the libp2p/kad-dht spec and implements the algorithms described in the IPFS DHT documentation.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

MIT - Protocol Labs 2017

Current Tags

  • 0.28.6                                ...           latest (3 years ago)

109 Versions

  • 0.28.6                                ...           3 years ago
  • 0.28.5                                ...           3 years ago
  • 0.28.4                                ...           3 years ago
  • 0.28.3                                ...           3 years ago
  • 0.28.2                                ...           3 years ago
  • 0.28.1                                ...           3 years ago
  • 0.28.0                                ...           3 years ago
  • 0.27.6                                ...           3 years ago
  • 0.27.5                                ...           3 years ago
  • 0.27.4                                ...           3 years ago
  • 0.27.3                                ...           3 years ago
  • 0.27.2                                ...           3 years ago
  • 0.27.1                                ...           3 years ago
  • 0.27.0                                ...           3 years ago
  • 0.26.7                                ...           3 years ago
  • 0.26.6                                ...           3 years ago
  • 0.26.5                                ...           3 years ago
  • 0.26.4                                ...           3 years ago
  • 0.26.3                                ...           3 years ago
  • 0.26.2                                ...           3 years ago
  • 0.26.1                                ...           3 years ago
  • 0.26.0                                ...           3 years ago
  • 0.25.0                                ...           3 years ago
  • 0.24.2                                ...           3 years ago
  • 0.24.1                                ...           3 years ago
  • 0.24.0                                ...           3 years ago
  • 0.23.4                                ...           3 years ago
  • 0.23.3                                ...           3 years ago
  • 0.23.2                                ...           3 years ago
  • 0.23.1                                ...           3 years ago
  • 0.23.0                                ...           3 years ago
  • 0.22.0                                ...           4 years ago
  • 0.21.0                                ...           4 years ago
  • 0.20.6                                ...           4 years ago
  • 0.20.5                                ...           4 years ago
  • 0.20.4                                ...           4 years ago
  • 0.20.3                                ...           4 years ago
  • 0.20.2                                ...           4 years ago
  • 0.20.1                                ...           4 years ago
  • 0.20.0                                ...           4 years ago
  • 0.19.9                                ...           4 years ago
  • 0.19.8                                ...           4 years ago
  • 0.19.7                                ...           4 years ago
  • 0.19.6                                ...           4 years ago
  • 0.19.5                                ...           4 years ago
  • 0.19.4                                ...           4 years ago
  • 0.19.3                                ...           5 years ago
  • 0.19.2                                ...           5 years ago
  • 0.18.7                                ...           5 years ago
  • 0.19.1                                ...           5 years ago
  • 0.19.0                                ...           5 years ago
  • 0.19.0-pre.0                                ...           5 years ago
  • 0.18.6                                ...           5 years ago
  • 0.18.5                                ...           5 years ago
  • 0.18.4                                ...           5 years ago
  • 0.18.3                                ...           5 years ago
  • 0.18.2                                ...           5 years ago
  • 0.18.1                                ...           5 years ago
  • 0.18.0                                ...           5 years ago
  • 0.17.1                                ...           5 years ago
  • 0.17.0                                ...           5 years ago
  • 0.15.4                                ...           5 years ago
  • 0.16.1                                ...           5 years ago
  • 0.16.0                                ...           5 years ago
  • 0.15.3                                ...           5 years ago
  • 0.15.2                                ...           5 years ago
  • 0.15.1                                ...           5 years ago
  • 0.15.0                                ...           6 years ago
  • 0.14.15                                ...           6 years ago
  • 0.14.14                                ...           6 years ago
  • 0.14.13                                ...           6 years ago
  • 0.14.12                                ...           6 years ago
  • 0.14.11                                ...           6 years ago
  • 0.14.10                                ...           6 years ago
  • 0.14.9                                ...           6 years ago
  • 0.14.8                                ...           6 years ago
  • 0.14.7                                ...           6 years ago
  • 0.14.6                                ...           6 years ago
  • 0.14.5                                ...           6 years ago
  • 0.14.4                                ...           6 years ago
  • 0.14.3                                ...           6 years ago
  • 0.14.2                                ...           6 years ago
  • 0.14.1                                ...           6 years ago
  • 0.14.0                                ...           6 years ago
  • 0.13.0                                ...           6 years ago
  • 0.12.1                                ...           6 years ago
  • 0.12.0                                ...           6 years ago
  • 0.11.1                                ...           6 years ago
  • 0.11.0                                ...           6 years ago
  • 0.10.6                                ...           6 years ago
  • 0.10.5                                ...           6 years ago
  • 0.10.4                                ...           6 years ago
  • 0.10.3                                ...           6 years ago
  • 0.10.2                                ...           6 years ago
  • 0.10.1                                ...           6 years ago
  • 0.10.0                                ...           7 years ago
  • 0.9.0                                ...           7 years ago
  • 0.8.0                                ...           7 years ago
  • 0.6.3                                ...           7 years ago
  • 0.6.0                                ...           7 years ago
  • 0.5.1                                ...           7 years ago
  • 0.5.0                                ...           7 years ago
  • 0.4.1                                ...           7 years ago
  • 0.4.0                                ...           7 years ago
  • 0.3.0                                ...           7 years ago
  • 0.2.1                                ...           7 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.0                                ...           8 years ago
  • 0.0.1                                ...           8 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (29)
Dev Dependencies (17)

© 2010 - cnpmjs.org x YWFE | Home | YWFE