hmyv2_latestHeader

Parameters

None

Returns

  • blockHash - String - block hash

  • blockNumber - Number - block number

  • shardID - Number - shard id

  • leader - String - leader address

  • viewID - Number - current blockchain view of validators

  • epoch - Number - blockchain epoch

  • timestamp - Date - block generation timestamp date

  • unixtime - Number - block generation time in Unix time

  • lastCommitSig - String - BLS validators signature for the block

  • lastCommitBitmap - String - last commit bitmap for block signers

Example

//Request
curl --location --request POST 'http://<your-app-id>.ankr.com' --header 'Content-Type: application/json' --data-raw '{ "jsonrpc": "2.0", "id": 1, "method": "hmyv2_latestHeader", "params": [] }'
//Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x5c734391979ead6da16fdf475ddb8fd2773147f76b8a8998eaf8184c7542f427",
"blockNumber": 4708055,
"epoch": 265,
"lastCommitBitmap": "ffffffffffffffffffffffffffffffffffffffffffffffffffffff0fffff03",
"lastCommitSig": "fcbbaf4dee54ebafc8daddfce8ccce15a538d8aeba160dab24acb7886bb7fc0b64cdb7298c0f89da30c8b48f714f0813b1c05a2dda96f4e84e7d91cbd369fb2e588128f3fd0bb832f99c2c15cb58f95bcf5124e18ddee62775a17fd62d372092",
"leader": "one1xdnm2fj6hyk7e49af2h9dmudkdlta9q354094e",
"shardID": 2,
"timestamp": "2020-09-02 08:07:40 +0000 UTC",
"unixtime": 1599034060,
"viewID": 4708219
}
}