Skip to main content

chain_subscribeNewHead RPC Method

Retrieves the latest header via subscription.

Updated on
Oct 4, 2023

chain_subscribeNewHead RPC Method

Parameters

subscription
string
Allows the client to manage the subscription

Returns

parentHash
string
The hash of the parent block header
number
string
The block number of the latest header
stateRoot
string
The hash of the state root of the latest header
extrinsicsRoot
string
The hash of the extrinsics root of the latest header
digest
object
An object containing additional information about the header, such as logs
logs
array
An array of log messages associated with the header
Request
1
wscat -c \
2
# wait for connection
3
{"id":1,"jsonrpc":"2.0","method":"chain_subscribeNewHead","params":[]}
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free