diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2014-12-29 20:26:47 +0100 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2014-12-29 20:27:46 +0100 |
commit | 2c0f901ea90e3efab5e15abeba011597cfdd92c1 (patch) | |
tree | 5767f9e0396eea38f8ff25ee7efda0af2a8860dc | |
parent | 59582c8b8d126a82a60529663c2f122df8ad7c2a (diff) |
[REST] rest/chaininfos add documentation
-rw-r--r-- | doc/REST-interface.md | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/REST-interface.md b/doc/REST-interface.md index 0af650b4e8..23154ee903 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -10,6 +10,8 @@ Supported API 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. + `GET /rest/block/BLOCK-HASH.{bin|hex|json}` `GET /rest/block/notxdetails/BLOCK-HASH.{bin|hex|json}` @@ -20,7 +22,17 @@ The HTTP request and response are both handled entirely in-memory, thus making m 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. -For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option. +`GET /rest/chaininfo.json` + +Returns various state info regarding block chain processing. +Only supports JSON as output format. +* chain : (string) current network name as defined in BIP70 (main, test, regtest) +* blocks : (numeric) the current number of blocks processed in the server +* headers : (numeric) the current number of headers we have validated +* bestblockhash : (string) the hash of the currently best block +* difficulty : (numeric) the current difficulty +* verificationprogress : (numeric) estimate of verification progress [0..1] +* chainwork : (string) total amount of work in active chain, in hexadecimal Risks ------------- |