rootSubscribe RPC 方法

订阅以在 validator 设置新 root 时接收通知。

{
"jsonrpc": "2.0",
"id": 1,
"method": "rootSubscribe"
}

params

None

result

Response
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
integer

订阅 ID(用于取消订阅)

通知格式:

结果是最新的 root slot 编号。

{
"jsonrpc": "2.0",
"method": "rootNotification",
"params": {
"result": 42,
"subscription": 0
}
}

Is this page helpful?