mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 09:50:08 +01:00
Updated Websocket JSON RPC API (markdown)
parent
6bdabbcdef
commit
e90a362873
@ -247,7 +247,7 @@ The following is an overview of the JSON-RPC notifications used for websocket co
|
||||
|Requests|[notifyspent](#notifyspent) and [rescan](#rescan)|
|
||||
|Parameters|1. Transaction (string) full transaction encoded as a hex string<br />2. Block details (object, optional) details about a block and the index of the transaction within a block, if the transaction is mined|
|
||||
|Description|Notifies a client when an registered outpoint is spent by a transaction accepted to mempool and/or mined into a block.|
|
||||
|Example|Example redeemingtx notification for mainnet outpoint 61d3696de4c888730cbe06b0ad8ecb6d72d6108e893895aa9bc067bd7eba3fad:0 after being spent by transaction 4ad0c16ac973ff675dec1f3e5f1273f1c45be2a63554343f21b70240a1e43ece (newlines added for readability):<br />`{`<br /> `"jsonrpc": "1.0",`<br /> `"method": "redeemingtx",`<br /> `"params":`<br /> `[`<br /> `"0100000003ad3fba7ebd67c09baa9538898e10d6726dcb8eadb006be0c7388c8e46d69d3610000000..."`<br /> `],`<br /> `"id": null`<br />`}`<br />The redeemingtx notification for the same txout, after the spending transaction was mined into block 279143:<br />`{`<br /> `"jsonrpc": "1.0",`<br /> `"method": "recvtx",`<br /> `"params":`<br /> `[`<br /> `"0100000003ad3fba7ebd67c09baa9538898e10d6726dcb8eadb006be0c7388c8e46d69d3610000000...",`<br /> `{`<br /> `"height": 279143,`<br /> `"hash": "00000000000000017188b968a371bab95aa43522665353b646e41865abae02a4",`<br /> `"index": XXX,`<br /> `"time": 1389115004`<br /> `}`<br /> `],`<br /> `"id": null`<br />`}`|
|
||||
|Example|Example redeemingtx notification for mainnet outpoint 61d3696de4c888730cbe06b0ad8ecb6d72d6108e893895aa9bc067bd7eba3fad:0 after being spent by transaction 4ad0c16ac973ff675dec1f3e5f1273f1c45be2a63554343f21b70240a1e43ece (newlines added for readability):<br />`{`<br /> `"jsonrpc": "1.0",`<br /> `"method": "redeemingtx",`<br /> `"params":`<br /> `[`<br /> `"0100000003ad3fba7ebd67c09baa9538898e10d6726dcb8eadb006be0c7388c8e46d69d3610000000..."`<br /> `],`<br /> `"id": null`<br />`}`<br />The redeemingtx notification for the same txout, after the spending transaction was mined into block 279143:<br />`{`<br /> `"jsonrpc": "1.0",`<br /> `"method": "recvtx",`<br /> `"params":`<br /> `[`<br /> `"0100000003ad3fba7ebd67c09baa9538898e10d6726dcb8eadb006be0c7388c8e46d69d3610000000...",`<br /> `{`<br /> `"height": 279143,`<br /> `"hash": "00000000000000017188b968a371bab95aa43522665353b646e41865abae02a4",`<br /> `"index": 6,`<br /> `"time": 1389115004`<br /> `}`<br /> `],`<br /> `"id": null`<br />`}`|
|
||||
[Return to Notification Overview](#NotificationOverview)<br />
|
||||
|
||||
***
|
||||
|
Loading…
Reference in New Issue
Block a user