This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@dao-xyz/orbit-db-pubsub

0.6.11 • Public • Published

orbit-db-pubsub

Gitter Matrix Discord npm version

Message propagation module for orbit-db

Default message propagation service for orbit-db. Uses IPFS pubsub.

Install

This project uses npm and nodejs.

npm install orbit-db-pubsub

Usage

API

subscribe(topic, onMessageHandler, onNewPeerHandler)

Listen for new messages in topic

onMessageHandler gets called when a message is received with signature (topic, data)

onNewPeerHandler gets called when a new peer joins with signature (topic, peer)

Returns a promise.

unsubscribe(topic)

Stop listening for new messages in topic

Returns a promise.

disconnect ()

Stop listening for new messages in all topics

Returns a promise.

publish(topic, data)

Publish data to a topic

Contributing

If you think this could be better, please open an issue!

Please note that all interactions in @orbitdb fall under our Code of Conduct.

License

MIT ©️ 2016-2018 Protocol Labs Inc., Haja Networks Oy

Readme

Keywords

Package Sidebar

Install

npm i @dao-xyz/orbit-db-pubsub

Weekly Downloads

1

Version

0.6.11

License

MIT

Unpacked Size

11.4 kB

Total Files

8

Last publish

Collaborators

  • marcus.pousette