Is there an Event List available?

I’m running code as follows:

node.addEventListener(‘peer:discovery’, (evt) => {
logger.info(discovered peer ${evt.detail.id.toString()});
});

node.addEventListener(‘peer:connect’, (evt) => {
logger.info(connected to ${evt.detail.toString()});
});

“node” is a libp2p node. Where can I get a list of available event to listen to? I’m not able to find that info in the docs.

Hi @msalimbene ,

I’m assuming this is js-libp2p you’re asking about? If that’s the case, the documentation contains an exhaustive list of events.

Cheers! :beers:
Dave

1 Like