diff --git a/doc/REST-interface.md b/doc/REST-interface.md --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -1,21 +1,19 @@ -Unauthenticated REST Interface -============================== +# Unauthenticated REST Interface The REST API can be enabled with the `-rest` option. The interface runs on the same port as the JSON-RPC interface, by default port 8332 for mainnet and port 18332 for testnet. -Supported API -------------- +## Supported API -####Transactions +### Transactions `GET /rest/tx/.` Given a transaction hash: returns a transaction in binary, hex-encoded binary, or JSON formats. For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option. -####Blocks +### Blocks `GET /rest/block/.` `GET /rest/block/notxdetails/.` @@ -25,12 +23,12 @@ With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response. -####Blockheaders +### Blockheaders `GET /rest/headers//.` Given a block hash: returns amount of blockheaders in upward direction. -####Chaininfos +### Chaininfos `GET /rest/chaininfo.json` Returns various state info regarding block chain processing. @@ -46,7 +44,7 @@ * pruneheight : (numeric) heighest block available * softforks : (array) status of softforks in progress -####Query UTXO set +### Query UTXO set `GET /rest/getutxos//-/-/.../-.` The getutxo command allows querying of the UTXO set given a set of outpoints. @@ -79,7 +77,7 @@ } ``` -####Memory pool +### Memory pool `GET /rest/mempool/info.json` Returns various information about the TX mempool. @@ -93,6 +91,6 @@ Returns transactions in the TX mempool. Only supports JSON as output format. -Risks -------------- +## Risks + Running a web browser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `