Use a channel to recieve events instead of allowing setting callbacks. Events is generic, depending on what nwaku returns in the callbacks it can be replace by an specific type or maybe we can create a trait for such events.
this is just a broad idea as I could not really check if it compiles.
Use a channel to recieve events instead of allowing setting callbacks. Events is generic, depending on what nwaku returns in the callbacks it can be replace by an specific type or maybe we can create a trait for such events. this is just a broad idea as I could not really check if it compiles.