Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@libp2p/interface-content-routing
Advanced tools
Readme
Content routing interface for libp2p
$ npm i @libp2p/interface-content-routing
The primary goal of this module is to enable developers to pick and swap their Content 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.
Include this badge in your readme if you make a module that is compatible with the interface-content-routing API. You can validate this by running the tests.
TBD
A valid (read: that follows this abstraction) Content Routing module must implement the following API.
findProviders(cid)
Find peers in the network that can provide a specific value, given a key.
Parameters
Returns
It returns an AsyncIterable
containing the identification and addresses of the peers providing the given key, as follows:
AsyncIterable<{ id: PeerId, multiaddrs: Multiaddr[] }>
provide(cid)
Announce to the network that we are providing the given value.
Parameters
Returns
It returns a promise that is resolved on the success of the operation.
Promise<void>
Licensed under either of
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.
FAQs
Content routing interface for libp2p
The npm package @libp2p/interface-content-routing receives a total of 4,408 weekly downloads. As such, @libp2p/interface-content-routing popularity was classified as popular.
We found that @libp2p/interface-content-routing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.