chain_getFinalizedHead

Get the cryptographic hash of the latest finalized block.

Use the chain_getFinalizedHead method to obtain the hash of the most recent finalized block in the canonical blockchain. When tracking the chain's ultimate progression is crucial, this tool is indispensable. Its absence of arguments facilitates getting the hash of the most recent completed block.

Example Request and Result for chain_getFinalizedHead method

In this section, we provide an illustrative example of a request made to retrieve details contents using the chain_getFinalizedHead 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 the cryptographic hash of the latest finalized block.

POST https://vara-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription

blocknumber*

string

5419126

{
    "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_getFinalizedHead",
    "params": ["5419126"],
    "id": 1
}'

Last updated