Skip to main content

chain_subscribeFinalizedHeads RPC method

The chain_subscribeFinalizedHeads method facilitates real-time tracking of the most recent finalized block headers. It establishes a subscription that continuously provides the header details of the latest finalized blocks. This is particularly useful for clients needing up-to-date blockchain information without constant polling.

Parameters

subscription string

Manages header update subscription.

Returns

parentHash string

Hash of the preceding block's header.

number string

Numerical position of the current block.

stateRoot string

State root hash of the current header.

extrinsicsRoot string

Root hash of the block's extrinsics.

digest object

Contains additional header details and logs.

logs array

Array of log entries related to the header.

Code Examples

wscat -c wss://api-polkadot.dwellir.com/<API-KEY> \
# wait for connection
{"id":1,"jsonrpc":"2.0","method":"chain_subscribeFinalizedHeads","params":[]}