mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-28 15:45:50 +00:00
Remove redocly-incompatible syntax from checks tutorials
This commit is contained in:
@@ -11,8 +11,6 @@ This tutorial shows how to cancel a [Check](../../../concepts/payment-types/chec
|
||||
|
||||
You may want to cancel an incoming Check if you do not want it. You might cancel an outgoing Check if you made a mistake when sending it or if circumstances have changed. If a Check expires, it's also necessary to cancel it to remove it from the ledger so the sender gets their [owner reserve](../../../concepts/accounts/reserves.md#owner-reserves) back.
|
||||
|
||||
{% set cancel_n = cycler(* range(1,99)) %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To cancel a Check with this tutorial, you need the following:
|
||||
@@ -24,7 +22,7 @@ To cancel a Check with this tutorial, you need the following:
|
||||
- A [client library](../../../references/client-libraries.md) or any HTTP or WebSocket library.
|
||||
|
||||
|
||||
## {{cancel_n.next()}}. Prepare the CheckCancel transaction
|
||||
## 1. Prepare the CheckCancel transaction
|
||||
|
||||
Figure out the values of the [CheckCancel transaction][] fields. The following fields are the bare minimum; everything else is either optional or can be [auto-filled](../../../references/protocol/transactions/common-fields.md#auto-fillable-fields) when signing:
|
||||
|
||||
@@ -57,7 +55,7 @@ The following examples show how to cancel a Check.
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
## {{cancel_n.next()}}. Sign the CheckCancel transaction
|
||||
## 2. Sign the CheckCancel transaction
|
||||
|
||||
{% partial file="/_snippets/tutorial-sign-step.md" /%}
|
||||
|
||||
@@ -91,9 +89,8 @@ The following examples show how to cancel a Check.
|
||||
{% /tabs %}
|
||||
|
||||
|
||||
## {{cancel_n.next()}}. Submit the signed CheckCancel transaction
|
||||
## 3. Submit the signed CheckCancel transaction
|
||||
|
||||
{% set step_1_link = "#1-prepare-the-checkcancel-transaction" %}
|
||||
{% partial file="/_snippets/tutorial-submit-step.md" /%}
|
||||
|
||||
### Example Request
|
||||
@@ -125,11 +122,11 @@ The following examples show how to cancel a Check.
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
## {{cancel_n.next()}}. Wait for validation
|
||||
## 4. Wait for validation
|
||||
|
||||
{% partial file="/_snippets/wait-for-validation.md" /%}
|
||||
|
||||
## {{cancel_n.next()}}. Confirm final result
|
||||
## 5. Confirm final result
|
||||
|
||||
Use the [tx method][] with the CheckCancel transaction's identifying hash to check its status. Look for a `"TransactionResult": "tesSUCCESS"` field in the transaction's metadata, indicating that the transaction succeeded, and the field `"validated": true` in the result, indicating that this result is final.
|
||||
|
||||
|
||||
@@ -13,14 +13,12 @@ You might cash a Check for a flexible amount if you want to get as much as possi
|
||||
|
||||
The specified recipient can also [cash the check for an exact amount](cash-a-check-for-a-flexible-amount.md).
|
||||
|
||||
{% set cash_flex_n = cycler(* range(1,99)) %}
|
||||
|
||||
|
||||
## Prerequisites
|
||||
|
||||
{% partial file="/_snippets/checkcash-prereqs.md" /%}
|
||||
|
||||
## {{cash_flex_n.next()}}. Prepare the CheckCash transaction
|
||||
## 1. Prepare the CheckCash transaction
|
||||
|
||||
Figure out the values of the [CheckCash transaction][] fields. To cash a check for a flexible amount, the following fields are the bare minimum; everything else is either optional or can be [auto-filled](../../../references/protocol/transactions/common-fields.md#auto-fillable-fields) when signing:
|
||||
|
||||
@@ -54,7 +52,7 @@ The following examples show how to prepare a transaction to cash a Check for a f
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
## {{cash_flex_n.next()}}. Sign the CheckCash transaction
|
||||
## 2. Sign the CheckCash transaction
|
||||
|
||||
{% partial file="/_snippets/tutorial-sign-step.md" /%}
|
||||
|
||||
@@ -80,9 +78,8 @@ The following examples show how to prepare a transaction to cash a Check for a f
|
||||
{% /tabs %}
|
||||
|
||||
|
||||
## {{cash_flex_n.next()}}. Submit the signed CheckCash transaction
|
||||
## 3. Submit the signed CheckCash transaction
|
||||
|
||||
{% set step_1_link = "#1-prepare-the-checkcash-transaction" %}
|
||||
{% partial file="/_snippets/tutorial-submit-step.md" /%}
|
||||
|
||||
### Example Request
|
||||
@@ -106,11 +103,11 @@ The following examples show how to prepare a transaction to cash a Check for a f
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
## {{cash_flex_n.next()}}. Wait for validation
|
||||
## 4. Wait for validation
|
||||
|
||||
{% partial file="/_snippets/wait-for-validation.md" /%}
|
||||
|
||||
## {{cash_flex_n.next()}}. Confirm final result
|
||||
## 5. Confirm final result
|
||||
|
||||
Use the [tx method][] with the CheckCash transaction's identifying hash to check its status. Look for a `"TransactionResult": "tesSUCCESS"` field in the transaction's metadata, indicating that the transaction succeeded, and the field `"validated": true` in the result, indicating that this result is final.
|
||||
|
||||
@@ -149,7 +146,7 @@ If cashing the Check failed with a `tec`-class code, look up the code in the [Fu
|
||||
| `tecPATH_PARTIAL` | The Check could not deliver enough tokens, either due to trust line limits or because the sender does not have enough balance of the token to send (including the issuer's [transfer fee](../../../concepts/tokens/transfer-fees.md), if there is one). | If the problem is the trust line limit, send a [TrustSet transaction][] to increase your limit (if desired) or lower your balance by spending some of the currency, then try to cash the Check again. If the problem is the sender's balance, wait for the sender to have more of the Check's currency, or try again to cash the Check for a lesser amount. |
|
||||
| `tecUNFUNDED_PAYMENT` | The Check could not deliver enough XRP. | Wait for the sender to have more XRP, or try again to cash the Check for a lesser amount. |
|
||||
|
||||
## {{cash_flex_n.next()}}. Confirm delivered amount
|
||||
## 6. Confirm delivered amount
|
||||
|
||||
If the Check was cashed for a flexible `DeliverMin` amount and succeeded, you can assume that the Check was cashed for at least the `DeliverMin` amount. To get the exact amount delivered, check the transaction metadata. The `delivered_amount` field in the metadata shows the exact amount delivered. (This field is only provided if the Check was cashed for a flexible amount. If the check was successfully cashed for a fixed amount, then the delivered amount is equal to the `Amount` of the CheckCash transaction.)
|
||||
|
||||
@@ -190,14 +187,8 @@ If the Check was cashed for a flexible `DeliverMin` amount and succeeded, you ca
|
||||
|
||||
- For tokens where the sender or recipient of the check is the issuer, the `RippleState` object representing the trust line between those accounts has its `Balance` adjusted in the favor of the Check's recipient.
|
||||
|
||||
<!-- {# TODO: example of single-RippleState balance changes #}-->
|
||||
|
||||
- For tokens with a third-party issuer, there are changes to two `RippleState` objects, representing the trust lines connecting the sender to the issuer, and the issuer to the recipient. The `RippleState` object representing the relationship between the Check's sender and the issuer has its `Balance` changed in favor of the issuer, and the `RippleState` object representing the relationship between the issuer and the recipient has its `Balance` changed in favor of the recipient.
|
||||
|
||||
<!--{# TODO: example of double-RippleState balance changes #}-->
|
||||
|
||||
- If the token has a [transfer fee](../../../concepts/tokens/transfer-fees.md), the Check's sender may be debited more than the recipient is credited. (The difference is the transfer fee, which is returned to the issuer as a decreased net obligation.)
|
||||
|
||||
<!--{# common links #}-->
|
||||
|
||||
{% raw-partial file="/_snippets/common-links.md" /%}
|
||||
|
||||
@@ -11,13 +11,11 @@ As long as the Check is in the ledger and not expired, the specified recipient c
|
||||
|
||||
The specified recipient can also [cash the check for a flexible amount](cash-a-check-for-a-flexible-amount.md).
|
||||
|
||||
{% set cash_exact_n = cycler(* range(1,99)) %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
{% partial file="/_snippets/checkcash-prereqs.md" /%}
|
||||
|
||||
## {{cash_exact_n.next()}}. Prepare the CheckCash transaction
|
||||
## 1. Prepare the CheckCash transaction
|
||||
|
||||
Figure out the values of the [CheckCash transaction][] fields. To cash a check for an exact amount, the following fields are the bare minimum; everything else is either optional or can be [auto-filled](../../../references/protocol/transactions/common-fields.md#auto-fillable-fields) when signing:
|
||||
|
||||
@@ -53,7 +51,7 @@ The following examples show how to prepare a transaction to cash a Check for a f
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
## {{cash_exact_n.next()}}. Sign the CheckCash transaction
|
||||
## 2. Sign the CheckCash transaction
|
||||
|
||||
{% partial file="/_snippets/tutorial-sign-step.md" /%}
|
||||
|
||||
@@ -79,9 +77,8 @@ The following examples show how to prepare a transaction to cash a Check for a f
|
||||
{% /tabs %}
|
||||
|
||||
|
||||
## {{cash_exact_n.next()}}. Submit the signed CheckCash transaction
|
||||
## 3. Submit the signed CheckCash transaction
|
||||
|
||||
{% set step_1_link = "#1-prepare-the-checkcash-transaction" %}
|
||||
{% partial file="/_snippets/tutorial-submit-step.md" /%}
|
||||
|
||||
### Example Request
|
||||
@@ -105,11 +102,11 @@ The following examples show how to prepare a transaction to cash a Check for a f
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
## {{cash_exact_n.next()}}. Wait for validation
|
||||
## 4. Wait for validation
|
||||
|
||||
{% partial file="/_snippets/wait-for-validation.md" /%}
|
||||
|
||||
## {{cash_exact_n.next()}}. Confirm final result
|
||||
## 5. Confirm final result
|
||||
|
||||
Use the [tx method][] with the CheckCash transaction's identifying hash to check its status. Look for a `"TransactionResult": "tesSUCCESS"` field in the transaction's metadata, indicating that the transaction succeeded, and the field `"validated": true` in the result, indicating that this result is final.
|
||||
|
||||
@@ -138,6 +135,4 @@ If cashing the Check failed, the Check remains in the ledger so you can try cash
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
<!--{# common links #}-->
|
||||
|
||||
{% raw-partial file="/_snippets/common-links.md" /%}
|
||||
|
||||
@@ -13,9 +13,6 @@ This tutorial shows how to look up [Checks](../../../concepts/payment-types/chec
|
||||
|
||||
To get a list of all incoming and outgoing Checks for an account, use the `account_objects` command with the recipient account's address and set the `type` field of the request to `checks`.
|
||||
|
||||
<!-- Moved this note to the account_objects method page. -->
|
||||
**Note:** The commandline interface to the `account_objects` command does not accept the `type` field. You can use the [json method][] to send the JSON-RPC format request on the commandline instead.
|
||||
|
||||
### Example Request
|
||||
|
||||
{% tabs %}
|
||||
@@ -67,6 +64,4 @@ for (i=0; i < account_objects_response.account_objects.length; i++) {
|
||||
}
|
||||
```
|
||||
|
||||
<!--{# common links #}-->
|
||||
|
||||
{% raw-partial file="/_snippets/common-links.md" /%}
|
||||
|
||||
@@ -11,12 +11,8 @@ This tutorial shows how to look up [Checks](../../../concepts/payment-types/chec
|
||||
|
||||
## 1. Look up all Checks for the address
|
||||
|
||||
<!--{# TODO: Update if https://github.com/XRPLF/rippled/issues/2443 gets done #}-->
|
||||
|
||||
To get a list of all incoming and outgoing Checks for an account, use the `account_objects` command with the sending account's address and set the `type` field of the request to `checks`.
|
||||
|
||||
<!-- This note moved to account_objects method page. -->
|
||||
**Note:** The commandline interface to the `account_objects` command does not accept the `type` field. You can use the [json method][] to send the JSON-RPC format request on the commandline instead.
|
||||
|
||||
### Example Request
|
||||
|
||||
@@ -68,6 +64,4 @@ for (i=0; i < account_objects_response.account_objects.length; i++) {
|
||||
}
|
||||
```
|
||||
|
||||
<!--{# common links #}-->
|
||||
|
||||
{% raw-partial file="/_snippets/common-links.md" /%}
|
||||
|
||||
@@ -15,8 +15,6 @@ This tutorial uses the example of a fictitious company, BoxSend SG (whose XRP Le
|
||||
|
||||
Outside of the XRP Ledger, Grand Payments sends an invoice to BoxSend SG with the ID `46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291`, and requests a Check for 100 XRP be sent to Grand Payments' XRP Ledger address of `rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis`. <!-- SPELLING_IGNORE: boxsend -->
|
||||
|
||||
{% set send_n = cycler(* range(1,99)) %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To send a Check with this tutorial, you need the following:
|
||||
@@ -27,7 +25,7 @@ To send a Check with this tutorial, you need the following:
|
||||
- A [secure way to sign transactions](../../../concepts/transactions/secure-signing.md).
|
||||
- A [client library](../../../references/client-libraries.md) or any HTTP or WebSocket library.
|
||||
|
||||
## {{send_n.next()}}. Prepare the CheckCreate transaction
|
||||
## 1. Prepare the CheckCreate transaction
|
||||
|
||||
Decide how much money the Check is for and who can cash it. Figure out the values of the [CheckCreate transaction][] fields. The following fields are the bare minimum; everything else is either optional or can be [auto-filled](../../../references/protocol/transactions/common-fields.md#auto-fillable-fields) when signing:
|
||||
|
||||
@@ -62,7 +60,7 @@ The following example shows a prepared Check from BoxSend SG (`rBXsgNkPcDN2runsv
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
## {{send_n.next()}}. Sign the CheckCreate transaction
|
||||
## 2. Sign the CheckCreate transaction
|
||||
|
||||
{% partial file="/_snippets/tutorial-sign-step.md" /%}
|
||||
|
||||
@@ -103,12 +101,10 @@ The following example shows a prepared Check from BoxSend SG (`rBXsgNkPcDN2runsv
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
## {{send_n.next()}}. Submit the signed transaction
|
||||
## 3. Submit the signed transaction
|
||||
|
||||
{% set step_1_link = "#1-prepare-the-checkcreate-transaction" %}
|
||||
{% partial file="/_snippets/tutorial-submit-step.md" /%}
|
||||
|
||||
|
||||
### Example Request
|
||||
|
||||
{% tabs %}
|
||||
@@ -146,12 +142,12 @@ The following example shows a prepared Check from BoxSend SG (`rBXsgNkPcDN2runsv
|
||||
{% /tabs %}
|
||||
|
||||
|
||||
## {{send_n.next()}}. Wait for validation
|
||||
## 4. Wait for validation
|
||||
|
||||
{% partial file="/_snippets/wait-for-validation.md" /%}
|
||||
|
||||
|
||||
## {{send_n.next()}}. Confirm final result
|
||||
## 5. Confirm final result
|
||||
|
||||
Use the [tx method][] with the CheckCreate transaction's identifying hash to check its status. Look for a `"TransactionResult": "tesSUCCESS"` field in the transaction's metadata, indicating that the transaction succeeded, and the field `"validated": true` in the result, indicating that this result is final.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user