mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 19:55:54 +00:00
Add transaction types to reorg
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
<!--{# Transaction reference common links #}-->
|
<!--{# Transaction reference common links #}-->
|
||||||
[Internal Type]: https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/SField.cpp
|
[Internal Type]: https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/SField.cpp
|
||||||
|
[common fields]: transaction-common-fields.html
|
||||||
|
|
||||||
{% set api_methods = [
|
{% set api_methods = [
|
||||||
"account_channels",
|
"account_channels",
|
||||||
|
|||||||
3
content/_snippets/tx-fields-intro.md
Normal file
3
content/_snippets/tx-fields-intro.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## {{currentpage.name}} Fields
|
||||||
|
|
||||||
|
In addition to the [common fields][], a {{currentpage.name}} transaction uses the following fields:
|
||||||
85
content/concepts/decentralized-exchange/offers.md
Normal file
85
content/concepts/decentralized-exchange/offers.md
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# Offers
|
||||||
|
|
||||||
|
In the XRP Ledger's decentralized exchange, orders to trade currency are called "Offers". Offers can trade XRP with issued currencies, or issued currencies with each other, including issued currencies with the same currency code but different issuers. (Currencies with the same code but different issuers can also sometimes be exchanged through [rippling](rippling.html).)
|
||||||
|
|
||||||
|
- To create an Offer, send an [OfferCreate transaction][].
|
||||||
|
- Offers that aren't fully filled immediately become [Offer objects](offer.html) in the ledger data. Later Offers and Payments can consume the Offer object from the ledger.
|
||||||
|
- [Cross-currency payments](cross-currency-payments.html) consume offers to provide liquidity.
|
||||||
|
|
||||||
|
## Lifecycle of an Offer
|
||||||
|
|
||||||
|
When an OfferCreate transaction is processed, it automatically consumes matching or crossing offers to the extent possible. (If existing offers provide a better rate than requested, the offer creator could pay less than the full `TakerGets` amount to receive the entire `TakerPays` amount.) If that does not completely fulfill the `TakerPays` amount, then the offer becomes an Offer object in the ledger. (You can use [OfferCreate Flags](offercreate.html#offercreate-flags) to modify this behavior.)
|
||||||
|
|
||||||
|
An offer in the ledger can be fulfilled either by additional OfferCreate transactions that match up with the existing offers, or by [Payment transactions][] that use the offer to connect the payment path. Offers can be partially fulfilled and partially funded. A single transaction can consume up to 850 Offers from the ledger. (Any more than that, and the metadata becomes too large, resulting in [`tecOVERSIZE`](#tec-codes).)
|
||||||
|
|
||||||
|
You can create an offer so long as you have at least some (any positive, nonzero amount) of the currency specified by the `TakerGets` parameter of the offer. The offer sells as much of the currency as you have, up to the `TakerGets` amount, until the `TakerPays` amount is satisfied. An offer cannot place anyone in debt.
|
||||||
|
|
||||||
|
It is possible for an offer to become temporarily or permanently _unfunded_:
|
||||||
|
|
||||||
|
* If the creator no longer has any of the `TakerGets` currency.
|
||||||
|
* The offer becomes funded again when the creator obtains more of that currency.
|
||||||
|
* If the currency required to fund the offer is held in a [frozen trust line](concept-freeze.html).
|
||||||
|
* The offer becomes funded again when the trust line is no longer frozen.
|
||||||
|
* If the creator does not have enough XRP for the reserve amount of a new trust line required by the offer. (See [Offers and Trust](#offers-and-trust).)
|
||||||
|
* The offer becomes funded again when the creator obtains more XRP, or the reserve requirements decrease.
|
||||||
|
* If the Expiration time included in the offer is before the close time of the most recently-closed ledger. (See [Expiration](#expiration).)
|
||||||
|
|
||||||
|
An unfunded offer can stay on the ledger indefinitely, but it does not have any effect. The only ways an offer can be *permanently* removed from the ledger are:
|
||||||
|
|
||||||
|
* It becomes fully claimed by a Payment or a matching OfferCreate transaction.
|
||||||
|
* An OfferCancel or OfferCreate transaction explicitly cancels the offer.
|
||||||
|
* An OfferCreate transaction from the same account crosses the earlier offer. (In this case, the older offer is automatically canceled.)
|
||||||
|
* An offer is found to be unfunded during transaction processing, typically because it was at the tip of the orderbook.
|
||||||
|
* This includes cases where one side or the other of an offer is found to be closer to 0 than `rippled`'s precision supports.
|
||||||
|
|
||||||
|
### Tracking Unfunded Offers
|
||||||
|
|
||||||
|
Tracking the funding status of all offers can be computationally taxing. In particular, addresses that are actively trading may have a large number of offers open. A single balance can affect the funding status of many offers to buy different currencies. Because of this, `rippled` does not proactively find and remove offers.
|
||||||
|
|
||||||
|
A client application can locally track the funding status of offers. To do this, first retreive an order book using the [book_offers method][] and check the `taker_gets_funded` field of offers. Then, [subscribe](reference-rippled.html#subscribe) to the `transactions` stream and watch the transaction metadata to see which offers are modified.
|
||||||
|
|
||||||
|
|
||||||
|
## Offers and Trust
|
||||||
|
|
||||||
|
The limit values of trust lines (See [TrustSet](#trustset)) do not affect offers. In other words, you can use an offer to acquire more than the maximum amount you trust an issuer to redeem.
|
||||||
|
|
||||||
|
However, holding non-XRP balances still requires a trust line to the address issuing those balances. When an offer is taken, it automatically creates any necessary trust lines, setting their limits to 0. Because [trust lines increase the reserve an account must hold](concept-reserves.html), any offers that would require a new trust line also require the address to have enough XRP to meet the reserve for that trust line.
|
||||||
|
|
||||||
|
A trust line indicates an issuer you trust enough to accept their issuances as payment, within limits. Offers are explicit instructions to acquire certain issuances, so they are allowed to go beyond those limits.
|
||||||
|
|
||||||
|
## Offer Preference
|
||||||
|
|
||||||
|
Existing offers are grouped by exchange rate (sometimes called "offer quality"), which is measured as the ratio between `TakerGets` and `TakerPays`. Offers with a higher exchange rate are taken preferentially. (That is, the person accepting the offer receives as much as possible for the amount of currency they pay out.) Offers with the same exchange rate are taken on the basis of which offer was placed in the earliest ledger version.
|
||||||
|
|
||||||
|
When offers of the same exchange rate are placed in the same ledger version, the order in which they are taken is determined by the [canonical order](https://github.com/ripple/rippled/blob/release/src/ripple/app/misc/CanonicalTXSet.cpp "Source: Transaction ordering") in which the transactions were [applied to the ledger](https://github.com/ripple/rippled/blob/5425a90f160711e46b2c1f1c93d68e5941e4bfb6/src/ripple/app/consensus/LedgerConsensus.cpp#L1435-L1538 "Source: Applying transactions"). This behavior is designed to be deterministic, efficient, and hard to game.
|
||||||
|
|
||||||
|
### TickSize
|
||||||
|
|
||||||
|
_Requires the [TickSize amendment](reference-amendments.html#ticksize)._
|
||||||
|
|
||||||
|
When an Offer is placed into an order book, its exchange rate is truncated based on the `TickSize` values set by the issuers of the currencies involved in the Offer. When a trader offers to exchange XRP and an issued currency, the `TickSize` from the issuer of the currency applies. When a trader offers to exchange two issued currencies, the offer uses the smaller `TickSize` value (that is, the one with fewer significant digits). If neither currency has a `TickSize` set, the default behavior applies.
|
||||||
|
|
||||||
|
The `TickSize` value truncates the number of _significant digits_ in the exchange rate of an offer when it gets placed in an order book. Issuers can set `TickSize` to an integer from `3` to `15` using an [AccountSet transaction][]. The exchange rate is represented as significant digits and an exponent; the `TickSize` does not affect the exponent. This allows the XRP Ledger to represent exchange rates between assets that vary greatly in value (for example, a hyperinflated currency compared to a rare commodity). The lower the `TickSize` an issuer sets, the larger the increment traders must offer to be considered a higher exchange rate than the existing Offers.
|
||||||
|
|
||||||
|
The `TickSize` does not affect the part of an Offer that can be executed immediately. (For that reason, OfferCreate transactions with `tfImmediateOrCancel` are unaffected by `TickSize` values.) If the Offer cannot be fully executed, the transaction processing engine calculates the exchange rate and truncates it based on `TickSize`. Then, the engine rounds the remaining amount of the Offer from the "less important" side to match the truncated exchange rate. For a default OfferCreate transaction (a "buy" Offer), the `TakerPays` amount (the amount being bought) gets rounded. If the `tfSell` flag is enabled (a "sell" Offer) the `TakerGets` amount (the amount being sold) gets rounded.
|
||||||
|
|
||||||
|
When an issuer enables, disables, or changes the `TickSize`, Offers that were placed under the previous setting are unaffected.
|
||||||
|
|
||||||
|
|
||||||
|
## Expiration
|
||||||
|
|
||||||
|
Since transactions can take time to propagate and confirm, the timestamp of a ledger is used to determine offer validity. An offer only expires when its Expiration time is before the most-recently validated ledger. In other words, an offer with an `Expiration` field is still considered "active" if its expiration time is later than the timestamp of the most-recently validated ledger, regardless of what your local clock says.
|
||||||
|
|
||||||
|
You can determine the final disposition of an offer with an `Expiration` as soon as you see a fully-validated ledger with a close time equal to or greater than the expiration time.
|
||||||
|
|
||||||
|
**Note:** Since only new transactions can modify the ledger, an expired offer can stay on the ledger after it becomes inactive. The offer is treated as unfunded and has no effect, but it can continue to appear in results (for example, from the [ledger_entry](reference-rippled.html#ledger-entry) command). Later on, the expired offer can get finally deleted as a result of another transaction (such as another OfferCreate) if the server finds it while processing.
|
||||||
|
|
||||||
|
If an OfferCreate transaction has an `Expiration` time that has already passed when the transaction first gets included in a ledger, the transaction does not execute the offer. The result code of such a transaction depends on whether the [Checks amendment](reference-amendments.html#checks) is enabled. With the Checks amendment enabled, the transaction has the `tecEXPIRED` result code. Otherwise, the transaction has the `tesSUCCESS` transaction code. In either case, the transaction has no effect except to destroy the XRP paid as a [transaction cost](concept-transaction-cost.html).
|
||||||
|
|
||||||
|
## Auto-Bridging
|
||||||
|
|
||||||
|
Any OfferCreate that would exchange two non-XRP currencies could potentially use XRP as an intermediary currency in a synthetic order book. This is because of auto-bridging, which serves to improve liquidity across all currency pairs by using XRP as a vehicle currency. This works because of XRP's nature as a native cryptocurrency to the XRP Ledger. Offer execution can use a combination of direct and auto-bridged offers to achieve the best total exchange rate.
|
||||||
|
|
||||||
|
Example: _Anita places an offer to sell GBP and buy BRL. She might find that this uncommon currency market has few offers. There is one offer with a good rate, but it has insufficient quantity to satisfy Anita's trade. However, both GBP and BRL have active, competitive markets to XRP. Auto-bridging software finds a way to complete Anita's offer by purchasing XRP with GBP from one trader, then selling the XRP to another trader to buy BRL. Anita automatically gets the best rate possible by combining the small offer in the direct GBP:BRL market with the better composite rates created by pairing GBP:XRP and XRP:BRL offers._
|
||||||
|
|
||||||
|
Auto-bridging happens automatically on any OfferCreate transaction. [Payment transactions](#payment) _do not_ autobridge by default, but path-finding can find paths that have the same effect.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
## EnableAmendment
|
# EnableAmendment
|
||||||
|
|
||||||
Tracks the progress of the [amendment process](concept-amendments.html#amendment-process) for changes in transaction processing. This can indicate that a proposed amendment gained or lost majority approval, or that an amendment has been enabled.
|
Tracks the progress of the [amendment process](concept-amendments.html#amendment-process) for changes in transaction processing. This can indicate that a proposed amendment gained or lost majority approval, or that an amendment has been enabled.
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ Tracks the progress of the [amendment process](concept-amendments.html#amendment
|
|||||||
| Amendment | String | Hash256 | A unique identifier for the amendment. This is not intended to be a human-readable name. See [Amendments](concept-amendments.html) for a list of known amendments. |
|
| Amendment | String | Hash256 | A unique identifier for the amendment. This is not intended to be a human-readable name. See [Amendments](concept-amendments.html) for a list of known amendments. |
|
||||||
| LedgerSequence | Number | UInt32 | The index of the ledger version where this amendment appears. This distinguishes the pseudo-transaction from other occurrences of the same change. |
|
| LedgerSequence | Number | UInt32 | The index of the ledger version where this amendment appears. This distinguishes the pseudo-transaction from other occurrences of the same change. |
|
||||||
|
|
||||||
### EnableAmendment Flags
|
## EnableAmendment Flags
|
||||||
|
|
||||||
The `Flags` value of the EnableAmendment pseudo-transaction indicates the status of the amendment at the time of the ledger including the pseudo-transaction.
|
The `Flags` value of the EnableAmendment pseudo-transaction indicates the status of the amendment at the time of the ledger including the pseudo-transaction.
|
||||||
|
|
||||||
@@ -19,3 +19,8 @@ A `Flags` value of `0` (no flags) indicates that the amendment has been enabled,
|
|||||||
|:---------------|:-----------|:--------------|:-------------------------------|
|
|:---------------|:-----------|:--------------|:-------------------------------|
|
||||||
| tfGotMajority | 0x00010000 | 65536 | Support for this amendment increased to at least 80% of trusted validators starting with this ledger version. |
|
| tfGotMajority | 0x00010000 | 65536 | Support for this amendment increased to at least 80% of trusted validators starting with this ledger version. |
|
||||||
| tfLostMajority | 0x00020000 | 131072 | Support for this amendment decreased to less than 80% of trusted validators starting with this ledger version. |
|
| tfLostMajority | 0x00020000 | 131072 | Support for this amendment decreased to less than 80% of trusted validators starting with this ledger version. |
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Pseudo-Transactions
|
||||||
|
|
||||||
|
Pseudo-Transactions are never submitted by users, nor propagated through the network. Instead, a server may choose to inject them in a proposed ledger directly. If enough servers inject an equivalent pseudo-transaction for it to pass consensus, then it becomes included in the ledger, and appears in ledger data thereafter.
|
||||||
|
|
||||||
|
Some of the fields that are mandatory for normal transactions do not make sense for pseudo-transactions. In those cases, the pseudo-transaction has the following default values:
|
||||||
|
|
||||||
|
| Field | Default Value |
|
||||||
|
|:--------------|:---------------------------------------------------------|
|
||||||
|
| Account | [ACCOUNT_ZERO](concept-accounts.html#special-addresses) |
|
||||||
|
| Sequence | 0 |
|
||||||
|
| Fee | 0 |
|
||||||
|
| SigningPubKey | "" |
|
||||||
|
| Signature | "" |
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
## SetFee
|
# SetFee
|
||||||
|
|
||||||
A change in [transaction cost](concept-transaction-cost.html) or [account reserve](concept-reserves.html) requirements as a result of [Fee Voting](concept-fee-voting.html).
|
A change in [transaction cost](concept-transaction-cost.html) or [account reserve](concept-reserves.html) requirements as a result of [Fee Voting](concept-fee-voting.html).
|
||||||
|
|
||||||
@@ -28,3 +28,8 @@ A change in [transaction cost](concept-transaction-cost.html) or [account reserv
|
|||||||
| ReserveBase | Unsigned Integer | UInt32 | The base reserve, in drops |
|
| ReserveBase | Unsigned Integer | UInt32 | The base reserve, in drops |
|
||||||
| ReserveIncrement | Unsigned Integer | UInt32 | The incremental reserve, in drops |
|
| ReserveIncrement | Unsigned Integer | UInt32 | The incremental reserve, in drops |
|
||||||
| LedgerSequence | Number | UInt32 | The index of the ledger version where this pseudo-transaction appears. This distinguishes the pseudo-transaction from other occurrences of the same change. |
|
| LedgerSequence | Number | UInt32 | The index of the ledger version where this pseudo-transaction appears. This distinguishes the pseudo-transaction from other occurrences of the same change. |
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
@@ -1,13 +1,5 @@
|
|||||||
# Transactions Overview
|
# Transactions Overview
|
||||||
|
|
||||||
A _Transaction_ is the only way to modify the XRP Ledger. Transactions are only valid if signed, submitted, and accepted into a validated ledger version following the [consensus process](https://ripple.com/build/ripple-ledger-consensus-process/). Some ledger rules also generate _[pseudo-transactions](#pseudo-transactions)_, which aren't signed or submitted, but still must be accepted by consensus. Transactions that fail are also included in ledgers because they modify balances of XRP to pay for the anti-spam [transaction cost](concept-transaction-cost.html).
|
|
||||||
|
|
||||||
* [Authorizing Transactions](#authorizing-transactions)
|
|
||||||
* [Common Fields of All Transactions](#common-fields)
|
|
||||||
* [Transaction Types](#transaction-types)
|
|
||||||
* [Reliable Transaction Submission](#reliable-transaction-submission)
|
|
||||||
* [Transaction Results - How to find and interpret transaction results](#transaction-results)
|
|
||||||
* [Full Transaction Response List - Complete table of all error codes](#full-transaction-response-list)
|
|
||||||
|
|
||||||
## Authorizing Transactions
|
## Authorizing Transactions
|
||||||
|
|
||||||
@@ -303,24 +295,9 @@ _Pseudo-Transactions_ that are not created and submitted in the usual way, but m
|
|||||||
{% include 'transactions/trustset.md' %}
|
{% include 'transactions/trustset.md' %}
|
||||||
|
|
||||||
|
|
||||||
# Pseudo-Transactions
|
|
||||||
|
|
||||||
Pseudo-Transactions are never submitted by users, nor propagated through the network. Instead, a server may choose to inject them in a proposed ledger directly. If enough servers inject an equivalent pseudo-transaction for it to pass consensus, then it becomes included in the ledger, and appears in ledger data thereafter.
|
|
||||||
|
|
||||||
Some of the fields that are mandatory for normal transactions do not make sense for pseudo-transactions. In those cases, the pseudo-transaction has the following default values:
|
|
||||||
|
|
||||||
| Field | Default Value |
|
|
||||||
|:--------------|:---------------------------------------------------------|
|
|
||||||
| Account | [ACCOUNT_ZERO](concept-accounts.html#special-addresses) |
|
|
||||||
| Sequence | 0 |
|
|
||||||
| Fee | 0 |
|
|
||||||
| SigningPubKey | "" |
|
|
||||||
| Signature | "" |
|
|
||||||
|
|
||||||
|
|
||||||
{% include 'transactions/enableamendment.md' %}
|
|
||||||
|
|
||||||
{% include 'transactions/setfee.md' %}
|
|
||||||
|
|
||||||
|
|
||||||
# Transaction Results
|
# Transaction Results
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
# Transaction Formats
|
# Transaction Formats
|
||||||
|
|
||||||
Transactions are the only way to modify the XRP Ledger. Get details about their required format.
|
A _Transaction_ is the only way to modify the XRP Ledger. Transactions are only final if signed, submitted, and accepted into a validated ledger version following the [consensus process](consensus.html). Some ledger rules also generate _[pseudo-transactions](#pseudo-transactions)_, which aren't signed or submitted, but still must be accepted by consensus. Transactions that fail are also included in ledgers because they modify balances of XRP to pay for the anti-spam [transaction cost][].
|
||||||
|
|
||||||
* **[Transaction Common Fields](transaction-common-fields.html)**
|
|
||||||
<!--{# TODO: provide overview text of what this content is all about #}-->
|
|
||||||
|
|
||||||
* **[Transaction Types](transaction-types.html)**
|
<!--{# common link defs #}-->
|
||||||
<!--{# TODO: provide overview text of what this content is all about #}-->
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
* **[Transaction Results](transaction-results.html)**
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
<!--{# TODO: provide overview text of what this content is all about #}-->
|
|
||||||
|
|
||||||
<!--{# TODO: This page may need to catch overflow of any doc from https://developers.ripple.com/reference-transaction-format.html that hasn't been moved out to other docs, such as tutorials and more granular reference docs. If yes - need to adjust presentation of links to child pages above because they may look like anchor links to topics on the page and cause confusion. Ideally, we'd provide another page in this hierarchy that reflects the content in the overflow. #}-->
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
## AccountSet
|
# AccountSet
|
||||||
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/f65cea66ef99b1de149c02c15f06de6c61abf360/src/ripple/app/transactors/SetAccount.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/f65cea66ef99b1de149c02c15f06de6c61abf360/src/ripple/app/transactors/SetAccount.cpp "Source")
|
||||||
|
|
||||||
An AccountSet transaction modifies the properties of an [account in the XRP Ledger](reference-ledger-format.html#accountroot).
|
An AccountSet transaction modifies the properties of an [account in the XRP Ledger](reference-ledger-format.html#accountroot).
|
||||||
|
|
||||||
Example AccountSet:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"TransactionType": "AccountSet",
|
"TransactionType": "AccountSet",
|
||||||
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||||
@@ -18,6 +18,10 @@ Example AccountSet:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:-------------------------------|:-----------------|:------------------|:-----|
|
|:-------------------------------|:-----------------|:------------------|:-----|
|
||||||
| [ClearFlag](#accountset-flags) | Unsigned Integer | UInt32 | _(Optional)_ Unique identifier of a flag to disable for this account. |
|
| [ClearFlag](#accountset-flags) | Unsigned Integer | UInt32 | _(Optional)_ Unique identifier of a flag to disable for this account. |
|
||||||
@@ -32,7 +36,7 @@ Example AccountSet:
|
|||||||
|
|
||||||
If none of these options are provided, then the AccountSet transaction has no effect (beyond destroying the transaction cost). See [Canceling or Skipping a Transaction](#canceling-or-skipping-a-transaction) for more details.
|
If none of these options are provided, then the AccountSet transaction has no effect (beyond destroying the transaction cost). See [Canceling or Skipping a Transaction](#canceling-or-skipping-a-transaction) for more details.
|
||||||
|
|
||||||
### Domain
|
## Domain
|
||||||
|
|
||||||
The `Domain` field is represented as the hex string of the lowercase ASCII of the domain. For example, the domain *example.com* would be represented as `"6578616D706C652E636F6D"`.
|
The `Domain` field is represented as the hex string of the lowercase ASCII of the domain. For example, the domain *example.com* would be represented as `"6578616D706C652E636F6D"`.
|
||||||
|
|
||||||
@@ -40,7 +44,7 @@ To remove the `Domain` field from an account, send an AccountSet with the Domain
|
|||||||
|
|
||||||
Client applications can use the [ripple.txt](https://wiki.ripple.com/Ripple.txt) file hosted by the domain to confirm that the account is actually operated by that domain.
|
Client applications can use the [ripple.txt](https://wiki.ripple.com/Ripple.txt) file hosted by the domain to confirm that the account is actually operated by that domain.
|
||||||
|
|
||||||
### AccountSet Flags
|
## AccountSet Flags
|
||||||
|
|
||||||
There are several options which can be either enabled or disabled for an account. Account options are represented by different types of flags depending on the situation:
|
There are several options which can be either enabled or disabled for an account. Account options are represented by different types of flags depending on the situation:
|
||||||
|
|
||||||
@@ -82,7 +86,7 @@ The following [Transaction flags](#flags), specific to the AccountSet transactio
|
|||||||
**Caution:** The numeric values of `tf` and `asf` flags in transactions do not match up with the values they set in the accounts "at rest" in the ledger. To read the flags of an account in the ledger, see [`AccountRoot` flags](reference-ledger-format.html#accountroot-flags).
|
**Caution:** The numeric values of `tf` and `asf` flags in transactions do not match up with the values they set in the accounts "at rest" in the ledger. To read the flags of an account in the ledger, see [`AccountRoot` flags](reference-ledger-format.html#accountroot-flags).
|
||||||
|
|
||||||
|
|
||||||
#### Blocking Incoming Transactions
|
### Blocking Incoming Transactions
|
||||||
|
|
||||||
Incoming transactions with unclear purposes may be an inconvenience for financial institutions, who would have to recognize when a customer made a mistake, and then potentially refund accounts or adjust balances depending on the mistake. The `asfRequireDest` and `asfDisallowXRP` flags are intended to protect users from accidentally sending funds in a way that is unclear about the reason the funds were sent.
|
Incoming transactions with unclear purposes may be an inconvenience for financial institutions, who would have to recognize when a customer made a mistake, and then potentially refund accounts or adjust balances depending on the mistake. The `asfRequireDest` and `asfDisallowXRP` flags are intended to protect users from accidentally sending funds in a way that is unclear about the reason the funds were sent.
|
||||||
|
|
||||||
@@ -90,8 +94,13 @@ For example, a destination tag is typically used to identify which hosted balanc
|
|||||||
|
|
||||||
You can protect against unwanted incoming payments for non-XRP currencies by not creating trust lines in those currencies. Since XRP does not require trust, the `asfDisallowXRP` flag is used to discourage users from sending XRP to an account. However, this flag is not enforced in `rippled` because it could potentially cause accounts to become unusable. (If an account did not have enough XRP to send a transaction that disabled the flag, the account would be completely unusable.) Instead, client applications should disallow or discourage XRP payments to accounts with the `asfDisallowXRP` flag enabled.
|
You can protect against unwanted incoming payments for non-XRP currencies by not creating trust lines in those currencies. Since XRP does not require trust, the `asfDisallowXRP` flag is used to discourage users from sending XRP to an account. However, this flag is not enforced in `rippled` because it could potentially cause accounts to become unusable. (If an account did not have enough XRP to send a transaction that disabled the flag, the account would be completely unusable.) Instead, client applications should disallow or discourage XRP payments to accounts with the `asfDisallowXRP` flag enabled.
|
||||||
|
|
||||||
### TransferRate
|
## TransferRate
|
||||||
|
|
||||||
The TransferRate field specifies a fee to charge whenever counterparties transfer the currency you issue. See [Transfer Fees](concept-transfer-fees.html) for more information.
|
The TransferRate field specifies a fee to charge whenever counterparties transfer the currency you issue. See [Transfer Fees](concept-transfer-fees.html) for more information.
|
||||||
|
|
||||||
In `rippled`'s WebSocket and JSON-RPC APIs, the TransferRate is represented as an integer, the amount that must be sent for 1 billion units to arrive. For example, a 20% transfer fee is represented as the value `1200000000`. The value cannot be less than 1000000000. (Less than that would indicate giving away money for sending transactions, which is exploitable.) You can specify 0 as a shortcut for 1000000000, meaning no fee.
|
In `rippled`'s WebSocket and JSON-RPC APIs, the TransferRate is represented as an integer, the amount that must be sent for 1 billion units to arrive. For example, a 20% transfer fee is represented as the value `1200000000`. The value cannot be less than 1000000000. (Less than that would indicate giving away money for sending transactions, which is exploitable.) You can specify 0 as a shortcut for 1000000000, meaning no fee.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
## CheckCancel
|
# CheckCancel
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/CancelCheck.cpp "Source") <!--{# TODO: change from develop to master when 0.90.0 is released #}-->
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/CancelCheck.cpp "Source") <!--{# TODO: change from develop to master when 0.90.0 is released #}-->
|
||||||
|
|
||||||
_Requires the [Checks Amendment](reference-amendments.html#checks)._
|
_Requires the [Checks Amendment](reference-amendments.html#checks)._
|
||||||
|
|
||||||
Cancels an unredeemed Check, removing it from the ledger without sending any money. The source or the destination of the check can cancel a Check at any time using this transaction type. If the Check has expired, any address can cancel it.
|
Cancels an unredeemed Check, removing it from the ledger without sending any money. The source or the destination of the check can cancel a Check at any time using this transaction type. If the Check has expired, any address can cancel it.
|
||||||
|
|
||||||
Example CheckCancel:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -16,13 +16,22 @@ Example CheckCancel:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
In addition to the [common fields](#common-fields), a CheckCancel transaction has the following:
|
In addition to the [common fields](#common-fields), a CheckCancel transaction has the following:
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:------------|:----------|:------------------|:-------------------------------|
|
|:------------|:----------|:------------------|:-------------------------------|
|
||||||
| `CheckID` | String | Hash256 | The ID of the [Check ledger object](reference-ledger-format.html#check) to cancel, as a 64-character hexadecimal string. |
|
| `CheckID` | String | Hash256 | The ID of the [Check ledger object](reference-ledger-format.html#check) to cancel, as a 64-character hexadecimal string. |
|
||||||
|
|
||||||
### Error Cases
|
## Error Cases
|
||||||
|
|
||||||
- If the object identified by the `CheckID` does not exist or is not a Check, the transaction fails with the result `tecNO_ENTRY`.
|
- If the object identified by the `CheckID` does not exist or is not a Check, the transaction fails with the result `tecNO_ENTRY`.
|
||||||
- If the Check is not expired and the sender of the CheckCancel transaction is not the source or destination of the Check, the transaction fails with the result `tecNO_PERMISSION`.
|
- If the Check is not expired and the sender of the CheckCancel transaction is not the source or destination of the Check, the transaction fails with the result `tecNO_PERMISSION`.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## CheckCash
|
# CheckCash
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/CashCheck.cpp "Source") <!--{# TODO: change from develop to master when 0.90.0 is released #}-->
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/CashCheck.cpp "Source") <!--{# TODO: change from develop to master when 0.90.0 is released #}-->
|
||||||
|
|
||||||
_Requires the [Checks Amendment](reference-amendments.html#checks)._
|
_Requires the [Checks Amendment](reference-amendments.html#checks)._
|
||||||
@@ -7,7 +7,7 @@ Attempts to redeem a Check object in the ledger to receive up to the amount auth
|
|||||||
|
|
||||||
Since the funds for a check are not guaranteed, redeeming a Check can fail because the sender does not have a high enough balance or because there is not enough liquidity to deliver the funds. If this happens, the Check remains in the ledger and the destination can try to cash it again later, or for a different amount.
|
Since the funds for a check are not guaranteed, redeeming a Check can fail because the sender does not have a high enough balance or because there is not enough liquidity to deliver the funds. If this happens, the Check remains in the ledger and the destination can try to cash it again later, or for a different amount.
|
||||||
|
|
||||||
Example CheckCash:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -19,6 +19,10 @@ Example CheckCash:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
In addition to the [common fields](#common-fields), a CheckCash transaction has the following:
|
In addition to the [common fields](#common-fields), a CheckCash transaction has the following:
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
@@ -29,7 +33,7 @@ In addition to the [common fields](#common-fields), a CheckCash transaction has
|
|||||||
|
|
||||||
The transaction ***must*** include either `Amount` or `DeliverMin`, but not both.
|
The transaction ***must*** include either `Amount` or `DeliverMin`, but not both.
|
||||||
|
|
||||||
### Error Cases
|
## Error Cases
|
||||||
|
|
||||||
- If the sender of the CheckCash transaction is not the `Destination` of the check, the transaction fails with the result code `tecNO_PERMISSION`.
|
- If the sender of the CheckCash transaction is not the `Destination` of the check, the transaction fails with the result code `tecNO_PERMISSION`.
|
||||||
- If the Check identified by the `CheckID` field does not exist, the transaction fails with the result `tecNO_ENTRY`.
|
- If the Check identified by the `CheckID` field does not exist, the transaction fails with the result `tecNO_ENTRY`.
|
||||||
@@ -37,3 +41,8 @@ The transaction ***must*** include either `Amount` or `DeliverMin`, but not both
|
|||||||
- If the destination of the Check has the RequireDest flag enabled but the Check, as created, does not have a destination tag, the transaction fails with the result code `tecDST_TAG_NEEDED`.
|
- If the destination of the Check has the RequireDest flag enabled but the Check, as created, does not have a destination tag, the transaction fails with the result code `tecDST_TAG_NEEDED`.
|
||||||
- If the transaction specifies both `Amount` and `DeliverMin`, or omits both, the transaction fails with the result `temMALFORMED`.
|
- If the transaction specifies both `Amount` and `DeliverMin`, or omits both, the transaction fails with the result `temMALFORMED`.
|
||||||
- If the `Amount` or `DeliverMin` does not match the currency (and issuer, if not XRP) of the Check, the transaction fails with the result `temBAD_CURRENCY`.
|
- If the `Amount` or `DeliverMin` does not match the currency (and issuer, if not XRP) of the Check, the transaction fails with the result `temBAD_CURRENCY`.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
## CheckCreate
|
# CheckCreate
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/CreateCheck.cpp "Source") <!--{# TODO: change from develop to master when 0.90.0 is released #}-->
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/CreateCheck.cpp "Source") <!--{# TODO: change from develop to master when 0.90.0 is released #}-->
|
||||||
|
|
||||||
_Requires the [Checks Amendment](reference-amendments.html#checks)._
|
_Requires the [Checks Amendment](reference-amendments.html#checks)._
|
||||||
|
|
||||||
Create a Check object in the ledger, which is a deferred payment that can be cashed by its intended destination. The sender of this transaction is the sender of the Check.
|
Create a Check object in the ledger, which is a deferred payment that can be cashed by its intended destination. The sender of this transaction is the sender of the Check.
|
||||||
|
|
||||||
Example CheckCreate:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -20,6 +20,10 @@ Example CheckCreate:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
In addition to the [common fields](#common-fields), a CheckCreate transaction has the following:
|
In addition to the [common fields](#common-fields), a CheckCreate transaction has the following:
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
@@ -30,7 +34,7 @@ In addition to the [common fields](#common-fields), a CheckCreate transaction ha
|
|||||||
| `Expiration` | Unsigned Integer | UInt32 | _(Optional)_ Time after which the Check is no longer valid, in [seconds since the Ripple Epoch](reference-rippled.html#specifying-time). |
|
| `Expiration` | Unsigned Integer | UInt32 | _(Optional)_ Time after which the Check is no longer valid, in [seconds since the Ripple Epoch](reference-rippled.html#specifying-time). |
|
||||||
| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this Check. |
|
| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this Check. |
|
||||||
|
|
||||||
### Error Cases
|
## Error Cases
|
||||||
|
|
||||||
- If the `Destination` is the sender of the transaction, the transaction fails with the result code `temREDUNDANT`.
|
- If the `Destination` is the sender of the transaction, the transaction fails with the result code `temREDUNDANT`.
|
||||||
- If the `Destination` [account](concept-accounts.html) does not exist in the ledger, the transaction fails with the result code `tecNO_DST`.
|
- If the `Destination` [account](concept-accounts.html) does not exist in the ledger, the transaction fails with the result code `tecNO_DST`.
|
||||||
@@ -39,3 +43,8 @@ In addition to the [common fields](#common-fields), a CheckCreate transaction ha
|
|||||||
- If the `Expiration` of the transaction is in the past, the transaction fails with the result `tecEXPIRED`.
|
- If the `Expiration` of the transaction is in the past, the transaction fails with the result `tecEXPIRED`.
|
||||||
- If the sender does not have enough XRP to meet the [owner reserve](concept-reserves.html#owner-reserves) after adding the Check, the transaction fails with the result `tecINSUFFICIENT_RESERVE`.
|
- If the sender does not have enough XRP to meet the [owner reserve](concept-reserves.html#owner-reserves) after adding the Check, the transaction fails with the result `tecINSUFFICIENT_RESERVE`.
|
||||||
- If either the sender or the destination of the Check cannot own more objects in the ledger, the transaction fails with the result `tecDIR_FULL`.
|
- If either the sender or the destination of the Check cannot own more objects in the ledger, the transaction fails with the result `tecDIR_FULL`.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## EscrowCancel
|
# EscrowCancel
|
||||||
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/Escrow.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/Escrow.cpp "Source")
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ _Requires the [Escrow Amendment](reference-amendments.html#escrow)._
|
|||||||
|
|
||||||
Return escrowed XRP to the sender.
|
Return escrowed XRP to the sender.
|
||||||
|
|
||||||
Example EscrowCancel:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -17,6 +17,10 @@ Example EscrowCancel:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:----------------|:-----------------|:------------------|:--------------------------|
|
|:----------------|:-----------------|:------------------|:--------------------------|
|
||||||
| `Owner` | String | AccountID | Address of the source account that funded the escrow payment.
|
| `Owner` | String | AccountID | Address of the source account that funded the escrow payment.
|
||||||
@@ -26,3 +30,8 @@ Any account may submit an EscrowCancel transaction.
|
|||||||
|
|
||||||
* If the corresponding [EscrowCreate transaction][] did not specify a `CancelAfter` time, the EscrowCancel transaction fails.
|
* If the corresponding [EscrowCreate transaction][] did not specify a `CancelAfter` time, the EscrowCancel transaction fails.
|
||||||
* Otherwise the EscrowCancel transaction fails if the `CancelAfter` time is after the close time of the most recently-closed ledger.
|
* Otherwise the EscrowCancel transaction fails if the `CancelAfter` time is after the close time of the most recently-closed ledger.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## EscrowCreate
|
# EscrowCreate
|
||||||
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/Escrow.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/Escrow.cpp "Source")
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ _Requires the [Escrow Amendment](reference-amendments.html#escrow)._
|
|||||||
|
|
||||||
Sequester XRP until the escrow process either finishes or is canceled.
|
Sequester XRP until the escrow process either finishes or is canceled.
|
||||||
|
|
||||||
Example EscrowCreate:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -22,6 +22,10 @@ Example EscrowCreate:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:-----------------|:----------|:------------------|:--------------------------|
|
|:-----------------|:----------|:------------------|:--------------------------|
|
||||||
| `Amount` | String | Amount | Amount of [XRP, in drops][Currency Amount], to deduct from the sender's balance and escrow. Once escrowed, the XRP can either go to the `Destination` address (after the `FinishAfter` time) or returned to the sender (after the `CancelAfter` time). |
|
| `Amount` | String | Amount | Amount of [XRP, in drops][Currency Amount], to deduct from the sender's balance and escrow. Once escrowed, the XRP can either go to the `Destination` address (after the `FinishAfter` time) or returned to the sender (after the `CancelAfter` time). |
|
||||||
@@ -30,6 +34,10 @@ Example EscrowCreate:
|
|||||||
| `FinishAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch](reference-rippled.html#specifying-time), when the escrowed XRP can be released to the recipient. This value is immutable; the funds cannot move until this time is reached. |
|
| `FinishAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch](reference-rippled.html#specifying-time), when the escrowed XRP can be released to the recipient. This value is immutable; the funds cannot move until this time is reached. |
|
||||||
| `Condition` | String | VariableLength | _(Optional)_ Hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). The funds can only be delivered to the recipient if this condition is fulfilled. |
|
| `Condition` | String | VariableLength | _(Optional)_ Hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). The funds can only be delivered to the recipient if this condition is fulfilled. |
|
||||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the destination for this escrowed payment, such as a hosted recipient at the destination address. |
|
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the destination for this escrowed payment, such as a hosted recipient at the destination address. |
|
||||||
| `SourceTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the source for this escrowed payment, such as a hosted sender at the source address. |
|
|
||||||
|
|
||||||
Either `CancelAfter` or `FinishAfter` must be specified. If both are included, the `FinishAfter` time must precede that of `CancelAfter`.
|
Either `CancelAfter` or `FinishAfter` must be specified. If both are included, the `FinishAfter` time must precede that of `CancelAfter`.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## EscrowFinish
|
# EscrowFinish
|
||||||
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/Escrow.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/Escrow.cpp "Source")
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ _Requires the [Escrow Amendment](reference-amendments.html#escrow)._
|
|||||||
|
|
||||||
Deliver XRP from a held payment to the recipient.
|
Deliver XRP from a held payment to the recipient.
|
||||||
|
|
||||||
Example EscrowFinish:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -19,6 +19,10 @@ Example EscrowFinish:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:----------------|:-----------------|:------------------|:--------------------------|
|
|:----------------|:-----------------|:------------------|:--------------------------|
|
||||||
| `Owner` | String | AccountID | Address of the source account that funded the held payment.
|
| `Owner` | String | AccountID | Address of the source account that funded the held payment.
|
||||||
@@ -33,3 +37,8 @@ Any account may submit an EscrowFinish transaction.
|
|||||||
- You cannot execute a held payment after it has expired. Specifically, if the corresponding [EscrowCreate transaction][] specified a `CancelAfter` time that is before the close time of the most recently-closed ledger, the EscrowFinish transaction fails.
|
- You cannot execute a held payment after it has expired. Specifically, if the corresponding [EscrowCreate transaction][] specified a `CancelAfter` time that is before the close time of the most recently-closed ledger, the EscrowFinish transaction fails.
|
||||||
|
|
||||||
**Note:** The minimum [transaction cost](concept-transaction-cost.html) to submit an EscrowFinish transaction increases if it contains a fulfillment. If the transaction has no fulfillment, the transaction cost is the standard 10 drops. If the transaction contains a fulfillment, the transaction cost is 330 [drops of XRP](reference-rippled.html#specifying-currency-amounts) plus another 10 drops for every 16 bytes in size of the preimage.
|
**Note:** The minimum [transaction cost](concept-transaction-cost.html) to submit an EscrowFinish transaction increases if it contains a fulfillment. If the transaction has no fulfillment, the transaction cost is the standard 10 drops. If the transaction contains a fulfillment, the transaction cost is 330 [drops of XRP](reference-rippled.html#specifying-currency-amounts) plus another 10 drops for every 16 bytes in size of the preimage.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
## OfferCancel
|
# OfferCancel
|
||||||
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/app/tx/impl/CancelOffer.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/app/tx/impl/CancelOffer.cpp "Source")
|
||||||
|
|
||||||
An OfferCancel transaction removes an Offer object from the XRP Ledger.
|
An OfferCancel transaction removes an Offer object from the XRP Ledger.
|
||||||
|
|
||||||
```
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"TransactionType": "OfferCancel",
|
"TransactionType": "OfferCancel",
|
||||||
"Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
"Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||||
@@ -16,6 +18,10 @@ An OfferCancel transaction removes an Offer object from the XRP Ledger.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:--------------|:-----------------|:------------------|:----------------------|
|
|:--------------|:-----------------|:------------------|:----------------------|
|
||||||
| OfferSequence | Unsigned Integer | UInt32 | The sequence number of a previous OfferCreate transaction. If specified, cancel any offer object in the ledger that was created by that transaction. It is not considered an error if the offer specified does not exist. |
|
| OfferSequence | Unsigned Integer | UInt32 | The sequence number of a previous OfferCreate transaction. If specified, cancel any offer object in the ledger that was created by that transaction. It is not considered an error if the offer specified does not exist. |
|
||||||
@@ -23,3 +29,8 @@ An OfferCancel transaction removes an Offer object from the XRP Ledger.
|
|||||||
*Tip:* To remove an old offer and replace it with a new one, you can use an [OfferCreate transaction][] with an `OfferSequence` parameter, instead of using OfferCancel and another OfferCreate.
|
*Tip:* To remove an old offer and replace it with a new one, you can use an [OfferCreate transaction][] with an `OfferSequence` parameter, instead of using OfferCancel and another OfferCreate.
|
||||||
|
|
||||||
The OfferCancel method returns [tesSUCCESS](#transaction-results) even if it did not find an offer with the matching sequence number.
|
The OfferCancel method returns [tesSUCCESS](#transaction-results) even if it did not find an offer with the matching sequence number.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
## OfferCreate
|
# OfferCreate
|
||||||
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/app/tx/impl/CreateOffer.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/app/tx/impl/CreateOffer.cpp "Source")
|
||||||
|
|
||||||
An OfferCreate transaction is effectively a [limit order](http://en.wikipedia.org/wiki/limit_order). It defines an intent to exchange currencies, and creates an Offer object in the XRP Ledger if not completely fulfilled when placed. Offers can be partially fulfilled.
|
An OfferCreate transaction is effectively a [limit order](http://en.wikipedia.org/wiki/limit_order). It defines an intent to exchange currencies, and creates an [Offer object](offer.html) if not completely fulfilled when placed. Offers can be partially fulfilled.
|
||||||
|
|
||||||
```
|
For more information about how Offers work, see [Offers](offers.html).
|
||||||
|
|
||||||
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"TransactionType": "OfferCreate",
|
"TransactionType": "OfferCreate",
|
||||||
"Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
"Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||||
@@ -21,6 +25,10 @@ An OfferCreate transaction is effectively a [limit order](http://en.wikipedia.or
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:--------------------------|:--------------------|:------------------|:-------|
|
|:--------------------------|:--------------------|:------------------|:-------|
|
||||||
| [Expiration](#expiration) | Unsigned Integer | UInt32 | _(Optional)_ Time after which the offer is no longer active, in [seconds since the Ripple Epoch](reference-rippled.html#specifying-time). |
|
| [Expiration](#expiration) | Unsigned Integer | UInt32 | _(Optional)_ Time after which the offer is no longer active, in [seconds since the Ripple Epoch](reference-rippled.html#specifying-time). |
|
||||||
@@ -28,86 +36,7 @@ An OfferCreate transaction is effectively a [limit order](http://en.wikipedia.or
|
|||||||
| TakerGets | [Currency Amount][] | Amount | The amount and type of currency being provided by the offer creator. |
|
| TakerGets | [Currency Amount][] | Amount | The amount and type of currency being provided by the offer creator. |
|
||||||
| TakerPays | [Currency Amount][] | Amount | The amount and type of currency being requested by the offer creator. |
|
| TakerPays | [Currency Amount][] | Amount | The amount and type of currency being requested by the offer creator. |
|
||||||
|
|
||||||
### Lifecycle of an Offer
|
## OfferCreate Flags
|
||||||
|
|
||||||
When an OfferCreate transaction is processed, it automatically consumes matching or crossing offers to the extent possible. (If existing offers provide a better rate than requested, the offer creator could pay less than the full `TakerGets` amount to receive the entire `TakerPays` amount.) If that does not completely fulfill the `TakerPays` amount, then the offer becomes an Offer object in the ledger. (You can use [OfferCreate Flags](#offercreate-flags) to modify this behavior.)
|
|
||||||
|
|
||||||
An offer in the ledger can be fulfilled either by additional OfferCreate transactions that match up with the existing offers, or by [Payments](#payment) that use the offer to connect the payment path. Offers can be partially fulfilled and partially funded. A single transaction can consume up to 850 Offers from the ledger. (Any more than that, and the metadata becomes too large, resulting in [`tecOVERSIZE`](#tec-codes).)
|
|
||||||
|
|
||||||
You can create an offer so long as you have at least some (any positive, nonzero amount) of the currency specified by the `TakerGets` parameter of the offer. The offer sells as much of the currency as you have, up to the `TakerGets` amount, until the `TakerPays` amount is satisfied. An offer cannot place anyone in debt.
|
|
||||||
|
|
||||||
It is possible for an offer to become temporarily or permanently _unfunded_:
|
|
||||||
|
|
||||||
* If the creator no longer has any of the `TakerGets` currency.
|
|
||||||
* The offer becomes funded again when the creator obtains more of that currency.
|
|
||||||
* If the currency required to fund the offer is held in a [frozen trust line](concept-freeze.html).
|
|
||||||
* The offer becomes funded again when the trust line is no longer frozen.
|
|
||||||
* If the creator does not have enough XRP for the reserve amount of a new trust line required by the offer. (See [Offers and Trust](#offers-and-trust).)
|
|
||||||
* The offer becomes funded again when the creator obtains more XRP, or the reserve requirements decrease.
|
|
||||||
* If the Expiration time included in the offer is before the close time of the most recently-closed ledger. (See [Expiration](#expiration).)
|
|
||||||
|
|
||||||
An unfunded offer can stay on the ledger indefinitely, but it does not have any effect. The only ways an offer can be *permanently* removed from the ledger are:
|
|
||||||
|
|
||||||
* It becomes fully claimed by a Payment or a matching OfferCreate transaction.
|
|
||||||
* An OfferCancel or OfferCreate transaction explicitly cancels the offer.
|
|
||||||
* An OfferCreate transaction from the same account crosses the earlier offer. (In this case, the older offer is automatically canceled.)
|
|
||||||
* An offer is found to be unfunded during transaction processing, typically because it was at the tip of the orderbook.
|
|
||||||
* This includes cases where one side or the other of an offer is found to be closer to 0 than `rippled`'s precision supports.
|
|
||||||
|
|
||||||
#### Tracking Unfunded Offers
|
|
||||||
|
|
||||||
Tracking the funding status of all offers can be computationally taxing. In particular, addresses that are actively trading may have a large number of offers open. A single balance can affect the funding status of many offers to buy different currencies. Because of this, `rippled` does not proactively find and remove offers.
|
|
||||||
|
|
||||||
A client application can locally track the funding status of offers. To do this, first retreive an order book using the [book_offers method][] and check the `taker_gets_funded` field of offers. Then, [subscribe](reference-rippled.html#subscribe) to the `transactions` stream and watch the transaction metadata to see which offers are modified.
|
|
||||||
|
|
||||||
|
|
||||||
### Offers and Trust
|
|
||||||
|
|
||||||
The limit values of trust lines (See [TrustSet](#trustset)) do not affect offers. In other words, you can use an offer to acquire more than the maximum amount you trust an issuer to redeem.
|
|
||||||
|
|
||||||
However, holding non-XRP balances still requires a trust line to the address issuing those balances. When an offer is taken, it automatically creates any necessary trust lines, setting their limits to 0. Because [trust lines increase the reserve an account must hold](concept-reserves.html), any offers that would require a new trust line also require the address to have enough XRP to meet the reserve for that trust line.
|
|
||||||
|
|
||||||
A trust line indicates an issuer you trust enough to accept their issuances as payment, within limits. Offers are explicit instructions to acquire certain issuances, so they are allowed to go beyond those limits.
|
|
||||||
|
|
||||||
### Offer Preference
|
|
||||||
|
|
||||||
Existing offers are grouped by exchange rate (sometimes called "offer quality"), which is measured as the ratio between `TakerGets` and `TakerPays`. Offers with a higher exchange rate are taken preferentially. (That is, the person accepting the offer receives as much as possible for the amount of currency they pay out.) Offers with the same exchange rate are taken on the basis of which offer was placed in the earliest ledger version.
|
|
||||||
|
|
||||||
When offers of the same exchange rate are placed in the same ledger version, the order in which they are taken is determined by the [canonical order](https://github.com/ripple/rippled/blob/release/src/ripple/app/misc/CanonicalTXSet.cpp "Source: Transaction ordering") in which the transactions were [applied to the ledger](https://github.com/ripple/rippled/blob/5425a90f160711e46b2c1f1c93d68e5941e4bfb6/src/ripple/app/consensus/LedgerConsensus.cpp#L1435-L1538 "Source: Applying transactions"). This behavior is designed to be deterministic, efficient, and hard to game.
|
|
||||||
|
|
||||||
#### TickSize
|
|
||||||
|
|
||||||
_Requires the [TickSize amendment](reference-amendments.html#ticksize)._
|
|
||||||
|
|
||||||
When an Offer is placed into an order book, its exchange rate is truncated based on the `TickSize` values set by the issuers of the currencies involved in the Offer. When a trader offers to exchange XRP and an issued currency, the `TickSize` from the issuer of the currency applies. When a trader offers to exchange two issued currencies, the offer uses the smaller `TickSize` value (that is, the one with fewer significant digits). If neither currency has a `TickSize` set, the default behavior applies.
|
|
||||||
|
|
||||||
The `TickSize` value truncates the number of _significant digits_ in the exchange rate of an offer when it gets placed in an order book. Issuers can set `TickSize` to an integer from `3` to `15` using an [AccountSet transaction][]. The exchange rate is represented as significant digits and an exponent; the `TickSize` does not affect the exponent. This allows the XRP Ledger to represent exchange rates between assets that vary greatly in value (for example, a hyperinflated currency compared to a rare commodity). The lower the `TickSize` an issuer sets, the larger the increment traders must offer to be considered a higher exchange rate than the existing Offers.
|
|
||||||
|
|
||||||
The `TickSize` does not affect the part of an Offer that can be executed immediately. (For that reason, OfferCreate transactions with `tfImmediateOrCancel` are unaffected by `TickSize` values.) If the Offer cannot be fully executed, the transaction processing engine calculates the exchange rate and truncates it based on `TickSize`. Then, the engine rounds the remaining amount of the Offer from the "less important" side to match the truncated exchange rate. For a default OfferCreate transaction (a "buy" Offer), the `TakerPays` amount (the amount being bought) gets rounded. If the `tfSell` flag is enabled (a "sell" Offer) the `TakerGets` amount (the amount being sold) gets rounded.
|
|
||||||
|
|
||||||
When an issuer enables, disables, or changes the `TickSize`, Offers that were placed under the previous setting are unaffected.
|
|
||||||
|
|
||||||
|
|
||||||
### Expiration
|
|
||||||
|
|
||||||
Since transactions can take time to propagate and confirm, the timestamp of a ledger is used to determine offer validity. An offer only expires when its Expiration time is before the most-recently validated ledger. In other words, an offer with an `Expiration` field is still considered "active" if its expiration time is later than the timestamp of the most-recently validated ledger, regardless of what your local clock says.
|
|
||||||
|
|
||||||
You can determine the final disposition of an offer with an `Expiration` as soon as you see a fully-validated ledger with a close time equal to or greater than the expiration time.
|
|
||||||
|
|
||||||
**Note:** Since only new transactions can modify the ledger, an expired offer can stay on the ledger after it becomes inactive. The offer is treated as unfunded and has no effect, but it can continue to appear in results (for example, from the [ledger_entry](reference-rippled.html#ledger-entry) command). Later on, the expired offer can get finally deleted as a result of another transaction (such as another OfferCreate) if the server finds it while processing.
|
|
||||||
|
|
||||||
If an OfferCreate transaction has an `Expiration` time that has already passed when the transaction first gets included in a ledger, the transaction does not execute the offer. The result code of such a transaction depends on whether the [Checks amendment](reference-amendments.html#checks) is enabled. With the Checks amendment enabled, the transaction has the `tecEXPIRED` result code. Otherwise, the transaction has the `tesSUCCESS` transaction code. In either case, the transaction has no effect except to destroy the XRP paid as a [transaction cost](concept-transaction-cost.html).
|
|
||||||
|
|
||||||
### Auto-Bridging
|
|
||||||
|
|
||||||
Any OfferCreate that would exchange two non-XRP currencies could potentially use XRP as an intermediary currency in a synthetic order book. This is because of auto-bridging, which serves to improve liquidity across all currency pairs by using XRP as a vehicle currency. This works because of XRP's nature as a native cryptocurrency to the XRP Ledger. Offer execution can use a combination of direct and auto-bridged offers to achieve the best total exchange rate.
|
|
||||||
|
|
||||||
Example: _Anita places an offer to sell GBP and buy BRL. She might find that this uncommon currency market has few offers. There is one offer with a good rate, but it has insufficient quantity to satisfy Anita's trade. However, both GBP and BRL have active, competitive markets to XRP. Auto-bridging software finds a way to complete Anita's offer by purchasing XRP with GBP from one trader, then selling the XRP to another trader to buy BRL. Anita automatically gets the best rate possible by combining the small offer in the direct GBP:BRL market with the better composite rates created by pairing GBP:XRP and XRP:BRL offers._
|
|
||||||
|
|
||||||
Auto-bridging happens automatically on any OfferCreate transaction. [Payment transactions](#payment) _do not_ autobridge by default, but path-finding can find paths that have the same effect.
|
|
||||||
|
|
||||||
|
|
||||||
### OfferCreate Flags
|
|
||||||
|
|
||||||
Transactions of the OfferCreate type support additional values in the [`Flags` field](#flags), as follows:
|
Transactions of the OfferCreate type support additional values in the [`Flags` field](#flags), as follows:
|
||||||
|
|
||||||
@@ -122,4 +51,9 @@ The following invalid flag combination prompts a `temINVALID_FLAG` error:
|
|||||||
|
|
||||||
* tfImmediateOrCancel and tfFillOrKill
|
* tfImmediateOrCancel and tfFillOrKill
|
||||||
|
|
||||||
**Note:** When an OfferCreate uses tfImmediateOrCancel or tfFillOrKill and the offer cannot be executed when placed, the transaction may conclude "successfully" without trading any currency or having any effect on the order books. In this case, the transaction has the [result code](#result-categories) `tesSUCCESS`, it pays the [transaction cost](concept-transaction-cost.html) and uses up a `Sequence` number, but has no other effect.
|
**Note:** When an OfferCreate uses tfImmediateOrCancel or tfFillOrKill and the offer cannot be executed when placed, the transaction may conclude "successfully" without trading any currency or having any effect on the order books. In this case, the transaction has the [result code](#result-categories) `tesSUCCESS`, it pays the [transaction cost][] and uses up a `Sequence` number, but has no other effect.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
## Payment
|
# Payment
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/5425a90f160711e46b2c1f1c93d68e5941e4bfb6/src/ripple/app/transactors/Payment.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/5425a90f160711e46b2c1f1c93d68e5941e4bfb6/src/ripple/app/transactors/Payment.cpp "Source")
|
||||||
|
|
||||||
A Payment transaction represents a transfer of value from one account to another. (Depending on the path taken, this can involve additional exchanges of value, which occur atomically.)
|
A Payment transaction represents a transfer of value from one account to another. (Depending on the path taken, this can involve additional exchanges of value, which occur atomically.)
|
||||||
|
|
||||||
Payments are also the only way to [create accounts](#creating-accounts).
|
Payments are also the only way to [create accounts](#creating-accounts).
|
||||||
|
|
||||||
Example payment:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"TransactionType" : "Payment",
|
"TransactionType" : "Payment",
|
||||||
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||||
@@ -23,6 +23,10 @@ Example payment:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:---------------|:---------------------|:------------------|:-----------------|
|
|:---------------|:---------------------|:------------------|:-----------------|
|
||||||
| Amount | [Currency Amount][] | Amount | The 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. |
|
| Amount | [Currency Amount][] | Amount | The 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. |
|
||||||
@@ -33,7 +37,7 @@ Example payment:
|
|||||||
| SendMax | [Currency Amount][] | Amount | _(Optional)_ Highest amount of source currency this transaction is allowed to cost, including [transfer fees](concept-transfer-fees.html), exchange rates, and [slippage](http://en.wikipedia.org/wiki/Slippage_%28finance%29). Does not include the [XRP destroyed as a cost for submitting the transaction](#transaction-cost). For non-XRP amounts, the nested field names MUST be lower-case. Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments. |
|
| SendMax | [Currency Amount][] | Amount | _(Optional)_ Highest amount of source currency this transaction is allowed to cost, including [transfer fees](concept-transfer-fees.html), exchange rates, and [slippage](http://en.wikipedia.org/wiki/Slippage_%28finance%29). Does not include the [XRP destroyed as a cost for submitting the transaction](#transaction-cost). For non-XRP amounts, the nested field names MUST be lower-case. Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments. |
|
||||||
| DeliverMin | [Currency Amount][] | Amount | _(Optional)_ Minimum amount of destination currency this transaction should deliver. Only valid if this is a [partial payment](#partial-payments). For non-XRP amounts, the nested field names are lower-case. |
|
| DeliverMin | [Currency Amount][] | Amount | _(Optional)_ Minimum amount of destination currency this transaction should deliver. Only valid if this is a [partial payment](#partial-payments). For non-XRP amounts, the nested field names are lower-case. |
|
||||||
|
|
||||||
### Special issuer Values for SendMax and Amount
|
## Special issuer Values for SendMax and Amount
|
||||||
|
|
||||||
Most of the time, the `issuer` field of a non-XRP [Currency Amount][] indicates a financial institution's [issuing address](concept-issuing-and-operational-addresses.html). However, when describing payments, there are special rules for the `issuer` field in the `Amount` and `SendMax` fields of a payment.
|
Most of the time, the `issuer` field of a non-XRP [Currency Amount][] indicates a financial institution's [issuing address](concept-issuing-and-operational-addresses.html). However, when describing payments, there are special rules for the `issuer` field in the `Amount` and `SendMax` fields of a payment.
|
||||||
|
|
||||||
@@ -41,13 +45,13 @@ Most of the time, the `issuer` field of a non-XRP [Currency Amount][] indicates
|
|||||||
* When the `issuer` field of the destination `Amount` field matches the `Destination` address, it is treated as a special case meaning "any issuer that the destination accepts." This includes all addresses to which the destination has extended trust lines, as well as issuances created by the destination which are held on other trust lines.
|
* When the `issuer` field of the destination `Amount` field matches the `Destination` address, it is treated as a special case meaning "any issuer that the destination accepts." This includes all addresses to which the destination has extended trust lines, as well as issuances created by the destination which are held on other trust lines.
|
||||||
* When the `issuer` field of the `SendMax` field matches the source account's address, it is treated as a special case meaning "any issuer that the source can use." This includes creating new issuances on trust lines that other accounts have extended to the source account, and sending issuances the source account holds from other issuers.
|
* When the `issuer` field of the `SendMax` field matches the source account's address, it is treated as a special case meaning "any issuer that the source can use." This includes creating new issuances on trust lines that other accounts have extended to the source account, and sending issuances the source account holds from other issuers.
|
||||||
|
|
||||||
### Creating Accounts
|
## Creating Accounts
|
||||||
|
|
||||||
The Payment transaction type can create new accounts in the XRP Ledger by sending enough XRP to an unfunded address. Other transactions to unfunded addresses always fail.
|
The Payment transaction type can create new accounts in the XRP Ledger by sending enough XRP to an unfunded address. Other transactions to unfunded addresses always fail.
|
||||||
|
|
||||||
For more information, see [Accounts](concept-accounts.html#creating-accounts).
|
For more information, see [Accounts](concept-accounts.html#creating-accounts).
|
||||||
|
|
||||||
### Paths
|
## Paths
|
||||||
|
|
||||||
If present, the `Paths` field must contain a _path set_ - an array of path arrays. Each individual path represents one way value can flow from the sender to receiver through various intermediary accounts and order books. A single transaction can potentially use multiple paths, for example if the transaction exchanges currency using several different order books to achieve the best rate.
|
If present, the `Paths` field must contain a _path set_ - an array of path arrays. Each individual path represents one way value can flow from the sender to receiver through various intermediary accounts and order books. A single transaction can potentially use multiple paths, for example if the transaction exchanges currency using several different order books to achieve the best rate.
|
||||||
|
|
||||||
@@ -62,7 +66,7 @@ The `Paths` field must not be an empty array, nor an array whose members are all
|
|||||||
|
|
||||||
For more information, see [Paths](concept-paths.html).
|
For more information, see [Paths](concept-paths.html).
|
||||||
|
|
||||||
### Payment Flags
|
## Payment Flags
|
||||||
|
|
||||||
Transactions of the Payment type support additional values in the [`Flags` field](#flags), as follows:
|
Transactions of the Payment type support additional values in the [`Flags` field](#flags), as follows:
|
||||||
|
|
||||||
@@ -72,7 +76,7 @@ Transactions of the Payment type support additional values in the [`Flags` field
|
|||||||
| tfPartialPayment | 0x00020000 | 131072 | If the specified `Amount` cannot be sent without spending more than `SendMax`, reduce the received amount instead of failing outright. See [Partial Payments](#partial-payments) for more details. |
|
| tfPartialPayment | 0x00020000 | 131072 | If the specified `Amount` cannot be sent without spending more than `SendMax`, reduce the received amount instead of failing outright. See [Partial Payments](#partial-payments) for more details. |
|
||||||
| tfLimitQuality | 0x00040000 | 262144 | Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of `Amount`:`SendMax`. See [Limit Quality](#limit-quality) for details. |
|
| tfLimitQuality | 0x00040000 | 262144 | Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of `Amount`:`SendMax`. See [Limit Quality](#limit-quality) for details. |
|
||||||
|
|
||||||
### Partial Payments
|
## Partial Payments
|
||||||
|
|
||||||
A partial payment allows a payment to succeed by reducing the amount received. Partial payments are useful for [returning payments](tutorial-gateway-guide.html#bouncing-payments) without incurring additional costs to oneself. However, partial payments can also be used to exploit integrations that naively assume the `Amount` field of a successful transaction always describes the exact amount delivered.
|
A partial payment allows a payment to succeed by reducing the amount received. Partial payments are useful for [returning payments](tutorial-gateway-guide.html#bouncing-payments) without incurring additional costs to oneself. However, partial payments can also be used to exploit integrations that naively assume the `Amount` field of a successful transaction always describes the exact amount delivered.
|
||||||
|
|
||||||
@@ -83,7 +87,7 @@ The [`delivered_amount`](#delivered-amount) field of a payment's metadata indica
|
|||||||
For more information, see the full article on [Partial Payments](concept-partial-payments.html).
|
For more information, see the full article on [Partial Payments](concept-partial-payments.html).
|
||||||
|
|
||||||
|
|
||||||
### Limit Quality
|
## Limit Quality
|
||||||
|
|
||||||
The XRP Ledger defines the "quality" of a currency exchange as the ratio of the numeric amount in to the numeric amount out. For example, if you spend $2 USD to receive £1 GBP, then the "quality" of that exchange is `0.5`.
|
The XRP Ledger defines the "quality" of a currency exchange as the ratio of the numeric amount in to the numeric amount out. For example, if you spend $2 USD to receive £1 GBP, then the "quality" of that exchange is `0.5`.
|
||||||
|
|
||||||
@@ -98,3 +102,8 @@ Without the tfLimitQuality flag set, this transaction would succeed, because the
|
|||||||
The tfLimitQuality flag is most useful when combined with [partial payments](#partial-payments). When both *tfPartialPayment* and *tfLimitQuality* are set on a transaction, then the transaction delivers as much of the destination `Amount` as it can, without using any conversions that are worse than the limit quality.
|
The tfLimitQuality flag is most useful when combined with [partial payments](#partial-payments). When both *tfPartialPayment* and *tfLimitQuality* are set on a transaction, then the transaction delivers as much of the destination `Amount` as it can, without using any conversions that are worse than the limit quality.
|
||||||
|
|
||||||
In the above example with a ¥95/$15 offer and a ¥5/$2 offer, the situation is different if my transaction has both tfPartialPayment and tfLimitQuality enabled. If we keep my `SendMax` of 20 USD and a destination `Amount` of 100 CNY, then the limit quality is still `5`. However, because I am doing a partial payment, the transaction sends as much as it can instead of failing if the full destination amount cannot be sent. This means that my transaction consumes the ¥95/$15 offer, whose quality is about `6.3`, but it rejects the ¥5/$2 offer because that offer's quality of `2.5` is worse than the quality limit of `5`. In the end, my transaction only delivers ¥95 instead of the full ¥100, but it avoids wasting money on poor exchange rates.
|
In the above example with a ¥95/$15 offer and a ¥5/$2 offer, the situation is different if my transaction has both tfPartialPayment and tfLimitQuality enabled. If we keep my `SendMax` of 20 USD and a destination `Amount` of 100 CNY, then the limit quality is still `5`. However, because I am doing a partial payment, the transaction sends as much as it can instead of failing if the full destination amount cannot be sent. This means that my transaction consumes the ¥95/$15 offer, whose quality is about `6.3`, but it rejects the ¥5/$2 offer because that offer's quality of `2.5` is worse than the quality limit of `5`. In the end, my transaction only delivers ¥95 instead of the full ¥100, but it avoids wasting money on poor exchange rates.
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## PaymentChannelClaim
|
# PaymentChannelClaim
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/PayChan.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/PayChan.cpp "Source")
|
||||||
|
|
||||||
_Requires the [PayChan Amendment](reference-amendments.html#paychan)._
|
_Requires the [PayChan Amendment](reference-amendments.html#paychan)._
|
||||||
@@ -21,7 +21,7 @@ The **destination address** of a channel can:
|
|||||||
|
|
||||||
- Cause a channel to be closed if its `Expiration` or `CancelAfter` time is older than the previous ledger's close time. Any validly-formed PaymentChannelClaim transaction has this effect regardless of the contents of the transaction.
|
- Cause a channel to be closed if its `Expiration` or `CancelAfter` time is older than the previous ledger's close time. Any validly-formed PaymentChannelClaim transaction has this effect regardless of the contents of the transaction.
|
||||||
|
|
||||||
Example PaymentChannelClaim:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -35,6 +35,10 @@ Example PaymentChannelClaim:
|
|||||||
|
|
||||||
<!--{# TODO: replace the above example with one where the channel, pubkey, signature, and balance match #}-->
|
<!--{# TODO: replace the above example with one where the channel, pubkey, signature, and balance match #}-->
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:------------|:----------|:------------------|:-------------------------------|
|
|:------------|:----------|:------------------|:-------------------------------|
|
||||||
| `Channel` | String | Hash256 | The unique ID of the channel, as a 64-character hexadecimal string. |
|
| `Channel` | String | Hash256 | The unique ID of the channel, as a 64-character hexadecimal string. |
|
||||||
@@ -44,7 +48,7 @@ Example PaymentChannelClaim:
|
|||||||
| `PublicKey` | String | PubKey | _(Optional)_ The public key used for the signature, as hexadecimal. This must match the `PublicKey` stored in the ledger for the channel. Required unless the sender of the transaction is the source address of the channel and the `Signature` field is omitted. (The transaction includes the PubKey so that `rippled` can check the validity of the signature before trying to apply the transaction to the ledger.) |
|
| `PublicKey` | String | PubKey | _(Optional)_ The public key used for the signature, as hexadecimal. This must match the `PublicKey` stored in the ledger for the channel. Required unless the sender of the transaction is the source address of the channel and the `Signature` field is omitted. (The transaction includes the PubKey so that `rippled` can check the validity of the signature before trying to apply the transaction to the ledger.) |
|
||||||
|
|
||||||
|
|
||||||
### PaymentChannelClaim Flags
|
## PaymentChannelClaim Flags
|
||||||
|
|
||||||
Transactions of the PaymentChannelClaim type support additional values in the [`Flags` field](#flags), as follows:
|
Transactions of the PaymentChannelClaim type support additional values in the [`Flags` field](#flags), as follows:
|
||||||
|
|
||||||
@@ -52,3 +56,8 @@ Transactions of the PaymentChannelClaim type support additional values in the [`
|
|||||||
|:----------|:-----------|:--------------|:------------------------------------|
|
|:----------|:-----------|:--------------|:------------------------------------|
|
||||||
| `tfRenew` | 0x00010000 | 65536 | Clear the channel's `Expiration` time. (`Expiration` is different from the channel's immutable `CancelAfter` time.) Only the source address of the payment channel can use this flag. |
|
| `tfRenew` | 0x00010000 | 65536 | Clear the channel's `Expiration` time. (`Expiration` is different from the channel's immutable `CancelAfter` time.) Only the source address of the payment channel can use this flag. |
|
||||||
| `tfClose` | 0x00020000 | 131072 | Request to close the channel. Only the channel source and destination addresses can use this flag. This flag closes the channel immediately if it has no more XRP allocated to it after processing the current claim, or if the destination address uses it. If the source address uses this flag when the channel still holds XRP, this schedules the channel to close after `SettleDelay` seconds have passed. (Specifically, this sets the `Expiration` of the channel to the close time of the previous ledger plus the channel's `SettleDelay` time, unless the channel already has an earlier `Expiration` time.) If the destination address uses this flag when the channel still holds XRP, any XRP that remains after processing the claim is returned to the source address. |
|
| `tfClose` | 0x00020000 | 131072 | Request to close the channel. Only the channel source and destination addresses can use this flag. This flag closes the channel immediately if it has no more XRP allocated to it after processing the current claim, or if the destination address uses it. If the source address uses this flag when the channel still holds XRP, this schedules the channel to close after `SettleDelay` seconds have passed. (Specifically, this sets the `Expiration` of the channel to the close time of the previous ledger plus the channel's `SettleDelay` time, unless the channel already has an earlier `Expiration` time.) If the destination address uses this flag when the channel still holds XRP, any XRP that remains after processing the claim is returned to the source address. |
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
## PaymentChannelCreate
|
# PaymentChannelCreate
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/PayChan.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/PayChan.cpp "Source")
|
||||||
|
|
||||||
_Requires the [PayChan Amendment](reference-amendments.html#paychan)._
|
_Requires the [PayChan Amendment](reference-amendments.html#paychan)._
|
||||||
|
|
||||||
Create a unidirectional channel and fund it with XRP. The address sending this transaction becomes the "source address" of the payment channel.
|
Create a unidirectional channel and fund it with XRP. The address sending this transaction becomes the "source address" of the payment channel.
|
||||||
|
|
||||||
Example PaymentChannelCreate:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -21,6 +21,10 @@ Example PaymentChannelCreate:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:-----------------|:----------|:------------------|:--------------------------|
|
|:-----------------|:----------|:------------------|:--------------------------|
|
||||||
| `Amount` | String | Amount | Amount of [XRP, in drops][Currency Amount], to deduct from the sender's balance and set aside in this channel. While the channel is open, the XRP can only go to the `Destination` address. When the channel closes, any unclaimed XRP is returned to the source address's balance. |
|
| `Amount` | String | Amount | Amount of [XRP, in drops][Currency Amount], to deduct from the sender's balance and set aside in this channel. While the channel is open, the XRP can only go to the `Destination` address. When the channel closes, any unclaimed XRP is returned to the source address's balance. |
|
||||||
@@ -29,4 +33,8 @@ Example PaymentChannelCreate:
|
|||||||
| `PublicKey` | String | PubKey | The public key of the key pair the source will use to sign claims against this channel, in hexadecimal. This can be any secp256k1 or Ed25519 public key. <!-- STYLE_OVERRIDE: will --> |
|
| `PublicKey` | String | PubKey | The public key of the key pair the source will use to sign claims against this channel, in hexadecimal. This can be any secp256k1 or Ed25519 public key. <!-- STYLE_OVERRIDE: will --> |
|
||||||
| `CancelAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch](reference-rippled.html#specifying-time), when this channel expires. Any transaction that would modify the channel after this time closes the channel without otherwise affecting it. This value is immutable; the channel can be closed earlier than this time but cannot remain open after this time. |
|
| `CancelAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch](reference-rippled.html#specifying-time), when this channel expires. Any transaction that would modify the channel after this time closes the channel without otherwise affecting it. This value is immutable; the channel can be closed earlier than this time but cannot remain open after this time. |
|
||||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the destination for this payment channel, such as a hosted recipient at the destination address. |
|
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the destination for this payment channel, such as a hosted recipient at the destination address. |
|
||||||
| `SourceTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the source for this payment channel, such as a hosted sender at the source address. |
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## PaymentChannelFund
|
# PaymentChannelFund
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/PayChan.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/PayChan.cpp "Source")
|
||||||
|
|
||||||
_Requires the [PayChan Amendment](reference-amendments.html#paychan)._
|
_Requires the [PayChan Amendment](reference-amendments.html#paychan)._
|
||||||
@@ -17,8 +17,16 @@ Example PaymentChannelFund:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:-------------|:----------|:------------------|:------------------------------|
|
|:-------------|:----------|:------------------|:------------------------------|
|
||||||
| `Channel` | String | Hash256 | The unique ID of the channel to fund, as a 64-character hexadecimal string. |
|
| `Channel` | String | Hash256 | The unique ID of the channel to fund, as a 64-character hexadecimal string. |
|
||||||
| `Amount` | String | Amount | Amount of [XRP, in drops][Currency Amount] to add to the channel. To set the expiration for a channel without adding more XRP, set this to `"0"`. |
|
| `Amount` | String | Amount | Amount of [XRP, in drops][Currency Amount] to add to the channel. To set the expiration for a channel without adding more XRP, set this to `"0"`. |
|
||||||
| `Expiration` | Number | UInt32 | _(Optional)_ New `Expiration` time to set for the channel, in seconds since the Ripple Epoch. This must be later than either the current time plus the `SettleDelay` of the channel, or the existing `Expiration` of the channel. After the `Expiration` time, any transaction that would access the channel closes the channel without taking its normal action. Any unspent XRP is returned to the source address when the channel closes. (`Expiration` is separate from the channel's immutable `CancelAfter` time.) For more in formation, see the [PayChannel ledger object type](reference-ledger-format.html#paychannel). |
|
| `Expiration` | Number | UInt32 | _(Optional)_ New `Expiration` time to set for the channel, in seconds since the Ripple Epoch. This must be later than either the current time plus the `SettleDelay` of the channel, or the existing `Expiration` of the channel. After the `Expiration` time, any transaction that would access the channel closes the channel without taking its normal action. Any unspent XRP is returned to the source address when the channel closes. (`Expiration` is separate from the channel's immutable `CancelAfter` time.) For more in formation, see the [PayChannel ledger object type](reference-ledger-format.html#paychannel). |
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## SetRegularKey
|
# SetRegularKey
|
||||||
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/4239880acb5e559446d2067f00dabb31cf102a23/src/ripple/app/transactors/SetRegularKey.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/4239880acb5e559446d2067f00dabb31cf102a23/src/ripple/app/transactors/SetRegularKey.cpp "Source")
|
||||||
|
|
||||||
@@ -6,13 +6,9 @@ A `SetRegularKey` transaction assigns, changes, or removes the regular key pair
|
|||||||
|
|
||||||
You can protect your account by assigning a regular key pair to it and using it instead of the master key pair to sign transactions whenever possible. If your regular key pair is compromised, but your master key pair is not, you can use a `SetRegularKey` transaction to regain control of your account.
|
You can protect your account by assigning a regular key pair to it and using it instead of the master key pair to sign transactions whenever possible. If your regular key pair is compromised, but your master key pair is not, you can use a `SetRegularKey` transaction to regain control of your account.
|
||||||
|
|
||||||
For more information about regular and master key pairs, see [Cryptographic Keys](concept-cryptographic-keys.html).
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
For a tutorial on assigning a regular key pair to an account, see [Working with a Regular Key Pair](tutorial-regular-keys.html).
|
```json
|
||||||
|
|
||||||
For even greater security, you can use [multi-signing](#multi-signing), but multi-signing requires additional XRP for the [transaction cost](concept-transaction-cost.html) and [reserve](concept-reserves.html).
|
|
||||||
|
|
||||||
```
|
|
||||||
{
|
{
|
||||||
"Flags": 0,
|
"Flags": 0,
|
||||||
"TransactionType": "SetRegularKey",
|
"TransactionType": "SetRegularKey",
|
||||||
@@ -22,6 +18,22 @@ For even greater security, you can use [multi-signing](#multi-signing), but mult
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:-------------|:----------|:------------------|:------------------------------|
|
|:-------------|:----------|:------------------|:------------------------------|
|
||||||
| `RegularKey` | String | AccountID | _(Optional)_ A base-58-encoded [Ripple address](reference-rippled.html#addresses) that indicates the regular key pair to be assigned to the account. If omitted, removes any existing regular key pair from the account. |
|
| `RegularKey` | String | AccountID | _(Optional)_ A base-58-encoded [Ripple address](reference-rippled.html#addresses) that indicates the regular key pair to be assigned to the account. If omitted, removes any existing regular key pair from the account. |
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
For more information about regular and master key pairs, see [Cryptographic Keys](cryptographic-keys.html).
|
||||||
|
|
||||||
|
For a tutorial on assigning a regular key pair to an account, see [Working with a Regular Key Pair](working-with-a-regular-key-pair.html).
|
||||||
|
|
||||||
|
For even greater security, you can use [multi-signing](multi-signing.html), but multi-signing requires additional XRP for the [transaction cost][] and [reserve](reserves.html).
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
## SignerListSet
|
# SignerListSet
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/ef511282709a6a0721b504c6b7703f9de3eecf38/src/ripple/app/tx/impl/SetSignerList.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/ef511282709a6a0721b504c6b7703f9de3eecf38/src/ripple/app/tx/impl/SetSignerList.cpp "Source")
|
||||||
|
|
||||||
The SignerListSet transaction creates, replaces, or removes a list of signers that can be used to [multi-sign](#multi-signing) a transaction. This transaction type was introduced by the [MultiSign amendment](reference-amendments.html#multisign). [New in: rippled 0.31.0][]
|
The SignerListSet transaction creates, replaces, or removes a list of signers that can be used to [multi-sign](#multi-signing) a transaction. This transaction type was introduced by the [MultiSign amendment](reference-amendments.html#multisign). [New in: rippled 0.31.0][]
|
||||||
|
|
||||||
Example SignerListSet:
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"Flags": 0,
|
"Flags": 0,
|
||||||
"TransactionType": "SignerListSet",
|
"TransactionType": "SignerListSet",
|
||||||
@@ -35,6 +35,9 @@ Example SignerListSet:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:--------------|:----------|:------------------|:-----------------------------|
|
|:--------------|:----------|:------------------|:-----------------------------|
|
||||||
| SignerQuorum | Number | UInt32 | A target number for the signer weights. A multi-signature from this list is valid only if the sum weights of the signatures provided is greater than or equal to this value. To delete a SignerList, use the value `0`. |
|
| SignerQuorum | Number | UInt32 | A target number for the signer weights. A multi-signature from this list is valid only if the sum weights of the signatures provided is greater than or equal to this value. To delete a SignerList, use the value `0`. |
|
||||||
@@ -47,3 +50,8 @@ You cannot create a SignerList such that the SignerQuorum could never be met. Th
|
|||||||
You can create, update, or remove a SignerList using the master key, regular key, or the current SignerList, if those methods of signing transactions are available.
|
You can create, update, or remove a SignerList using the master key, regular key, or the current SignerList, if those methods of signing transactions are available.
|
||||||
|
|
||||||
You cannot remove the last method of signing transactions from an account. If an account's master key is disabled (it has the [`lsfDisableMaster` flag](reference-ledger-format.html#accountroot-flags) enabled) and the account does not have a [Regular Key](#setregularkey) configured, then you cannot delete the SignerList from the account. Instead, the transaction fails with the error [`tecNO_ALTERNATIVE_KEY`](#tec-codes).
|
You cannot remove the last method of signing transactions from an account. If an account's master key is disabled (it has the [`lsfDisableMaster` flag](reference-ledger-format.html#accountroot-flags) enabled) and the account does not have a [Regular Key](#setregularkey) configured, then you cannot delete the SignerList from the account. Instead, the transaction fails with the error [`tecNO_ALTERNATIVE_KEY`](#tec-codes).
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Transaction Types
|
||||||
|
|
||||||
|
The type of a transaction (`TransactionType` field) is the most fundamental information about a transaction. This indicates what type of operation the transaction is supposed to do.
|
||||||
|
|
||||||
|
All transactions have certain fields in common:
|
||||||
|
|
||||||
|
* [Common Fields](transaction-common-fields.html)
|
||||||
|
|
||||||
|
Each transaction type has additional fields relevant to the type of action it causes.
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
## TrustSet
|
# TrustSet
|
||||||
|
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/app/tx/impl/SetTrust.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/app/tx/impl/SetTrust.cpp "Source")
|
||||||
|
|
||||||
Create or modify a trust line linking two accounts.
|
Create or modify a trust line linking two accounts.
|
||||||
|
|
||||||
```
|
## Example {{currentpage.name}} JSON
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"TransactionType": "TrustSet",
|
"TransactionType": "TrustSet",
|
||||||
"Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
"Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||||
@@ -20,6 +22,9 @@ Create or modify a trust line linking two accounts.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% include '_snippets/tx-fields-intro.md' %}
|
||||||
|
<!--{# fix md highlighting_ #}-->
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Description |
|
| Field | JSON Type | [Internal Type][] | Description |
|
||||||
|:-----------------------------|:-----------------|:------------------|:-------|
|
|:-----------------------------|:-----------------|:------------------|:-------|
|
||||||
| [LimitAmount](#trust-limits) | Object | Amount | Object defining the trust line to create or modify, in the format of a [Currency Amount][]. |
|
| [LimitAmount](#trust-limits) | Object | Amount | Object defining the trust line to create or modify, in the format of a [Currency Amount][]. |
|
||||||
@@ -29,7 +34,7 @@ Create or modify a trust line linking two accounts.
|
|||||||
| QualityIn | Unsigned Integer | UInt32 | _(Optional)_ Value incoming balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of `0` is shorthand for treating balances at face value. |
|
| QualityIn | Unsigned Integer | UInt32 | _(Optional)_ Value incoming balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of `0` is shorthand for treating balances at face value. |
|
||||||
| QualityOut | Unsigned Integer | UInt32 | _(Optional)_ Value outgoing balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of `0` is shorthand for treating balances at face value. |
|
| QualityOut | Unsigned Integer | UInt32 | _(Optional)_ Value outgoing balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of `0` is shorthand for treating balances at face value. |
|
||||||
|
|
||||||
### Trust Limits
|
## Trust Limits
|
||||||
|
|
||||||
All balances on the XRP Ledger, except for XRP, represent value owed in the world outside the XRP Ledger. The address that issues those funds in the XRP Ledger (identified by the `issuer` field of the `LimitAmount` object) is expected to pay the balance back, outside of the XRP Ledger, when users redeem their XRP Ledger balances by returning them to the issuer.
|
All balances on the XRP Ledger, except for XRP, represent value owed in the world outside the XRP Ledger. The address that issues those funds in the XRP Ledger (identified by the `issuer` field of the `LimitAmount` object) is expected to pay the balance back, outside of the XRP Ledger, when users redeem their XRP Ledger balances by returning them to the issuer.
|
||||||
|
|
||||||
@@ -45,7 +50,7 @@ The default state of all flags is off, except for the [NoRipple flag](concept-no
|
|||||||
|
|
||||||
The Auth flag of a trust line does not determine whether the trust line counts towards its owner's XRP reserve requirement. However, an enabled Auth flag prevents the trust line from being in its default state. An authorized trust line can never be deleted. An issuer can pre-authorize a trust line with the `tfSetfAuth` flag only, even if the limit and balance of the trust line are 0.
|
The Auth flag of a trust line does not determine whether the trust line counts towards its owner's XRP reserve requirement. However, an enabled Auth flag prevents the trust line from being in its default state. An authorized trust line can never be deleted. An issuer can pre-authorize a trust line with the `tfSetfAuth` flag only, even if the limit and balance of the trust line are 0.
|
||||||
|
|
||||||
### TrustSet Flags
|
## TrustSet Flags
|
||||||
|
|
||||||
Transactions of the TrustSet type support additional values in the [`Flags` field](#flags), as follows:
|
Transactions of the TrustSet type support additional values in the [`Flags` field](#flags), as follows:
|
||||||
|
|
||||||
@@ -56,3 +61,8 @@ Transactions of the TrustSet type support additional values in the [`Flags` fiel
|
|||||||
| tfClearNoRipple | 0x00040000 | 262144 | Clears the No-Rippling flag. (See [NoRipple](concept-noripple.html) for details.) |
|
| tfClearNoRipple | 0x00040000 | 262144 | Clears the No-Rippling flag. (See [NoRipple](concept-noripple.html) for details.) |
|
||||||
| tfSetFreeze | 0x00100000 | 1048576 | [Freeze](concept-freeze.html) the trustline. |
|
| tfSetFreeze | 0x00100000 | 1048576 | [Freeze](concept-freeze.html) the trustline. |
|
||||||
| tfClearFreeze | 0x00200000 | 2097152 | [Unfreeze](concept-freeze.html) the trustline. |
|
| tfClearFreeze | 0x00200000 | 2097152 | [Unfreeze](concept-freeze.html) the trustline. |
|
||||||
|
|
||||||
|
<!--{# common link defs #}-->
|
||||||
|
{% include '_snippets/rippled-api-links.md' %}
|
||||||
|
{% include '_snippets/tx-type-links.md' %}
|
||||||
|
{% include '_snippets/rippled_versions.md' %}
|
||||||
|
|||||||
@@ -671,13 +671,15 @@ pages:
|
|||||||
targets:
|
targets:
|
||||||
- local
|
- local
|
||||||
|
|
||||||
- name: Transaction Types #TODO: pull landing content from transaction-format-old-monolith.md
|
- md: references/rippled-api/transaction-formats/transaction-types/transaction-types.md
|
||||||
html: transaction-types.html
|
html: transaction-types.html
|
||||||
funnel: Docs
|
funnel: Docs
|
||||||
doc_type: References
|
doc_type: References
|
||||||
supercategory: rippled API
|
supercategory: rippled API
|
||||||
category: Transaction Formats
|
category: Transaction Formats
|
||||||
subcategory: Transaction Types
|
subcategory: Transaction Types
|
||||||
|
blurb: All the different types of transactions that the XRP Ledger can process.
|
||||||
|
template: template-landing-children.html
|
||||||
targets:
|
targets:
|
||||||
- local
|
- local
|
||||||
|
|
||||||
@@ -688,10 +690,208 @@ pages:
|
|||||||
supercategory: rippled API
|
supercategory: rippled API
|
||||||
category: Transaction Formats
|
category: Transaction Formats
|
||||||
subcategory: Transaction Types
|
subcategory: Transaction Types
|
||||||
|
blurb: Set options on an account.
|
||||||
targets:
|
targets:
|
||||||
- local
|
- local
|
||||||
|
|
||||||
# TODO: 17 other transaction types
|
- md: references/rippled-api/transaction-formats/transaction-types/checkcancel.md
|
||||||
|
html: checkcancel.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Cancel a check.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/checkcash.md
|
||||||
|
html: checkcash.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Redeem a check.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/checkcreate.md
|
||||||
|
html: checkcreate.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Create a check.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/escrowcancel.md
|
||||||
|
html: escrowcancel.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Reclaim escrowed XRP.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/escrowcreate.md
|
||||||
|
html: escrowcreate.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Create an escrowed XRP payment.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/escrowfinish.md
|
||||||
|
html: escrowfinish.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Deliver escrowed XRP to recipient.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/offercancel.md
|
||||||
|
html: offercancel.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Withdraw a currency-exchange order.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/offercreate.md
|
||||||
|
html: offercreate.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Submit an order to exchange currency.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/payment.md
|
||||||
|
html: payment.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Send funds from one account to another.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/paymentchannelclaim.md
|
||||||
|
html: paymentchannelclaim.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Claim money from a payment channel.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/paymentchannelcreate.md
|
||||||
|
html: paymentchannelcreate.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Open a new payment channel.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/paymentchannelfund.md
|
||||||
|
html: paymentchannelfund.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Add more XRP to a payment channel.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/setregularkey.md
|
||||||
|
html: setregularkey.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Add, remove, or modify an account's regular key pair.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/signerlistset.md
|
||||||
|
html: signerlistset.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Add, remove, or modify an account's multi-signing list.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/transaction-types/trustset.md
|
||||||
|
html: trustset.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Transaction Types
|
||||||
|
blurb: Add or modify a trust line.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/pseudo-transaction-types/pseudo-transaction-types.md
|
||||||
|
html: pseudo-transaction-types.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Pseudo-Transaction Types
|
||||||
|
blurb: Formats of pseudo-transactions that validators sometimes apply to the XRP Ledger.
|
||||||
|
template: template-landing-children.html
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/pseudo-transaction-types/enableamendment.md
|
||||||
|
html: enableamendment.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Pseudo-Transaction Types
|
||||||
|
blurb: Enable a change in transaction processing.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
|
- md: references/rippled-api/transaction-formats/pseudo-transaction-types/setfee.md
|
||||||
|
html: setfee.html
|
||||||
|
funnel: Docs
|
||||||
|
doc_type: References
|
||||||
|
supercategory: rippled API
|
||||||
|
category: Transaction Formats
|
||||||
|
subcategory: Pseudo-Transaction Types
|
||||||
|
blurb: Change global reserve and transaction cost settings.
|
||||||
|
targets:
|
||||||
|
- local
|
||||||
|
|
||||||
- name: Transaction Results #TODO: pull landing content from transaction-format-old-monolith.md
|
- name: Transaction Results #TODO: pull landing content from transaction-format-old-monolith.md
|
||||||
html: transaction-results.html
|
html: transaction-results.html
|
||||||
@@ -700,6 +900,7 @@ pages:
|
|||||||
supercategory: rippled API
|
supercategory: rippled API
|
||||||
category: Transaction Formats
|
category: Transaction Formats
|
||||||
subcategory: Transaction Results
|
subcategory: Transaction Results
|
||||||
|
blurb: All possible transaction result codes and their meanings.
|
||||||
targets:
|
targets:
|
||||||
- local
|
- local
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user