You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
data can be a Buffer or anything that converts to a buffer with new Buffer(data).
Usage
ipfs.pubsub.sub('hello',(err,stream)=>{stream.on('data',(message)=>{console.log(message)stream.cancel()// cancel subscription/* { data: 'world', topicIDs: ['hello'] // these fields are currently missing from the message // (but are present in messages from go-ipfs pubsub) // from: bs58.encode(message.from), // seqno: Base64.decode(message.seqno) } */})})ipfs.pubsub.sub('hello','world')