Update json_rpc_api.md
Corrections suggested by @onyb https://github.com/btcsuite/btcd/pull/1608#discussion_r458363077
This commit is contained in:
parent
3c56a6bd3a
commit
69773a7b41
1 changed files with 1 additions and 1 deletions
|
@ -271,7 +271,7 @@ the method name for further details such as parameter and return information.
|
|||
| | |
|
||||
|---|---|
|
||||
|Method|getblock|
|
||||
|Parameters|1. block hash (string, required) - the hash of the block<br />2. verbosity (int, optional, default=1) - specifies the block is returned as a JSON object instead of hex-encoded string<font color="orange">**This parameter is a btcd extension**</font>|
|
||||
|Parameters|1. block hash (string, required) - the hash of the block<br />2. verbosity (int, optional, default=1) - Specifies whether the block data should be returned as a hex-encoded string (0), as parsed data with a slice of TXIDs (1), or as parsed data with parsed transaction data (2).
|
||||
|Description|Returns information about a block given its hash.|
|
||||
|Returns (verbosity=0)|`"data" (string) hex-encoded bytes of the serialized block`|
|
||||
|Returns (verbosity=1)|`{ (json object)`<br /> `"hash": "blockhash", (string) the hash of the block (same as provided)`<br /> `"confirmations": n, (numeric) the number of confirmations`<br /> `"strippedsize", n (numeric) the size of the block without witness data`<br /> `"size": n, (numeric) the size of the block`<br /> `"weight": n, (numeric) value of the weight metric`<br /> `"height": n, (numeric) the height of the block in the block chain`<br /> `"version": n, (numeric) the block version`<br /> `"merkleroot": "hash", (string) root hash of the merkle tree`<br /> `"tx": [ (json array of string) the transaction hashes`<br /> `"transactionhash", (string) hash of the parent transaction`<br /> `...`<br /> `]`<br /> `"time": n, (numeric) the block time in seconds since 1 Jan 1970 GMT`<br /> `"nonce": n, (numeric) the block nonce`<br /> `"bits", n, (numeric) the bits which represent the block difficulty`<br /> `difficulty: n.nn, (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty`<br /> `"previousblockhash": "hash", (string) the hash of the previous block`<br /> `"nextblockhash": "hash", (string) the hash of the next block (only if there is one)`<br />`}`|
|
||||
|
|
Loading…
Reference in a new issue