bcoin-org / bclient

Bcoin node and wallet clients
Other
11 stars 20 forks source link

Emit using eventEmitter #16

Closed nodech closed 5 years ago

nodech commented 5 years ago

Even though you can use bind for WalletClient to subscribe to events, we end up having different APIs for Wallet and WalletClient (One using bind another on).

This will enable EventEmitter api for walletClient. (EventEmitter is used for connect, error and disconnect events for now).

nodech commented 5 years ago

Caveats: There will be no way to differentiate vanilla socket events from bsock events.

Note:

nodech commented 5 years ago

I guess exposing unhook and unbind will solve my issue. We could change Wallet to use Socket API as well.