slotsUpdatesSubscribe RPCメソッド
validatorからslotごとの様々な更新に関する通知を受け取るためにサブスクライブします
このサブスクリプションは不安定です。このサブスクリプションの形式は将来変更される可能性があり、常にサポートされるとは限りません。
{"jsonrpc": "2.0","id": 1,"method": "slotsUpdatesSubscribe"}
params
Noneresult
Response
{"jsonrpc": "2.0","result": 0,"id": 1}
integer
サブスクリプションID(サブスクリプション解除に必要)
通知フォーマット
通知は以下のフィールドを持つオブジェクトになります:
err: <string|undefined>
- エラーメッセージ。更新タイプが「dead」の場合のみ存在します。parent: <u64|undefined>
- 親slot。更新タイプが「createdBank」の場合のみ存在します。slot: <u64>
- 新しく更新されたslotstats: <object|undefined>
- エラーメッセージ。更新タイプが「frozen」の場合のみ存在します。以下のフィールドを持つオブジェクト:maxTransactionsPerEntry: <u64>
,numFailedTransactions: <u64>
,numSuccessfulTransactions: <u64>
,numTransactionEntries: <u64>
,
timestamp: <i64>
- 更新のUnixタイムスタンプ(ミリ秒)type: <string>
- 更新タイプ、以下のいずれか:- "firstShredReceived"
- "completed"
- "createdBank"
- "frozen"
- "dead"
- "optimisticConfirmation"
- "root"
{"jsonrpc": "2.0","method": "slotsUpdatesNotification","params": {"result": {"parent": 75,"slot": 76,"timestamp": 1625081266243,"type": "optimisticConfirmation"},"subscription": 0}}
Is this page helpful?