From c456302d4258e3abc4b8afde20fba808632771b2 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Thu, 3 Mar 2022 11:56:20 +0100 Subject: [PATCH] doc: minor improvements in getutxos REST endpoint synopsis Describing an optional sub-path as in the synopsis could be misleading as the angle brackets normally indicate that the field has to be replaced a custom value. Clarify that by showing two variants instead, similar to the block endpoint with the notxdetails option. Further improvements: - uppercase and , to match the description of the other endpoints - s/getutxo command/getutxos endpoint/ - describe what the checkmempool option does - s/serialisation/serialization/ (the US spelling is more dominant than the UK spelling in the project, and there is indeed no other instance of the string "serialis*" in the source tree, except once in a release note) - link to BIP64 within the text instead of only showing bare URL - mention that BIP64 is only relevant for bin and hex output formats - show two endpoint formats of the block section as list --- doc/REST-interface.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/REST-interface.md b/doc/REST-interface.md index 1f0a07a2840..02315c359c5 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -36,8 +36,8 @@ By default, this endpoint will only search the mempool. To query for a confirmed transaction, enable the transaction index via "txindex=1" command line / configuration option. #### Blocks -`GET /rest/block/.` -`GET /rest/block/notxdetails/.` +- `GET /rest/block/.` +- `GET /rest/block/notxdetails/.` Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats. Responds with 404 if the block doesn't exist. @@ -89,11 +89,13 @@ Only supports JSON as output format. * softforks : (array) status of softforks in progress #### Query UTXO set -`GET /rest/getutxos//-/-/.../-.` +- `GET /rest/getutxos/-/-/.../-.` +- `GET /rest/getutxos/checkmempool/-/-/.../-.` -The getutxo command allows querying of the UTXO set given a set of outpoints. -See BIP64 for input and output serialisation: -https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki +The getutxos endpoint allows querying the UTXO set, given a set of outpoints. +With the `/checkmempool/` option, the mempool is also taken into account. +See [BIP64](https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki) for +input and output serialization (relevant for `bin` and `hex` output formats). Example: ```