mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
headings, includes, blurbs
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
## ledger
|
||||
# ledger
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerHandler.cpp "Source")
|
||||
|
||||
Retrieve information about the public ledger.
|
||||
|
||||
#### Request Format
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
@@ -70,7 +70,7 @@ The request can contain the following parameters:
|
||||
|
||||
The `ledger` field is deprecated and may be removed without further notice.
|
||||
|
||||
#### Response Format
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
@@ -188,9 +188,15 @@ If the request specified `"owner_funds": true` and expanded transactions, the re
|
||||
|:--------------|:-------|:----------------------------------------------------|
|
||||
| `owner_funds` | String | Numeric amount of the `TakerGets` currency that the `Account` sending this OfferCreate transaction has after the execution of all transactions in this ledger. This does not check whether the currency amount is [frozen](concept-freeze.html). |
|
||||
|
||||
#### Possible Errors
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types](#universal-errors).
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
|
||||
* `noPermission` - If you specified `full` or `accounts` as true, but are not connected to the server as an admin (usually, admin requires connecting on a local port).
|
||||
|
||||
|
||||
<!-- TODO: we should add this fee levels link to rippled-api-links.md. server_state.md is also including this as a one-off.-->
|
||||
[fee levels]: concept-transaction-cost.html#fee-levels
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
## ledger_closed
|
||||
# ledger_closed
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerClosed.cpp "Source")
|
||||
|
||||
The `ledger_closed` method returns the unique identifiers of the most recently closed ledger. (This ledger is not necessarily validated and immutable yet.)
|
||||
|
||||
#### Request Format
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
@@ -41,7 +41,7 @@ rippled ledger_closed
|
||||
|
||||
This method accepts no parameters.
|
||||
|
||||
#### Response Format
|
||||
## Response Format
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
@@ -82,6 +82,10 @@ The response follows the [standard format](#response-formatting), with a success
|
||||
| `ledger_hash` | String | 20-byte hex string with a unique hash of the ledger |
|
||||
| `ledger_index` | Unsigned Integer | Sequence number of this ledger |
|
||||
|
||||
#### Possible Errors
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types](#universal-errors).
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
## ledger_current
|
||||
# ledger_current
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerCurrent.cpp "Source")
|
||||
|
||||
The `ledger_current` method returns the unique identifiers of the current in-progress ledger. This command is mostly useful for testing, because the ledger returned is still in flux.
|
||||
|
||||
#### Request Format
|
||||
## Request Format
|
||||
|
||||
An example of the request format:
|
||||
|
||||
@@ -43,7 +43,7 @@ rippled ledger_current
|
||||
The request contains no parameters.
|
||||
|
||||
|
||||
#### Response Format
|
||||
## Response Format
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
@@ -83,6 +83,10 @@ The response follows the [standard format](#response-formatting), with a success
|
||||
|
||||
A `ledger_hash` field is not provided, because the hash of the current ledger is constantly changing along with its contents.
|
||||
|
||||
#### Possible Errors
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types](#universal-errors).
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
## ledger_data
|
||||
# ledger_data
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerData.cpp "Source")
|
||||
|
||||
The `ledger_data` method retrieves contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version.
|
||||
|
||||
#### Request Format
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
@@ -52,7 +52,7 @@ A request can include the following fields:
|
||||
|
||||
The `ledger` field is deprecated and may be removed without further notice.
|
||||
|
||||
#### Response Format
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
@@ -250,8 +250,12 @@ The format of each object in the `state` array depends on whether `binary` was s
|
||||
| (Additional fields) | (Various) | (Only included if `"binary":false`) Additional fields describing this object, depending on which LedgerEntryType it is. |
|
||||
| `index` | String | Unique identifier for this ledger entry, as hex. |
|
||||
|
||||
#### Possible Errors
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types](#universal-errors)
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## ledger_entry
|
||||
# ledger_entry
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerEntry.cpp "Source")
|
||||
|
||||
The `ledger_entry` method returns a single ledger object from the XRP Ledger in its raw format. See [ledger format][] for information on the different types of objects you can retrieve.
|
||||
|
||||
**Note:** There is no commandline version of this method. You can use the [`json` command](#json) to access this method from the commandline instead.
|
||||
|
||||
#### Request Format
|
||||
## Request Format
|
||||
|
||||
An example of the request format:
|
||||
|
||||
@@ -74,7 +74,7 @@ The full list of parameters recognized by this method is as follows:
|
||||
|
||||
The `generator` and `ledger` parameters are deprecated and may be removed without further notice.
|
||||
|
||||
#### Response Format
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
@@ -140,8 +140,14 @@ The response follows the [standard format](#response-formatting), with a success
|
||||
| `node` | Object | (Omitted if `"binary": true` specified.) Object containing the data of this ledger object, according to the [ledger format][]. |
|
||||
| `node_binary` | String | (Omitted unless `"binary":true` specified) Binary data of the ledger object, as hex. |
|
||||
|
||||
#### Possible Errors
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types](#universal-errors).
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
|
||||
|
||||
|
||||
<!-- TODO: we should add this ledger format link to rippled-api-links.md. account_objects.md is also including this as a one-off.-->
|
||||
[ledger format]: reference-ledger-format.html
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
|
||||
Reference in New Issue
Block a user