From 5dcb714e9307bfae5063cb5ac3ba1219737da22d Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Fri, 17 Apr 2020 18:26:29 +0300 Subject: [PATCH] Update websockets.md --- docs/integration-guides/websockets.md | 54 ++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/docs/integration-guides/websockets.md b/docs/integration-guides/websockets.md index 577b9ee4f..cb6fd1306 100644 --- a/docs/integration-guides/websockets.md +++ b/docs/integration-guides/websockets.md @@ -119,6 +119,7 @@ Current topics available for subscribing to include: * `vote` (experimental, unfinished) * `stopped_election` * `active_difficulty` +* `bootstrap` --- @@ -503,4 +504,55 @@ Notes: - The duration is in milliseconds - If work generation fails, the notification is similar to the work cancelled notification, except `"reason": "failure"` -- When work generation is done locally it will show `"source": "local"` \ No newline at end of file +- When work generation is done locally it will show `"source": "local"` + +#### Bootstrap + +This subscription is available since _v21.0_ + +##### Subscribing + +To subscribe to bootstrap attempts start/exit notifications: + +```json +{ + "action": "subscribe", + "topic": "bootstrap" +} +``` + +##### Filtering options + +No filters are currently available for the `bootstrap` topic. + +##### Sample Results + +```json +{ + "topic": "bootstrap", + "time": "1561661740065", + "message": { + "reason": "started", + "id": "C9FF2347C4DF512A7F6B514CC4A0F79A", + "mode": "legacy" + } +} +``` + +```json +{ + "topic": "bootstrap", + "time": "1561661740565", + "message": { + "reason": "exited", + "id": "C9FF2347C4DF512A7F6B514CC4A0F79A", + "mode": "legacy", + "total_blocks": "1000000", + "duration": "500" + } +} +``` + +Notes: + +- The duration is in seconds