diff --git a/docs/sdk-and-tools/rest-api/ws-subscriptions.md b/docs/sdk-and-tools/rest-api/ws-subscriptions.md index d89e5070..bd0f1d44 100644 --- a/docs/sdk-and-tools/rest-api/ws-subscriptions.md +++ b/docs/sdk-and-tools/rest-api/ws-subscriptions.md @@ -248,6 +248,7 @@ main().catch(console.error); ```json { + "status": "success", "pool": [ { "txHash": "0b0cd3932689c6853e50ccc0f49feeb9c5f2a68858cbd213fd0825dd4bc0632b", @@ -258,7 +259,39 @@ main().catch(console.error); "type": "Transaction" } ], - "poolCount": 1902 + "poolCount": 1902 +} +``` + +#### Update fields + +| Field | Type | Description | +|-----------|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| +| status | `"success" \| "tooLarge" \| "internalServerError"` | `success` when `pool` holds the transactions, `tooLarge` when the pool is too large to be sent, `internalServerError` when the pool could not be read. | +| pool | array \| null | The transactions in the pool for the requested page and type. `null` when `status` is not `success`. | +| poolCount | number \| null | The number of transactions in the pool for the requested type. When `status` is not `success`, the total count of the pool, regardless of `type`, or `null` when it could not be counted either. | + +#### Pool too large + +When the pool is too large to be read, the update carries no transactions, only the total count of the pool. Clients should show that the pool is too large to be displayed instead of the list. + +```json +{ + "status": "tooLarge", + "pool": null, + "poolCount": 58213 +} +``` + +#### Pool unavailable + +When the pool could not be read for any other reason, the update carries no transactions, only the total count of the pool, or `null` when it could not be counted either. + +```json +{ + "status": "internalServerError", + "pool": null, + "poolCount": 58213 } ```