Merge branch 'master' into api-v2

This commit is contained in:
oeggert
2024-11-19 11:52:26 -08:00
committed by GitHub
764 changed files with 2331 additions and 6115 deletions

View File

@@ -158,7 +158,7 @@ rippled json ledger_entry '{ "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59
### Get AMM Object
_(Requires the [AMM amendment][])_
_(Added by the [AMM amendment][])_
Retrieve an Automated Market-Maker (AMM) object from the ledger. This is similar to [amm_info method][], but the `ledger_entry` version returns only the ledger entry as stored.
@@ -404,7 +404,7 @@ rippled json ledger_entry '{ "offer": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJY
### Get Oracle Object
_(Requires the [PriceOracle amendment][] {% not-enabled /%})_
_(Requires the [PriceOracle amendment][])_
Retrieve an [Oracle entry](../../../protocol/ledger-data/ledger-entry-types/oracle.md), which represents a single price oracle that can store token prices.

View File

@@ -1,6 +1,6 @@
---
seo:
description: Get information on
description: Get information on order book changes
labels:
- Decentralized Exchange
- Cross-Currency
@@ -20,7 +20,7 @@ An example of the request format:
```json
{
"id": "example_book_changes",
"command": "book_changes",
"command": "{% $frontmatter.seo.title %}",
"ledger_index": 88530953
}
```

View File

@@ -2,13 +2,12 @@
html: get_aggregate_price.html
parent: ledger-methods.html
blurb: Calculates the aggregate price of specified Oracle instances.
status: not_enabled
labels:
- Oracle
---
# get_aggregate_price
_(Requires the [PriceOracle amendment][] {% not-enabled /%})_
_(Requires the [PriceOracle amendment][])_
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/GetAggregatePrice.cpp "Source")

View File

@@ -74,8 +74,6 @@ An example of a successful response:
```json
200 OK
Headers
{
"result": {
"version": {

View File

@@ -41,7 +41,7 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
|:------------------------------|:----------|:------------------|:----------|:-------------|
| `Account` | String | AccountID | Yes | The identifying (classic) address of this [account](../../../../concepts/accounts/index.md). |
| `AccountTxnID` | String | Hash256 | No | The identifying hash of the transaction most recently sent by this account. This field must be enabled to use the [`AccountTxnID` transaction field](../../transactions/common-fields.md#accounttxnid). To enable it, send an [AccountSet transaction with the `asfAccountTxnID` flag enabled](../../transactions/types/accountset.md#accountset-flags). |
| `AMMID` | String | Hash256 | No | _(Requires the [AMM amendment][])_ The ledger entry ID of the corresponding AMM ledger entry. Set during account creation; cannot be modified. If present, indicates that this is a special AMM AccountRoot; always omitted on non-AMM accounts. |
| `AMMID` | String | Hash256 | No | _(Added by the [AMM amendment][])_ The ledger entry ID of the corresponding AMM ledger entry. Set during account creation; cannot be modified. If present, indicates that this is a special AMM AccountRoot; always omitted on non-AMM accounts. |
| `Balance` | String | Amount | No | The account's current [XRP balance in drops][XRP, in drops], represented as a string. |
| `BurnedNFTokens` | Number | UInt32 | No | How many total of this account's issued [non-fungible tokens](../../../../concepts/tokens/nfts/index.md) have been burned. This number is always equal or less than `MintedNFTokens`. |
| `Domain` | String | Blob | No | A domain associated with this account. In JSON, this is the hexadecimal for the ASCII representation of the domain. [Cannot be more than 256 bytes in length.](https://github.com/xrplf/rippled/blob/55dc7a252e08a0b02cd5aa39e9b4777af3eafe77/src/ripple/app/tx/impl/SetAccount.h#L34) |
@@ -64,7 +64,7 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
## Special AMM AccountRoot Entries
_(Requires the [AMM amendment][])_
_(Added by the [AMM amendment][])_
Automated Market Makers use an AccountRoot ledger entry to issue their LP Tokens and hold the assets in the AMM pool, and an [AMM ledger entry](amm.md) for tracking some of the details of the AMM. The address of an AMM's AccountRoot is randomized so that users cannot identify and fund the address in advance of the AMM being created. Unlike normal accounts, AMM AccountRoot objects are created with the following settings:

View File

@@ -9,7 +9,7 @@ labels:
# AMM
[[Source]](https://github.com/XRPLF/rippled/blob/89780c8e4fd4d140fcb912cf2d0c01c1b260539e/src/ripple/protocol/impl/LedgerFormats.cpp#L272-L284 "Source")
_(Requires the [AMM amendment][])_
_(Added by the [AMM amendment][])_
An `AMM` ledger entry describes a single [Automated Market Maker](../../../../concepts/tokens/decentralized-exchange/automated-market-makers.md) (AMM) instance. This is always paired with a [special AccountRoot entry](accountroot.md#special-amm-accountroot-entries).

View File

@@ -5,14 +5,13 @@ seo:
description: The definition and details of a Decentralized Identifier (DID).
labels:
- DID
status: not_enabled
---
# DID
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L330-L341 "Source")
_(Requires the [DID amendment][] {% not-enabled /%})_
_(Requires the [DID amendment][])_
A `DID` ledger entry holds references to, or data associated with, a single [DID](../../../../concepts/accounts/decentralized-identifiers.md).
A `DID` ledger entry holds references to, or data associated with, a single [DID](../../../../concepts/decentralized-storage/decentralized-identifiers.md).
## Example DID JSON

View File

@@ -1,6 +1,6 @@
# Oracle
_(Requires the [PriceOracle amendment][] {% not-enabled /%})_
_(Requires the [PriceOracle amendment][])_
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L353-L366 "Source")
@@ -59,7 +59,7 @@ A price oracle object can store information for up to 10 token pairs.
|---------------------|-----------|---------------|-----------|-------------|
| `BaseAsset` | String | Currency | Yes | The primary asset in a trading pair. Any valid identifier, such as a stock symbol, bond CUSIP, or currency code is allowed. |
| `QuoteAsset` | String | Currency | Yes | The quote asset in a trading pair. The quote asset denotes the price of one unit of the base asset. |
| `AssetPrice` | Number | UInt64 | No | The asset price after applying the `Scale` precision level. It's not included if the last update transaction didn't include the `BaseAsset`/`QuoteAsset` pair. |
| `AssetPrice` | String | UInt64 | No | The asset price after applying the `Scale` precision level. It's not included if the last update transaction didn't include the `BaseAsset`/`QuoteAsset` pair. Displayed in hexadecimal format. |
| `Scale` | Number | UInt8 | No | The scaling factor to apply to an asset price. For example, if `Scale` is 6 and original price is 0.155, then the scaled price is 155000. Valid scale ranges are 0-10. It's not included if the last update transaction didn't include the `BaseAsset`/`QuoteAsset` pair. |

View File

@@ -14,7 +14,7 @@ These codes indicate that the transaction was malformed, and cannot succeed acco
| Code | Explanation |
|:------------------------------|:----------------------------------------------|
| `temBAD_AMM_TOKENS` | The transaction incorrectly specified one or more assets. For example, the asset's issuer does not match the corresponding asset in the AMM's pool, or the transaction specified the same asset twice. _(Requires the [AMM amendment][])_ |
| `temBAD_AMM_TOKENS` | The transaction incorrectly specified one or more assets. For example, the asset's issuer does not match the corresponding asset in the AMM's pool, or the transaction specified the same asset twice. _(Added by the [AMM amendment][])_ |
| `temBAD_AMOUNT` | An amount specified by the transaction (for example the destination `Amount` or `SendMax` values of a [Payment][]) was invalid, possibly because it was a negative number. |
| `temBAD_AUTH_MASTER` | The key used to sign this transaction does not match the master key for the account sending it, and the account does not have a [Regular Key](../../../../concepts/accounts/cryptographic-keys.md) set. |
| `temBAD_CURRENCY` | The transaction improperly specified a currency field. See [Specifying Currency Amounts][Currency Amount] for the correct format. |

View File

@@ -9,7 +9,7 @@ labels:
# AMMVote
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/impl/AMMVote.cpp "Source")
_(Requires the [AMM amendment][])_
_(Added by the [AMM amendment][])_
Vote on the trading fee for an [Automated Market Maker](../../../../concepts/tokens/decentralized-exchange/automated-market-makers.md) instance. Up to 8 accounts can vote in proportion to the amount of the AMM's LP Tokens they hold. Each new vote re-calculates the AMM's trading fee based on a weighted average of the votes.

View File

@@ -5,13 +5,12 @@ seo:
description: Delete a DID.
labels:
- DID
status: not_enabled
---
# DIDDelete
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/impl/DID.cpp "Source")
_(Requires the [DID amendment][] {% not-enabled /%})_
_(Requires the [DID amendment][])_
Delete the [DID ledger entry](../../ledger-data/ledger-entry-types/did.md) associated with the specified `Account` field.

View File

@@ -5,13 +5,12 @@ seo:
description: Create or update a DID.
labels:
- DID
status: not_enabled
---
# DIDSet
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/impl/DID.cpp "Source")
_(Requires the [DID amendment][] {% not-enabled /%})_
_(Requires the [DID amendment][])_
Creates a new [DID ledger entry](../../ledger-data/ledger-entry-types/did.md) or updates the fields of an existing one.

View File

@@ -4,10 +4,9 @@ parent: transaction-types.html
blurb: Delete an existing price oracle.
labels:
- Oracle
status: not_enabled
---
# OracleDelete
_(Requires the [PriceOracle amendment][] {% not-enabled /%})_
_(Requires the [PriceOracle amendment][])_
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/impl/DeleteOracle.cpp "Source")

View File

@@ -4,10 +4,9 @@ parent: transaction-types.html
blurb: Create or update an existing price oracle.
labels:
- Oracle
status: not_enabled
---
# OracleSet
_(Requires the [PriceOracle amendment][] {% not-enabled /%})_
_(Requires the [PriceOracle amendment][])_
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/impl/SetOracle.cpp "Source")
@@ -46,7 +45,7 @@ Creates a new `Oracle` ledger entry or updates the fields of an existing one, us
| `OracleDocumentID` | Number | UInt32 | Yes | A unique identifier of the price oracle for the `Account`. |
| `Provider` | String | Blob | Variable | An arbitrary value that identifies an oracle provider, such as Chainlink, Band, or DIA. This field is a string, up to 256 ASCII hex encoded characters (0x20-0x7E). This field is required when creating a new `Oracle` ledger entry, but is optional for updates. |
| `URI` | String | Blob | No | An optional Universal Resource Identifier to reference price data off-chain. This field is limited to 256 bytes. |
| `LastUpdateTime` | Number | UInt32 | Yes | The time the data was last updated, in [seconds since the Ripple Epoch][]. |
| `LastUpdateTime` | Number | UInt32 | Yes | The time the data was last updated, in seconds since the UNIX Epoch. |
| `AssetClass` | String | Blob | Variable | Describes the type of asset, such as "currency", "commodity", or "index". This field is a string, up to 16 ASCII hex encoded characters (0x20-0x7E). This field is required when creating a new `Oracle` ledger entry, but is optional for updates. |
| `PriceDataSeries` | Array | Array | Yes | An array of up to 10 `PriceData` objects, each representing the price information for a token pair. More than five `PriceData` objects require two owner reserves. |
@@ -56,9 +55,9 @@ Creates a new `Oracle` ledger entry or updates the fields of an existing one, us
| Field | JSON Type | Internal Type | Required? | Description |
|---------------------|-----------|---------------|-----------|-------------|
| `BaseAsset` | String | Currency | Yes | The primary asset in a trading pair. Any valid identifier, such as a stock symbol, bond CUSIP, or currency code is allowed. For example, in the BTC/USD pair, BTC is the base asset; in 912810RR9/BTC, 912810RR9 is the base asset. |
| `QuoteAsset` | String | Currency | Yes | The quote asset in a trading pair. The quote asset denotes the price of one unit of the base asset. For example, in the BTC/USD pair, USD is the quote asset; in 912810RR9/BTC, BTC is the quote asset. |
| `AssetPrice` | Number | UInt64 | No | The asset price after applying the `Scale` precision level. If it is not included, the PriceData object will be deleted. |
| `Scale` | Number | UInt8 | No | The scaling factor to apply to an asset price. For example, if `Scale` is 6 and original price is 0.155, then the scaled price is 155000. Valid scale ranges are 0-10. The default value is 0. |
| `QuoteAsset` | String | Currency | Yes | The quote asset in a trading pair. The quote asset denotes the price of one unit of the base asset. For example, in the BTC/USD pair, BTC is the base asset; in 912810RR9/BTC, 912810RR9 is the base asset. |
| `AssetPrice` | String | UInt64 | No | The asset price after applying the `Scale` precision level. It's not included if the last update transaction didn't include the `BaseAsset`/`QuoteAsset` pair. It's recommended you provide this value as a hexadecimal, but [client libraries](https://xrpl.org/docs/references#client-libraries) will accept decimal numbers and convert to hexadecimal strings. |
| `Scale` | Number | UInt8 | No | The scaling factor to apply to an asset price. For example, if `Scale` is 6 and original price is 0.155, then the scaled price is 155000. Valid scale ranges are 0-10. It's not included if the last update transaction didn't include the `BaseAsset`/`QuoteAsset` pair.|
`PriceData` is created or updated, following these rules: