This package has been deprecated

Author message:

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

orbit-db-pubsub

0.7.0 • 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 orbit-db-pubsub

Weekly Downloads

1,985

Version

0.7.0

License

MIT

Unpacked Size

14.2 kB

Total Files

10

Last publish

Collaborators

  • haad
  • hajamark
  • shamb0t