chain_getFinalisedHead
Get hash of the last finalised block in the canon chain.
To retrieve the hash of the most recent finalized block in the canonical blockchain, use the chain_getFinalisedHead method. This feature is essential in situations where it's important to monitor the chain's eventual progression. Its lack of parameters makes obtaining the hash of the most recent finished block easier.
Example Request and Result for chain_getFinalisedHead method
In this section, we provide an illustrative example of a request made to retrieve details contents using the chain_getFinalisedHead
method. Additionally, we present the resulting response containing information about the block hash for a specified block.
Parameters
- none
The example in this section uses a non-existing project id.
Make sure you replace it with your Vara Mainnet endpoint when issuing the API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
Get hash of the last finalised block in the canon chain.
POST
https://vara-mainnet.blastapi.io/<project-id>
Request Body
Name | Type | Description |
---|---|---|
blocknumber* | string | 5419126 |
- 200: OK Expand for a detailed response example
{
"jsonrpc": "2.0",
"result": "0x39796abd1503188bdd9f0c82591863cab5bd24db3d263dae69c67a4c01cbedd7",
"id": 1
}
Curl Request example
curl --location 'https://vara-mainnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "chain_getFinalisedHead",
"params": ["5419126"],
"id": 1
}'