Allow filtering events when subscribing to them
omitar opened this issue · comments
omitar commented
It looks like I can call service.addEventListener
but there is no way to filter those events before sending them over the wire to the client. This means that for a busy service, this could send a lot of events to the client, even if client is interested only in a subset of events.
For example, in SimplePeg I would like to listen to events that conversion for a particular user is completed. But it looks like I have to listen for events for all users.
Armani Ferrante commented
For now, if you want web3 filters, use the Web3Gateway
's eth.subscribe
method directly. See https://oasis-labs-oasis-client.readthedocs-hosted.com/en/latest/gateways.html#subscriptions.