Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@dao-xyz/libp2p-direct-sub

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dao-xyz/libp2p-direct-sub

Direct streaming for libp2p

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

Direct Sub

Pubsub protocol built on top of Direct Stream

Features

  • Accurate

    .getSubscribers(topic)
    

    metho. Based on aggregated subscriber info, not only from immediate peers.

  • Subscriptions with associated metadata. E.g. you can subscribe to topics and provide data that explains the purpose for peers

    .subscribe(topic, new UInt8Array([1,2,3]))
    
    .getSubscribersWithData(topic, data)
    
  • Efficient, content routing through path-finding algorithms

    .publish(data, { topics: ["a","b"]})
    

    will try to find the subscribers of "a" and "b" and send messages with the shortest path in the network.

Keywords

peerbit

FAQs

Package last updated on 15 Jun 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