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

@libp2p/interface-peer-routing

Package Overview
Dependencies
Maintainers
6
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/interface-peer-routing

Peer Routing interface for libp2p

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
145
decreased by-82.1%
Maintainers
6
Weekly downloads
 
Created
Source

@libp2p/interface-peer-routing

libp2p.io Discuss codecov CI

Peer Routing interface for libp2p

Table of contents

Install

$ npm i @libp2p/interface-peer-routing

The primary goal of this module is to enable developers to pick and swap their Peer Routing module as they see fit for their libp2p installation, without having to go through shims or compatibility issues. This module and test suite were heavily inspired by abstract-blob-store and interface-stream-muxer.

Publishing a test suite as a module lets multiple modules all ensure compatibility since they use the same test suite.

Modules that implement the interface

Badge

Include this badge in your readme if you make a module that is compatible with the interface-record-store API. You can validate this by running the tests.

How to use the battery of tests

Node.js

TBD

API

A valid (read: that follows this abstraction) Peer Routing module must implement the following API.

findPeer

  • findPeer(peerId)

Query the network for all multiaddresses associated with a PeerId.

Parameters

Returns

It returns the peerId together with the known peers multiaddrs, as follows:

Promise<{ id: PeerId, multiaddrs: Multiaddr[] }>

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.

Keywords

FAQs

Package last updated on 04 May 2023

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