getblockheader
Summary
If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.
Description
If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.
If verbose is true, returns an Object with information about blockheader
Arguments
blockhash(STR_HEX, required): The block hashverbose(BOOL): true for a json object, false for the hex-encoded data
Results
value(OBJ): No description.hash(STR_HEX): the block hash (same as provided)confirmations(NUM): The number of confirmations, or -1 if the block is not on the main chainheight(NUM): The block height or indexversion(NUM): The block versionversionHex(STR_HEX): The block version formatted in hexadecimalmerkleroot(STR_HEX): The merkle roottime(NUM_TIME): The block time expressed in UNIX epoch timemediantime(NUM_TIME): The median block time expressed in UNIX epoch timenonce(NUM): The noncebits(STR_HEX): nBits: compact representation of the block difficulty targettarget(STR_HEX): The difficulty targetdifficulty(NUM): The difficultychainwork(STR_HEX): Expected number of hashes required to produce the current chainnTx(NUM): The number of transactions in the blockpreviousblockhash(STR_HEX, optional): The hash of the previous block (if available)nextblockhash(STR_HEX, optional): The hash of the next block (if available)value(STR_HEX): A string that is serialized, hex-encoded data for block 'hash'
Examples
qbit-cli getblockheader "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: application/json' http://127.0.0.1:8352/