aboutsummaryrefslogtreecommitdiff
path: root/doc/REST-interface.md
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-10-13 11:50:57 +0800
committerfanquake <fanquake@gmail.com>2022-10-13 11:54:52 +0800
commit7e5fe034618e4d7dfc1c203cb2e29220389fb1a6 (patch)
tree3a9863935e9dfa9c51da26bf956acd3e8b15e8f5 /doc/REST-interface.md
parent422efcad36e31891faddc24d3bc05a825baaa4d9 (diff)
parentc456302d4258e3abc4b8afde20fba808632771b2 (diff)
Merge bitcoin/bitcoin#24467: doc: minor improvements in getutxos REST endpoint synopsis
c456302d4258e3abc4b8afde20fba808632771b2 doc: minor improvements in getutxos REST endpoint synopsis (Sebastian Falbesoner) Pull request description: Describing an optional sub-path as `<checkmempool>` 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: ``` #### Blocks `GET /rest/block/<BLOCK-HASH>.<bin|hex|json>` `GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>` ``` Further improvements: - uppercase `<TXID>` and `<N>`, 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 ACKs for top commit: stickies-v: ACK c456302d4258e3abc4b8afde20fba808632771b2 - also checked that current master (cc12b8947) doesn't have any other lines changes that would require updates as per the outlined improvement points. Tree-SHA512: b025aac0812397f5fbf78c805c13aeb5afa6862a049d13c0b101178799cdaff1ccd3abc368a5c103ea6ebf17cdff76584c54638d0f8d303d81ade2d71443d305
Diffstat (limited to 'doc/REST-interface.md')
-rw-r--r--doc/REST-interface.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/REST-interface.md b/doc/REST-interface.md
index 265b74ee9a..0035dfcd8e 100644
--- a/doc/REST-interface.md
+++ b/doc/REST-interface.md
@@ -37,8 +37,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/<BLOCK-HASH>.<bin|hex|json>`
-`GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>`
+- `GET /rest/block/<BLOCK-HASH>.<bin|hex|json>`
+- `GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>`
Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats.
Responds with 404 if the block doesn't exist.
@@ -87,11 +87,13 @@ Only supports JSON as output format.
Refer to the `getblockchaininfo` RPC help for details.
#### Query UTXO set
-`GET /rest/getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>`
+- `GET /rest/getutxos/<TXID>-<N>/<TXID>-<N>/.../<TXID>-<N>.<bin|hex|json>`
+- `GET /rest/getutxos/checkmempool/<TXID>-<N>/<TXID>-<N>/.../<TXID>-<N>.<bin|hex|json>`
-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:
```