rootSubscribe RPC Method
Subscribe to receive notification anytime a new root is set by the validator.
params
Noneresult
integer
subscription id (needed to unsubscribe)
Request
{"jsonrpc": "2.0","id": 1,"method": "rootSubscribe"}
Response
{"jsonrpc": "2.0","result": 0,"id": 1}
Request
{"jsonrpc": "2.0","id": 1,"method": "rootSubscribe"}
params
Noneresult
Response
{"jsonrpc": "2.0","result": 0,"id": 1}
integer
subscription id (needed to unsubscribe)
Notification Format:
The result is the latest root slot number.
{"jsonrpc": "2.0","method": "rootNotification","params": {"result": 42,"subscription": 0}}
Is this page helpful?