Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: unify events under one source #2067

Open
weboko opened this issue Jul 16, 2024 · 0 comments
Open

feat: unify events under one source #2067

weboko opened this issue Jul 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@weboko
Copy link
Collaborator

weboko commented Jul 16, 2024

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:

@weboko weboko added the enhancement New feature or request label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Do
Development

No branches or pull requests

1 participant