A list of multicodecs that contain the pubsub protocol name.
Pubsub routers support message validators per topic, which will validate the message before its propagations. They are stored in a map where keys are the topic name and values are the validators.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsThe dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Gets a list of the PeerIds that are subscribed to one topic.
Gets a list of topics the node is subscribed to.
const topics = libp2p.pubsub.getTopics()
Publishes messages to the given topic.
Optionaldata: Uint8Array<ArrayBufferLike>The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionallistener: EventHandler<GossipSubEvents[K]> | nullOptionaloptions: boolean | EventListenerOptionsThe removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionallistener: EventHandler<Event>Optionaloptions: boolean | EventListenerOptionsOptionaldetail: CustomEventInit<Detail>
The global signature policy controls whether or not we sill send and receive signed or unsigned messages.
Signed messages prevent spoofing message senders and should be preferred to using unsigned messages.