observers called when receiving new message.
Observers under key ""
are always called.
Register a decryption key to attempt decryption of received messages.
This can either be a private key for asymmetric encryption or a symmetric
key. WakuRelay
will attempt to decrypt messages using both methods.
Strings must be in hex format.
Register an observer of new messages received via waku relay
called when a new message is received via waku relay
Content Topics for which the callback with be called, all of them if undefined, [] or ["",..] is passed.
Delete a decryption key that was used to attempt decryption of received messages.
Strings must be in hex format.
Remove an observer of new messages received via waku relay. Useful to ensure the same observer is not registered several time (e.g when loading React components)
Return the relay peers we are connected to, and we would publish a message to
Send Waku message.
Mounts the gossipsub protocol onto the libp2p node and subscribes to the default topic.
Subscribe to a pubsub topic and start emitting Waku messages to observers.
Generated using TypeDoc
Implements the Waku v2 Relay protocol. Must be passed as a
pubsub
module to a {Libp2p} instance.{require('libp2p-interfaces/src/pubsub')}