Open hopeyen opened 1 year ago
@richard-ramos do we have something like that in the underlaying lib?
Hm. In go-waku we could access the list of topics via wakuNode.Relay().Topics()
so we could expose that easily.
For the list of peers, in the current version of go-waku filter, there's no subscription management at client side, so there's no easy way to obtain the list of peers. One solution i could provide could be to instead of returning true
when waku_filter_subscribe
is executed, to instead return an object with the info for the subscription:
{
peerId: ....,
topic: ....,
contentTopics: [ ... ]
}
and then subscription management could be done by the application using go-waku library.
...
In https://github.com/vacp2p/rfc/pull/562 a lot of improvements over filter protocol are being done, and once they land in go-waku and nwaku i believe it will be easier to provide a list of active filter subscriptions.
This will need to be added to nwaku when we switch from go-waku to nwaku for Rust bindings.
Added to Epic: https://github.com/waku-org/nwaku/issues/2420
It would be really nice to have a function returning topics related to the running node, such as
This makes it easier to track and manage the topics