getblockheader - Zcash
Example code for the getblockheader JSON-RPC method. Сomplete guide on how to use the getblockheader JSON-RPC method in GetBlock.io Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "getblockheader",
"params": [
"00000000018bb43cadf5b4c8a2e7f9d0e1a6b3c8d5e4f2a1b0c9d8e7f6a5b4c3",
true
],
"id": "getblock.io"
}'const axios = require('axios');
const response = await axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', {
jsonrpc: '2.0',
method: 'getblockheader',
params: [
"00000000018bb43cadf5b4c8a2e7f9d0e1a6b3c8d5e4f2a1b0c9d8e7f6a5b4c3",
true
],
id: 'getblock.io'
}, {
headers: { 'Content-Type': 'application/json' }
});
console.log(response.data.result);Response
Response Parameters
Parameter
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Last updated
Was this helpful?