# libp2p

> JavaScript implementation of libp2p, a modular peer to peer network stack

Latest version **3.3.11** (published 2026-09-02) · Apache-2.0 OR MIT license · 0 weekly downloads

## Install

```sh
npm install libp2p
pnpm add libp2p
yarn add libp2p
bun add libp2p
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.3.11 |
| Published | 2026-09-02 |
| First published | 2015-09-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 27 |
| Unpacked size | 2.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2579 |
| Maintainers | achingbrain, npm-service-account-libp2p |
| Keywords | IPFS, libp2p, network, p2p, peer, peer-to-peer |

## Links

- npm: https://www.npmjs.com/package/libp2p
- Repository: https://github.com/libp2p/js-libp2p
- Homepage: https://github.com/libp2p/js-libp2p/tree/main/packages/libp2p#readme
- Issues: https://github.com/libp2p/js-libp2p/issues
- npm.io page: https://npm.io/package/libp2p

## Dependencies (27)

- [p-defer](https://npm.io/package/p-defer.md) ^4.0.1
- [p-event](https://npm.io/package/p-event.md) ^7.0.0
- [p-retry](https://npm.io/package/p-retry.md) ^8.0.0
- [it-merge](https://npm.io/package/it-merge.md) ^3.0.12
- [any-signal](https://npm.io/package/any-signal.md) ^4.1.1
- [main-event](https://npm.io/package/main-event.md) ^1.0.1
- [it-parallel](https://npm.io/package/it-parallel.md) ^3.0.13
- [race-signal](https://npm.io/package/race-signal.md) ^2.0.0
- [uint8arrays](https://npm.io/package/uint8arrays.md) ^6.1.1
- [multiformats](https://npm.io/package/multiformats.md) ^14.0.0
- [@libp2p/utils](https://npm.io/package/@libp2p/utils.md) ^7.4.1
- [@libp2p/crypto](https://npm.io/package/@libp2p/crypto.md) ^5.1.23
- [@libp2p/logger](https://npm.io/package/@libp2p/logger.md) ^6.2.13
- [datastore-core](https://npm.io/package/datastore-core.md) ^12.0.1
- [@libp2p/peer-id](https://npm.io/package/@libp2p/peer-id.md) ^6.0.15
- [progress-events](https://npm.io/package/progress-events.md) ^1.1.0
- [@chainsafe/is-ip](https://npm.io/package/@chainsafe/is-ip.md) ^2.1.0
- [@libp2p/interface](https://npm.io/package/@libp2p/interface.md) ^3.3.0
- [@multiformats/dns](https://npm.io/package/@multiformats/dns.md) ^1.0.6
- [@chainsafe/netmask](https://npm.io/package/@chainsafe/netmask.md) ^2.0.0
- [@libp2p/peer-store](https://npm.io/package/@libp2p/peer-store.md) ^12.0.28
- [interface-datastore](https://npm.io/package/interface-datastore.md) ^10.0.1
- [@multiformats/multiaddr](https://npm.io/package/@multiformats/multiaddr.md) ^13.0.3
- [@libp2p/peer-collections](https://npm.io/package/@libp2p/peer-collections.md) ^7.0.28
- [@libp2p/interface-internal](https://npm.io/package/@libp2p/interface-internal.md) ^3.1.13
- [@libp2p/multistream-select](https://npm.io/package/@libp2p/multistream-select.md) ^7.0.28
- [@multiformats/multiaddr-matcher](https://npm.io/package/@multiformats/multiaddr-matcher.md) ^3.0.2

## Recent versions

- 3.3.11 (latest) — 2026-09-02
- 3.3.10-5cb617ae2 (next) — 2026-09-02
- 3.3.10-185d901cd — 2026-09-02
- 3.3.10 — 2026-08-31
- 3.3.9-cef4d32cf — 2026-08-31
- 3.3.9-ac7305ccf — 2026-08-31
- 3.3.9-87dca02b0 — 2026-08-27
- 3.3.9-4a6c5d11a — 2026-08-27
- 3.3.9 — 2026-08-23
- 3.3.8-947d304ed — 2026-08-22
- 3.3.8-0967e75f5 — 2026-08-22
- 3.3.8-4dae661b4 — 2026-08-22
- 3.3.8-8786aa8d0 — 2026-08-20
- 3.3.8-55d7a539a — 2026-08-20
- 3.3.8-d5534174d — 2026-08-13
- … 1350 more at https://npm.io/package/libp2p/versions

## README

<h1 align="center">
  <a href="https://libp2p.io"><img width="250" src="https://github.com/libp2p/js-libp2p/blob/main/img/libp2p.png?raw=true" alt="libp2p hex logo" /></a>
</h1>

<h3 align="center">The JavaScript implementation of the libp2p Networking Stack</h3>

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![npm](https://img.shields.io/npm/dm/libp2p.svg?style=flat-square)](https://www.npmjs.com/package/libp2p)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![Matrix](https://img.shields.io/badge/matrix-%23libp2p--implementers%3Aipfs.io-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
[![Discord](https://img.shields.io/discord/806902334369824788?color=blueviolet\&label=discord\&style=flat-square)](https://discord.com/invite/Ae4TbahHaT)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amain)

# Background

libp2p is the product of a long and arduous quest to understand the evolution of the Internet networking stack. In order to build P2P applications, devs have long had to make custom ad-hoc solutions to fit their needs, sometimes making some hard assumptions about their runtimes and the state of the network at the time of their development. Today, looking back more than 20 years, we see a clear pattern in the types of mechanisms built around the Internet Protocol, IP, which can be found throughout many layers of the OSI layer system, libp2p distils these mechanisms into flat categories and defines clear interfaces that once exposed, enable other protocols and applications to use and swap them, enabling upgradability and adaptability for the runtime, without breaking the API.

We are in the process of writing better documentation, blog posts, tutorials and a formal specification. Today you can find:

- [libp2p.io](https://libp2p.io)
- [docs.libp2p.io](https://docs.libp2p.io)
- [Specification (WIP)](https://github.com/libp2p/specs)
- [Discussion Forums](https://discuss.libp2p.io)
- Talks
  - [`libp2p <3 ethereum` at DEVCON2](https://archive.devcon.org/archive/watch/2/libp2p-devp2p-ipfs-and-ethereum-networking/)
- Articles
  - [The overview of libp2p](https://github.com/libp2p/libp2p#description)

To sum up, libp2p is a "network stack" -- a protocol suite -- that cleanly separates concerns, and enables sophisticated applications to only use the protocols they absolutely need, without giving up interoperability and upgradability. libp2p grew out of IPFS, but it is built so that lots of people can use it, for lots of different projects.

# Roadmap

The js-libp2p roadmap can be found here: <https://github.com/libp2p/js-libp2p/blob/main/ROADMAP.md>

It represents current projects the js-libp2p maintainers are focused on and provides an estimation of completion targets.

# Usage

### Configuration

For all the information on how you can configure libp2p see [CONFIGURATION.md](https://github.com/libp2p/js-libp2p/blob/main/doc/CONFIGURATION.md).

## Limits

For help configuring your node to resist malicious network peers, see [LIMITS.md](https://github.com/libp2p/js-libp2p/blob/main/doc/LIMITS.md)

## Getting started

If you are starting your journey with `js-libp2p`, read the [GETTING\_STARTED.md](https://github.com/libp2p/js-libp2p/blob/main/doc/GETTING_STARTED.md) guide.

## Tutorials and Examples

You can find multiple examples on the [examples repo](https://github.com/libp2p/js-libp2p-examples) that will guide you through using libp2p for several scenarios.

# Development

**Clone and install dependencies:**

```sh
> git clone https://github.com/libp2p/js-libp2p.git
> cd js-libp2p
> npm install
> npm run build
```

# Tests

## Run unit tests

```sh
# run all the unit tests
> npm test

# run just Node.js tests
> npm run test:node

# run just Browser tests (Chrome)
> npm run test:chrome
```

# Packages

List of packages currently in existence for libp2p

> This table is generated using the module `package-table` with `package-table --data=package-list.json`.

| Package                                                                                                | Version                                                                                                                                                                 | Deps                                                                                                                                                                                                            | CI                                                                                                                                                                                                                                                                                        | Coverage                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **libp2p**                                                                                             |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`libp2p`](//github.com/libp2p/js-libp2p)                                                              | [![npm](https://img.shields.io/npm/v/libp2p.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/libp2p)                                                           | [![Deps](https://img.shields.io/librariesio/release/npm/libp2p?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/libp2p)                                                               | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)                                                                                                     |
| [`@libp2p/interface`](//github.com/libp2p/js-libp2p/tree/main/packages/interface)                      | [![npm](https://img.shields.io/npm/v/%40libp2p%2Finterface.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/interface)                                 | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Finterface?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Finterface)                                 | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/interface/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/interface)                                           |
| **transports**                                                                                         |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/memory`](//github.com/libp2p/js-libp2p/tree/main/packages/transport-memory)                  | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fmemory.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/memory)                                       | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fmemory?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fmemory)                                       | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-memory/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-memory)                             |
| [`@libp2p/tcp`](//github.com/libp2p/js-libp2p/tree/main/packages/transport-tcp)                        | [![npm](https://img.shields.io/npm/v/%40libp2p%2Ftcp.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/tcp)                                             | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Ftcp?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Ftcp)                                             | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-tcp/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-tcp)                                   |
| [`@libp2p/webrtc`](//github.com/libp2p/js-libp2p/tree/main/packages/transport-webrtc)                  | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fwebrtc.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/webrtc)                                       | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fwebrtc?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fwebrtc)                                       | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-webrtc/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-webrtc)                             |
| [`@libp2p/websockets`](//github.com/libp2p/js-libp2p/tree/main/packages/transport-websockets)          | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fwebsockets.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/websockets)                               | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fwebsockets?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fwebsockets)                               | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-websockets/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-websockets)                     |
| [`@libp2p/webtransport`](//github.com/libp2p/js-libp2p/tree/main/packages/transport-webtransport)      | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fwebtransport.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/webtransport)                           | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fwebtransport?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fwebtransport)                           | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-webtransport/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/transport-webtransport)                 |
| **secure channels**                                                                                    |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/noise`](//github.com/libp2p/js-libp2p/tree/main/packages/connection-encrypter-noise)         | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fnoise.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/noise)                                         | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fnoise?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fnoise)                                         | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/connection-encrypter-noise/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/connection-encrypter-noise)         |
| [`@libp2p/plaintext`](//github.com/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext) | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fplaintext.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/plaintext)                                 | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fplaintext?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fplaintext)                                 | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext) |
| [`@libp2p/tls`](//github.com/libp2p/js-libp2p/tree/main/packages/connection-encrypter-tls)             | [![npm](https://img.shields.io/npm/v/%40libp2p%2Ftls.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/tls)                                             | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Ftls?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Ftls)                                             | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/connection-encrypter-tls/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/connection-encrypter-tls)             |
| **stream multiplexers**                                                                                |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/yamux`](//github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-yamux)           | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fyamux.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/yamux)                                         | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fyamux?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fyamux)                                         | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-yamux/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-yamux)             |
| [`@libp2p/mplex`](//github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex)           | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fmplex.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/mplex)                                         | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fmplex?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fmplex)                                         | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex)             |
| **peer discovery**                                                                                     |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/bootstrap`](//github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap)       | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fbootstrap.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/bootstrap)                                 | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fbootstrap?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fbootstrap)                                 | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap)             |
| [`@libp2p/kad-dht`](//github.com/libp2p/js-libp2p/tree/main/packages/kad-dht)                          | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fkad-dht.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/kad-dht)                                     | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fkad-dht?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fkad-dht)                                     | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/kad-dht/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/kad-dht)                                               |
| [`@libp2p/mdns`](//github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-mdns)                 | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fmdns.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/mdns)                                           | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fmdns?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fmdns)                                           | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-discovery-mdns/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-discovery-mdns)                       |
| [`@chainsafe/discv5`](//github.com/ChainSafe/discv5)                                                   | [![npm](https://img.shields.io/npm/v/%40chainsafe%2Fdiscv5.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@chainsafe/discv5)                                 | [![Deps](https://img.shields.io/librariesio/release/npm/%40chainsafe%2Fdiscv5?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40chainsafe%2Fdiscv5)                                 | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/ChainSafe/discv5/test_and_release.yml?branch=master\&label=ci\&style=flat-square)](//github.com/ChainSafe/discv5/actions?query=branch%3Amaster+workflow%3Aci+)                                                        | [![codecov](https://codecov.io/gh/ChainSafe/discv5/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/gh/ChainSafe/discv5)                                                                                                   |
| **content routing**                                                                                    |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/http-v1-content-routing`](//github.com/libp2p/js-http-v1-content-routing)                    | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fhttp-v1-content-routing.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/http-v1-content-routing)     | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fhttp-v1-content-routing?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fhttp-v1-content-routing)     | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-http-v1-content-routing/js-test-and-release.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-http-v1-content-routing/actions?query=branch%3Amain+workflow%3Aci+)                       | [![codecov](https://codecov.io/gh/libp2p/js-http-v1-content-routing/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-http-v1-content-routing)                                                                   |
| [`@libp2p/delegated-content-routing`](//github.com/libp2p/js-libp2p-delegated-content-routing)         | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fdelegated-content-routing.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/delegated-content-routing) | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fdelegated-content-routing?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fdelegated-content-routing) | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-delegated-content-routing/js-test-and-release.yml?branch=master\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p-delegated-content-routing/actions?query=branch%3Amaster+workflow%3Aci+) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-delegated-content-routing/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-delegated-content-routing)                                               |
| [`@libp2p/kad-dht`](//github.com/libp2p/js-libp2p/tree/main/packages/kad-dht)                          | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fkad-dht.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/kad-dht)                                     | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fkad-dht?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fkad-dht)                                     | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/kad-dht/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/kad-dht)                                               |
| **peer routing**                                                                                       |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/delegated-peer-routing`](//github.com/libp2p/js-libp2p-delegated-peer-routing)               | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fdelegated-peer-routing.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/delegated-peer-routing)       | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fdelegated-peer-routing?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fdelegated-peer-routing)       | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-delegated-peer-routing/js-test-and-release.yml?branch=master\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p-delegated-peer-routing/actions?query=branch%3Amaster+workflow%3Aci+)       | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-delegated-peer-routing/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-delegated-peer-routing)                                                     |
| [`@libp2p/kad-dht`](//github.com/libp2p/js-libp2p/tree/main/packages/kad-dht)                          | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fkad-dht.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/kad-dht)                                     | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fkad-dht?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fkad-dht)                                     | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/kad-dht/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/kad-dht)                                               |
| **utilities**                                                                                          |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/crypto`](//github.com/libp2p/js-libp2p/tree/main/packages/crypto)                            | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fcrypto.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/crypto)                                       | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fcrypto?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fcrypto)                                       | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/crypto/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/crypto)                                                 |
| **data types**                                                                                         |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/peer-id`](//github.com/libp2p/js-libp2p/tree/main/packages/peer-id)                          | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fpeer-id.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/peer-id)                                     | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fpeer-id?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fpeer-id)                                     | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-id/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-id)                                               |
| [`@libp2p/peer-record`](//github.com/libp2p/js-libp2p/tree/main/packages/peer-record)                  | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fpeer-record.svg?maxAge=86400\&style=flat-square)](//npmjs.com/package/@libp2p/peer-record)                             | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fpeer-record?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fpeer-record)                             | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-record/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-record)                                       |
| **pubsub**                                                                                             |                                                                                                                                                                         |                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                |
| [`@libp2p/gossipsub`](//github.com/libp2p/js-libp2p/tree/main/packages/gossipsub)                      | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fgossipsub.svg?maxAge=86400\&style=flat-square)](//github.com/libp2p/js-libp2p/tree/main/packages/gossipsub/releases)   | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fgossipsub?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Fgossipsub)                                 | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/gossipsub/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/gossipsub)                                           |
| [`@libp2p/floodsub`](//github.com/libp2p/js-libp2p/tree/main/packages/floodsub)                        | [![npm](https://img.shields.io/npm/v/%40libp2p%2Ffloodsub.svg?maxAge=86400\&style=flat-square)](//github.com/libp2p/js-libp2p/tree/main/packages/floodsub/releases)     | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Ffloodsub?logo=Libraries.io\&logoColor=white\&style=flat-square)](//libraries.io/npm/%40libp2p%2Ffloodsub)                                   | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&label=ci\&style=flat-square)](//github.com/libp2p/js-libp2p/actions?query=branch%3Amain+workflow%3Aci+)                                                                        | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/floodsub/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/floodsub)                                             |

# Used by

<div style="padding: 20px">
  <p align="middle">
    <a href="https://lodestar.chainsafe.io/"><img width="300" src="https://github.com/ChainSafe/lodestar/blob/unstable/assets/lodestar_icon_text_black_stroke.png?raw=true"></a>
    <a href="https://hoprnet.org/"><img width="150" src="https://github.com/hoprnet/hopr-assets/blob/master/v1/logo/hopr_logo_padded.png?raw=true" alt="HOPR Logo">
    <a href="https://helia.io/"><img src="https://raw.githubusercontent.com/ipfs/helia/main/assets/helia.png" alt="Helia logo" width="150" /></a>
    <a href="https://github.com/orbitdb/orbitdb"><img src="https://avatars.githubusercontent.com/u/25079463?s=200&v=4" alt="OrbitDB logo" width="150" /></a>
    <a href="https://waku.org/"><img src="https://avatars.githubusercontent.com/u/107703624?s=200&v=4" alt="Waku" width="150" /></a>
    <a href="https://peerbit.org/"><img src="https://www.peerbit.org/content/docs/peerbit-logo.png" alt="Peerbit logo" width="150" /></a>
  </p>
</div>

And [many others...](https://github.com/libp2p/js-libp2p/network/dependents)

# Contribute

The libp2p implementation in JavaScript is a work in progress. As such, there are a few things you can do right now to help out:

- Go through the modules and **check out existing issues**. This would be especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
- **Add tests**. There can never be enough tests.

# API Docs

- <https://libp2p.github.io/js-libp2p/modules/libp2p.html>

# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p/blob/main/packages/libp2p/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p/blob/main/packages/libp2p/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

# Contribution

Unless 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.

---
_Source: https://npm.io/package/libp2p · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
