Skip to content

Commit c456302

Browse files
committed
doc: minor improvements in getutxos REST endpoint synopsis
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. 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
1 parent 08bcfa2 commit c456302

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

doc/REST-interface.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ By default, this endpoint will only search the mempool.
3636
To query for a confirmed transaction, enable the transaction index via "txindex=1" command line / configuration option.
3737

3838
#### Blocks
39-
`GET /rest/block/<BLOCK-HASH>.<bin|hex|json>`
40-
`GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>`
39+
- `GET /rest/block/<BLOCK-HASH>.<bin|hex|json>`
40+
- `GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>`
4141

4242
Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats.
4343
Responds with 404 if the block doesn't exist.
@@ -89,11 +89,13 @@ Only supports JSON as output format.
8989
* softforks : (array) status of softforks in progress
9090

9191
#### Query UTXO set
92-
`GET /rest/getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>`
92+
- `GET /rest/getutxos/<TXID>-<N>/<TXID>-<N>/.../<TXID>-<N>.<bin|hex|json>`
93+
- `GET /rest/getutxos/checkmempool/<TXID>-<N>/<TXID>-<N>/.../<TXID>-<N>.<bin|hex|json>`
9394

94-
The getutxo command allows querying of the UTXO set given a set of outpoints.
95-
See BIP64 for input and output serialisation:
96-
https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki
95+
The getutxos endpoint allows querying the UTXO set, given a set of outpoints.
96+
With the `/checkmempool/` option, the mempool is also taken into account.
97+
See [BIP64](https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki) for
98+
input and output serialization (relevant for `bin` and `hex` output formats).
9799

98100
Example:
99101
```

0 commit comments

Comments
 (0)