post https://api.infstones.com/neo/mainnet/
Returns the information of the block header with the specified script hash or index.
The usage of this method is as same as
getblock
. The only difference is thatgetblockeader
gets the block header andgetblock
gets the complete block.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK HASH | ✅ | String | The block hash or block index. |
VERBOSE | ❌ | Boolean/Integer | If false or 0 , serialized information of the block is returned in a Base64-encoded string. If true or 1 , detailed information of the block is returned in JSON format. Default is false . |
"params": [
"0x8b8143850fd4c058a46664d0fa33590b87d10e55acefe92aeb489c30167b2b19",
1
]
Result
The corresponding block header information according to the specified hash or index.
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "getblockheader", "params":["0x8b8143850fd4c058a46664d0fa33590b87d10e55acefe92aeb489c30167b2b19", 1],"id": 1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hash": "0x8b8143850fd4c058a46664d0fa33590b87d10e55acefe92aeb489c30167b2b19",
"size": 696,
"version": 0,
"previousblockhash": "0xa9ecbad4d16211556d766b8aa13c5d798b1afc2e57d694efc5156e24336646b1",
"merkleroot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"time": 1648673682055,
"nonce": "76107EAE84DE715C",
"index": 1310102,
"primary": 3,
"nextconsensus": "NSiVJYZej4XsxG5CUpdwn7VRQk8iiiDMPM",
"witnesses": [{
"invocation": "DEBZ3pwKRR7pCaA/yQ02SXbuhYPRLAnjdQNu4PPLfGqT7agpQQZ3VD9LtYMMAGQqlvchnJMhCk3KfUnJvHRVUlkRDECCGgCZF/REIA7mraoiMoUVPObdvm/H41u9DwoohCQvnzIhwe5lwFFscFki4BJecKCfvoyOVVbI0LxPtId3Egr1DEBAqNa4U5zaqc1m0Ll6CPJdC02o7k23eOBnwTIfiivUlMG/WfI4MxDYWHpEkN8pqoyCIynUu7AJ2a0d94Qic1CEDEDzDcAmWEf/AIkchb8aa17tCNrSyt7EeBYtmuGS8B989empSi4RghgVJ84JJVEW5BAR\u002BVQBdC0GbFea5UQGtFl9DECtmftfnzbcfjWd4Ao0i1sWp2JvWoRg/c1Ye6p4sWNBj3mb8AJTUH2czLWtG\u002BVUbaSmTrXfVdJ3F89FlEV8\u002BLIA",
"verification": "FQwhAjmjdDZlL0GzuALKRMvLfWXTqguIyaA4AkO9vhqqXLNbDCECSG/RVwLESQomcDESpcwdCSP9aXozQGvVocAOABOwmnAMIQKq7DhHD2qtAELG6HfP2Ah9Jnaw9Rb93TYoAbm9OTY5ngwhA7IJ/U9TpxcOpERODLCmu2pTwr0BaSaYnPhfmw\u002B6F6cMDCEDuNnVdx2PUTqghpucyNUJhkA7eMbaNokGOMPUalrc4EoMIQLKDidpe5wkj28W4IX9AGHib0TahbWO6DXBEMql7DulVAwhA9nosWvZsi0zRdbUzeMb4cPh0WFTLj0MzsuV7OLrWDNuF0Ge0Nw6"
}],
"confirmations": 259,
"nextblockhash": "0x9f114a26f32d77d48700da77bb3f74df5204bdd2538f53cd97d843062c9af268"
}
}