npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

libp2p

v3.1.2

Published

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

Downloads

212,678

Readme

libp2p.io npm Discuss Matrix Discord codecov CI

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:

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.

Limits

For help configuring your node to resist malicious network peers, see LIMITS.md

Getting started

If you are starting your journey with js-libp2p, read the GETTING_STARTED.md guide.

Tutorials and Examples

You can find multiple examples on the examples repo that will guide you through using libp2p for several scenarios.

Development

Clone and install dependencies:

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

Tests

Run unit tests

# 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 | npm | Deps | GitHub CI | codecov | | @libp2p/interface | npm | Deps | GitHub CI | codecov | | transports | | | | | | @libp2p/memory | npm | Deps | GitHub CI | codecov | | @libp2p/tcp | npm | Deps | GitHub CI | codecov | | @libp2p/webrtc | npm | Deps | GitHub CI | codecov | | @libp2p/websockets | npm | Deps | GitHub CI | codecov | | @libp2p/webtransport | npm | Deps | GitHub CI | codecov | | secure channels | | | | | | @chainsafe/libp2p-noise | npm | Deps | GitHub CI | codecov | | @libp2p/plaintext | npm | Deps | GitHub CI | codecov | | @libp2p/tls | npm | Deps | GitHub CI | codecov | | stream multiplexers | | | | | | @chainsafe/libp2p-yamux | npm | Deps | GitHub CI | codecov | | @libp2p/mplex | npm | Deps | GitHub CI | codecov | | peer discovery | | | | | | @libp2p/bootstrap | npm | Deps | GitHub CI | codecov | | @libp2p/kad-dht | npm | Deps | GitHub CI | codecov | | @libp2p/mdns | npm | Deps | GitHub CI | codecov | | @chainsafe/discv5 | npm | Deps | GitHub CI | codecov | | content routing | | | | | | @libp2p/http-v1-content-routing | npm | Deps | GitHub CI | codecov | | @libp2p/delegated-content-routing | npm | Deps | GitHub CI | codecov | | @libp2p/kad-dht | npm | Deps | GitHub CI | codecov | | peer routing | | | | | | @libp2p/delegated-peer-routing | npm | Deps | GitHub CI | codecov | | @libp2p/kad-dht | npm | Deps | GitHub CI | codecov | | utilities | | | | | | @libp2p/crypto | npm | Deps | GitHub CI | codecov | | data types | | | | | | @libp2p/peer-id | npm | Deps | GitHub CI | codecov | | @libp2p/peer-record | npm | Deps | GitHub CI | codecov | | pubsub | | | | | | @chainsafe/libp2p-gossipsub | npm | Deps | GitHub CI | codecov | | @libp2p/floodsub | npm | Deps | GitHub CI | codecov |

Used by

And many others...

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

License

Licensed under either of

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.