From 69773a7b41c1cb2f6914004764c7a02af05ca569 Mon Sep 17 00:00:00 2001
From: qqjettkgjzhxmwj <37233887+JettScythe@users.noreply.github.com>
Date: Tue, 21 Jul 2020 17:24:02 -0300
Subject: [PATCH] Update json_rpc_api.md
Corrections suggested by @onyb https://github.com/btcsuite/btcd/pull/1608#discussion_r458363077
---
docs/json_rpc_api.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/json_rpc_api.md b/docs/json_rpc_api.md
index c33bd7a3..61884df0 100644
--- a/docs/json_rpc_api.md
+++ b/docs/json_rpc_api.md
@@ -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
2. verbosity (int, optional, default=1) - specifies the block is returned as a JSON object instead of hex-encoded string**This parameter is a btcd extension**|
+|Parameters|1. block hash (string, required) - the hash of the block
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)`
`"hash": "blockhash", (string) the hash of the block (same as provided)`
`"confirmations": n, (numeric) the number of confirmations`
`"strippedsize", n (numeric) the size of the block without witness data`
`"size": n, (numeric) the size of the block`
`"weight": n, (numeric) value of the weight metric`
`"height": n, (numeric) the height of the block in the block chain`
`"version": n, (numeric) the block version`
`"merkleroot": "hash", (string) root hash of the merkle tree`
`"tx": [ (json array of string) the transaction hashes`
`"transactionhash", (string) hash of the parent transaction`
`...`
`]`
`"time": n, (numeric) the block time in seconds since 1 Jan 1970 GMT`
`"nonce": n, (numeric) the block nonce`
`"bits", n, (numeric) the bits which represent the block difficulty`
`difficulty: n.nn, (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty`
`"previousblockhash": "hash", (string) the hash of the previous block`
`"nextblockhash": "hash", (string) the hash of the next block (only if there is one)`
`}`|