New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

libp2p

Package Overview
Dependencies
Maintainers
1
Versions
1015
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libp2p

JavaScript Skeleton for libp2p bundles

  • 0.5.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-25.7%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status coverage Dependency Status js-standard-style

libp2p is the networking stack of IPFS, a modular networking library to solve P2P application needs.

Table of Contents

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, dev have long had to made 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 writting 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 upgradeability. libp2p grew out of IPFS, but it is built so that lots of people can use it, for lots of different projects.

Bundles

With its modular nature, libp2p can be found being used in different projects with different sets of features, while preserving the same top level API. js-libp2p is only a skeleton and should not be installed directly, if you are looking for a prebundled libp2p stack, please check:

If you have developed a libp2p bundle, please consider submitting it to this list so that it can be found easily by the users of libp2p.

Install

Again, as noted above, this module is only a skeleton and should not be used directly other than libp2p bundle implementors that want to extend its code.

npm install --save libp2p

Usage

Disclaimer - We haven't solidified libp2p interface yet, it might change at anytime.

Extending libp2p skeleton

libp2p becomes very simple and basically acts as a glue for every module that compose this library. Since it can be highly customized, it requires some setup. What we recommend is to have a libp2p build for the system you are developing taking into account in your needs (e.g. for a browser working version of libp2p that acts as the network layer of IPFS, we have a built and minified version that browsers can require).

libp2p API

Defined by interface-libp2p

Development

Linting

> npm run lint

Packages

List of packages currently in existence for libp2p

PackageVersionDependenciesDevDependencies
Bundles
libp2p-ipfs-nodejsnpmDependency StatusdevDependency Status
libp2p-ipfs-browsernpmDependency StatusdevDependency Status
Transports
libp2p-utpnpmDependency StatusdevDependency Status
libp2p-websocketsnpmDependency StatusdevDependency Status
libp2p-webrtc-starnpmDependency StatusdevDependency Status
Connection Upgrades
interface-connectionnpmDependency StatusdevDependency Status
Stream Muxers
interface-stream-muxernpmDependency StatusdevDependency Status
libp2p-spdynpmDependency StatusdevDependency Status
libp2p-multiplex
Discovery
libp2p-mdns-discoverynpmDependency StatusdevDependency Status
libp2p-railingnpmDependency StatusdevDependency Status
Crypto Channels
libp2p-secionpmDependency StatusdevDependency Status
Peer Routing
libp2p-kad-routingnpmDependency StatusdevDependency Status
Content Routing
interface-record-storenpmDependency StatusdevDependency Status
libp2p-recordnpmDependency StatusdevDependency Status
libp2p-distributed-record-storenpmDependency StatusdevDependency Status
libp2p-kad-record-storenpmDependency StatusdevDependency Status
Generics
libp2p-swarmnpmDependency StatusdevDependency Status
libp2p-pingnpmDependency StatusdevDependency Status
multistream-selectnpmDependency StatusdevDependency Status
Data Types
peer-booknpmDependency StatusdevDependency Status
peer-id

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 infrasture 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. Most of this has been developed by @diasdavid, which means that 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.

License

MIT © David Dias

Keywords

FAQs

Package last updated on 11 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc