Sending NotifyAllNewTXsCmd will register websocket client to receive
notifications on all new transactions.
Once registered the client will receive either AllTxNtfn or
AllVerboseTxNtfn based on the required verbose field in the
NotifyAllNewTXsCmd.
This changes notifications to JSON-RPC Requests, rather than
Responses, that also satisify the btcjson.Cmd interface and are
registered with btcjson's parser. This prevents issues where JSON-RPC
Response IDs clash due to a client using the same ID as what an old
notification used.
As this changes the API, and thus, requires notification handlers to
be modified, the remaining missing notifications used by btcwallet
have been implemented. Applications parsing these notifications, such
as btcgui, can now use a common handler function signature for all
notifications.
Test coverage for all notifications has been added (excluding testing
for badly-marshaled notifications with wrong numbers of parameters, or
wrong types).
Fixes#2.