Add note for ledger_data API about type field (#1819)

* add note for `ledger_data` about `type`

* Revise to give more clarity on whats happening
This commit is contained in:
Shawn Xie
2023-04-13 13:57:00 -04:00
committed by GitHub
parent 4c01a5dbf7
commit 6e7a8b8ad3

View File

@@ -251,6 +251,8 @@ The response follows the [standard format][], with a successful result containin
| `state` | Array | Array of JSON objects containing data from the ledger's state tree, as defined below. | | `state` | Array | Array of JSON objects containing data from the ledger's state tree, as defined below. |
| `marker` | [Marker][] | Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. | | `marker` | [Marker][] | Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. |
If a `type` field is mentioned in the request, the `state` array will be empty if the first set of array objects does not match the type requested. In such cases, you can use the `marker` from this response to paginate and retrieve further data.
The format of each object in the `state` array depends on whether `binary` was set to true or not in the request. Each `state` object may include the following fields: The format of each object in the `state` array depends on whether `binary` was set to true or not in the request. Each `state` object may include the following fields:
| `Field` | Type | Description | | `Field` | Type | Description |