Subscribe to receive a notification from the validator on a variety of updates on every slot.
On ThorNode
Send over the complete wss:// URL copied from the dashboard. Each active subscription counts toward the per-token cap; over the cap the request is answered with -32005 subscription limit exceeded and not forwarded. Frames pass through unchanged.
Parameters
The notification will be an object with the following fields:
err: <string|undefined> - The error message. Only present if the update is of type “dead”.
parent: <u64|undefined> - The parent slot. Only present if the update is of type “createdBank”.
slot: <u64> - The newly updated slot
stats: <object|undefined> - Only present if the update is of type “frozen”. An object with the following fields:
maxTransactionsPerEntry: <u64>
numFailedTransactions: <u64>
numSuccessfulTransactions: <u64>
numTransactionEntries: <u64>
timestamp: <i64> - The Unix timestamp of the update in milliseconds
type: <string> - The update type, one of:
- “firstShredReceived”
- “completed”
- “createdBank”
- “frozen”
- “dead”
- “optimisticConfirmation”
- “root”
Response
Subscription id (needed to unsubscribe)