From c072b2622cda016f03228dd3d1539b44eeb4e370 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Thu, 3 May 2018 11:19:45 -0700 Subject: [PATCH] New file structure for concepts & tutorials --- .../{concept-checks.md => checks.md} | 0 .../complex-payment-types.md | 3 + .../{concept-escrow.md => escrow.md} | 0 ...artial-payments.md => partial-payments.md} | 0 .../{concept-amendments.md => amendments.md} | 0 ...etwork-landing.md => consensus-network.md} | 0 .../{concept-fee-voting.md => fee-voting.md} | 0 .../decentralized-exchange.md | 3 + ...ust-lines.md => authorized-trust-lines.md} | 0 .../{concept-demurrage.md => demurrage.md} | 0 .../{concept-freeze.md => freeze.md} | 10 +- .../{concept-noripple.md => noripple.md} | 0 .../{concept-paths.md => paths.md} | 0 ...cept-transfer-fees.md => transfer-fees.md} | 0 .../history-sharding.md | 0 .../stand-alone-mode.md | 0 .../the-rippled-server.md} | 2 +- ...-started-with-rippleapi-for-javascript.md} | 8 +- ...-get-started-landing.md => get-started.md} | 0 ...-landing.md => manage-account-settings.md} | 0 .../{tutorial-multisign.md => multisign.md} | 0 ...torial-regular-keys.md => regular-keys.md} | 0 .../manage-issued-currencies.md | 3 + ...-ubuntu.md => build-run-rippled-ubuntu.md} | 0 .../manage-the-rippled-server.md | 3 + ...-rippled-landing.md => rippled-landing.md} | 0 ...rial-rippled-setup.md => rippled-setup.md} | 0 .../checks-cancel.md} | 26 +- .../checks-cash-exact.md} | 14 +- .../checks-cash-flex.md} | 14 +- .../checks-lookup-by-recipient.md} | 8 +- .../checks-lookup-by-sender.md} | 8 +- .../send-a-check.md} | 38 +- .../use-checks/use-checks.md | 5 + .../use-complex-payment-types.md | 3 + .../escrow.md} | 60 +- ...ial-paychan.md => use-payment-channels.md} | 0 ....md => reliable-transaction-submission.md} | 0 .../use-simple-xrp-payments.md | 3 + ...ide.md => become-an-xrp-ledger-gateway.md} | 0 .../list-xrp-as-an-exchange.md | 125 ++-- .../tutorial-listing-xrp.md | 602 ------------------ .../xrp-ledger-businesses.md | 3 + dactyl-config.yml | 360 +++++++---- 44 files changed, 441 insertions(+), 860 deletions(-) rename content/concepts/complex-payment-types/{concept-checks.md => checks.md} (100%) create mode 100644 content/concepts/complex-payment-types/complex-payment-types.md rename content/concepts/complex-payment-types/{concept-escrow.md => escrow.md} (100%) rename content/concepts/complex-payment-types/{concept-partial-payments.md => partial-payments.md} (100%) rename content/concepts/consensus-network/{concept-amendments.md => amendments.md} (100%) rename content/concepts/consensus-network/{concept-consensus-network-landing.md => consensus-network.md} (100%) rename content/concepts/consensus-network/{concept-fee-voting.md => fee-voting.md} (100%) create mode 100644 content/concepts/decentralized-exchange/decentralized-exchange.md rename content/concepts/issued-currencies/{concept-authorized-trust-lines.md => authorized-trust-lines.md} (100%) rename content/concepts/issued-currencies/{concept-demurrage.md => demurrage.md} (100%) rename content/concepts/issued-currencies/{concept-freeze.md => freeze.md} (98%) rename content/concepts/issued-currencies/{concept-noripple.md => noripple.md} (100%) rename content/concepts/issued-currencies/{concept-paths.md => paths.md} (100%) rename content/concepts/issued-currencies/{concept-transfer-fees.md => transfer-fees.md} (100%) rename content/concepts/{about-rippled => the-rippled-server}/history-sharding.md (100%) rename content/concepts/{about-rippled => the-rippled-server}/stand-alone-mode.md (100%) rename content/concepts/{about-rippled/about-rippled.md => the-rippled-server/the-rippled-server.md} (99%) rename content/tutorials/get-started/{tutorial-rippleapi-beginners-guide.md => get-started-with-rippleapi-for-javascript.md} (98%) rename content/tutorials/get-started/{tutorial-get-started-landing.md => get-started.md} (100%) rename content/tutorials/manage-account-settings/{tutorial-manage-acct-settings-landing.md => manage-account-settings.md} (100%) rename content/tutorials/manage-account-settings/{tutorial-multisign.md => multisign.md} (100%) rename content/tutorials/manage-account-settings/{tutorial-regular-keys.md => regular-keys.md} (100%) create mode 100644 content/tutorials/manage-issued-currencies/manage-issued-currencies.md rename content/tutorials/manage-the-rippled-server/{tutorial-build-run-rippled-ubuntu.md => build-run-rippled-ubuntu.md} (100%) create mode 100644 content/tutorials/manage-the-rippled-server/manage-the-rippled-server.md rename content/tutorials/manage-the-rippled-server/{tutorial-rippled-landing.md => rippled-landing.md} (100%) rename content/tutorials/manage-the-rippled-server/{tutorial-rippled-setup.md => rippled-setup.md} (100%) rename content/tutorials/use-complex-payment-types/{tutorial-checks-cancel.md => use-checks/checks-cancel.md} (86%) rename content/tutorials/use-complex-payment-types/{tutorial-checks-cash-exact.md => use-checks/checks-cash-exact.md} (91%) rename content/tutorials/use-complex-payment-types/{tutorial-checks-cash-flex.md => use-checks/checks-cash-flex.md} (95%) rename content/tutorials/use-complex-payment-types/{tutorial-checks-lookup-by-recipient.md => use-checks/checks-lookup-by-recipient.md} (89%) rename content/tutorials/use-complex-payment-types/{tutorial-checks-lookup-by-sender.md => use-checks/checks-lookup-by-sender.md} (90%) rename content/tutorials/use-complex-payment-types/{tutorial-checks-send.md => use-checks/send-a-check.md} (85%) create mode 100644 content/tutorials/use-complex-payment-types/use-checks/use-checks.md create mode 100644 content/tutorials/use-complex-payment-types/use-complex-payment-types.md rename content/tutorials/use-complex-payment-types/{tutorial-escrow.md => use-escrows/escrow.md} (89%) rename content/tutorials/use-complex-payment-types/{tutorial-paychan.md => use-payment-channels.md} (100%) rename content/tutorials/use-simple-xrp-payments/{tutorial-reliable-transaction-submission.md => reliable-transaction-submission.md} (100%) create mode 100644 content/tutorials/use-simple-xrp-payments/use-simple-xrp-payments.md rename content/tutorials/xrp-ledger-businesses/{tutorial-gateway-guide.md => become-an-xrp-ledger-gateway.md} (100%) delete mode 100644 content/tutorials/xrp-ledger-businesses/tutorial-listing-xrp.md create mode 100644 content/tutorials/xrp-ledger-businesses/xrp-ledger-businesses.md diff --git a/content/concepts/complex-payment-types/concept-checks.md b/content/concepts/complex-payment-types/checks.md similarity index 100% rename from content/concepts/complex-payment-types/concept-checks.md rename to content/concepts/complex-payment-types/checks.md diff --git a/content/concepts/complex-payment-types/complex-payment-types.md b/content/concepts/complex-payment-types/complex-payment-types.md new file mode 100644 index 0000000000..5318f5d904 --- /dev/null +++ b/content/concepts/complex-payment-types/complex-payment-types.md @@ -0,0 +1,3 @@ +# Complex Payment Types + +In addition to simple point-to-point XRP Payments, the XRP Ledger supports a number of complex payment types for a variety of use cases and situations. diff --git a/content/concepts/complex-payment-types/concept-escrow.md b/content/concepts/complex-payment-types/escrow.md similarity index 100% rename from content/concepts/complex-payment-types/concept-escrow.md rename to content/concepts/complex-payment-types/escrow.md diff --git a/content/concepts/complex-payment-types/concept-partial-payments.md b/content/concepts/complex-payment-types/partial-payments.md similarity index 100% rename from content/concepts/complex-payment-types/concept-partial-payments.md rename to content/concepts/complex-payment-types/partial-payments.md diff --git a/content/concepts/consensus-network/concept-amendments.md b/content/concepts/consensus-network/amendments.md similarity index 100% rename from content/concepts/consensus-network/concept-amendments.md rename to content/concepts/consensus-network/amendments.md diff --git a/content/concepts/consensus-network/concept-consensus-network-landing.md b/content/concepts/consensus-network/consensus-network.md similarity index 100% rename from content/concepts/consensus-network/concept-consensus-network-landing.md rename to content/concepts/consensus-network/consensus-network.md diff --git a/content/concepts/consensus-network/concept-fee-voting.md b/content/concepts/consensus-network/fee-voting.md similarity index 100% rename from content/concepts/consensus-network/concept-fee-voting.md rename to content/concepts/consensus-network/fee-voting.md diff --git a/content/concepts/decentralized-exchange/decentralized-exchange.md b/content/concepts/decentralized-exchange/decentralized-exchange.md new file mode 100644 index 0000000000..a086e967a3 --- /dev/null +++ b/content/concepts/decentralized-exchange/decentralized-exchange.md @@ -0,0 +1,3 @@ +# Decentralized Exchange + +The XRP Ledger contains a fully-functional exchange where users can trade issued currencies for XRP or each other. diff --git a/content/concepts/issued-currencies/concept-authorized-trust-lines.md b/content/concepts/issued-currencies/authorized-trust-lines.md similarity index 100% rename from content/concepts/issued-currencies/concept-authorized-trust-lines.md rename to content/concepts/issued-currencies/authorized-trust-lines.md diff --git a/content/concepts/issued-currencies/concept-demurrage.md b/content/concepts/issued-currencies/demurrage.md similarity index 100% rename from content/concepts/issued-currencies/concept-demurrage.md rename to content/concepts/issued-currencies/demurrage.md diff --git a/content/concepts/issued-currencies/concept-freeze.md b/content/concepts/issued-currencies/freeze.md similarity index 98% rename from content/concepts/issued-currencies/concept-freeze.md rename to content/concepts/issued-currencies/freeze.md index 020ab11f6f..b6cbad5c2b 100644 --- a/content/concepts/issued-currencies/concept-freeze.md +++ b/content/concepts/issued-currencies/freeze.md @@ -126,7 +126,7 @@ The rest of the [transaction flow](reference-rippleapi.html#transaction-flow) is Example JavaScript (ECMAScript 6) code to enable Individual Freeze on a trust line: ```js -{% include 'code_samples/freeze/set-individual-freeze.js' %} +{% include '_code-samples/freeze/set-individual-freeze.js' %} ``` @@ -173,7 +173,7 @@ The rest of the [transaction flow](reference-rippleapi.html#transaction-flow) is Example JavaScript (ECMAScript 6) code to enable Global Freeze on an address: ```js -{% include 'code_samples/freeze/set-global-freeze.js' %} +{% include '_code-samples/freeze/set-global-freeze.js' %} ``` @@ -222,7 +222,7 @@ You must [sign](reference-rippleapi.html#sign) this transaction using the master Example JavaScript (ECMAScript 6) code to enable No Freeze on an address: ```js -{% include 'code_samples/freeze/set-no-freeze.js' %} +{% include '_code-samples/freeze/set-no-freeze.js' %} ``` @@ -305,7 +305,7 @@ The response contains an array of trust lines, for each currency in which the is Example JavaScript (ECMAScript 6) code to check whether a trust line is frozen: ```js -{% include 'code_samples/freeze/check-individual-freeze.js' %} +{% include '_code-samples/freeze/check-individual-freeze.js' %} ``` @@ -401,7 +401,7 @@ Look for the following values in the response object: Example JavaScript (ECMAScript 6) code to check whether an address has Global Freeze or No Freeze enabled: ```js -{% include 'code_samples/freeze/check-global-freeze-no-freeze.js' %} +{% include '_code-samples/freeze/check-global-freeze-no-freeze.js' %} ``` # See Also diff --git a/content/concepts/issued-currencies/concept-noripple.md b/content/concepts/issued-currencies/noripple.md similarity index 100% rename from content/concepts/issued-currencies/concept-noripple.md rename to content/concepts/issued-currencies/noripple.md diff --git a/content/concepts/issued-currencies/concept-paths.md b/content/concepts/issued-currencies/paths.md similarity index 100% rename from content/concepts/issued-currencies/concept-paths.md rename to content/concepts/issued-currencies/paths.md diff --git a/content/concepts/issued-currencies/concept-transfer-fees.md b/content/concepts/issued-currencies/transfer-fees.md similarity index 100% rename from content/concepts/issued-currencies/concept-transfer-fees.md rename to content/concepts/issued-currencies/transfer-fees.md diff --git a/content/concepts/about-rippled/history-sharding.md b/content/concepts/the-rippled-server/history-sharding.md similarity index 100% rename from content/concepts/about-rippled/history-sharding.md rename to content/concepts/the-rippled-server/history-sharding.md diff --git a/content/concepts/about-rippled/stand-alone-mode.md b/content/concepts/the-rippled-server/stand-alone-mode.md similarity index 100% rename from content/concepts/about-rippled/stand-alone-mode.md rename to content/concepts/the-rippled-server/stand-alone-mode.md diff --git a/content/concepts/about-rippled/about-rippled.md b/content/concepts/the-rippled-server/the-rippled-server.md similarity index 99% rename from content/concepts/about-rippled/about-rippled.md rename to content/concepts/the-rippled-server/the-rippled-server.md index c41a150cf5..b1cbcceece 100644 --- a/content/concepts/about-rippled/about-rippled.md +++ b/content/concepts/the-rippled-server/the-rippled-server.md @@ -1,4 +1,4 @@ -# About rippled +# The rippled Server `rippled` is the core peer-to-peer server that manages the XRP Ledger. This section covers concepts that help you learn the "what" and "why" behind fundamental aspects of the `rippled` server. diff --git a/content/tutorials/get-started/tutorial-rippleapi-beginners-guide.md b/content/tutorials/get-started/get-started-with-rippleapi-for-javascript.md similarity index 98% rename from content/tutorials/get-started/tutorial-rippleapi-beginners-guide.md rename to content/tutorials/get-started/get-started-with-rippleapi-for-javascript.md index 3e931a2188..f931dfe92f 100644 --- a/content/tutorials/get-started/tutorial-rippleapi-beginners-guide.md +++ b/content/tutorials/get-started/get-started-with-rippleapi-for-javascript.md @@ -56,7 +56,7 @@ Use the following template, which includes: * (Optional) [ESLint](http://eslint.org/) (`eslint`) for checking code quality. ``` -{% include 'code_samples/rippleapi_quickstart/package.json' %} +{% include '_code-samples/rippleapi_quickstart/package.json' %} ``` @@ -81,7 +81,7 @@ npm WARN ajv@1.4.10 requires a peer of ajv-i18n@0.1.x but none was installed. This script, `get-account-info.js`, fetches information about a hard-coded account. Use it to test that RippleAPI works: ``` -{% include 'code_samples/rippleapi_quickstart/get-account-info.js' %} +{% include '_code-samples/rippleapi_quickstart/get-account-info.js' %} ``` ## Running the script @@ -197,7 +197,7 @@ The `catch` method ends this Promise chain. The callback provided here runs if a One of the biggest challenges in using the XRP Ledger (or any decentralized system) is knowing the final, immutable transaction results. Even if you [follow the best practices](tutorial-reliable-transaction-submission.html) you still have to wait for the [consensus process](https://ripple.com/build/ripple-ledger-consensus-process/) to finally accept or reject your transaction. The following example code demonstrates how to wait for the final outcome of a transaction: ``` -{% include 'code_samples/rippleapi_quickstart/submit-and-verify.js' %} +{% include '_code-samples/rippleapi_quickstart/submit-and-verify.js' %} ``` This code creates and submits an order transaction, although the same principles apply to other types of transactions as well. After submitting the transaction, the code uses a new Promise, which queries the ledger again after using setTimeout to wait a fixed amount of time, to see if the transaction has been verified. If it hasn't been verified, the process repeats until either the transaction is found in a validated ledger or the returned ledger is higher than the LastLedgerSequence parameter. @@ -285,5 +285,5 @@ To use this example, you must first [build RippleAPI](#build-instructions) and t [**browser-demo.html:**](https://github.com/ripple/ripple-dev-portal/blob/master/content/code_samples/rippleapi_quickstart/browser-demo.html "Source on GitHub") ``` -{% include 'code_samples/rippleapi_quickstart/browser-demo.html' %} +{% include '_code-samples/rippleapi_quickstart/browser-demo.html' %} ``` diff --git a/content/tutorials/get-started/tutorial-get-started-landing.md b/content/tutorials/get-started/get-started.md similarity index 100% rename from content/tutorials/get-started/tutorial-get-started-landing.md rename to content/tutorials/get-started/get-started.md diff --git a/content/tutorials/manage-account-settings/tutorial-manage-acct-settings-landing.md b/content/tutorials/manage-account-settings/manage-account-settings.md similarity index 100% rename from content/tutorials/manage-account-settings/tutorial-manage-acct-settings-landing.md rename to content/tutorials/manage-account-settings/manage-account-settings.md diff --git a/content/tutorials/manage-account-settings/tutorial-multisign.md b/content/tutorials/manage-account-settings/multisign.md similarity index 100% rename from content/tutorials/manage-account-settings/tutorial-multisign.md rename to content/tutorials/manage-account-settings/multisign.md diff --git a/content/tutorials/manage-account-settings/tutorial-regular-keys.md b/content/tutorials/manage-account-settings/regular-keys.md similarity index 100% rename from content/tutorials/manage-account-settings/tutorial-regular-keys.md rename to content/tutorials/manage-account-settings/regular-keys.md diff --git a/content/tutorials/manage-issued-currencies/manage-issued-currencies.md b/content/tutorials/manage-issued-currencies/manage-issued-currencies.md new file mode 100644 index 0000000000..168ab740e3 --- /dev/null +++ b/content/tutorials/manage-issued-currencies/manage-issued-currencies.md @@ -0,0 +1,3 @@ +# Manage Issued Currencies + +These tutorials walk through monitoring and managing issued currencies in the XRP Ledger, both as an issuer and as a user of issued currencies. diff --git a/content/tutorials/manage-the-rippled-server/tutorial-build-run-rippled-ubuntu.md b/content/tutorials/manage-the-rippled-server/build-run-rippled-ubuntu.md similarity index 100% rename from content/tutorials/manage-the-rippled-server/tutorial-build-run-rippled-ubuntu.md rename to content/tutorials/manage-the-rippled-server/build-run-rippled-ubuntu.md diff --git a/content/tutorials/manage-the-rippled-server/manage-the-rippled-server.md b/content/tutorials/manage-the-rippled-server/manage-the-rippled-server.md new file mode 100644 index 0000000000..b63d32124c --- /dev/null +++ b/content/tutorials/manage-the-rippled-server/manage-the-rippled-server.md @@ -0,0 +1,3 @@ +# Manage the rippled Server + +This category encompasses various procedures for running stable and effective `rippled` servers. diff --git a/content/tutorials/manage-the-rippled-server/tutorial-rippled-landing.md b/content/tutorials/manage-the-rippled-server/rippled-landing.md similarity index 100% rename from content/tutorials/manage-the-rippled-server/tutorial-rippled-landing.md rename to content/tutorials/manage-the-rippled-server/rippled-landing.md diff --git a/content/tutorials/manage-the-rippled-server/tutorial-rippled-setup.md b/content/tutorials/manage-the-rippled-server/rippled-setup.md similarity index 100% rename from content/tutorials/manage-the-rippled-server/tutorial-rippled-setup.md rename to content/tutorials/manage-the-rippled-server/rippled-setup.md diff --git a/content/tutorials/use-complex-payment-types/tutorial-checks-cancel.md b/content/tutorials/use-complex-payment-types/use-checks/checks-cancel.md similarity index 86% rename from content/tutorials/use-complex-payment-types/tutorial-checks-cancel.md rename to content/tutorials/use-complex-payment-types/use-checks/checks-cancel.md index 3f26ae1182..d34a1a41f6 100644 --- a/content/tutorials/use-complex-payment-types/tutorial-checks-cancel.md +++ b/content/tutorials/use-complex-payment-types/use-checks/checks-cancel.md @@ -52,7 +52,7 @@ The following examples demonstrate how to cancel a Check. *RippleAPI* ```js -{% include 'code_samples/checks/js/prepareCancel.js' %} +{% include '_code-samples/checks/js/prepareCancel.js' %} ``` @@ -68,13 +68,13 @@ The following examples demonstrate how to cancel a Check. *RippleAPI* ```js -{% include 'code_samples/checks/js/signCancel.js' %} +{% include '_code-samples/checks/js/signCancel.js' %} ``` *Commandline* ```bash -{% include 'code_samples/checks/cli/sign-cancel-req.sh' %} +{% include '_code-samples/checks/cli/sign-cancel-req.sh' %} ``` @@ -87,13 +87,13 @@ The following examples demonstrate how to cancel a Check. *RippleAPI* ``` -{% include 'code_samples/checks/js/sign-cancel-resp.txt' %} +{% include '_code-samples/checks/js/sign-cancel-resp.txt' %} ``` *Commandline* ```json -{% include 'code_samples/checks/cli/sign-cancel-resp.txt' %} +{% include '_code-samples/checks/cli/sign-cancel-resp.txt' %} ``` @@ -111,13 +111,13 @@ The following examples demonstrate how to cancel a Check. *RippleAPI* ```js -{% include 'code_samples/checks/js/submitCancel.js' %} +{% include '_code-samples/checks/js/submitCancel.js' %} ``` *Commandline* ```bash -{% include 'code_samples/checks/cli/submit-cancel-req.sh' %} +{% include '_code-samples/checks/cli/submit-cancel-req.sh' %} ``` @@ -130,13 +130,13 @@ The following examples demonstrate how to cancel a Check. *RippleAPI* ```js -{% include 'code_samples/checks/js/submit-cancel-resp.txt' %} +{% include '_code-samples/checks/js/submit-cancel-resp.txt' %} ``` *Commandline* ```json -{% include 'code_samples/checks/cli/submit-cancel-resp.txt' %} +{% include '_code-samples/checks/cli/submit-cancel-resp.txt' %} ``` @@ -158,13 +158,13 @@ Look for a `DeletedNode` object in the transaction metadata with `"LedgerEntryTy *RippleAPI* ```js -{% include 'code_samples/checks/js/getCancelTx.js' %} +{% include '_code-samples/checks/js/getCancelTx.js' %} ``` *Commandline* ```bash -{% include 'code_samples/checks/cli/tx-cancel-req.sh' %} +{% include '_code-samples/checks/cli/tx-cancel-req.sh' %} ``` @@ -177,13 +177,13 @@ Look for a `DeletedNode` object in the transaction metadata with `"LedgerEntryTy *RippleAPI* ```json -{% include 'code_samples/checks/js/get-cancel-tx-resp.txt' %} +{% include '_code-samples/checks/js/get-cancel-tx-resp.txt' %} ``` *Commandline* ```json -{% include 'code_samples/checks/cli/tx-cancel-resp.txt' %} +{% include '_code-samples/checks/cli/tx-cancel-resp.txt' %} ``` diff --git a/content/tutorials/use-complex-payment-types/tutorial-checks-cash-exact.md b/content/tutorials/use-complex-payment-types/use-checks/checks-cash-exact.md similarity index 91% rename from content/tutorials/use-complex-payment-types/tutorial-checks-cash-exact.md rename to content/tutorials/use-complex-payment-types/use-checks/checks-cash-exact.md index f7ee42db48..5999430295 100644 --- a/content/tutorials/use-complex-payment-types/tutorial-checks-cash-exact.md +++ b/content/tutorials/use-complex-payment-types/use-checks/checks-cash-exact.md @@ -43,7 +43,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *RippleAPI* ```js -{% include 'code_samples/checks/js/prepareCashExact.js' %} +{% include '_code-samples/checks/js/prepareCashExact.js' %} ``` @@ -59,7 +59,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *Commandline* ```bash -{% include 'code_samples/checks/cli/sign-cash-exact-req.sh' %} +{% include '_code-samples/checks/cli/sign-cash-exact-req.sh' %} ``` @@ -72,7 +72,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *Commandline* ```json -{% include 'code_samples/checks/cli/sign-cash-exact-resp.txt' %} +{% include '_code-samples/checks/cli/sign-cash-exact-resp.txt' %} ``` @@ -90,7 +90,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *Commandline* ```bash -{% include 'code_samples/checks/cli/submit-cash-exact-req.sh' %} +{% include '_code-samples/checks/cli/submit-cash-exact-req.sh' %} ``` @@ -103,7 +103,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *Commandline* ```json -{% include 'code_samples/checks/cli/submit-cash-exact-resp.txt' %} +{% include '_code-samples/checks/cli/submit-cash-exact-resp.txt' %} ``` @@ -127,7 +127,7 @@ If cashing the Check failed, the Check remains in the ledger so you can try cash *Commandline* ```bash -{% include 'code_samples/checks/cli/tx-cash-exact-req.sh' %} +{% include '_code-samples/checks/cli/tx-cash-exact-req.sh' %} ``` @@ -140,7 +140,7 @@ If cashing the Check failed, the Check remains in the ledger so you can try cash *Commandline* ```json -{% include 'code_samples/checks/cli/tx-cash-exact-resp.txt' %} +{% include '_code-samples/checks/cli/tx-cash-exact-resp.txt' %} ``` diff --git a/content/tutorials/use-complex-payment-types/tutorial-checks-cash-flex.md b/content/tutorials/use-complex-payment-types/use-checks/checks-cash-flex.md similarity index 95% rename from content/tutorials/use-complex-payment-types/tutorial-checks-cash-flex.md rename to content/tutorials/use-complex-payment-types/use-checks/checks-cash-flex.md index 8f94237065..ceeae113de 100644 --- a/content/tutorials/use-complex-payment-types/tutorial-checks-cash-flex.md +++ b/content/tutorials/use-complex-payment-types/use-checks/checks-cash-flex.md @@ -44,7 +44,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *RippleAPI* ```js -{% include 'code_samples/checks/js/prepareCashFlex.js' %} +{% include '_code-samples/checks/js/prepareCashFlex.js' %} ``` @@ -60,7 +60,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *Commandline* ```bash -{% include 'code_samples/checks/cli/sign-cash-flex-req.sh' %} +{% include '_code-samples/checks/cli/sign-cash-flex-req.sh' %} ``` @@ -73,7 +73,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *Commandline* ```json -{% include 'code_samples/checks/cli/sign-cash-flex-resp.txt' %} +{% include '_code-samples/checks/cli/sign-cash-flex-resp.txt' %} ``` @@ -91,7 +91,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *Commandline* ```bash -{% include 'code_samples/checks/cli/submit-cash-flex-req.sh' %} +{% include '_code-samples/checks/cli/submit-cash-flex-req.sh' %} ``` @@ -104,7 +104,7 @@ The following examples show how to prepare a transaction to cash a Check for a f *Commandline* ```json -{% include 'code_samples/checks/cli/submit-cash-flex-resp.txt' %} +{% include '_code-samples/checks/cli/submit-cash-flex-resp.txt' %} ``` @@ -124,7 +124,7 @@ Use the [`tx` method](reference-rippled.html#tx) with the CheckCash transaction' *Commandline* ```bash -{% include 'code_samples/checks/cli/tx-cash-flex-req.sh' %} +{% include '_code-samples/checks/cli/tx-cash-flex-req.sh' %} ``` @@ -137,7 +137,7 @@ Use the [`tx` method](reference-rippled.html#tx) with the CheckCash transaction' *Commandline* ```json -{% include 'code_samples/checks/cli/tx-cash-flex-resp.txt' %} +{% include '_code-samples/checks/cli/tx-cash-flex-resp.txt' %} ``` diff --git a/content/tutorials/use-complex-payment-types/tutorial-checks-lookup-by-recipient.md b/content/tutorials/use-complex-payment-types/use-checks/checks-lookup-by-recipient.md similarity index 89% rename from content/tutorials/use-complex-payment-types/tutorial-checks-lookup-by-recipient.md rename to content/tutorials/use-complex-payment-types/use-checks/checks-lookup-by-recipient.md index 38a32567e7..0ae2fb2bdf 100644 --- a/content/tutorials/use-complex-payment-types/tutorial-checks-lookup-by-recipient.md +++ b/content/tutorials/use-complex-payment-types/use-checks/checks-lookup-by-recipient.md @@ -17,13 +17,13 @@ To get a list of all incoming and outgoing Checks for an account, use the `accou *RippleAPI* ```js -{% include 'code_samples/checks/js/getChecks.js' %} +{% include '_code-samples/checks/js/getChecks.js' %} ``` *JSON-RPC* ```json -{% include 'code_samples/checks/json-rpc/account_objects-req.json' %} +{% include '_code-samples/checks/json-rpc/account_objects-req.json' %} ``` @@ -35,7 +35,7 @@ To get a list of all incoming and outgoing Checks for an account, use the `accou *RippleAPI* ``` -{% include 'code_samples/checks/js/get-checks-resp.txt' %} +{% include '_code-samples/checks/js/get-checks-resp.txt' %} ``` *JSON-RPC* @@ -43,7 +43,7 @@ To get a list of all incoming and outgoing Checks for an account, use the `accou ```json 200 OK -{% include 'code_samples/checks/json-rpc/account_objects-resp.json' %} +{% include '_code-samples/checks/json-rpc/account_objects-resp.json' %} ``` diff --git a/content/tutorials/use-complex-payment-types/tutorial-checks-lookup-by-sender.md b/content/tutorials/use-complex-payment-types/use-checks/checks-lookup-by-sender.md similarity index 90% rename from content/tutorials/use-complex-payment-types/tutorial-checks-lookup-by-sender.md rename to content/tutorials/use-complex-payment-types/use-checks/checks-lookup-by-sender.md index e61ac0e78a..8e5e8ea794 100644 --- a/content/tutorials/use-complex-payment-types/tutorial-checks-lookup-by-sender.md +++ b/content/tutorials/use-complex-payment-types/use-checks/checks-lookup-by-sender.md @@ -19,13 +19,13 @@ To get a list of all incoming and outgoing Checks for an account, use the `accou *RippleAPI* ```js -{% include 'code_samples/checks/js/getChecks.js' %} +{% include '_code-samples/checks/js/getChecks.js' %} ``` *JSON-RPC* ```json -{% include 'code_samples/checks/json-rpc/account_objects-req.json' %} +{% include '_code-samples/checks/json-rpc/account_objects-req.json' %} ``` @@ -37,7 +37,7 @@ To get a list of all incoming and outgoing Checks for an account, use the `accou *RippleAPI* ``` -{% include 'code_samples/checks/js/get-checks-resp.txt' %} +{% include '_code-samples/checks/js/get-checks-resp.txt' %} ``` *JSON-RPC* @@ -45,7 +45,7 @@ To get a list of all incoming and outgoing Checks for an account, use the `accou ```json 200 OK -{% include 'code_samples/checks/json-rpc/account_objects-resp.json' %} +{% include '_code-samples/checks/json-rpc/account_objects-resp.json' %} ``` diff --git a/content/tutorials/use-complex-payment-types/tutorial-checks-send.md b/content/tutorials/use-complex-payment-types/use-checks/send-a-check.md similarity index 85% rename from content/tutorials/use-complex-payment-types/tutorial-checks-send.md rename to content/tutorials/use-complex-payment-types/use-checks/send-a-check.md index 4a3aa7800a..25bfacf8a2 100644 --- a/content/tutorials/use-complex-payment-types/tutorial-checks-send.md +++ b/content/tutorials/use-complex-payment-types/use-checks/send-a-check.md @@ -57,7 +57,7 @@ The following example shows a prepared Check from BoxSend SG (rBXsgNkPcDN2runsvW *RippleAPI* ```js -{% include 'code_samples/checks/js/prepareCreate.js' %} +{% include '_code-samples/checks/js/prepareCreate.js' %} ``` @@ -73,19 +73,19 @@ The following example shows a prepared Check from BoxSend SG (rBXsgNkPcDN2runsvW *RippleAPI* ```js -{% include 'code_samples/checks/js/signCreate.js' %} +{% include '_code-samples/checks/js/signCreate.js' %} ``` *WebSocket* ```json -{% include 'code_samples/checks/websocket/sign-create-req.json' %} +{% include '_code-samples/checks/websocket/sign-create-req.json' %} ``` *Commandline* ```bash -{% include 'code_samples/checks/cli/sign-create-req.sh' %} +{% include '_code-samples/checks/cli/sign-create-req.sh' %} ``` @@ -97,19 +97,19 @@ The following example shows a prepared Check from BoxSend SG (rBXsgNkPcDN2runsvW *RippleAPI* ```js -{% include 'code_samples/checks/js/sign-create-resp.txt' %} +{% include '_code-samples/checks/js/sign-create-resp.txt' %} ``` *WebSocket* ```json -{% include 'code_samples/checks/websocket/sign-create-resp.json' %} +{% include '_code-samples/checks/websocket/sign-create-resp.json' %} ``` *Commandline* ```json -{% include 'code_samples/checks/cli/sign-create-resp.txt' %} +{% include '_code-samples/checks/cli/sign-create-resp.txt' %} ``` @@ -126,19 +126,19 @@ The following example shows a prepared Check from BoxSend SG (rBXsgNkPcDN2runsvW *RippleAPI* ```js -{% include 'code_samples/checks/js/submitCreate.js' %} +{% include '_code-samples/checks/js/submitCreate.js' %} ``` *WebSocket* ```json -{% include 'code_samples/checks/websocket/submit-create-req.json' %} +{% include '_code-samples/checks/websocket/submit-create-req.json' %} ``` *Commandline* ```bash -{% include 'code_samples/checks/cli/submit-create-req.sh' %} +{% include '_code-samples/checks/cli/submit-create-req.sh' %} ``` @@ -150,19 +150,19 @@ The following example shows a prepared Check from BoxSend SG (rBXsgNkPcDN2runsvW *RippleAPI* ```js -{% include 'code_samples/checks/js/submit-create-resp.txt' %} +{% include '_code-samples/checks/js/submit-create-resp.txt' %} ``` *WebSocket* ```json -{% include 'code_samples/checks/websocket/submit-create-resp.json' %} +{% include '_code-samples/checks/websocket/submit-create-resp.json' %} ``` *Commandline* ```json -{% include 'code_samples/checks/cli/submit-create-resp.txt' %} +{% include '_code-samples/checks/cli/submit-create-resp.txt' %} ``` @@ -187,19 +187,19 @@ Look for a `CreatedNode` object in the transaction metadata to indicate that the *RippleAPI* ``` -{% include 'code_samples/checks/js/getCreateTx.js' %} +{% include '_code-samples/checks/js/getCreateTx.js' %} ``` *WebSocket* ```json -{% include 'code_samples/checks/websocket/tx-create-req.json' %} +{% include '_code-samples/checks/websocket/tx-create-req.json' %} ``` *Commandline* ```bash -{% include 'code_samples/checks/cli/tx-create-req.sh' %} +{% include '_code-samples/checks/cli/tx-create-req.sh' %} ``` @@ -211,19 +211,19 @@ Look for a `CreatedNode` object in the transaction metadata to indicate that the *RippleAPI* ``` -{% include 'code_samples/checks/js/get-create-tx-resp.txt' %} +{% include '_code-samples/checks/js/get-create-tx-resp.txt' %} ``` *WebSocket* ```json -{% include 'code_samples/checks/websocket/tx-create-resp.json' %} +{% include '_code-samples/checks/websocket/tx-create-resp.json' %} ``` *Commandline* ```json -{% include 'code_samples/checks/cli/tx-create-resp.txt' %} +{% include '_code-samples/checks/cli/tx-create-resp.txt' %} ``` diff --git a/content/tutorials/use-complex-payment-types/use-checks/use-checks.md b/content/tutorials/use-complex-payment-types/use-checks/use-checks.md new file mode 100644 index 0000000000..894f58911f --- /dev/null +++ b/content/tutorials/use-complex-payment-types/use-checks/use-checks.md @@ -0,0 +1,5 @@ +# Use Checks + +Checks in the XRP Ledger authorize another account to claim funds later, similar to how personal paper checks work. + +**Caution:** As of 2018-05-03, the Checks amendment is not enabled on the XRP Ledger. You can use Checks on the [XRP Test Net](TODO:link) only. diff --git a/content/tutorials/use-complex-payment-types/use-complex-payment-types.md b/content/tutorials/use-complex-payment-types/use-complex-payment-types.md new file mode 100644 index 0000000000..2282768425 --- /dev/null +++ b/content/tutorials/use-complex-payment-types/use-complex-payment-types.md @@ -0,0 +1,3 @@ +# Use Complex Payment Types + +In addition to [simple, direct XRP Payments](TODO:link), the XRP Ledger supports a variety of more complex payments for building smart apps on the decentralized ledger. diff --git a/content/tutorials/use-complex-payment-types/tutorial-escrow.md b/content/tutorials/use-complex-payment-types/use-escrows/escrow.md similarity index 89% rename from content/tutorials/use-complex-payment-types/tutorial-escrow.md rename to content/tutorials/use-complex-payment-types/use-escrows/escrow.md index 704b1f31ba..3a76072a6f 100644 --- a/content/tutorials/use-complex-payment-types/tutorial-escrow.md +++ b/content/tutorials/use-complex-payment-types/use-escrows/escrow.md @@ -58,7 +58,7 @@ Request: *Websocket* ```json -{% include 'code_samples/escrow/websocket/submit-request-escrowcreate-time.json' %} +{% include '_code-samples/escrow/websocket/submit-request-escrowcreate-time.json' %} ``` @@ -70,7 +70,7 @@ Response: *Websocket* ```json -{% include 'code_samples/escrow/websocket/submit-response-escrowcreate-time.json' %} +{% include '_code-samples/escrow/websocket/submit-response-escrowcreate-time.json' %} ``` @@ -93,7 +93,7 @@ Request: *Websocket* ```json -{% include 'code_samples/escrow/websocket/tx-request-escrowcreate-time.json' %} +{% include '_code-samples/escrow/websocket/tx-request-escrowcreate-time.json' %} ``` @@ -105,7 +105,7 @@ Response: *Websocket* ```json -{% include 'code_samples/escrow/websocket/tx-response-escrowcreate-time.json' %} +{% include '_code-samples/escrow/websocket/tx-response-escrowcreate-time.json' %} ``` @@ -123,7 +123,7 @@ Request: *Websocket* ```json -{% include 'code_samples/escrow/websocket/ledger-request.json' %} +{% include '_code-samples/escrow/websocket/ledger-request.json' %} ``` @@ -135,7 +135,7 @@ Response: *Websocket* ```json -{% include 'code_samples/escrow/websocket/ledger-response.json' %} +{% include '_code-samples/escrow/websocket/ledger-response.json' %} ``` @@ -158,7 +158,7 @@ Request: *Websocket* ```json -{% include 'code_samples/escrow/websocket/submit-request-escrowfinish-time.json' %} +{% include '_code-samples/escrow/websocket/submit-request-escrowfinish-time.json' %} ``` @@ -170,7 +170,7 @@ Response: *Websocket* ```json -{% include 'code_samples/escrow/websocket/submit-response-escrowfinish-time.json' %} +{% include '_code-samples/escrow/websocket/submit-response-escrowfinish-time.json' %} ``` @@ -192,7 +192,7 @@ Request: *Websocket* ```json -{% include 'code_samples/escrow/websocket/tx-request-escrowfinish-time.json' %} +{% include '_code-samples/escrow/websocket/tx-request-escrowfinish-time.json' %} ``` @@ -204,7 +204,7 @@ Response: *Websocket* ```json -{% include 'code_samples/escrow/websocket/tx-response-escrowfinish-time.json' %} +{% include '_code-samples/escrow/websocket/tx-response-escrowfinish-time.json' %} ``` @@ -283,7 +283,7 @@ Request: *Websocket* ```json -{% include 'code_samples/escrow/websocket/submit-request-escrowcreate-condition.json' %} +{% include '_code-samples/escrow/websocket/submit-request-escrowcreate-condition.json' %} ``` @@ -295,7 +295,7 @@ Response: *Websocket* ```json -{% include 'code_samples/escrow/websocket/submit-response-escrowcreate-condition.json' %} +{% include '_code-samples/escrow/websocket/submit-response-escrowcreate-condition.json' %} ``` @@ -315,7 +315,7 @@ Request: *Websocket* ```json -{% include 'code_samples/escrow/websocket/tx-request-escrowcreate-condition.json' %} +{% include '_code-samples/escrow/websocket/tx-request-escrowcreate-condition.json' %} ``` @@ -327,7 +327,7 @@ Response: *Websocket* ```json -{% include 'code_samples/escrow/websocket/tx-response-escrowcreate-condition.json' %} +{% include '_code-samples/escrow/websocket/tx-response-escrowcreate-condition.json' %} ``` @@ -347,7 +347,7 @@ If the escrow has expired, you can only [cancel the escrow](#cancel-an-expired-e _Websocket_ ```json -{% include 'code_samples/escrow/websocket/submit-request-escrowfinish-condition.json' %} +{% include '_code-samples/escrow/websocket/submit-request-escrowfinish-condition.json' %} ``` @@ -359,7 +359,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/submit-response-escrowfinish-condition.json' %} +{% include '_code-samples/escrow/websocket/submit-response-escrowfinish-condition.json' %} ``` @@ -377,13 +377,13 @@ Use the [`tx` command](reference-rippled.html#tx) with the EscrowFinish transact Request: ```json -{% include 'code_samples/escrow/websocket/tx-request-escrowfinish-condition.json' %} +{% include '_code-samples/escrow/websocket/tx-request-escrowfinish-condition.json' %} ``` Response: ```json -{% include 'code_samples/escrow/websocket/tx-response-escrowfinish-condition.json' %} +{% include '_code-samples/escrow/websocket/tx-response-escrowfinish-condition.json' %} ``` ## Cancel an expired escrow @@ -399,7 +399,7 @@ Request: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/ledger-request-expiration.json' %} +{% include '_code-samples/escrow/websocket/ledger-request-expiration.json' %} ``` @@ -411,7 +411,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/ledger-response-expiration.json' %} +{% include '_code-samples/escrow/websocket/ledger-response-expiration.json' %} ``` @@ -426,7 +426,7 @@ Request: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-request-expiration.json' %} +{% include '_code-samples/escrow/websocket/account_objects-request-expiration.json' %} ``` @@ -438,7 +438,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-response-expiration.json' %} +{% include '_code-samples/escrow/websocket/account_objects-response-expiration.json' %} ``` @@ -456,7 +456,7 @@ Request: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/submit-request-escrowcancel.json' %} +{% include '_code-samples/escrow/websocket/submit-request-escrowcancel.json' %} ``` @@ -468,7 +468,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/submit-response-escrowcancel.json' %} +{% include '_code-samples/escrow/websocket/submit-response-escrowcancel.json' %} ``` @@ -491,7 +491,7 @@ _Websocket_ ```json -{% include 'code_samples/escrow/websocket/tx-request-escrowcancel.json' %} +{% include '_code-samples/escrow/websocket/tx-request-escrowcancel.json' %} ``` @@ -503,7 +503,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/tx-response-escrowcancel.json' %} +{% include '_code-samples/escrow/websocket/tx-response-escrowcancel.json' %} ``` @@ -531,7 +531,7 @@ Request: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-request.json' %} +{% include '_code-samples/escrow/websocket/account_objects-request.json' %} ``` @@ -548,7 +548,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-response.json' %} +{% include '_code-samples/escrow/websocket/account_objects-response.json' %} ``` @@ -568,7 +568,7 @@ Request: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-request.json' %} +{% include '_code-samples/escrow/websocket/account_objects-request.json' %} ``` @@ -585,7 +585,7 @@ Response: _Websocket_ ```json -{% include 'code_samples/escrow/websocket/account_objects-response.json' %} +{% include '_code-samples/escrow/websocket/account_objects-response.json' %} ``` diff --git a/content/tutorials/use-complex-payment-types/tutorial-paychan.md b/content/tutorials/use-complex-payment-types/use-payment-channels.md similarity index 100% rename from content/tutorials/use-complex-payment-types/tutorial-paychan.md rename to content/tutorials/use-complex-payment-types/use-payment-channels.md diff --git a/content/tutorials/use-simple-xrp-payments/tutorial-reliable-transaction-submission.md b/content/tutorials/use-simple-xrp-payments/reliable-transaction-submission.md similarity index 100% rename from content/tutorials/use-simple-xrp-payments/tutorial-reliable-transaction-submission.md rename to content/tutorials/use-simple-xrp-payments/reliable-transaction-submission.md diff --git a/content/tutorials/use-simple-xrp-payments/use-simple-xrp-payments.md b/content/tutorials/use-simple-xrp-payments/use-simple-xrp-payments.md new file mode 100644 index 0000000000..3ad4530854 --- /dev/null +++ b/content/tutorials/use-simple-xrp-payments/use-simple-xrp-payments.md @@ -0,0 +1,3 @@ +# Use Simple XRP Payments + +Direct XRP payments from one account to another are the simplest way to transact in the XRP Ledger. This section includes tutorials for how to use simple transactions proficiently and robustly. diff --git a/content/tutorials/xrp-ledger-businesses/tutorial-gateway-guide.md b/content/tutorials/xrp-ledger-businesses/become-an-xrp-ledger-gateway.md similarity index 100% rename from content/tutorials/xrp-ledger-businesses/tutorial-gateway-guide.md rename to content/tutorials/xrp-ledger-businesses/become-an-xrp-ledger-gateway.md diff --git a/content/tutorials/xrp-ledger-businesses/list-xrp-as-an-exchange.md b/content/tutorials/xrp-ledger-businesses/list-xrp-as-an-exchange.md index 023593c0e0..2dcf4b8d6b 100644 --- a/content/tutorials/xrp-ledger-businesses/list-xrp-as-an-exchange.md +++ b/content/tutorials/xrp-ledger-businesses/list-xrp-as-an-exchange.md @@ -16,13 +16,13 @@ For illustrative purposes, this document uses a fictitious business called _Alph ### User Benefits -Alpha Exchange wants to list BTC/XRP and XRP/USD trading pairs partially because listing these pairs will benefit its users. Specifically, this support will allow its users to: +Alpha Exchange wants to list BTC/XRP and XRP/USD trading pairs partially because listing these pairs benefits its users. Specifically, this support wants to enable its users to: * Deposit XRP _to_ Alpha Exchange _from_ the XRP Ledger * Withdraw XRP _from_ Alpha Exchange _to_ the XRP Ledger -* Trade XRP with other currencies, such as BTC, USD, amongst others +* Trade XRP with other currencies, such as BTC, USD, among others ## Prerequisites for Supporting XRP @@ -34,48 +34,72 @@ To support XRP, Alpha Exchange must: See also: -* [Gateway Compliance](https://ripple.com/build/gateway-guide/#gateway-compliance) — Gateways and exchanges are different, but exchanges should also ensure that they are complying with local regulations and reporting to the appropriate agencies. +* [Gateway Compliance](tutorial-gateway-guide.html#gateway-compliance) — Gateways and exchanges are different, but exchanges should also ensure that they are complying with local regulations and reporting to the appropriate agencies. -* [Requirements for Sending to XRP Ledger](https://ripple.com/build/gateway-guide/#requirements-for-sending-to-rcl) +* [Requirements for Sending to XRP Ledger](tutorial-gateway-guide.html#requirements-for-sending-to-xrp-ledger) -* [Requirements for Receiving from XRP Ledger](https://ripple.com/build/gateway-guide/#requirements-for-receiving-from-rcl) +* [Requirements for Receiving from XRP Ledger](tutorial-gateway-guide.html#requirements-for-receiving-from-xrp-ledger) -* [Gateway Precautions](https://ripple.com/build/gateway-guide/#precautions) +* [Gateway Precautions](tutorial-gateway-guide.html#precautions) + +### Partial Payments + +Before integrating, exchanges should be aware of the [partial payments](reference-transaction-format.html#partial-payments) feature. This feature allows XRP Ledger users to send successful payments that reduce the amount received instead of increasing the `SendMax`. This feature can be useful for [returning payments](tutorial-gateway-guide.html#bouncing-payments) without incurring additional cost as the sender. + +#### Partial Payments Warning + +When the [tfPartialPayment flag](reference-transaction-format.html#payment-flags) is enabled, the `Amount` field **_is not guaranteed to be the amount received_**. The `delivered_amount` field of a payment's metadata indicates the amount of currency actually received by the destination account. When receiving a payment, use `delivered_amount` instead of the Amount field to determine how much your account received instead. + +**Warning:** Be aware that malicious actors could exploit this. For more information, see [Partial Payments](concept-partial-payments.html). ### Accounts -XRP is held in *accounts* (sometimes referred to as *wallets* ) on the XRP Ledger. Accounts on the XRP Ledger are different than accounts on other blockchain ledgers, such as Bitcoin, where accounts incur little to no overhead. To submit transactions (for example, [OfferCreate](https://ripple.com/build/transactions/#offercreate) and others used for trading), XRP Ledger accounts require XRP [reserves](https://ripple.com/build/reserves/) to protect the ledger against spam and malicious usage. On other blockchains, balances are derived from the previous block. On the XRP Ledger, [account objects](https://ripple.com/build/ledger-format/#accountroot) describe several other properties of the account in addition to balances, so accounts are represented in each ledger and can never be destroyed or removed. Exchanges do not need to create accounts for each customer that holds XRP; they can store all of their customers’ XRP in just a few XRP Ledger accounts. For more information about XRP Ledger accounts, see the [Accounts](https://ripple.com/build/accounts/) article. +XRP is held in _accounts_ (also referred to as _wallets_ or _addresses_ ) on the XRP Ledger. Accounts on the XRP Ledger are different than accounts on other blockchain ledgers, such as Bitcoin, where accounts incur little to no overhead. In the XRP Ledger, accounts can [never be deleted](concept-accounts.html#permanence-of-accounts), and each account must hold a separate [reserve of XRP](concept-reserves.html) that cannot be sent to others. For these reasons, Ripple recommends that institutions not create excessive or needless accounts. -To comply with Ripple's recommend best practices, Alpha Exchange should create at least two new [accounts](https://ripple.com/build/accounts/) on the XRP Ledger. To minimize the risks associated with a compromised secret key, Ripple recommends creating [_issuing_, _operational_, and _standby_ accounts](https://ripple.com/build/issuing-operational-addresses/) (these are sometimes referred to, respectively, as cold, hot, and warm wallets). The operational/standby/issuing model is intended to balance security and convenience. Exchanges listing XRP should create the following accounts: + -* An [_issuing_ account](https://ripple.com/build/issuing-operational-addresses/#issuing-address) to securely hold the majority of XRP and customers' funds. To provide optimal security, this account should be offline. +To follow Ripple's recommended best practices, Alpha Exchange should create at least two new accounts on the XRP Ledger. To minimize the risks associated with a compromised secret key, Ripple recommends creating [_cold_, _hot_, and _warm_ accounts](https://ripple.com/build/issuing-operational-addresses/) (these are sometimes referred to, respectively, as cold, hot, and warm wallets). The hot/warm/cold model is intended to balance security and convenience. Exchanges listing XRP should create the following accounts: - For more information about the possible consequences of a compromised issuing account, see [Issuing Account Compromise](https://ripple.com/build/issuing-operational-addresses/#issuing-address-compromise). +* A [_cold wallet_](concept-issuing-and-operational-addresses.html#issuing-address) to securely hold the majority of XRP and customers' funds. For exchanges, this is also the address to which its users send [deposits](#deposit-xrp-into-exchange). To provide optimal security, this account's secret key should be offline. -* One or more [_operational_ accounts](https://ripple.com/build/issuing-operational-addresses/#operational-addresses) to conduct the day-to-day business of managing customers' XRP withdrawals and deposits. For example, with an opertaitional wallet, exchanges can securely support these types of automated XRP transfers. Operational accounts need to be online to service instant withdrawal requests. + If a malicious actor compromises an exchange's cold wallet, the possible consequences are: - For more information about the possible consequences of a compromised operational account, see [Operational Account Compromise](https://ripple.com/build/issuing-operational-addresses/#operational-address-compromise). + * The malicious actor gets full access to all XRP in the cold wallet. -* Optionally, one or more standby accounts to provide an additional layer of security between the issuing and operational accounts. Unlike an operational account, the secret key of a standby account does not need to be online. Additionally, you can distribute the secret keys for the standby account to several different people and implement [multisigning](https://ripple.com/build/how-to-multi-sign/) to increase security. + * If the master key is compromised, the malicious actor can irrevocably take control of the cold wallet forever (by disabling the master key and setting a new regular key or signer list). This would also give the malicious actor control over all future XRP received by the cold wallet. - For more information about the possible consequences of a compromised standby account, see [Standby Account Compromise](https://ripple.com/build/issuing-operational-addresses/#standby-address-compromise). + * If this happens, the exchange has to make a new cold wallet address and tell its customers the new address. + + * If the regular key or signer list are comromised, the exchange can regain control of the cold wallet. However, some of a malicious actor's actions cannot easily be undone: + + * The malicious actor could issue currency in the XRP Ledger by using the cold wallet, but that currency should not be valued by anyone (unless the exchange explicitly stated it was also a gateway). + + * If a malicious actor sets the asfRequireAuth flag for the account, that cannot be unset, although this only relates to issuing currency and should not affect an exchange that is not also a gateway. Any other settings a malicious actor sets or unsets with a master key can be reverted. + +* One or more [_hot wallets_](concept-issuing-and-operational-addresses.html#operational-addresses) to conduct the day-to-day business of managing customers' XRP withdrawals and deposits. For example, with a hot wallet, exchanges can securely support these types of automated XRP transfers. Hot wallets need to be online to service instant withdrawal requests. + + For more information about the possible consequences of a compromised hot wallet, see [Operational Account Compromise](concept-issuing-and-operational-addresses.html#operational-address-compromise). + +* Optionally, one or more warm wallets to provide an additional layer of security between the cold and hot wallets. Unlike a hot wallet, the secret key of a warm wallet does not need to be online. Additionally, you can distribute the secret keys for the warm wallet to several different people and implement [multisigning](tutorial-multisign.html) to increase security. + + For more information about the possible consequences of a compromised warm wallet, see [Standby Account Compromise](concept-issuing-and-operational-addresses.html#standby-address-compromise). See also: -* ["Suggested Business Practices" in the _Gateway Guide_](https://ripple.com/build/gateway-guide/#suggested-business-practices) +* ["Suggested Business Practices" in the _Gateway Guide_](tutorial-gateway-guide.html#suggested-business-practices) -* [Issuing and Operational Addresses](https://ripple.com/build/issuing-operational-addresses/) +* [Issuing and Operational Addresses](concept-issuing-and-operational-addresses.html) -* [Creating Accounts](https://ripple.com/build/transactions/#creating-accounts) +* [Creating Accounts](reference-transaction-format.html#creating-accounts) -* [Reserves](https://ripple.com/build/reserves/) +* [Reserves](concept-reserves.html) ### Balance Sheets -Alpha Exchange will custody its customers' XRP, so it needs to track each customer's balance(s). To do this, Alpha Exchange must create and maintain an additional balance sheet. The following table illustrates what this balance sheet might look like. +To custody its ccustomers' XRP, Alpha Exchange must track each customer's XRP balance and its own holdings. To do this, Alpha Exchange must create and maintain an additional balance sheet or accounting system. The following table illustrates what this balance sheet might look like. -The new XRP Ledger accounts (_Alpha Operational_, _Alpha Standby_, _Alpha Issuing_) are in the *User* column of the *XRP Balances on XRP Ledger* table. +The new XRP Ledger accounts (_Alpha Hot_, _Alpha Warm_, _Alpha Cold_) are in the *User* column of the *XRP Balances on XRP Ledger* table. The *Alpha Exchange XRP Balances* table represents new, additional balance sheet. Alpha Exchange’s software manages their users’ balances of XRP on this accounting system. @@ -124,7 +148,7 @@ XRP Balances 0 - Alpha Operational + Alpha Hot 0 ... @@ -132,7 +156,7 @@ XRP Balances - Alpha Standby + Alpha Warm 0 @@ -140,7 +164,7 @@ XRP Balances - Alpha Issuing + Alpha Cold 0 @@ -159,17 +183,17 @@ XRP Balances #### XRP Amounts -Amounts of XRP are represented on the XRP Ledger as an unsigned integer count of *drops*, where one XRP == 1,000,000 drops. Ripple recommends that software store XRP balances as integer amounts of drops, and perform integer arithmetic on these values. However, user interfaces should present balances in units of XRP. +Amounts of XRP are represented on the XRP Ledger as an unsigned integer count of _drops_, where one XRP is 1,000,000 drops. Ripple recommends that software store XRP balances as integer amounts of drops, and perform integer arithmetic on these values. However, user interfaces should present balances in units of XRP. -One drop (.000001 XRP) cannot be further subdivided. Bear this in mind when calculating and displaying FX rates between XRP and other assets. +One drop (.000001 XRP) cannot be further subdivided. Keep this in mind when calculating and displaying FX rates between XRP and other assets. -For more informtion, see [Specifying Currency Amounts](https://ripple.com/build/rippled-apis/#specifying-currency-amounts). +For more information, see [Specifying Currency Amounts](reference-rippled.html#specifying-currency-amounts). #### On-Ledger and Off-Ledger With exchanges like _Alpha Exchange_, XRP can be "on-ledger" or "off-ledger": -* **On-Ledger XRP**: XRP that can be queried through the public XRP Ledger by specifying the public [address](https://ripple.com/build/accounts/#addresses) of the XRP holder. The counterparty to these balances is the XRP Ledger. For more information, see [Currencies](https://ripple.com/build/rippled-apis/#currencies). +* **On-Ledger XRP**: XRP that can be queried through the public XRP Ledger by specifying the public [address](concept-accounts.html#addresses) of the XRP holder. The counterparty to these balances is the XRP Ledger. For more information, see [Currencies](reference-rippled.html#currencies). * **Off-Ledger XRP**: XRP that is held by the accounting system of an exchange and can be queried through the exchange interface. Off-ledger XRP balances are credit-based. The counterparty is the exchange holding the XRP. @@ -193,7 +217,7 @@ There are four main steps involved in an exchange's typical flow of funds: This list does not include the [prerequisites](#prerequisites-for-supporting-xrp) required of an exchange. -At this point, _Alpha Exchange_ has created [operational, standby, and issuing accounts](#accounts) on the XRP Ledger and added them to its balance sheet, but has not accepted any deposits from its users. +At this point, _Alpha Exchange_ has created [hot, warm, and cold wallets](#accounts) on the XRP Ledger and added them to its balance sheet, but has not accepted any deposits from its users. @@ -240,7 +264,7 @@ XRP Balances - + @@ -248,7 +272,7 @@ XRP Balances - + @@ -256,7 +280,7 @@ XRP Balances - + @@ -276,13 +300,13 @@ XRP Balances ### Deposit XRP into Exchange -To track [off-ledger XRP balances](#on-ledger-and-off-ledger) exchanges need to create new [balance sheets](#balance-sheets) (or similar accounting systems). The following table illustrates the balance changes that take place on Alpha Exchange's new balance sheet as users begin to deposit XRP. +To track [off-ledger XRP balances](#on-ledger-and-off-ledger), exchanges need to create new [balance sheets](#balance-sheets) (or similar accounting systems). The following table illustrates the balance changes that take place on Alpha Exchange's new balance sheet as users begin to deposit XRP. A user named Charlie wants to deposit 50,000 XRP to Alpha Exchange. Doing this involves the following steps: -1. Charlie submits a payment of 50,000 XRP (by using [RippleAPI](https://ripple.com/build/rippleapi/) or similar software) to Alpha Exchange's [issuing account](#accounts). +1. Charlie submits a payment of 50,000 XRP (by using [RippleAPI](reference-rippleapi.html) or similar software) to Alpha Exchange's [cold wallet](#accounts). - a. Charlie adds an identifier (in this case, `789`) to the payment to associate it with his account at Alpha Exchange. This is called a [_destination tag_](https://ripple.com/build/gateway-guide/#source-and-destination-tags). (To use this, Alpha Exchange must have set the asfRequireDest flag on all of its accounts. This flag requires all incoming payments to have a destination tag like Charlie's. For more information, see [AccountSet Flags](https://ripple.com/build/transactions/#accountset-flags). + a. Charlie adds an identifier (in this case, `789`) to the payment to associate it with his account at Alpha Exchange. This is called a [_destination tag_](tutorial-gateway-guide.html#source-and-destination-tags). (To use this, Alpha Exchange should have set the asfRequireDest flag on all of its accounts to require all incoming payments to have a destination tag like Charlie's. For more information, see [AccountSet Flags](reference-transaction-format.html#accountset-flags)). 2. The software at Alpha Exchange detects the incoming payment, and recognizes `789` as the destination tag for Charlie’s account. @@ -344,7 +368,7 @@ XRP Balances - + @@ -352,7 +376,7 @@ XRP Balances - + @@ -360,7 +384,7 @@ XRP Balances - + @@ -379,18 +403,18 @@ XRP Balances
0
Alpha OperationalAlpha Hot 0 ...
Alpha StandbyAlpha Warm 0
Alpha IssuingAlpha Cold 0
Alpha OperationalAlpha Hot 0 ...
Alpha StandbyAlpha Warm 0
Alpha IssuingAlpha Cold 0
50,000
-### Trade XRP on The Exchange +### Trade XRP on the Exchange -Alpha Exchange users (like Charlie) can trade credit-based balances on Alpha Exchange. Alpha Exchange should keep track of user balances on its new balance sheet as these trades are made. These trades are _off-ledger_ and independent from the XRP Ledger, so the balance changes are not recorded there. +Alpha Exchange users (like Charlie) can trade credit-based balances on Alpha Exchange. Alpha Exchange should keep track of user balances on its new balance sheet as these trades are made. These trades are _off-ledger_ and independent from the XRP Ledger, so the balance changes are not recorded on the XRP Ledger. -For more information about trading _on_ the XRP Ledger, see [Lifecycle of an Offer](https://ripple.com/build/transactions/#lifecycle-of-an-offer). +Customers who hold XRP in their own XRP Ledger accounts can also use the distributed exchange built into the XRP Ledger to trade currencies issued by gateways. For more information about trading _on_ the XRP Ledger, see [Lifecycle of an Offer](reference-transaction-format.html#lifecycle-of-an-offer). ### Rebalance XRP Holdings -Exchanges can adjust the balances between their operational and issuing accounts at any time. Each balance adjustment consumes a [transaction fee](https://ripple.com/build/fees-disambiguation/), but does not otherwise affect the aggregate balance of all the accounts. The aggregate, on-ledger balance should always exceed the total balance available for trade on the exchange. (The excess should be sufficient to cover the XRP Ledger's [transaction fees](https://ripple.com/build/transaction-cost/).) +Exchanges can adjust the balances between their hot and cold wallets at any time. Each balance adjustment consumes a [transaction cost](concept-transaction-cost.html), but does not otherwise affect the aggregate balance of all the accounts. The aggregate, on-ledger balance should always exceed the total balance available for trade on the exchange. (The excess should be enough to cover the XRP Ledger's transaction costs.) -The following table demonstrates a balance adjustment of 80,000 XRP (via a [_payment_](https://ripple.com/build/transactions/#payment) on the XRP Ledger) between Alpha Exchange's issuing account and its operational account, where the issuing account was debited and the operational account was credited. If the payment were reversed (debit the operational account and credit the issuing account), the operational account balance would decrease. Balance adjustments like these allow an exchange to limit the risks associated with holding XRP in online operational accounts. +The following table demonstrates a balance adjustment of 80,000 XRP (via a [_payment_](reference-transaction-format.html#payment) on the XRP Ledger) between Alpha Exchange's cold wallet and its hot wallet, where the cold wallet was debited and the hot wallet was credited. If the payment were reversed (debiting the hot wallet and crediting the cold wallet), the hot wallet balance would decrease. Balance adjustments like these allow an exchange to limit the risks associated with holding XRP in online hot wallets. @@ -416,7 +440,7 @@ Off-Ledger Balances - + @@ -425,7 +449,7 @@ Off-Ledger Balances - + @@ -441,7 +465,7 @@ Off-Ledger Balances - + @@ -476,7 +500,7 @@ In this example, Charlie withdraws 25,000 XRP from Alpha Exchange. This involves a. Debits the amount (25,000 XRP) from Charlie’s account on its off-ledger balance sheet - b. Submits a payment on the XRP Ledger for the same amount (25,000 XRP), from Alpha Exchange's operational account to Charlie’s XRP Ledger account + b. Submits a payment on the XRP Ledger for the same amount (25,000 XRP), from Alpha Exchange's hot wallet to Charlie’s XRP Ledger account
Alice 80,000 OperationalHot 0
80,000
Bob 50,000 StandbyWarm 0
Charlie 50,000 IssuingCold 180,000
100,000
@@ -511,7 +535,7 @@ Off-Ledger Balances - + @@ -523,7 +547,7 @@ Off-Ledger Balances - + @@ -547,7 +571,7 @@ Off-Ledger Balances - + @@ -573,3 +597,6 @@ Off-Ledger Balances
Alice 80,000 OperationalHot 80,000
55,000
Bob 50,000 StandbyWarm 0
50,000
25,000
IssuingCold 100,000
+ + +{% include '_snippets/tx-type-links.md' %} diff --git a/content/tutorials/xrp-ledger-businesses/tutorial-listing-xrp.md b/content/tutorials/xrp-ledger-businesses/tutorial-listing-xrp.md deleted file mode 100644 index 2dcf4b8d6b..0000000000 --- a/content/tutorials/xrp-ledger-businesses/tutorial-listing-xrp.md +++ /dev/null @@ -1,602 +0,0 @@ -# Listing XRP as an Exchange - -This document describes the steps that an exchange needs to take to list XRP. For details about other aspects of `rippled` and the XRP Ledger, see the [Ripple Developer Center](https://ripple.com/build). - -## Alpha Exchange - -For illustrative purposes, this document uses a fictitious business called _Alpha Exchange_ to explain the high-level steps required to list XRP. For the purposes of this document, Alpha Exchange: - -* Currently specializes in listing BTC/USD - -* Wants to add BTC/XRP and XRP/USD trading pairs - -* Maintains balances for all of its customers - -* Maintains balances for each of its supported currencies - -### User Benefits - -Alpha Exchange wants to list BTC/XRP and XRP/USD trading pairs partially because listing these pairs benefits its users. Specifically, this support wants to enable its users to: - -* Deposit XRP _to_ Alpha Exchange _from_ the XRP Ledger - -* Withdraw XRP _from_ Alpha Exchange _to_ the XRP Ledger - -* Trade XRP with other currencies, such as BTC, USD, among others - -## Prerequisites for Supporting XRP - -To support XRP, Alpha Exchange must: - -* Create and maintain new [accounts](#accounts) - -* Create and maintain [balance sheets](#balance-sheets) - -See also: - -* [Gateway Compliance](tutorial-gateway-guide.html#gateway-compliance) — Gateways and exchanges are different, but exchanges should also ensure that they are complying with local regulations and reporting to the appropriate agencies. - -* [Requirements for Sending to XRP Ledger](tutorial-gateway-guide.html#requirements-for-sending-to-xrp-ledger) - -* [Requirements for Receiving from XRP Ledger](tutorial-gateway-guide.html#requirements-for-receiving-from-xrp-ledger) - -* [Gateway Precautions](tutorial-gateway-guide.html#precautions) - -### Partial Payments - -Before integrating, exchanges should be aware of the [partial payments](reference-transaction-format.html#partial-payments) feature. This feature allows XRP Ledger users to send successful payments that reduce the amount received instead of increasing the `SendMax`. This feature can be useful for [returning payments](tutorial-gateway-guide.html#bouncing-payments) without incurring additional cost as the sender. - -#### Partial Payments Warning - -When the [tfPartialPayment flag](reference-transaction-format.html#payment-flags) is enabled, the `Amount` field **_is not guaranteed to be the amount received_**. The `delivered_amount` field of a payment's metadata indicates the amount of currency actually received by the destination account. When receiving a payment, use `delivered_amount` instead of the Amount field to determine how much your account received instead. - -**Warning:** Be aware that malicious actors could exploit this. For more information, see [Partial Payments](concept-partial-payments.html). - -### Accounts - -XRP is held in _accounts_ (also referred to as _wallets_ or _addresses_ ) on the XRP Ledger. Accounts on the XRP Ledger are different than accounts on other blockchain ledgers, such as Bitcoin, where accounts incur little to no overhead. In the XRP Ledger, accounts can [never be deleted](concept-accounts.html#permanence-of-accounts), and each account must hold a separate [reserve of XRP](concept-reserves.html) that cannot be sent to others. For these reasons, Ripple recommends that institutions not create excessive or needless accounts. - - - -To follow Ripple's recommended best practices, Alpha Exchange should create at least two new accounts on the XRP Ledger. To minimize the risks associated with a compromised secret key, Ripple recommends creating [_cold_, _hot_, and _warm_ accounts](https://ripple.com/build/issuing-operational-addresses/) (these are sometimes referred to, respectively, as cold, hot, and warm wallets). The hot/warm/cold model is intended to balance security and convenience. Exchanges listing XRP should create the following accounts: - -* A [_cold wallet_](concept-issuing-and-operational-addresses.html#issuing-address) to securely hold the majority of XRP and customers' funds. For exchanges, this is also the address to which its users send [deposits](#deposit-xrp-into-exchange). To provide optimal security, this account's secret key should be offline. - - If a malicious actor compromises an exchange's cold wallet, the possible consequences are: - - * The malicious actor gets full access to all XRP in the cold wallet. - - * If the master key is compromised, the malicious actor can irrevocably take control of the cold wallet forever (by disabling the master key and setting a new regular key or signer list). This would also give the malicious actor control over all future XRP received by the cold wallet. - - * If this happens, the exchange has to make a new cold wallet address and tell its customers the new address. - - * If the regular key or signer list are comromised, the exchange can regain control of the cold wallet. However, some of a malicious actor's actions cannot easily be undone: - - * The malicious actor could issue currency in the XRP Ledger by using the cold wallet, but that currency should not be valued by anyone (unless the exchange explicitly stated it was also a gateway). - - * If a malicious actor sets the asfRequireAuth flag for the account, that cannot be unset, although this only relates to issuing currency and should not affect an exchange that is not also a gateway. Any other settings a malicious actor sets or unsets with a master key can be reverted. - -* One or more [_hot wallets_](concept-issuing-and-operational-addresses.html#operational-addresses) to conduct the day-to-day business of managing customers' XRP withdrawals and deposits. For example, with a hot wallet, exchanges can securely support these types of automated XRP transfers. Hot wallets need to be online to service instant withdrawal requests. - - For more information about the possible consequences of a compromised hot wallet, see [Operational Account Compromise](concept-issuing-and-operational-addresses.html#operational-address-compromise). - -* Optionally, one or more warm wallets to provide an additional layer of security between the cold and hot wallets. Unlike a hot wallet, the secret key of a warm wallet does not need to be online. Additionally, you can distribute the secret keys for the warm wallet to several different people and implement [multisigning](tutorial-multisign.html) to increase security. - - For more information about the possible consequences of a compromised warm wallet, see [Standby Account Compromise](concept-issuing-and-operational-addresses.html#standby-address-compromise). - - -See also: - -* ["Suggested Business Practices" in the _Gateway Guide_](tutorial-gateway-guide.html#suggested-business-practices) - -* [Issuing and Operational Addresses](concept-issuing-and-operational-addresses.html) - -* [Creating Accounts](reference-transaction-format.html#creating-accounts) - -* [Reserves](concept-reserves.html) - -### Balance Sheets - -To custody its ccustomers' XRP, Alpha Exchange must track each customer's XRP balance and its own holdings. To do this, Alpha Exchange must create and maintain an additional balance sheet or accounting system. The following table illustrates what this balance sheet might look like. - -The new XRP Ledger accounts (_Alpha Hot_, _Alpha Warm_, _Alpha Cold_) are in the *User* column of the *XRP Balances on XRP Ledger* table. - -The *Alpha Exchange XRP Balances* table represents new, additional balance sheet. Alpha Exchange’s software manages their users’ balances of XRP on this accounting system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
XRP Balances -on XRP LedgerAlpha Exchange -XRP Balances
UserBalanceAcct #UserBalance
Dave25,000123Alice0
Edward45,000456Bob0
Charlie50,000789Charlie0
Alpha Hot0...
Alpha Warm0
Alpha Cold0
...
- -#### XRP Amounts - -Amounts of XRP are represented on the XRP Ledger as an unsigned integer count of _drops_, where one XRP is 1,000,000 drops. Ripple recommends that software store XRP balances as integer amounts of drops, and perform integer arithmetic on these values. However, user interfaces should present balances in units of XRP. - -One drop (.000001 XRP) cannot be further subdivided. Keep this in mind when calculating and displaying FX rates between XRP and other assets. - -For more information, see [Specifying Currency Amounts](reference-rippled.html#specifying-currency-amounts). - -#### On-Ledger and Off-Ledger - -With exchanges like _Alpha Exchange_, XRP can be "on-ledger" or "off-ledger": - -* **On-Ledger XRP**: XRP that can be queried through the public XRP Ledger by specifying the public [address](concept-accounts.html#addresses) of the XRP holder. The counterparty to these balances is the XRP Ledger. For more information, see [Currencies](reference-rippled.html#currencies). - -* **Off-Ledger XRP**: XRP that is held by the accounting system of an exchange and can be queried through the exchange interface. Off-ledger XRP balances are credit-based. The counterparty is the exchange holding the XRP. - - Off-ledger XRP balances are traded between the participants of an exchange. To support these trades, the exchange must hold a balance of _on-ledger XRP_ equal to the aggregate amount of _off-ledger XRP_ that it makes available for trade. - - -## Flow of Funds - -The remaining sections describe how funds flow through the accounts managed by Alpha Exchange as its users begin to deposit, trade, and redeem XRP balances. To illustrate the flow of funds, this document uses the tables introduced in the ["Balance Sheets" section](#balance-sheets). - -There are four main steps involved in an exchange's typical flow of funds: - -1. [Deposit XRP into Exchange](#deposit-xrp-into-exchange) - -2. [Rebalance XRP Holdings](#rebalance-xrp-holdings) - -3. [Withdraw XRP from Exchange](#withdraw-xrp-from-exchange) - -4. [Trade XRP on the Exchange](#trade-xrp-on-the-exchange) - - -This list does not include the [prerequisites](#prerequisites-for-supporting-xrp) required of an exchange. - -At this point, _Alpha Exchange_ has created [hot, warm, and cold wallets](#accounts) on the XRP Ledger and added them to its balance sheet, but has not accepted any deposits from its users. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
XRP Balances -on XRP LedgerAlpha Exchange -XRP Balances
UserBalanceAcct #UserBalance
Dave25,000123Alice0
Edward45,000456Bob0
Charlie50,000789Charlie0
Alpha Hot0...
Alpha Warm0
Alpha Cold0
...
- - -### Deposit XRP into Exchange - -To track [off-ledger XRP balances](#on-ledger-and-off-ledger), exchanges need to create new [balance sheets](#balance-sheets) (or similar accounting systems). The following table illustrates the balance changes that take place on Alpha Exchange's new balance sheet as users begin to deposit XRP. - -A user named Charlie wants to deposit 50,000 XRP to Alpha Exchange. Doing this involves the following steps: - -1. Charlie submits a payment of 50,000 XRP (by using [RippleAPI](reference-rippleapi.html) or similar software) to Alpha Exchange's [cold wallet](#accounts). - - a. Charlie adds an identifier (in this case, `789`) to the payment to associate it with his account at Alpha Exchange. This is called a [_destination tag_](tutorial-gateway-guide.html#source-and-destination-tags). (To use this, Alpha Exchange should have set the asfRequireDest flag on all of its accounts to require all incoming payments to have a destination tag like Charlie's. For more information, see [AccountSet Flags](reference-transaction-format.html#accountset-flags)). - -2. The software at Alpha Exchange detects the incoming payment, and recognizes `789` as the destination tag for Charlie’s account. - -3. When it detects the incoming payment, Alpha Exchange's software updates its balance sheet to indicate that the 50,000 XRP it received is controlled by Charlie. - - Charlie can now use up to 50,000 XRP on the exchange. For example, he can create offers to trade XRP with BTC or any of the other currencies Alpha Exchange supports. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
XRP Balances -on XRP LedgerAlpha Exchange -XRP Balances
UserBalanceAcct #UserBalance
Dave25,000123Alice0
Edward45,000456Bob0
Charlie100,000 -
50,000
789Charlie0 -
50,000
Alpha Hot0...
Alpha Warm0
Alpha Cold0 -
50,000
...
- - -### Trade XRP on the Exchange - -Alpha Exchange users (like Charlie) can trade credit-based balances on Alpha Exchange. Alpha Exchange should keep track of user balances on its new balance sheet as these trades are made. These trades are _off-ledger_ and independent from the XRP Ledger, so the balance changes are not recorded on the XRP Ledger. - -Customers who hold XRP in their own XRP Ledger accounts can also use the distributed exchange built into the XRP Ledger to trade currencies issued by gateways. For more information about trading _on_ the XRP Ledger, see [Lifecycle of an Offer](reference-transaction-format.html#lifecycle-of-an-offer). - - -### Rebalance XRP Holdings - -Exchanges can adjust the balances between their hot and cold wallets at any time. Each balance adjustment consumes a [transaction cost](concept-transaction-cost.html), but does not otherwise affect the aggregate balance of all the accounts. The aggregate, on-ledger balance should always exceed the total balance available for trade on the exchange. (The excess should be enough to cover the XRP Ledger's transaction costs.) - -The following table demonstrates a balance adjustment of 80,000 XRP (via a [_payment_](reference-transaction-format.html#payment) on the XRP Ledger) between Alpha Exchange's cold wallet and its hot wallet, where the cold wallet was debited and the hot wallet was credited. If the payment were reversed (debiting the hot wallet and crediting the cold wallet), the hot wallet balance would decrease. Balance adjustments like these allow an exchange to limit the risks associated with holding XRP in online hot wallets. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Alpha Exchange XRP -Off-Ledger BalancesAlpha Exchange XRP On-Ledger Balances
Acct #UserBalanceXRP Ledger AccountBalance
123Alice80,000Hot0 -
80,000
456Bob50,000Warm0
….….
789Charlie50,000Cold180,000 -
100,000
......
- - -### Withdraw XRP from Exchange - -Withdrawals allow an exchange's users to move XRP from the exchange's off-ledger balance sheet to an account on the XRP Ledger. - -In this example, Charlie withdraws 25,000 XRP from Alpha Exchange. This involves the following steps: - -1. Charlie initiates the process on Alpha Exchange’s website. He provides instructions to transfer 25,000 XRP to a specific account on the XRP Ledger (named "Charlie XRP Ledger" in the following table). - -2. In response to Charlie’s instructions, Alpha Exchange does the following: - - a. Debits the amount (25,000 XRP) from Charlie’s account on its off-ledger balance sheet - - b. Submits a payment on the XRP Ledger for the same amount (25,000 XRP), from Alpha Exchange's hot wallet to Charlie’s XRP Ledger account - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
XRP Ledger On-Ledger XRP BalancesAlpha Exchange XRP -Off-Ledger BalancesAlpha Exchange XRP On-Ledger Balances
UserBalanceAcct #UserBalanceXRP Ledger AccountBalance
Dave25,000123Alice80,000Hot80,000 -
55,000
Edward45,000456Bob50,000Warm0
….….….
Charlie XRP Ledger50,000 -
75,000
789Charlie50,000 -
25,000
Cold100,000
.........
- - -{% include '_snippets/tx-type-links.md' %} diff --git a/content/tutorials/xrp-ledger-businesses/xrp-ledger-businesses.md b/content/tutorials/xrp-ledger-businesses/xrp-ledger-businesses.md new file mode 100644 index 0000000000..8307bd5316 --- /dev/null +++ b/content/tutorials/xrp-ledger-businesses/xrp-ledger-businesses.md @@ -0,0 +1,3 @@ +# XRP Ledger Businesses + +This section demonstrates how to follow various best practices for running businesses that interface with the XRP Ledger, including exchanges listing XRP, gateways issuing currency in the XRP Ledger, and others. diff --git a/dactyl-config.yml b/dactyl-config.yml index af383fe54f..6f8aec286f 100644 --- a/dactyl-config.yml +++ b/dactyl-config.yml @@ -59,6 +59,8 @@ pages: targets: - local +# Concepts --------------------------------------------------------------------- + - name: Concepts funnel: Docs doc_type: Concepts @@ -109,6 +111,7 @@ pages: funnel: Docs doc_type: Concepts category: Payment System Basics + template: template-landing-children.html targets: - local @@ -140,122 +143,249 @@ pages: targets: - local + - md: concepts/complex-payment-types/complex-payment-types.md + html: complex-payment-types.html + funnel: Docs + doc_type: Concepts + category: Complex Payment Types + template: template-landing-children.html + targets: + - local + + - md: concepts/complex-payment-types/checks.md + html: checks.html + funnel: Docs + doc_type: Concepts + category: Complex Payment Types + targets: + - local + + - md: concepts/complex-payment-types/escrow.md + html: escrow.html + funnel: Docs + doc_type: Concepts + category: Complex Payment Types + targets: + - local + + - md: concepts/complex-payment-types/partial-payments.md + html: partial-payments.html + funnel: Docs + doc_type: Concepts + category: Complex Payment Types + targets: + - local + + # TODO: payment channels concept + + - md: concepts/issued-currencies/issued-currencies.md + html: issued-currencies.html + funnel: Docs + doc_type: Concepts + category: Issued Currencies + template: template-landing-children.html + targets: + - local + + # TODO: "Trust Lines and Issuing" (see gateway guide, tx reference on "trust limits" etc.) + + - md: concepts/issued-currencies/authorized-trust-lines.md + html: authorized-trust-lines.html + funnel: Docs + doc_type: Concepts + category: Issued Currencies + targets: + - local + + # TODO: Freezes, Rippling, Transfer Fees, Paths, Demurrage + + - md: concepts/decentralized-exchange/decentralized-exchange.md + html: decentralized-exchange.html + funnel: Docs + doc_type: Concepts + category: Decentralized Exchange + template: template-landing-children.html + targets: + - local + + # TODO: Offers, Tick Size, Autobridging, Offer Preference (all compiled from different sources) + + - md: concepts/consensus-network/consensus-network.md + html: consensus-network.html + funnel: Docs + doc_type: Concepts + category: Consensus Network + template: template-landing-children.html + targets: + - local + + # TODO: consensus principles & rules, validators & UNLs + + - md: concepts/consensus-network/amendments.md + html: amendments.html + funnel: Docs + doc_type: Concepts + category: Consensus Network + targets: + - local + + # TODO: fee voting, consensus research, pseudo-transactions, parallel networks + + - md: concepts/the-rippled-server/the-rippled-server.md + html: the-rippled-server.html + funnel: Docs + doc_type: Concepts + category: The rippled Server + targets: + - local + + # TODO: history sharding, stand-alone mode, clustering, peer protocol + +# Tutorials -------------------------------------------------------------------- + + - md: tutorials/tutorials.md + html: tutorials.html + funnel: Docs + doc_type: Tutorials + template: template-landing-children.html + blurb: Get step-by-step guidance to perform common tasks with the XRP Ledger. + targets: + - local + + - md: tutorials/get-started/get-started.md + html: get-started.html + funnel: Docs + doc_type: Tutorials + category: Get Started + template: template-landing-children.html + targets: + - local + + # TODO: Get Started with the rippled API, Send a Transaction with the rippled API + + - md: tutorials/get-started/get-started-with-rippleapi-for-javascript.md + html: get-started-with-rippleapi-for-javascript.html + funnel: Docs + doc_type: Tutorials + category: Get Started + targets: + - local + + # TODO: Get Started with API Tools + + - md: tutorials/use-simple-xrp-payments/use-simple-xrp-payments.md + html: use-simple-xrp-payments.html + funnel: Docs + doc_type: Tutorials + category: Use Simple XRP Payments + template: template-landing-children.html + targets: + - local + + # TODO: "Send XRP" + + - md: tutorials/use-simple-xrp-payments/reliable-transaction-submission.md + html: reliable-transaction-submission.html + funnel: Docs + doc_type: Tutorials + category: Use Simple XRP Payments + targets: + - local + + # TODO: Cancel or Skip a Transaction, Look Up Transaction Results + + - md: tutorials/manage-account-settings/manage-account-settings.md + html: manage-account-settings.html + funnel: Docs + doc_type: Tutorials + category: Manage Account Settings + template: template-landing-children.html + targets: + - local + + # TODO: "Get an Account", "Configure a Regular Key Pair", "Use Deposit Authorization to Block Unwanted Payments", "Configure Multi-Signing" + + - md: tutorials/use-complex-payment-types/use-complex-payment-types.md + html: use-complex-payment-types.html + funnel: Docs + doc_type: Tutorials + category: Use Complex Payment Types + template: template-landing-children.html + targets: + - local + + # TODO: split up "use escrows" + + #TODO: split concept info off of the paychan tutorial + - md: tutorials/use-complex-payment-types/use-payment-channels.md + html: use-payment-channels.html + funnel: Docs + doc_type: Tutorials + category: Use Complex Payment Types + targets: + - local + + - md: tutorials/use-complex-payment-types/use-checks/use-checks.md + html: use-checks.html + funnel: Docs + doc_type: Tutorials + category: Use Complex Payment Types + subcategory: Use Checks + template: template-landing-children.html + targets: + - local + + - md: tutorials/use-complex-payment-types/use-checks/send-a-check.md + html: send-a-check.html + funnel: Docs + doc_type: Tutorials + category: Use Complex Payment Types + subcategory: Use Checks + targets: + - local + + # TODO: other 5 checks tutorials + + # TODO: "Send a Cross-Currency Payment" + + - md: tutorials/manage-issued-currencies/manage-issued-currencies.md + html: manage-issued-currencies.html + funnel: Docs + doc_type: Tutorials + category: Manage Issued Currencies + template: template-landing-children.html + targets: + - local + + # TODO: Set up issuing/operational addresses, monitor changes to balances, + # freeze, enable/disable rippling, set transfer fees, use auth'd trust lines + + - md: tutorials/xrp-ledger-businesses/xrp-ledger-businesses.md + html: xrp-ledger-businesses.html + funnel: Docs + doc_type: Tutorials + category: XRP Ledger Businesses + template: template-landing-children.html + targets: + - local + + # TODO: list XRP as an exchange, become a gateway + # TODO: identify your accounts with ripple.txt (to come later) + + - md: tutorials/manage-the-rippled-server/manage-the-rippled-server.md + html: manage-the-rippled-server.html + funnel: Docs + doc_type: Tutorials + category: Manage the rippled Server + template: template-landing-children.html + targets: + - local + + # TODO: install rippled, troubleshoot rippled, build & run on ubuntu, + # run a validator, run in stand-alone mode, set up private peers, run in + # a cluster, capacity planning + - # - name: Payment System - # funnel: Docs - # doc_type: Concepts - # category: Payment System - # html: concept-payment-system.html - # template: template-landing-children.html - # targets: - # - local - # - # - md: concept-accounts.md - # funnel: Docs - # doc_type: Concepts - # category: Payment System - # subcategory: Accounts - # targets: - # - local - # - # - md: concept-depositauth.md - # funnel: Docs - # doc_type: Concepts - # category: Payment System - # subcategory: Accounts - # targets: - # - local - # - # - md: concept-transaction-cost.md - # funnel: Docs - # doc_type: Concepts - # category: Payment System - # targets: - # - local - # - # - md: concept-money.md - # funnel: Docs - # doc_type: Concepts - # category: Payment System - # targets: - # - local - # - # - md: concept-authorized-trust-lines.md - # funnel: Docs - # doc_type: Concepts - # category: Payment System - # subcategory: Accounts - # targets: - # - local - # - # - name: Consensus Network - # funnel: Docs - # doc_type: Concepts - # category: Consensus Network - # html: concept-consensus-network.html - # template: template-landing-children.html - # targets: - # - local - # - # - md: concept-amendments.md - # funnel: Docs - # doc_type: Concepts - # category: Consensus Network - # targets: - # - local - # - # - md: concept-fee-voting.md - # funnel: Docs - # doc_type: Concepts - # category: Consensus Network - # targets: - # - local - # - # - name: Tutorials #TODO: real page content - # funnel: Docs - # doc_type: Tutorials - # template: template-landing-children.html - # blurb: Get step-by-step guidance to perform common tasks with the XRP Ledger. - # targets: - # - local - # - # - name: Send and Receive Money - # funnel: Docs - # doc_type: Tutorials - # category: Send and Receive Money - # template: template-landing-children.html - # targets: - # - local - # - # - md: tutorial-reliable-transaction-submission.md - # funnel: Docs - # doc_type: Tutorials - # category: Send and Receive Money - # targets: - # - local - # - # - md: tutorial-checks-send.md - # funnel: Docs - # doc_type: Tutorials - # category: Send and Receive Money - # targets: - # - local - # - # - name: Manage the rippled Server - # funnel: Docs - # doc_type: Tutorials - # category: Manage the rippled Server - # template: template-landing-children.html - # targets: - # - local - # - # - md: tutorial-rippled-setup.md - # funnel: Docs - # doc_type: Tutorials - # category: Manage the rippled Server - # targets: - # - local - # # - name: References # funnel: Docs # doc_type: References