Optional options: Partial<waku_relay.CreateOptions>Private #privateReadonly controlMap of control messages peer id => control message
Readonly directDirect peers
Readonly fanoutMap of topics to set of peers. These mesh peers are the ones to which we are publishing without a topic membership topic => peer id set
Readonly globalThe signature policy to follow by default
Readonly gossipMap of pending messages to gossip peer id => control messages
Readonly gossipTracks IHAVE/IWANT promises broken by peers
Readonly meshMap of topic meshes topic => peer id set
observers called when receiving new message.
Observers under key "" are always called.
Readonly optsReadonly peersReadonly scorePeer score tracking
Readonly streamsReadonly streamsReadonly topicStatic multicodecOptional options: boolean | AddEventListenerOptionsAdd an observer and associated Decoder to process incoming messages on a given content topic.
Function to delete the observer
Add an observer and associated Decoder to process incoming messages on a given content topic.
Function to delete the observer
App layer publishes a message to peers, return number of peers this message is published to
Note: async due to crypto only if StrictSign, otherwise it's a sync fn.
For messages not from us, this class uses forwardMessage.
Optional listener: null | EventHandler<GossipsubEvents[K]>Optional options: boolean | EventListenerOptionsThis function should be called when asyncValidation is true after
the message got validated by the caller. Messages are stored in the mcache and
validation is expected to be fast enough that the messages should still exist in the cache.
There are three possible validation outcomes and the outcome is given in acceptance.
If acceptance = MessageAcceptance.Accept the message will get propagated to the
network. The propagation_source parameter indicates who the message was received by and
will not be forwarded back to that peer.
If acceptance = MessageAcceptance.Reject the message will be deleted from the memcache
and the P₄ penalty will be applied to the propagationSource.
If acceptance = MessageAcceptance.Ignore the message will be deleted from the memcache
but no P₄ penalty will be applied.
This function will return true if the message was found in the cache and false if was not in the cache anymore.
This should only be called once per message.
Send Waku message.
Generated using TypeDoc
Implements the Waku v2 Relay protocol. Must be passed as a
pubsubmodule to aLibp2pinstance.Implements