slotSubscribe RPC 方法
订阅以在验证器处理 slot 时接收通知
{"jsonrpc": "2.0","id": 1,"method": "slotSubscribe"}
params
Noneresult
Response
{"jsonrpc": "2.0","result": 0,"id": 1}
integer
订阅 ID(用于取消订阅)
通知格式:
通知将是一个包含以下字段的对象:
parent: <u64>
- 父 slotroot: <u64>
- 当前根 slotslot: <u64>
- 新设置的 slot 值
示例:
{"jsonrpc": "2.0","method": "slotNotification","params": {"result": {"parent": 75,"root": 44,"slot": 76},"subscription": 0}}
Is this page helpful?