Skip to content

Commit

Permalink
apply reviewer suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
oeggert committed Jan 19, 2024
1 parent 1b32202 commit 1d610ea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ The commandline always uses the latest [API version](#api-versioning).

## API Versioning

The `rippled` server uses a single integer to identify the API version to use. Currently, there are two API versions: `1` and `2` [New in: rippled 2.0.0][]. Servers support a range of API versions, which it reports in the `version` API method. <!-- STYLE_OVERRIDE: will --> <!-- TODO: add a link when `version` method is documented. -->
The `rippled` server uses a single integer to identify the API version to use. Currently, there are two API versions: `1` and `2` [New in: rippled 2.0.0][]. The server reports the range of supported API versions in the `version` API method. <!-- STYLE_OVERRIDE: will --> <!-- TODO: add a link when `version` method is documented. -->

Separate API requests can use different API versions even on the same persistent connection. For example, if you connect WebSocket to a server that supports API versions 1 and 2, you can make a `server_info` request using API version 2 and then make another `server_info` request using API version 1 from the same connection.
Separate API requests can use different API versions even on the same persistent connection. For example, if you connect WebSocket to a server that supports API versions 1 and 2, you can make an `account_tx` request using API version 2 and then make another `account_tx` request using API version 1 from the same connection.

Future versions of `rippled` that introduce breaking changes will introduce a new API version 3.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The request contains the following parameters:
| `ledger_hash` | String | No | A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | Number or String | No | The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
| `queue` | Boolean | No | If `true`, return stats about [queued transactions](transaction-queue.html) sent by this account. Can only be used when querying for the data from the current open ledger. Not available from servers in [Reporting Mode][]. |
| `signer_lists` | Boolean | No | [API v1][]: If `true`, return any [SignerList objects](signerlist.html) associated with this account.<br>[API v2][]: Identical to v1, but also returns an `invalidParams` error if a non-boolean value is used. |
| `signer_lists` | Boolean | No | [API v1][]: If `true`, return any [SignerList objects](signerlist.html) associated with this account.<br>[API v2][]: Identical to v1, but also returns an `invalidParams` error if you provide a non-boolean value. |

The following fields are deprecated and should not be provided: `ident`, `ledger`, `strict`.

Expand Down Expand Up @@ -204,7 +204,7 @@ The response follows the [standard format][], with the result containing the req
|:-----------------------|:--------|:------------------------------------------|
| `account_data` | Object | The [AccountRoot ledger object](accountroot.html) with this account's information, as stored in the ledger. |
| `account_flags` | Object | The account's flag statuses (see below), based on the `Flags` field of the account. [New in: rippled 1.11.0][] |
| `signer_lists` | Array | [API v1][]: _(Omitted unless the request specified `signer_lists` and at least one SignerList is associated with the account.)_ Array of [SignerList ledger objects](signerlist.html) associated with this account for [Multi-Signing](multi-signing.html). Since an account can own at most one SignerList, this array must have exactly one member if it is present. The field is nested under `account_data`.<br>[API v2][]: Identical to API v1, but the field is returned in the root reponse instead. [Clio](https://github.com/XRPLF/clio) implements the API v2 behavior. |
| `signer_lists` | Array | [API v1][]: _(Omitted unless the request specified `signer_lists` and at least one SignerList is associated with the account.)_ Array of [SignerList ledger objects](signerlist.html) associated with this account for [Multi-Signing](multi-signing.html). Since an account can own at most one SignerList, this array must have exactly one member if it is present. The field is nested under `account_data`.<br>[API v2][]: Identical to API v1, but the field is returned in the root response instead. [Clio](https://github.com/XRPLF/clio) implements the API v2 behavior in all cases. |
| `ledger_current_index` | Integer | _(Omitted if `ledger_index` is provided instead)_ The [ledger index][] of the current in-progress ledger, which was used when retrieving this information. |
| `ledger_index` | Integer | _(Omitted if `ledger_current_index` is provided instead)_ The [ledger index][] of the ledger version used when retrieving this information. The information does not contain any changes from ledger versions newer than this one. |
| `queue_data` | Object | _(Omitted unless `queue` specified as `true` and querying the current open ledger.)_ Information about [queued transactions](transaction-cost.html#queued-transactions) sent by this account. This information describes the state of the local `rippled` server, which may be different from other servers in the [peer-to-peer XRP Ledger network](peer-protocol.html). Some fields may be omitted because the values are calculated "lazily" by the queuing mechanism. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ The request includes the following parameters:
| `ledger_index_max` | Integer | [API v1][]: _(Optional)_ Use to specify the most recent ledger to include transactions from. A value of `-1` instructs the server to use the most recent validated ledger version available.<br>[API v2][]: Identical to v1, but also returns a `lgrIdxMalformed` error if a value is specified beyond the range of ledgers the server has. |
| `ledger_hash` | String | _(Optional)_ Use to look for transactions from a single ledger only. (See [Specifying Ledgers][].) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ Use to look for transactions from a single ledger only. (See [Specifying Ledgers][].) |
| `binary` | Boolean | [API v1][]: _(Optional)_ Defaults to `false`. If set to `true`, returns transactions as hex strings instead of JSON.<br>[API v2][]: Identical to v1, but also returns an `invalidParams` error if a non-boolean value is used. |
| `forward` | Boolean | [API v1][]: _(Optional)_ Defaults to `false`. If set to `true`, returns values indexed with the oldest ledger first. Otherwise, the results are indexed with the newest ledger first. (Each page of results may not be internally ordered, but the pages are overall ordered.)<br>[API v2][]: Identical to v1, but also returns an `invalidParams` error if a non-boolean value is used. |
| `binary` | Boolean | [API v1][]: _(Optional)_ Defaults to `false`. If set to `true`, returns transactions as hex strings instead of JSON.<br>[API v2][]: Identical to v1, but also returns an `invalidParams` error if you provide a non-boolean value. |
| `forward` | Boolean | [API v1][]: _(Optional)_ Defaults to `false`. If set to `true`, returns values indexed with the oldest ledger first. Otherwise, the results are indexed with the newest ledger first. (Each page of results may not be internally ordered, but the pages are overall ordered.)<br>[API v2][]: Identical to v1, but also returns an `invalidParams` error if you provide a non-boolean value. |
| `limit` | Integer | _(Optional)_ Default varies. Limit the number of transactions to retrieve. The server is not required to honor this value. |
| `marker` | [Marker][] | Value from a previous paginated response. Resume retrieving data where that response left off. This value is stable even if there is a change in the server's range of available ledgers. |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The request includes the following parameters:
|:---------------|:---------------------------|:-------------------------------|
| `account` | String | A unique identifier for the account, most commonly the account's address. |
| `role` | String | Whether the address refers to a `gateway` or `user`. Recommendations depend on the role of the account. Issuers must have Default Ripple enabled and must disable No Ripple on all trust lines. Users should have Default Ripple disabled, and should enable No Ripple on all trust lines. |
| `transactions` | Boolean | [API v1][]: _(Optional)_ If `true`, include an array of suggested [transactions](transaction-formats.html), as JSON objects, that you can sign and submit to fix the problems. Defaults to false.<br>[API v2][]: Identical to v1, but also returns an `invalidParams` error if you use a non-boolean value. |
| `transactions` | Boolean | [API v1][]: _(Optional)_ If `true`, include an array of suggested [transactions](transaction-formats.html), as JSON objects, that you can sign and submit to fix the problems. The default is `false`.<br>[API v2][]: Identical to v1, but also returns an `invalidParams` error if you use a non-boolean value. |
| `limit` | Unsigned Integer | _(Optional)_ The maximum number of trust line problems to include in the results. Defaults to 300. |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
Expand Down
3 changes: 2 additions & 1 deletion content/references/protocol/transactions/types/payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Payments are also the only way to [create accounts](#creating-accounts).

| Field | JSON Type | [Internal Type][] | Description |
|:-----------------|:---------------------|:------------------|:---------------|
| `Amount` | [Currency Amount][] | Amount | [API v1][]: The maximum amount of currency to deliver. For non-XRP amounts, the nested field names MUST be lower-case. If the [`tfPartialPayment` flag](#payment-flags) is set, deliver _up to_ this amount instead.<br>[API v2][]: Field renamed to `DeliverMax`. |
| `Amount` | [Currency Amount][] | Amount | [API v1][]: Only available in API v1. The maximum amount of currency to deliver. For non-XRP amounts, the nested field names MUST be lower-case. If the [`tfPartialPayment` flag](#payment-flags) is set, deliver _up to_ this amount instead. |
| `DeliverMax` | [Currency Amount][] | Amount | [API v2][]: Only available in API v2. The maximum amount of currency to deliver. For non-XRP amounts, the nested field names MUST be lower-case. If the [`tfPartialPayment` flag](#payment-flags) is set, deliver _up to_ this amount instead. [New in: rippled 2.0.0][] |
| `DeliverMin` | [Currency Amount][] | Amount | _(Optional)_ Minimum amount of destination currency this transaction should deliver. Only valid if this is a [partial payment](partial-payments.html). For non-XRP amounts, the nested field names are lower-case. |
| `Destination` | String | AccountID | The unique address of the account receiving the payment. |
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay. |
Expand Down

0 comments on commit 1d610ea

Please sign in to comment.