Use case steps and links

Adjusted numbering
added external link wrappers
added wrapper for related lists
moved link from headline to button below
This commit is contained in:
Jake Bonham
2019-05-16 17:13:59 -07:00
committed by mDuo13
parent 87b5d09587
commit a26a8eeeae
9 changed files with 170 additions and 65 deletions

View File

@@ -7,37 +7,42 @@ Want to contribute code or a bug report to help improve `ripple-lib`, the offici
{% set n = cycler(* range(1,99)) %}
<span class="use-case-step-num">{{n.next()}}</span>
## [Access the `ripple-lib` repo](https://github.com/ripple/ripple-lib)
## Access the `ripple-lib` repo
`ripple-lib` is an open-source project. You can take a look at `ripple-lib` code simply by accessing the `ripple-lib` GitHub repo. Before contributing or reporting bugs, we recommend that you get to know the code and developer experience by performing the following tasks.
<span class="use-case-external-link btn btn-outline-secondary external-link">[Access the `ripple-lib` repo](https://github.com/ripple/ripple-lib)</span>
<span class="use-case-step-num">{{n.next()}}</span>
## [Set up and run a `rippled` server](manage-the-rippled-server.html)
## Set up and run a rippled server
RippleAPI is an API for interacting with the XRP Ledger. The core peer-to-peer server that manages the XRP Ledger is `rippled`. Optionally, you can set up and run a `rippled` server to understand its developer experience and functionality. Anyone can run their own `rippled` server that follows the network and keeps a complete copy of the XRP Ledger.
[Set up and run a rippled server >](manage-the-rippled-server.html)
<span class="use-case-step-num">{{n.next()}}</span>
## [Get a Test Net XRP Ledger account](xrp-test-net-faucet.html)
## Get a Test Net XRP Ledger account
Use the XRP Test Net Faucet to get a test account on the XRP Test Network. If you set up a `rippled` server, you can connect it to the XRP Test Net to make test calls and get to know the XRP Ledger.
[Get a Test Net XRP Ledger account >](xrp-test-net-faucet.html)
<span class="use-case-step-num">{{n.next()}}</span>
## [Set up your `ripple-lib` development environment](get-started-with-rippleapi-for-javascript.html#environment-setup)
## Set up your `ripple-lib` development environment
`ripple-lib` requires Node.js and a few dependencies. We recommend using [Node.js v10 LTS](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/en/) dependency management. Also, be sure to create your own fork of the `ripple-lib` repository on GitHub so you can contribute pull requests to the official repo.
[Set up your development environment >](get-started-with-rippleapi-for-javascript.html#environment-setup)
<span class="use-case-step-num">{{n.next()}}</span>
## [Run your first `ripple-lib` script](get-started-with-rippleapi-for-javascript.html#first-rippleapi-script)
## Run your first `ripple-lib` script
Examine and run the `get-account-info.js` script. Use it to get a feel for how RippleAPI scripts work and to verify that your RippleAPI interface is working.
[Run your first script >](get-started-with-rippleapi-for-javascript.html#first-rippleapi-script)
<span class="use-case-step-num">{{n.next()}}</span>
## [Contribute code](https://github.com/ripple/ripple-lib/pulls)
## Contribute code
Now that you have a handle on `ripple-lib`, you may have ideas for how to improve it.
@@ -47,10 +52,13 @@ Need some inspiration? Take a look at our list of [Help Wanted issues](https://g
Access the `ripple-lib` repo and open an issue or pull request.
<span class="use-case-external-link btn btn-outline-secondary external-link">[Contribute code](https://github.com/ripple/ripple-lib/pulls)</span>
<span class="use-case-step-num">{{n.next()}}</span>
## [Report bugs](https://github.com/ripple/ripple-lib/issues)
## Report bugs
As you explore `ripple-lib`, you may find code that you dont think is working as intended. To report a bug, [open an issue](https://github.com/ripple/ripple-lib/issues) in the `ripple-lib` repo.
If the bug you wish to report is security-related, we urge you to disclose it responsibly through Ripple's [Bug Bounty program](https://ripple.com/bug-bounty/).
<span class="use-case-external-link btn btn-outline-secondary external-link">[Report bugs](https://github.com/ripple/ripple-lib/issues)</span>

View File

@@ -6,28 +6,32 @@ Want to contribute code or a bug report to help improve `rippled`, the core peer
{% set n = cycler(* range(1,99)) %}
<span class="use-case-step-num">{{n.next()}}</span>
## [Access the `rippled` repo](https://github.com/ripple/rippled)
## Access the `rippled` repo
`rippled` is an open-source project. You can take a look at `rippled` code simply by accessing the `rippled` GitHub repo. Before contributing or reporting bugs, we recommend that you get to know the code and developer experience by performing the following tasks.
<span class="use-case-external-link btn btn-outline-secondary external-link">[Access the repo](https://github.com/ripple/rippled)</span>
<span class="use-case-step-num">{{n.next()}}</span>
## [Set up and run a `rippled` server](manage-the-rippled-server.html)
## Set up and run a `rippled` server
Set up and run a `rippled` server to understand the developer experience and functionality of the core peer-to-peer server that manages the XRP Ledger. Anyone can run their own `rippled` server that follows the network and keeps a complete copy of the XRP Ledger.
[Set up and run a server >](manage-the-rippled-server.html)
<span class="use-case-step-num">{{n.next()}}</span>
## [Try out XRP Ledger integration tools](get-started-with-the-rippled-api.html)
## Try out XRP Ledger integration tools
Take a look at the various tools provided to help developers integrate with the XRP Ledger. From WebSocket and JSON-RPC API endpoints to the `ripple-lib` JavaScript library, take a look at the modes of integration offered to the developer community.
[Try out XRP Ledger integration tools >](get-started-with-the-rippled-api.html)
<span class="use-case-step-num">{{n.next()}}</span>
## [Get a sandbox XRP Ledger account](xrp-test-net-faucet.html)
## Get a sandbox XRP Ledger account
Use the XRP Ledger Test Net to get a sandbox account. Connect your `rippled server` to the Test Net to make test calls and get to know the XRP Ledger.
[Get a sandbox XRP Ledger account >](xrp-test-net-faucet.html)
<span class="use-case-step-num">{{n.next()}}</span>
## Set up your development environment
@@ -36,20 +40,24 @@ A `rippled` development environment has a C++ compiler, access to the necessary
<span class="use-case-step-num">{{n.next()}}</span>
## [Familiarize yourself with `rippled`'s coding style](https://github.com/ripple/rippled/blob/develop/docs/CodingStyle.md)
## Familiarize yourself with `rippled`'s coding style
Before you start contributing code to `rippled,` take some time to familiarize yourself with the coding standards used in the `rippled` repo. These standards gradually evolve and propagate through code reviews. Some aspects are enforced more strictly than others.
<span class="use-case-external-link btn btn-outline-secondary external-link">[Familiarize yourself with `rippled`'s coding style](https://github.com/ripple/rippled/blob/develop/docs/CodingStyle.md)</span>
<span class="use-case-step-num">{{n.next()}}</span>
## [Contribute code](https://github.com/ripple/rippled/pulls)
## Contribute code
Now that you have a handle on `rippled`, you may have ideas for how to improve it. Perhaps youre developing on the XRP Ledger and want to contribute some code that enables the XRP Ledger to provide a feature your application needs. Access the `rippled` repo and open an issue or pull request.
<span class="use-case-external-link btn btn-outline-secondary external-link">[Contribute code](https://github.com/ripple/rippled/pulls)</span>
<span class="use-case-step-num">{{n.next()}}</span>
## [Report bugs](https://github.com/ripple/rippled/issues)
## Report bugs
As you explore `rippled`, you may find code that you dont think is working as intended. To report a bug, [open an issue](https://github.com/ripple/rippled/issues) in the `rippled` repo.
If the bug you wish to report is security-related, we urge you to disclose it responsibly through Ripple's [Bug Bounty program](https://ripple.com/bug-bounty/).
<span class="use-case-external-link btn btn-outline-secondary external-link">[Report bugs](https://github.com/ripple/rippled/issues)</span>

View File

@@ -52,9 +52,11 @@ To support listing XRP, code integrations with the XRP Ledger to deposit XRP int
[Understand the flow of funds >](list-xrp-as-an-exchange.html#flow-of-funds)
### Related Tasks
<div class='related-tasks-links'>
- [Contribute Code to `rippled`](contribute-code-to-rippled.html)
- [Listen for New Ledger Versions](subscription-methods.html)
- [Capacity Planning](capacity-planning.html)
- [Look Up an XRP Ledger Accounts Transaction History](tx_history.html)
<!-- for the future, link to Implement Destination Tags -->
</div>

View File

@@ -31,23 +31,25 @@ Heres a roadmap to the high-level tasks youll need to perform to implement
{% set n = cycler(* range(1,99)) %}
<!-- USE_CASE_STEPS_START -->
<span class="use-case-step-num">{{n.next()}}</span>
## [Understand payment channels](payment-channels.html)
## Understand payment channels
Learn more about payment channels and whether they provide the features you need for your specific implementation.
[Understand payment channels >](payment-channels.html)
<span class="use-case-step-num">{{n.next()}}</span>
## Payer and payee: [Set up and run `rippled` servers](manage-the-rippled-server.html)
## Payer and payee: Set up and run `rippled` servers
To use a payment channel to send and receive XRP, both the payer and payee exchanges must each have access to a `rippled` server that they can use to send transactions. If your exchange processes XRP withdrawals directly, you are probably already running a `rippled` server that you can use for this purpose.
If not, a great way for an exchange to get access to a `rippled` server is to set up and run one.
[Set up and run rippled servers >](manage-the-rippled-server.html)
<span class="use-case-step-num">{{n.next()}}</span>
## Payer and payee: [Fund XRP Ledger accounts with enough XRP](accounts.html)
## Payer and payee: Fund XRP Ledger accounts with enough XRP
If your exchange processes XRP deposits and withdrawals directly, you probably have existing funded XRP Ledger accounts that you can use for this purpose. Just ensure that they are funded with enough XRP as described here.
@@ -69,7 +71,7 @@ Along these lines, there's a good chance that you are following industry best pr
The account needs at least 21 XRP, which provides the 20 XRP [base reserve](reserves.html), plus enough to pay the transaction costs of redeeming claims, which are trivial. For example, you could redeem thousands of claims for less than 1 XRP in total.
[Fund XRP Ledger accounts with enough XRP >](accounts.html)
<span class="use-case-step-num">{{n.next()}}</span>
## Payer: [Open a payment channel](use-payment-channels.html#1-the-payer-creates-a-payment-channel-to-a-particular-recipient)
@@ -91,19 +93,22 @@ Since payment channels are unidirectional, you need a second channel in the oppo
<span class="use-case-step-num">{{n.next()}}</span>
## Payee: [Verify payment channel details](use-payment-channels.html#2-the-payee-checks-specifics-of-the-payment-channel)
## Payee: Verify payment channel details
The payee exchange reviews the details of the payment channel.
[Verify payment channel details >](use-payment-channels.html#2-the-payee-checks-specifics-of-the-payment-channel)
<span class="use-case-step-num">{{n.next()}}</span>
## Payer: [Create claims](use-payment-channels.html#3-the-payer-creates-one-or-more-signed-claims-for-the-xrp-in-the-channel)
## Payer: Create claims
The payer exchange creates one or more claims for amounts of XRP that it wants to guarantee to the payee exchange.
[Create claims >](use-payment-channels.html#3-the-payer-creates-one-or-more-signed-claims-for-the-xrp-in-the-channel)
## Payer: [Send claim details to the payer exchange](use-payment-channels.html#4-the-payer-sends-a-claim-to-the-payee-as-payment-for-goods-or-services)
<span class="use-case-step-num">{{n.next()}}</span>
## Payer: Send claim details to the payer exchange
After creating a claim, the payer exchange must send details of the claim to the payee exchange, off-ledger.
@@ -128,10 +133,10 @@ Consider a series of claims prompted by payer exchange customers withdrawing XRP
| **Amount** | Cumulative amount of the claims created by the payer exchange. The payee exchange needs this value to verify and redeem the claim. For information about how to calculate the actual amount the payee exchange needs to credit the customer, see [Verify claims](#payee-verify-claims). |
| **Destination Tag** | Destination tag of the customer account on the payee exchange that needs to be credited based on the claim. The payer exchange can get this value from their customer's withdrawal request, which should provide a destination tag for the deposit to the payee exchange. When the payee exchange redeems claims, the XRP is deposited into the payee exchange's XRP Ledger account. The payee exchange can then credit the XRP from the claim to the appropriate customer account based on the destination tag provided. |
[Send claim details to the payer exchange >](use-payment-channels.html#4-the-payer-sends-a-claim-to-the-payee-as-payment-for-goods-or-services)
<span class="use-case-step-num">{{n.next()}}</span>
## Payee: [Verify claims](use-payment-channels.html#5-the-payee-verifies-the-claims)
## Payee: Verify claims
The payee exchange verifies claims sent by the payer exchange.
@@ -139,10 +144,11 @@ After verifying claims, the payee exchange should credit the claimed XRP to the
For example, to know how much to credit a customer for a claim amount of 3000, the payee exchange needs to know that the previous claim amount was 2000. The difference between the claim amount and the previous claim amount (3000 - 2000 = 1000) is the amount the payee exchange must credit to the customer account.
[Verify claims >](use-payment-channels.html#5-the-payee-verifies-the-claims)
<span class="use-case-step-num">{{n.next()}}</span>
## Payee: [Redeem them in batches](use-payment-channels.html#8-when-ready-the-payee-redeems-a-claim-for-the-authorized-amount)
## Payee: Redeem them in batches
The payee exchange can redeem batches of claims after verifying them to receive the XRP guaranteed by the payer exchange. Here are some guidelines the payee exchange can use to decide how often to redeem claims:
@@ -158,18 +164,20 @@ The payee exchange can redeem batches of claims after verifying them to receive
<!-- #{ TODO: Talk to some active PayChan users like Coil people to get some more specific recommendations. But I imagine that settling every few minutes or even hours could make sense depending on how much the payee exchange trusts the payer exchange, how many transactions they do how rapidly, etc. }# -->
[Redeem them in batches >](use-payment-channels.html#8-when-ready-the-payee-redeems-a-claim-for-the-authorized-amount)
<span class="use-case-step-num">{{n.next()}}</span>
## Payer and payee: [Continue to use the payment channel](use-payment-channels.html#7-repeat-steps-3-6-as-desired)
## Payer and payee: Continue to use the payment channel
Payer and payee exchanges can continue to send, verify, and redeem batches of claims as needed within the parameters set by the payment channel.
[Continue to use the payment channel >](use-payment-channels.html#7-repeat-steps-3-6-as-desired)
<span class="use-case-step-num">{{n.next()}}</span>
## Payer: When it's time, make a request to [close the payment channel](use-payment-channels.html#9-when-the-payer-and-payee-are-done-doing-business-the-payer-requests-for-the-channel-to-be-closed)
## Payer: When it's time, make a request to close the payment channel
When the payer exchange and payee exchange are done using the payment channel, the payer exchange can make a request to close the payment channel.
[Close the payment channel >](use-payment-channels.html#9-when-the-payer-and-payee-are-done-doing-business-the-payer-requests-for-the-channel-to-be-closed)
<!-- USE_CASE_STEPS_END -->

View File

@@ -7,7 +7,7 @@ Each `rippled` server (not running in stand-alone mode) connects to a network of
<span class="use-case-step-num">{{n.next()}}</span>
<!-- <span class="use-case-step-length">(1 hour)</span> -->
## [Understand what it means to run a validator](rippled-server-modes.html#reasons-to-run-a-validator)
## Understand what it means to run a validator
If you or your organization relies on the XRP Ledger, it is in your interest to run a validator to participate in the consensus process and provide a trusted validator that supports the ongoing decentralization of the XRP Ledger.
@@ -17,38 +17,46 @@ While validator diversity is important, not every validator is likely to be wide
Despite that, it is important to note that every validator contributes to the long-term health and decentralization of the XRP Ledger.
[Understand what it means to run a validator >](rippled-server-modes.html#reasons-to-run-a-validator)
<span class="use-case-step-num">{{n.next()}}</span>
<!-- <span class="use-case-step-length">(1 hour)</span> -->
## [Set up and run a `rippled` server](manage-the-rippled-server.html)
## Set up and run a `rippled` server
Install and run a `rippled` server. Anyone can run their own `rippled` server that follows the network and keeps a complete copy of the XRP Ledger.
For configuration guidance and network and hardware requirements, see [Capacity Planning](capacity-planning.html).
[Set up and run a rippled server >](manage-the-rippled-server.html)
<span class="use-case-step-num">{{n.next()}}</span>
<!-- <span class="use-case-step-length">(1 hour)</span> -->
## [Enable validation on your rippled server](run-rippled-as-a-validator.html)
## Enable validation on your rippled server
To configure your `rippled` server to run in validator mode, generate a validator key pair and add it to your `rippled.cfg` file.
[Learn more about validation >](run-rippled-as-a-validator.html)
<span class="use-case-step-num">{{n.next()}}</span>
<!-- <span class="use-case-step-length">(1 hour)</span> -->
## [Set up a stock rippled server as a proxy](run-rippled-as-a-validator.html#connect-using-proxies)
## Set up a stock rippled server as a proxy
To protect a production validator from DDoS attacks, you can use a stock `rippled` server as a proxy between the validator and the outside network.
[Set up a proxy >](run-rippled-as-a-validator.html#connect-using-proxies)
<span class="use-case-step-num">{{n.next()}}</span>
<!-- <span class="use-case-step-length">(1 hour)</span> -->
## [Associate your validator with a web domain you control](run-rippled-as-a-validator.html#6-provide-domain-verification)
## Associate your validator with a web domain you control
Network participants are unlikely to trust a validator without knowing who is operating it. To address this concern, associate your validator with a web domain you control.
You may also wish to have your validator listed with one or more validator tracking services, such as the [XRP Charts Validator Registry](https://xrpcharts.ripple.com/#/validators).
[Associate your validator >](run-rippled-as-a-validator.html#6-provide-domain-verification)
### Related Tasks
<div class='related-tasks-links'>
- [Contribute Code to `rippled`](contribute-code-to-rippled.html)
</div>

View File

@@ -75,7 +75,7 @@ To create the escrow as a smart contract, the participants must first define the
<span class="use-case-step-num">{{n.next()}}</span>
## Oracle: [Generate a condition and a fulfillment](send-a-conditionally-held-escrow.html#1-generate-condition-and-fulfillment)
## Oracle: Generate a condition and a fulfillment
Because participants want to create a conditionally-held escrow to provide the smart contract, they need a condition value and a fulfillment value. In this scenario, the participant that creates these values is the neutral party planner (oracle).
@@ -83,33 +83,38 @@ The party planner generates the condition and fulfillment values. The party plan
The party planner must keep the fulfillment value a secret. Anyone can use the condition and fulfillment values to finish the escrow. Most often, the receiver finishes the escrow because they're the ones who are motivated to get paid.
[Generate a condition and a fulfillment >](send-a-conditionally-held-escrow.html#1-generate-condition-and-fulfillment)
<span class="use-case-step-num">{{n.next()}}</span>
## Sender: [Calculate time values needed for the escrow](send-a-conditionally-held-escrow.html#2-calculate-release-or-cancel-time)
## Sender: Calculate time values needed for the escrow
Because the participants want the escrow to be eligible for cancellation after 12 noon the day after the party, the party host (sender) must calculate a `CancelAfter` value to include in the escrow definition.
[Calculate time values needed for the escrow >](send-a-conditionally-held-escrow.html#2-calculate-release-or-cancel-time)
<span class="use-case-step-num">{{n.next()}}</span>
## Sender: [Create the escrow](send-a-conditionally-held-escrow.html#3-submit-escrowcreate-transaction)
## Sender: Create the escrow
The party host (sender) creates the escrow that provides the smart contract. The party host must create the escrow because they are the only participant that can authorize the lock up and potential payout of XRP from their XRP Ledger account.
[Create the escrow >](send-a-conditionally-held-escrow.html#3-submit-escrowcreate-transaction)
<span class="use-case-step-num">{{n.next()}}</span>
## Sender and Receiver: [Wait for validation](send-a-conditionally-held-escrow.html#4-wait-for-validation) and [confirm escrow creation](send-a-conditionally-held-escrow.html#5-confirm-that-the-escrow-was-created)
## Sender and Receiver: Wait for validation and confirm escrow creation
The party host (sender) waits for validation of the ledger that contains the escrow creation transaction and then confirms that the escrow was created.
[Wait for validation >](send-a-conditionally-held-escrow.html#4-wait-for-validation)
The party host then provides the escrow transaction's `hash` value to the party band (receiver). The party band can use the `hash` value to look up the escrow transaction on the XRP Ledger to ensure that it was created according to the smart contract terms they agreed to. As part of this step, the party band should confirm that the condition matches the one the party planner (oracle) provided. If the condition is wrong, the fulfillment the party planner provides won't let the party band finish the escrow and get paid.
[confirm escrow creation >](send-a-conditionally-held-escrow.html#5-confirm-that-the-escrow-was-created)
<span class="use-case-step-num">{{n.next()}}</span>
## Receiver: [Finish the escrow](send-a-conditionally-held-escrow.html#6-submit-escrowfinish-transaction)
## Receiver: Finish the escrow
The party band (receiver) shows up and plays their set.
@@ -119,21 +124,29 @@ The party band must finish the escrow before 12 noon. If they don't, the escrow
If the party planner does not publish the fulfillment (the party band is a no show) or if the party planner publishes the fulfillment, but no one finishes the escrow; after 12 noon the next day, anyone can [cancel the escrow](cancel-an-expired-escrow.html). Cancelling the escrow returns the held XRP to the party host's account.
[Finish the escrow >](send-a-conditionally-held-escrow.html#6-submit-escrowfinish-transaction)
<span class="use-case-step-num">{{n.next()}}</span>
## Receiver and Sender: [Wait for validation](send-a-conditionally-held-escrow.html#7-wait-for-validation) and [confirm final result](send-a-conditionally-held-escrow.html#8-confirm-final-result)
## Receiver and Sender: Wait for validation and confirm final result
The party band (receiver) waits for validation of the ledger that contains the escrow finish transaction and then confirms that the escrow was finished.
At this time, the party band provides the transaction's `hash` value to the party host (sender). They can use the `hash` value to look up the escrow transaction on the XRP Ledger to ensure that it is been finished correctly.
The party band can check their XRP Ledger account balance to ensure that their balance has increased by 2000 XRP. The party host's balance won't change at this step (unless the escrow was canceled) because the escrow creation already debited the locked-up XRP from their account.
[Wait for validation >](send-a-conditionally-held-escrow.html#7-wait-for-validation)
[confirm final result >](send-a-conditionally-held-escrow.html#8-confirm-final-result)
<!-- USE_CASE_STEPS_END -->
### Related Tasks
<div class='related-tasks-links'>
- [Send a Time-Held Escrow](send-a-time-held-escrow.html)
- [Cancel an Expired Escrow](cancel-an-expired-escrow.html)
- [Look Up Escrows](look-up-escrows.html)
</div>