chain_getFinalizedHead - JSON-RPC Method
Description
Returns the hash of the most recently finalized block.
Code Examples
- cURL
- JavaScript
curl ${S.rpcBase} \
-X POST -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"chain_getFinalizedHead","params":[],"id":1}'
const res = await fetch('${S.rpcBase}', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', method: 'chain_getFinalizedHead', params: [], id: 1 })
});
const { result: hash } = await res.json();
console.log('Finalized head:', hash);