Skip to main content

chain_getFinalizedHead - JSON-RPC Method

Description#

Returns the hash of the most recently finalized block on Enjin Matrix. Use this hash when reading historical state or verifying finality-sensitive workflows such as NFT mint settlements and fuel tank crediting.

Parameters#

No parameters are required.

Returns#

FieldTypeDescription
resultstringHex-encoded hash of the latest finalized block

Request Example#

{
"jsonrpc": "2.0",
"method": "chain_getFinalizedHead",
"params": [],
"id": 1
}

Response Example#

{
"jsonrpc": "2.0",
"result": "0x1873093eade39aa409f64537dd972c27156e4691fc0fda227a06d50c52ad5fef",
"id": 1
}

Code Examples#

curl https://api-enjin-matrixchain.n.dwellir.com/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "chain_getFinalizedHead",
"params": [],
"id": 1
}'

Best Practices#

  • Combine this hash with chain_getHeader to extract the finalized block number for monitoring dashboards.
  • Supply the finalized hash to state_getStorage when reading historical state snapshots.
  • For canary environments, expect different hashes and block cadence; always derive the value at runtime.