Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion docs/sdk-and-tools/rest-api/ws-subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ main().catch(console.error);

```json
{
"status": "success",
"pool": [
{
"txHash": "0b0cd3932689c6853e50ccc0f49feeb9c5f2a68858cbd213fd0825dd4bc0632b",
Expand All @@ -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
}
```

Expand Down
Loading