The btcd notifyspent JSON-RPC request has just received a breaking API
change.  The first (and only) parameter is now no longer a JSON object
describing an OutPoint, but a JSON array of such objects.  This allows
clients to request redeemingtx notifications for many outpoints at
once, rather than requiring multiple requets for each.

As a quick example, a notifyspent request requesting redeemingtx
notifications for mainnet outpoints
61d3696de4c888730cbe06b0ad8ecb6d72d6108e893895aa9bc067bd7eba3fad:0 and
4ad0c16ac973ff675dec1f3e5f1273f1c45be2a63554343f21b70240a1e43ece:1 now
looks like such (newlines and indents added for readability):

{
        "json-rpc": "1.0",
        "id": someID,
        "method": "notifyspent",
        "params": [
                {
                        "hash": 
"61d3696de4c888730cbe06b0ad8ecb6d72d6108e893895aa9bc067bd7eba3fad",
                        "index": 0
                },
                {
                        "hash": 
"4ad0c16ac973ff675dec1f3e5f1273f1c45be2a63554343f21b70240a1e43ece",
                        "index": 1
                }
        ]
}

The btcd wiki has been updated to match the new request format:
https://github.com/conformal/btcd/wiki/Websocket-JSON-RPC-API#notifyspent

Attachment: pgpCZOZWbZaSr.pgp
Description: PGP signature

Reply via email to