Skip to content

feat: unify events under one source #2067

Open
@weboko

Description

@weboko

This is a feature request

Problem

Right now we have different event sources such as:

Later, when we want to action on something like network state change - we need to have a dependency on the emitting source which in this case is connection manager.

At the same time we have libp2p as a source of some other events.

All of the mentioned events are useful event outside of js-waku code base and can be leveraged by app developers.

Proposed Solutions

Unify libp2p and js-waku specific events under one source.
Make it accessible throughout code base so that we can emit or listen to events everywhere.
Expose such event source to outside.

As temporary means we can leverage libp2p for emitting and listening to events.
For outside it is better to expose something like node.events.addEventListener.

Notes:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions