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:
- "hash" (string, required) The block hash
- verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data
Request
curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
-X POST \
-H 'x-amberdata-blockchain-id: bitcoin-mainnet' \
-d '{"jsonrpc":"2.0","id":1,"method":"getblockheader","params":"000000000000000000187f49c0f588440af52039bc6e5951c286b692af2d004d"]}'
Response
{
"result": {
"hash": "000000000000000000187f49c0f588440af52039bc6e5951c286b692af2d004d",
"confirmations": 3308,
"height": 594413,
"version": 545259520,
"versionHex": "20800000",
"merkleroot": "4730782869f2626fc3e293d58e1ef8fe589fb6b14e43b17abed580c0307815a0",
"time": 1568237290,
"mediantime": 1568236047,
"nonce": 4071333510,
"bits": "171a213e",
"difficulty": 10771996663680.4,
"chainwork": "0000000000000000000000000000000000000000086c2b08f0d7eb29a1b8055a",
"nTx": 103,
"previousblockhash": "00000000000000000004f0c30e22cb43d425014eac9a39abc90ac961e0a73afd",
"nextblockhash": "0000000000000000000ca5aaf2c9e9bdc8fd1e48fdc39faf867b0f5aad28ead4"
},
"error": null,
"id": 1
}