@dao-xyz/libp2p-direct-sub
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i @dao-xyz/libp2p-direct-sub

Weekly Downloads

18

Version

1.0.4

License

MIT

Unpacked Size

91.7 kB

Total Files

12

Last publish

Collaborators

  • marcus.pousette