consistent tut subdirs

This commit is contained in:
ddawson
2024-03-05 13:22:52 -08:00
committed by Amarantha Kulkarni
parent e6c26969b1
commit 5679fc64e0
102 changed files with 338 additions and 346 deletions

View File

@@ -5,4 +5,4 @@ The prerequisites for cashing a check are the same whether you are cashing it fo
- The **address** and **secret key** of the Check's stated recipient. The address must match the `Destination` address in the Check object.
- If the Check is for a [token](../concepts/tokens/index.md), you (the recipient) must have a [trust line](../concepts/tokens/fungible-tokens/index.md) to the issuer. Your limit on that trust line must be high enough to hold your previous balance plus the amount you would receive.
- A [secure way to sign transactions](../concepts/transactions/secure-signing.md).
- A [client library](../references/client-libraries.md) that can connect to the XRP Ledger, or [any HTTP or WebSocket client](../tutorials/http-websocket-apis/get-started.md).
- A [client library](../references/client-libraries.md) that can connect to the XRP Ledger, or [any HTTP or WebSocket client](../tutorials/http-websocket-apis/build-apps/get-started.md).

View File

@@ -1,6 +1,6 @@
It can take several minutes to sync with the rest of the XRP Ledger network, during which time the server outputs various warnings. For information about log messages, see [Understanding Log Messages](../infrastructure/troubleshooting/understanding-log-messages.md).
You can use the [`rippled` commandline interface](../tutorials/http-websocket-apis/get-started.md#commandline) to see if your server is synced with the network:
You can use the [`rippled` commandline interface](../tutorials/http-websocket-apis/build-apps/get-started.md#commandline) to see if your server is synced with the network:
```sh
rippled server_info

View File

@@ -64,6 +64,6 @@ The typical way to get an account in the XRP Ledger is as follows:
- [AccountRoot object](../../references/protocol/ledger-data/ledger-entry-types/accountroot.md)
- **Tutorials:**
- [Manage Account Settings (Category)](../../tutorials/tasks/manage-account-settings/index.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/monitor-incoming-payments-with-websocket.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/build-apps/monitor-incoming-payments-with-websocket.md)
{% raw-partial file="/docs/_snippets/common-links.md" /%}

View File

@@ -27,7 +27,7 @@ You need to trust the server you use. If you connect to a malicious server, ther
* It could selectively show or hide payment paths and currency exchange offers to guarantee its own profit while not providing you the best deal.
* If you sent it your address's secret key, it could make arbitrary transactions on your behalf, and even transfer or destroy all the money your address holds.
Additionally, running your own server gives you [admin access](../../tutorials/http-websocket-apis/get-started.md#admin-access), which allows you to run important admin-only and load-intensive commands. If you use a shared server, you have to worry about other users of the same server competing with you for the server's computing power. Many of the commands in the WebSocket API can put a lot of strain on the server, so the server has the option to scale back its responses when it needs to. If you share a server with others, you may not always get the best results possible.
Additionally, running your own server gives you [admin access](../../tutorials/http-websocket-apis/build-apps/get-started.md#admin-access), which allows you to run important admin-only and load-intensive commands. If you use a shared server, you have to worry about other users of the same server competing with you for the server's computing power. Many of the commands in the WebSocket API can put a lot of strain on the server, so the server has the option to scale back its responses when it needs to. If you share a server with others, you may not always get the best results possible.
Finally, if you run a validating server, you can use a stock server as a proxy to the public network while keeping your validating server on a private network only accessible to the outside world through the stock server. This makes it more difficult to compromise the integrity of your validating server.

View File

@@ -12,7 +12,7 @@ The `rippled` server software can run in several modes depending on its configur
- [**P2P Mode**](#p2p-mode) - This is the main mode of the server: it follows the peer-to-peer network, processes transactions, and maintains some amount of [ledger history](ledger-history.md). This mode can be configured to do any or all of the following roles:
- [**Validator**](#validators) - Helps secure the network by participating in consensus.
- [**API Server**](#api-servers) - Provides [API access](../../tutorials/http-websocket-apis/get-started.md) to read data from the shared ledger, submit transactions, and watch activity in the ledger. Optionally, this can be a [**Full History Server**](#full-history-servers), which keeps a complete record of transaction and ledger history.
- [**API Server**](#api-servers) - Provides [API access](../../tutorials/http-websocket-apis/build-apps/get-started.md) to read data from the shared ledger, submit transactions, and watch activity in the ledger. Optionally, this can be a [**Full History Server**](#full-history-servers), which keeps a complete record of transaction and ledger history.
- [**Hub Server**](#public-hubs) - Relays messages between many other members of the peer-to-peer network.
- [**Reporting mode**](#reporting-mode) - A specialized mode for serving API requests from a relational database. It does not participate in the peer-to-peer network, so you need to run a P2P Mode server and connect the reporting mode server using a trusted gRPC connection.
- [**Stand-alone mode**](#stand-alone-mode) - An offline mode for testing. Does not connect to the peer-to-peer network or use consensus.

View File

@@ -40,7 +40,7 @@ The basis of any financial system is transferring value. The quickest and simple
- **Tutorials:**
- [Send XRP (Interactive Tutorial)](../../tutorials/tasks/send-xrp.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/monitor-incoming-payments-with-websocket.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/build-apps/monitor-incoming-payments-with-websocket.md)
- **References:**
- [Payment transaction][]
- [Transaction Results](../../references/protocol/transactions/transaction-results/transaction-results.md)

View File

@@ -128,7 +128,7 @@ Using [the `delivered_amount` field](#the-delivered_amount-field) when processin
- [Transactions](../transactions/index.md)
- **Tutorials:**
- [Look Up Transaction Results](../transactions/finality-of-results/look-up-transaction-results.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/monitor-incoming-payments-with-websocket.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/build-apps/monitor-incoming-payments-with-websocket.md)
- [Use Specialized Payment Types](../../tutorials/tasks/use-specialized-payment-types/index.md)
- [List XRP as an Exchange](../../use-cases/defi/list-xrp-as-an-exchange.md)
- **References:**

View File

@@ -28,7 +28,7 @@ Any market activity before the initial sale of the NFT is not recorded on the XR
Use a program or script to mint many tokens at once. You might find that [Tickets](../../accounts/tickets.md) help you submit transactions in parallel, up to a current limit of 200 transactions in one group.
For a practical example, see the [Batch Mint NFTs Using JavaScript](../../../tutorials/javascript/modular-tutorials/nfts/batch-mint-nfts.md) tutorial.
For a practical example, see the [Batch Mint NFTs Using JavaScript](../../../tutorials/javascript/nfts/batch-mint-nfts.md) tutorial.
### Benefits

View File

@@ -446,7 +446,7 @@ Most other transactions create a specific type of ledger entry and [adjust the s
- [Finality of Results](index.md)
- [Reliable Transaction Submission](../reliable-transaction-submission.md)
- **Tutorials:**
- [Monitor Incoming Payments with WebSocket](../../../tutorials/http-websocket-apis/monitor-incoming-payments-with-websocket.md)
- [Monitor Incoming Payments with WebSocket](../../../tutorials/http-websocket-apis/build-apps/monitor-incoming-payments-with-websocket.md)
- **References:**
- [Ledger Entry Types Reference](../../../references/protocol/ledger-data/ledger-entry-types/index.md) - All possible fields of all types of ledger entries
- [Transaction Metadata](../../../references/protocol/transactions/metadata.md) - Summary of the metadata format and fields that appear in metadata

View File

@@ -209,7 +209,7 @@ Example response from the `tx` command:
- [Set Up Secure Signing](secure-signing.md)
- [Send XRP](../../tutorials/tasks/send-xrp.md)
- [Look Up Transaction Results](finality-of-results/look-up-transaction-results.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/monitor-incoming-payments-with-websocket.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/build-apps/monitor-incoming-payments-with-websocket.md)
- [Cancel or Skip a Transaction](finality-of-results/canceling-a-transaction.md)
- [Reliable Transaction Submission](reliable-transaction-submission.md)
- **References:**

View File

@@ -47,7 +47,7 @@ In this configuration, you run `rippled` on the machine that generates the trans
The [example config file](https://github.com/XRPLF/rippled/blob/8429dd67e60ba360da591bfa905b58a35638fda1/cfg/rippled-example.cfg#L1050-L1073) listens for connections on the local loopback network (127.0.0.1), with JSON-RPC (HTTP) on port 5005 and WebSocket (WS) on port 6006, and treats all connected clients as admin.
**Caution:** Using the [commandline API](../../references/http-websocket-apis/api-conventions/request-formatting.md#commandline-format) for signatures is less secure than [using the Websocket or JSON-RPC APIs](../../tutorials/http-websocket-apis/get-started.md) through non-commandline clients. When using the commandline syntax, your secret key may be visible to other users in the system's process listing, and your shell history may save the key in plain text.
**Caution:** Using the [commandline API](../../references/http-websocket-apis/api-conventions/request-formatting.md#commandline-format) for signatures is less secure than [using the Websocket or JSON-RPC APIs](../../tutorials/http-websocket-apis/build-apps/get-started.md) through non-commandline clients. When using the commandline syntax, your secret key may be visible to other users in the system's process listing, and your shell history may save the key in plain text.
3. Maintain the server to keep it running, updated, and in sync with the network while you're using it.

View File

@@ -53,7 +53,7 @@ This divides transactions into roughly three categories:
## Local Load Cost
Each `rippled` server maintains a cost threshold based on its current load. If you submit a transaction with a `Fee` value that is lower than current load-based transaction cost of the `rippled` server, that server neither applies nor relays the transaction. (**Note:** If you submit a transaction through an [admin connection](../../tutorials/http-websocket-apis/get-started.md), the server applies and relays the transaction as long as the transaction meets the un-scaled minimum transaction cost.) A transaction is very unlikely to survive [the consensus process](../consensus-protocol/index.md) unless its `Fee` value meets the requirements of a majority of servers.
Each `rippled` server maintains a cost threshold based on its current load. If you submit a transaction with a `Fee` value that is lower than current load-based transaction cost of the `rippled` server, that server neither applies nor relays the transaction. (**Note:** If you submit a transaction through an [admin connection](../../tutorials/http-websocket-apis/build-apps/get-started.md), the server applies and relays the transaction as long as the transaction meets the un-scaled minimum transaction cost.) A transaction is very unlikely to survive [the consensus process](../consensus-protocol/index.md) unless its `Fee` value meets the requirements of a majority of servers.
## Open Ledger Cost

View File

@@ -9,7 +9,7 @@ labels:
---
# Configure Amendment Voting
Servers configured as validators can vote on [amendments](../../concepts/networks-and-servers/amendments.md) to the XRP Ledger protocol using the [feature method][]. (This method requires [admin access](../../tutorials/http-websocket-apis/get-started.md#admin-access).)
Servers configured as validators can vote on [amendments](../../concepts/networks-and-servers/amendments.md) to the XRP Ledger protocol using the [feature method][]. (This method requires [admin access](../../tutorials/http-websocket-apis/build-apps/get-started.md#admin-access).)
For example, to vote against the "SHAMapV2" amendment, run the following command:

View File

@@ -49,7 +49,7 @@ To enable gRPC on your server, complete the following steps:
- [XRP Ledger Overview](/about/)
- [`rippled` Server Modes](../../concepts/networks-and-servers/rippled-server-modes.md)
- **Tutorials:**
- [Get Started Using HTTP / WebSocket APIs](../../tutorials/http-websocket-apis/get-started.md)
- [Get Started Using HTTP / WebSocket APIs](../../tutorials/http-websocket-apis/build-apps/get-started.md)
- [Reliable Transaction Submission](../../concepts/transactions/reliable-transaction-submission.md)
- [Manage the rippled Server](../installation/install-rippled-on-ubuntu.md)
- **References:**

View File

@@ -57,7 +57,7 @@ To configure advisory deletion with a daily schedule, perform the following step
2. Test running the [can_delete method][] to prompt the server to run online deletion.
You can use the [`rippled` commandline interface](../../../tutorials/http-websocket-apis/get-started.md#commandline) to run this command. For example:
You can use the [`rippled` commandline interface](../../../tutorials/http-websocket-apis/build-apps/get-started.md#commandline) to run this command. For example:
```
$ rippled --conf=/etc/opt/ripple/rippled.cfg can_delete now

View File

@@ -11,7 +11,7 @@ labels:
By default, the signing methods for [`rippled`](../../concepts/networks-and-servers/index.md) are limited to [administrative connections](../../references/http-websocket-apis/admin-api-methods/index.md). If you want to allow signing methods to be used as public API methods (like with versions of `rippled` before v1.1.0), you can enable it with a configuration change.
This enables the following methods to be used on "public" [JSON-RPC and WebSocket connections](../../tutorials/http-websocket-apis/get-started.md), if your server accepts them:
This enables the following methods to be used on "public" [JSON-RPC and WebSocket connections](../../tutorials/http-websocket-apis/build-apps/get-started.md), if your server accepts them:
- [sign][sign method]
- [sign_for][sign_for method]
@@ -51,7 +51,7 @@ To enable public signing, perform the following steps:
- [Cryptographic Keys](../../concepts/accounts/cryptographic-keys.md)
- **Tutorials:**
- [Set Up Secure Signing](../../concepts/transactions/secure-signing.md)
- [Get Started Using HTTP / WebSocket APIs](../../tutorials/http-websocket-apis/get-started.md)
- [Get Started Using HTTP / WebSocket APIs](../../tutorials/http-websocket-apis/build-apps/get-started.md)
- [Get Started Using JavaScript](../../tutorials/javascript/build-apps/get-started.md)
- **References:**
- [sign method][]

View File

@@ -112,7 +112,7 @@ Before you install `rippled`, you must meet the [System Requirements](system-req
- **Tutorials:**
- [Configure rippled](../configuration/index.md)
- [Troubleshoot rippled](../troubleshooting/index.md)
- [Get Started with the rippled API](../../tutorials/http-websocket-apis/get-started.md)
- [Get Started with the rippled API](../../tutorials/http-websocket-apis/build-apps/get-started.md)
- **References:**
- [rippled API Reference](../../references/http-websocket-apis/index.md)
- [`rippled` Commandline Usage](../commandline-usage.md)

View File

@@ -149,7 +149,7 @@ Before you install `rippled`, you must meet the [System Requirements](system-req
- **Tutorials:**
- [Configure rippled](../configuration/index.md)
- [Troubleshoot rippled](../troubleshooting/index.md)
- [Get Started with the rippled API](../../tutorials/http-websocket-apis/get-started.md)
- [Get Started with the rippled API](../../tutorials/http-websocket-apis/build-apps/get-started.md)
- **References:**
- [rippled API Reference](../../references/http-websocket-apis/index.md)
- [`rippled` Commandline Usage](../commandline-usage.md)

View File

@@ -120,7 +120,7 @@ The `rippled` v1.3 package includes an updated auto-update script that works on
- **Tutorials:**
- [Update Automatically on Linux](update-rippled-automatically-on-linux.md)
- [Troubleshoot rippled](../troubleshooting/index.md)
- [Get Started with the rippled API](../../tutorials/http-websocket-apis/get-started.md)
- [Get Started with the rippled API](../../tutorials/http-websocket-apis/build-apps/get-started.md)
- **References:**
- [rippled API Reference](../../references/http-websocket-apis/index.md)
- [`rippled` Commandline Usage](../commandline-usage.md)

View File

@@ -183,7 +183,7 @@ To migrate your transaction database to a larger page size, perform the followin
11. Confirm that the `rippled` service started successfully.
You can use the [commandline interface](../../tutorials/http-websocket-apis/get-started.md#commandline) to check the server status (unless you have configured your server not to accept JSON-RPC requests). For example:
You can use the [commandline interface](../../tutorials/http-websocket-apis/build-apps/get-started.md#commandline) to check the server status (unless you have configured your server not to accept JSON-RPC requests). For example:
```
/opt/ripple/bin/rippled server_info

View File

@@ -129,7 +129,7 @@ The entry contains the IP address of the client that exceeded its rate limit, an
If you see frequent messages from the same IP address, you may want to block those IP addresses from your network to reduce the load on your server's public API. (For example, you may be able to configure your firewall to block those IP addresses.)
To avoid being dropped by rate limiting on your own server, [connect as an admin](../../tutorials/http-websocket-apis/get-started.md#admin-access).
To avoid being dropped by rate limiting on your own server, [connect as an admin](../../tutorials/http-websocket-apis/build-apps/get-started.md#admin-access).
## InboundLedger 11 timeouts for ledger

View File

@@ -17,6 +17,6 @@ For other programming languages, you can access the XRP Ledger through the [HTTP
| **JavaScript** / **TypeScript** | `xrpl-client` | [Get Started](https://jsfiddle.net/WietseWind/35az6p1b/) | [NPM Reference](https://www.npmjs.com/package/xrpl-client) | [Repo](https://github.com/XRPL-Labs/xrpl-client) |
| **JavaScript** / **TypeScript** | `xrpl-accountlib` | [Get Started](https://jsfiddle.net/WietseWind/gkefpnu0/) | [NPM Reference](https://www.npmjs.com/package/xrpl-accountlib) | [Repo](https://github.com/WietseWind/xrpl-accountlib) |
| **C++** | `rippled` Signing Library | [Get Started](https://github.com/XRPLF/rippled/tree/develop/Builds/linux#signing-library) | | (Part of [`rippled`](https://github.com/XRPLF/rippled/)) |
| **Java** | `xrpl4j` | [Get Started Using Java](../tutorials/java/get-started.md) | [API Reference](https://javadoc.io/doc/org.xrpl/) | [Repo](https://github.com/XRPLF/xrpl4j) |
| **PHP** | `XRPL_PHP` | [Get Started Using PHP](../tutorials/php/get-started.md) | [XRPL_PHP Docs](https://alexanderbuzz.github.io/xrpl-php-docs/) | [Repo](https://github.com/AlexanderBuzz/xrpl-php) |
| **Java** | `xrpl4j` | [Get Started Using Java](../tutorials/java/build-apps/get-started.md) | [API Reference](https://javadoc.io/doc/org.xrpl/) | [Repo](https://github.com/XRPLF/xrpl4j) |
| **PHP** | `XRPL_PHP` | [Get Started Using PHP](../tutorials/php/build-apps/get-started.md) | [XRPL_PHP Docs](https://alexanderbuzz.github.io/xrpl-php-docs/) | [Repo](https://github.com/AlexanderBuzz/xrpl-php) |
| **Ruby** | `XRPB` | | [XRPB Docs](https://www.rubydoc.info/gems/xrbp) | [Repo](https://github.com/DevNullProd/XRBP) |

View File

@@ -15,6 +15,6 @@ For information on the old Data API, see the [rippled-historical-database reposi
## Alternatives
For most common operations, like requesting account balances or transaction history, you can query a self-hosted or [public XRP Ledger server](../tutorials/public-servers.md) using a [WebSocket connection](../tutorials/http-websocket-apis/get-started.md#websocket-api) or [JSON-RPC (HTTP POST)](../tutorials/http-websocket-apis/get-started.md#json-rpc).
For most common operations, like requesting account balances or transaction history, you can query a self-hosted or [public XRP Ledger server](../tutorials/public-servers.md) using a [WebSocket connection](../tutorials/http-websocket-apis/build-apps/get-started.md#websocket-api) or [JSON-RPC (HTTP POST)](../tutorials/http-websocket-apis/build-apps/get-started.md#json-rpc).
See the [Get Started Using HTTP / WebSocket APIs](../tutorials/http-websocket-apis/get-started.md) page for more information.
See the [Get Started Using HTTP / WebSocket APIs](../tutorials/http-websocket-apis/build-apps/get-started.md) page for more information.

View File

@@ -10,7 +10,7 @@ labels:
Administer a `rippled` server using these admin API methods. Admin methods are meant only for trusted personnel in charge of keeping the server operational. Admin methods include commands for managing, monitoring, and debugging the server.
Admin commands are available only if you connect to `rippled` on a host and port that the `rippled.cfg` file identifies as admin. By default, the commandline client uses an admin connection. For more information on connecting to `rippled`, see [Getting Started with the `rippled` API](../../../tutorials/http-websocket-apis/get-started.md).
Admin commands are available only if you connect to `rippled` on a host and port that the `rippled.cfg` file identifies as admin. By default, the commandline client uses an admin connection. For more information on connecting to `rippled`, see [Getting Started with the `rippled` API](../../../tutorials/http-websocket-apis/build-apps/get-started.md).
## [Key Generation Methods](key-generation-methods/index.md)
@@ -48,7 +48,7 @@ Use these methods to sign transactions.
* **[`sign`](signing-methods/sign.md)** - Cryptographically sign a transaction.
* **[`sign_for`](signing-methods/sign_for.md)** - Contribute to a multi-signature.
By default, these methods are [admin-only](../../../tutorials/http-websocket-apis/get-started.md#admin-access). They can be used as public methods if the server admin has [enabled public signing](../../../infrastructure/configuration/enable-public-signing.md).
By default, these methods are [admin-only](../../../tutorials/http-websocket-apis/build-apps/get-started.md#admin-access). They can be used as public methods if the server admin has [enabled public signing](../../../infrastructure/configuration/enable-public-signing.md).
## [Peer Management Methods](peer-management-methods/index.md)

View File

@@ -10,7 +10,7 @@ labels:
The `rippled` server limits the rate at which API clients can make requests on public APIs. Rate limiting is based on the IP address of the client, so clients behind [network address translation](https://en.wikipedia.org/wiki/Network_address_translation) share a limit based on their public IP address.
**Tip:** Rate limiting does not apply when the client is connected [as an admin](../../../tutorials/http-websocket-apis/get-started.md#admin-access).
**Tip:** Rate limiting does not apply when the client is connected [as an admin](../../../tutorials/http-websocket-apis/build-apps/get-started.md#admin-access).
When a client is approaching the rate limit, the server adds the field `"warning": "load"` at the top level of an [API response](response-formatting.md). This warning is not added to every response, but the server may send several such warnings before it disconnects a client.
@@ -58,7 +58,7 @@ The usage rate drops off exponentially over time, so a client that does not make
- [The `rippled` Server](../../../concepts/networks-and-servers/index.md)
- [Software Ecosystem](../../../introduction/software-ecosystem.md)
- **Tutorials:**
- [Getting Started with XRP Ledger APIs](../../../tutorials/http-websocket-apis/get-started.md)
- [Getting Started with XRP Ledger APIs](../../../tutorials/http-websocket-apis/build-apps/get-started.md)
- [Troubleshooting rippled](../../../infrastructure/troubleshooting/index.md)
- **References:**
- [rippled API Reference](../index.md)

View File

@@ -130,7 +130,7 @@ Example warning:
This warning indicates that the one or more [amendments](../../../concepts/networks-and-servers/amendments.md) to the XRP Ledger protocol are scheduled to become enabled, but the current server does not have an implementation for those amendments. If those amendments become enabled, the current server will become [amendment blocked](../../../concepts/networks-and-servers/amendments.md#amendment-blocked-servers), so you should [upgrade to the latest `rippled` version](../../../infrastructure/installation/index.md) as soon as possible. <!-- STYLE_OVERRIDE: will -->
The server only sends this warning if the client is [connected as an admin](../../../tutorials/http-websocket-apis/get-started.md#admin-access).
The server only sends this warning if the client is [connected as an admin](../../../tutorials/http-websocket-apis/build-apps/get-started.md#admin-access).
This warning includes a `details` field with the following fields:
@@ -190,7 +190,7 @@ It is generally safe to ignore this warning.
- [Amendments](../../../concepts/networks-and-servers/amendments.md)
- [Known Amendments](/resources/known-amendments.md)
- **Tutorials:**
- [Get Started with XRP Ledger APIs](../../../tutorials/http-websocket-apis/get-started.md)
- [Get Started with XRP Ledger APIs](../../../tutorials/http-websocket-apis/build-apps/get-started.md)
- [Install and Update `rippled`](../../../infrastructure/installation/index.md)
- **References:**
- [feature method][]

View File

@@ -36,7 +36,7 @@ An AccountSet transaction modifies the properties of an [account in the XRP Ledg
| [`Domain`](#domain) | String | Blob | _(Optional)_ The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase. [Cannot be more than 256 bytes in length.](https://github.com/XRPLF/rippled/blob/55dc7a252e08a0b02cd5aa39e9b4777af3eafe77/src/ripple/app/tx/impl/SetAccount.h#L34) |
| `EmailHash` | String | Hash128 | _(Optional)_ An arbitrary 128-bit value. Conventionally, clients treat this as the md5 hash of an email address to use for displaying a [Gravatar](http://en.gravatar.com/site/implement/hash/) image. |
| `MessageKey` | String | Blob | _(Optional)_ Public key for sending encrypted messages to this account. To set the key, it must be exactly 33 bytes, with the first byte indicating the key type: `0x02` or `0x03` for secp256k1 keys, `0xED` for Ed25519 keys. To remove the key, use an empty value. |
| `NFTokenMinter` | String | Blob | _(Optional)_ Another account that can [mint NFTokens for you](../../../../tutorials/javascript/modular-tutorials/nfts/assign-an-authorized-minter.md). _(Added by the [NonFungibleTokensV1_1 amendment][].)_ |
| `NFTokenMinter` | String | Blob | _(Optional)_ Another account that can [mint NFTokens for you](../../../../tutorials/javascript/nfts/assign-an-authorized-minter.md). _(Added by the [NonFungibleTokensV1_1 amendment][].)_ |
| [`SetFlag`](#accountset-flags) | Number | UInt32 | _(Optional)_ Integer flag to enable for this account. |
| [`TransferRate`](#transferrate) | Number | UInt32 | _(Optional)_ The fee to charge when users transfer this account's tokens, represented as billionths of a unit. Cannot be more than `2000000000` or less than `1000000000`, except for the special case `0` meaning no fee. |
| [`TickSize`](../../../../concepts/tokens/decentralized-exchange/ticksize.md) | Number | UInt8 | _(Optional)_ Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are `3` to `15` inclusive, or `0` to disable. _(Added by the [TickSize amendment][])_ |

View File

@@ -12,7 +12,7 @@ showcase_icon: assets/img/logos/globe.svg
---
# Get Started Using HTTP / WebSocket APIs
If you don't have or don't want to use a [client library](../../references/client-libraries.md) in your preferred programming language, you can access the XRP Ledger directly through the APIs of its core server software, [`rippled`](../../concepts/networks-and-servers/index.md). The server provides APIs over JSON-RPC and WebSocket protocols. If you don't [run your own instance of `rippled`](../../infrastructure/installation/index.md) you can still use a [public server][public servers].
If you don't have or don't want to use a [client library](../../../references/client-libraries.md) in your preferred programming language, you can access the XRP Ledger directly through the APIs of its core server software, [`rippled`](../../../concepts/networks-and-servers/index.md). The server provides APIs over JSON-RPC and WebSocket protocols. If you don't [run your own instance of `rippled`](../../../infrastructure/installation/index.md) you can still use a [public server][public servers].
**Tip:** You can dive right into the API with the [**WebSocket API Tool**](/resources/dev-tools/websocket-api-tool), or use the [XRP Ledger Explorer](https://livenet.xrpl.org/) to watch the progress of the ledger live.
@@ -21,21 +21,21 @@ If you don't have or don't want to use a [client library](../../references/clien
Both JSON-RPC and WebSocket are HTTP-based protocols, and for the most part the data provided over both protocols is the same. The major differences are as follows:
- JSON-RPC uses individual HTTP requests and responses for each call, similar to a RESTful API. You can use any common HTTP client such as [curl](https://curl.se/), [Postman](https://www.postman.com/downloads/), or [Requests](https://requests.readthedocs.io/) to access this API.
- WebSocket uses a persistent connection that allows the server to push data to the client. Functions that require push messages, like [event subscriptions](../../references/http-websocket-apis/public-api-methods/subscription-methods/subscribe.md), are only available using WebSocket.
- WebSocket uses a persistent connection that allows the server to push data to the client. Functions that require push messages, like [event subscriptions](../../../references/http-websocket-apis/public-api-methods/subscription-methods/subscribe.md), are only available using WebSocket.
Both APIs can be served unencrypted (`http://` and `ws://`) or encrypted using TLS (`https://` and `wss://`). Unencrypted connections should not be served over open networks, but can be used when the client is on the same machine as the server.
## Admin Access
The API methods are divided into [Public Methods](../../references/http-websocket-apis/public-api-methods/index.md) and [Admin Methods](../../references/http-websocket-apis/admin-api-methods/index.md) so that organizations can offer public servers for the benefit of the community. To access admin methods, or admin functionality of public methods, you must connect to the API on a **port and IP address marked as admin** in the server's config file.
The API methods are divided into [Public Methods](../../../references/http-websocket-apis/public-api-methods/index.md) and [Admin Methods](../../../references/http-websocket-apis/admin-api-methods/index.md) so that organizations can offer public servers for the benefit of the community. To access admin methods, or admin functionality of public methods, you must connect to the API on a **port and IP address marked as admin** in the server's config file.
The [example config file](https://github.com/XRPLF/rippled/blob/f00f263852c472938bf8e993e26c7f96f435935c/cfg/rippled-example.cfg#L1154-L1179) listens for connections on the local loopback network (127.0.0.1), with JSON-RPC (HTTP) on port 5005 and WebSocket (WS) on port 6006, and treats all connected clients as admin.
## WebSocket API
If you are looking to try out some methods on the XRP Ledger, you can skip writing your own WebSocket code and go straight to using the API at the [WebSocket API Tool](/resources/dev-tools/websocket-api-tool). Later on, when you want to connect to your own `rippled` server, you can [build your own client](monitor-incoming-payments-with-websocket.md) or use a [client library](../../references/client-libraries.md) with WebSocket support.
If you are looking to try out some methods on the XRP Ledger, you can skip writing your own WebSocket code and go straight to using the API at the [WebSocket API Tool](/resources/dev-tools/websocket-api-tool). Later on, when you want to connect to your own `rippled` server, you can [build your own client](monitor-incoming-payments-with-websocket.md) or use a [client library](../../../references/client-libraries.md) with WebSocket support.
Example WebSocket API request:
@@ -49,7 +49,7 @@ Example WebSocket API request:
The response shows you the current status of the server.
Read more: [Request Formatting >](../../references/http-websocket-apis/api-conventions/request-formatting.md) [Response Formatting >](../../references/http-websocket-apis/api-conventions/response-formatting.md) [About the server_info method >][server_info method]
Read more: [Request Formatting >](../../../references/http-websocket-apis/api-conventions/request-formatting.md) [Response Formatting >](../../../references/http-websocket-apis/api-conventions/response-formatting.md) [About the server_info method >][server_info method]
## JSON-RPC
@@ -73,7 +73,7 @@ Content-Type: application/json
The response shows you the current status of the server.
Read more: [Request Formatting >](../../references/http-websocket-apis/api-conventions/request-formatting.md#json-rpc-format) [Response Formatting >](../../references/http-websocket-apis/api-conventions/response-formatting.md) [About the server_info method >][server_info method]
Read more: [Request Formatting >](../../../references/http-websocket-apis/api-conventions/request-formatting.md#json-rpc-format) [Response Formatting >](../../../references/http-websocket-apis/api-conventions/response-formatting.md) [About the server_info method >][server_info method]
## Commandline
@@ -85,7 +85,7 @@ Example commandline request:
rippled --conf=/etc/opt/ripple/rippled.cfg server_info
```
Read more: [Commandline Usage Reference >](../../infrastructure/commandline-usage.md)
Read more: [Commandline Usage Reference >](../../../infrastructure/commandline-usage.md)
**Caution:** The commandline interface is intended for administrative purposes only and is _not a supported API_. New versions of `rippled` may introduce breaking changes to the commandline API without warning!
@@ -93,21 +93,21 @@ Read more: [Commandline Usage Reference >](../../infrastructure/commandline-usag
For a full list of API methods, see:
- [Public `rippled` Methods](../../references/http-websocket-apis/public-api-methods/index.md): Methods available on public servers, including looking up data from the ledger and submitting transactions.
- [Admin `rippled` Methods](../../references/http-websocket-apis/admin-api-methods/index.md): Methods for [managing](../../infrastructure/installation/install-rippled-on-ubuntu.md) the `rippled` server.
- [Public `rippled` Methods](../../../references/http-websocket-apis/public-api-methods/index.md): Methods available on public servers, including looking up data from the ledger and submitting transactions.
- [Admin `rippled` Methods](../../../references/http-websocket-apis/admin-api-methods/index.md): Methods for [managing](../../../infrastructure/installation/install-rippled-on-ubuntu.md) the `rippled` server.
## See Also
- **Concepts:**
- [XRP Ledger Overview](/about/)
- [Client Libraries](../../references/client-libraries.md)
- [Parallel Networks](../../concepts/networks-and-servers/parallel-networks.md)
- [Client Libraries](../../../references/client-libraries.md)
- [Parallel Networks](../../../concepts/networks-and-servers/parallel-networks.md)
- **Tutorials:**
- [Get Started Using JavaScript](get-started.md)
- [Reliable Transaction Submission](../../concepts/transactions/reliable-transaction-submission.md)
- [Manage the rippled Server](../../infrastructure/installation/install-rippled-on-ubuntu.md)
- [Reliable Transaction Submission](../../../concepts/transactions/reliable-transaction-submission.md)
- [Manage the rippled Server](../../../infrastructure/installation/install-rippled-on-ubuntu.md)
- **References:**
- [rippled API Reference](../../references/http-websocket-apis/index.md)
- [rippled API Reference](../../../references/http-websocket-apis/index.md)
{% raw-partial file="/docs/_snippets/common-links.md" /%}

View File

@@ -0,0 +1,13 @@
---
html: build-apps-with-http-websocket.html
parent: javascript.html
top_nav_grouping: Article Types
metadata:
indexPage: true
---
# Build Applications with HTTP-Websocket Library
Build applications in HTTP-Websocket.
{% child-pages /%}

View File

@@ -10,7 +10,7 @@ labels:
---
# Monitor Incoming Payments with WebSocket
This tutorial shows how to monitor for incoming [payments](../../concepts/payment-types/index.md) using the [WebSocket API](../../references/http-websocket-apis/index.md). Since all XRP Ledger transactions are public, anyone can monitor incoming payments to any address.
This tutorial shows how to monitor for incoming [payments](../../../concepts/payment-types/index.md) using the [WebSocket API](../../../references/http-websocket-apis/index.md). Since all XRP Ledger transactions are public, anyone can monitor incoming payments to any address.
WebSocket follows a model where the client and server open one connection, then send messages both ways through the same connection, which stays open until explicitly closed (or until the connection fails). This is in contrast to the HTTP-based API model (including JSON-RPC and RESTful APIs), where the client opens and closes a new connection for each request.[¹](#footnote-1)<a id="from-footnote-1"></a>
@@ -19,8 +19,8 @@ WebSocket follows a model where the client and server open one connection, then
## Prerequisites
- The examples in this page use JavaScript and the WebSocket protocol, which are available in all major modern browsers. If you have some JavaScript knowledge and expertise in another programming language with a WebSocket client, you can follow along while adapting the instructions to the language of your choice.
- You need a stable internet connection and access to an XRP Ledger server. The embedded examples connect to Ripple's pool of public servers. If you [run your own `rippled` or Clio server](../../infrastructure/installation/index.md), you can also connect to that server locally.
- To properly handle XRP values without rounding errors, you need access to a number type that can do math on 64-bit unsigned integers. The examples in this tutorial use [big.js](https://github.com/MikeMcl/big.js/). If you are working with [tokens](../../concepts/tokens/index.md), you need even more precision. For more information, see [Currency Precision](../../references/protocol/data-types/currency-formats.md#xrp-precision).
- You need a stable internet connection and access to an XRP Ledger server. The embedded examples connect to Ripple's pool of public servers. If you [run your own `rippled` or Clio server](../../../infrastructure/installation/index.md), you can also connect to that server locally.
- To properly handle XRP values without rounding errors, you need access to a number type that can do math on 64-bit unsigned integers. The examples in this tutorial use [big.js](https://github.com/MikeMcl/big.js/). If you are working with [tokens](../../../concepts/tokens/index.md), you need even more precision. For more information, see [Currency Precision](../../../references/protocol/data-types/currency-formats.md#xrp-precision).
<script type="application/javascript" src="/js/interactive-tutorial.js"></script>
@@ -71,7 +71,7 @@ The above example opens a secure connection (`wss://`) to one of Ripple's public
const socket = new WebSocket('ws://localhost:6006')
```
**Tip:** By default, connecting to a local `rippled` server gives you access to the full set of [admin methods](../../references/http-websocket-apis/admin-api-methods/index.md) and admin-only data in some responses such as [server_info][server_info method], plus the [public methods](../../references/http-websocket-apis/public-api-methods/index.md) that are available when you connect to public servers over the internet.
**Tip:** By default, connecting to a local `rippled` server gives you access to the full set of [admin methods](../../../references/http-websocket-apis/admin-api-methods/index.md) and admin-only data in some responses such as [server_info][server_info method], plus the [public methods](../../../references/http-websocket-apis/public-api-methods/index.md) that are available when you connect to public servers over the internet.
Example:
@@ -123,11 +123,11 @@ Since WebSocket connections can have several messages going each way and there i
- An `id` field that matches the `id` provided in the request this is a response for. (This is important because responses may arrive out of order.)
- A `status` field that indicates whether the API successfully processed your request. The string value `success` indicates [a successful response](../../references/http-websocket-apis/api-conventions/response-formatting.md). The string value `error` indicates [an error](../../references/http-websocket-apis/api-conventions/error-formatting.md).
- A `status` field that indicates whether the API successfully processed your request. The string value `success` indicates [a successful response](../../../references/http-websocket-apis/api-conventions/response-formatting.md). The string value `error` indicates [an error](../../../references/http-websocket-apis/api-conventions/error-formatting.md).
**Warning:** When submitting transactions, a `status` of `success` at the top level of the WebSocket message does not mean that the transaction itself succeeded. It only indicates that the server understood your request. For looking up a transaction's actual outcome, see [Look Up Transaction Results](../../concepts/transactions/finality-of-results/look-up-transaction-results.md).
**Warning:** When submitting transactions, a `status` of `success` at the top level of the WebSocket message does not mean that the transaction itself succeeded. It only indicates that the server understood your request. For looking up a transaction's actual outcome, see [Look Up Transaction Results](../../../concepts/transactions/finality-of-results/look-up-transaction-results.md).
- For follow-up messages from [subscriptions](../../references/http-websocket-apis/public-api-methods/subscription-methods/subscribe.md), the `type` indicates the type of follow-up message it is, such as the notification of a new transaction, ledger, or validation; or a follow-up to an ongoing [pathfinding request](../../references/http-websocket-apis/public-api-methods/path-and-order-book-methods/path_find.md). Your client only receives these messages if it subscribes to them.
- For follow-up messages from [subscriptions](../../../references/http-websocket-apis/public-api-methods/subscription-methods/subscribe.md), the `type` indicates the type of follow-up message it is, such as the notification of a new transaction, ledger, or validation; or a follow-up to an ongoing [pathfinding request](../../../references/http-websocket-apis/public-api-methods/path-and-order-book-methods/path_find.md). Your client only receives these messages if it subscribes to them.
**Tip:** The [xrpl.js library for JavaScript](https://js.xrpl.org/) handles this step by default. All asynchronous API requests use Promises to provide the response, and you can listen to streams using the `.on(event, callback)` method of the `Client`.
@@ -341,27 +341,27 @@ WS_HANDLERS["transaction"] = log_tx
## 4. Read Incoming Payments
When you subscribe to an account, you get messages for _all transactions to or from the account_, as well as _transactions that affect the account indirectly_, such as trading its [tokens](../../concepts/tokens/index.md). If your goal is to recognize when the account has received incoming payments, you must filter the transactions stream and process the payments based on the amount they actually delivered. Look for the following information:
When you subscribe to an account, you get messages for _all transactions to or from the account_, as well as _transactions that affect the account indirectly_, such as trading its [tokens](../../../concepts/tokens/index.md). If your goal is to recognize when the account has received incoming payments, you must filter the transactions stream and process the payments based on the amount they actually delivered. Look for the following information:
- The **`validated` field** indicates that the transaction's outcome is [final](../../concepts/transactions/finality-of-results/index.md). This should always be the case when you subscribe to `accounts`, but if you _also_ subscribe to `accounts_proposed` or the `transactions_proposed` stream then the server sends similar messages on the same connection for unconfirmed transactions. As a precaution, it's best to always check the `validated` field.
- The **`meta.TransactionResult` field** is the [transaction result](../../references/protocol/transactions/transaction-results/transaction-results.md). If the result is not `tesSUCCESS`, the transaction failed and cannot have delivered any value.
- The **`validated` field** indicates that the transaction's outcome is [final](../../../concepts/transactions/finality-of-results/index.md). This should always be the case when you subscribe to `accounts`, but if you _also_ subscribe to `accounts_proposed` or the `transactions_proposed` stream then the server sends similar messages on the same connection for unconfirmed transactions. As a precaution, it's best to always check the `validated` field.
- The **`meta.TransactionResult` field** is the [transaction result](../../../references/protocol/transactions/transaction-results/transaction-results.md). If the result is not `tesSUCCESS`, the transaction failed and cannot have delivered any value.
- The **`transaction.Account`** field is the sender of the transaction. If you are only looking for transactions sent by others, you can ignore any transactions where this field matches your account's address. (Keep in mind, it _is_ possible to make a cross-currency payment to yourself.)
- The **`transaction.TransactionType` field** is the type of transaction. The transaction types that can possibly deliver currency to an account are as follows:
- **[Payment transactions][]** can deliver XRP or [tokens](../../concepts/tokens/index.md). Filter these by the `transaction.Destination` field, which contains the address of the recipient, and always use the `meta.delivered_amount` to see how much the payment actually delivered. XRP amounts are [formatted as strings](../../references/protocol/data-types/basic-data-types.md#specifying-currency-amounts).
- **[Payment transactions][]** can deliver XRP or [tokens](../../../concepts/tokens/index.md). Filter these by the `transaction.Destination` field, which contains the address of the recipient, and always use the `meta.delivered_amount` to see how much the payment actually delivered. XRP amounts are [formatted as strings](../../../references/protocol/data-types/basic-data-types.md#specifying-currency-amounts).
**Warning:** If you use the `transaction.Amount` field instead, you may be vulnerable to the [partial payments exploit](../../concepts/payment-types/partial-payments.md#partial-payments-exploit). Malicious users can use this exploit to trick you into allowing the malicious user to trade or withdraw more money than they paid you.
**Warning:** If you use the `transaction.Amount` field instead, you may be vulnerable to the [partial payments exploit](../../../concepts/payment-types/partial-payments.md#partial-payments-exploit). Malicious users can use this exploit to trick you into allowing the malicious user to trade or withdraw more money than they paid you.
- **[CheckCash transactions][]** allow an account to receive money authorized by a different account's [CheckCreate transaction][]. Look at the metadata of a **CheckCash transaction** to see how much currency the account received.
- **[EscrowFinish transactions][]** can deliver XRP by finishing an [Escrow](../../concepts/payment-types/escrow.md) created by a previous [EscrowCreate transaction][]. Look at the metadata of the **EscrowFinish transaction** to see which account received XRP from the escrow and how much.
- **[EscrowFinish transactions][]** can deliver XRP by finishing an [Escrow](../../../concepts/payment-types/escrow.md) created by a previous [EscrowCreate transaction][]. Look at the metadata of the **EscrowFinish transaction** to see which account received XRP from the escrow and how much.
- **[OfferCreate transactions][]** can deliver XRP or tokens by consuming offers your account has previously placed in the XRP Ledger's [decentralized exchange](../../concepts/tokens/decentralized-exchange/index.md). If you never place offers, you cannot receive money this way. Look at the metadata to see what currency the account received, if any, and how much.
- **[OfferCreate transactions][]** can deliver XRP or tokens by consuming offers your account has previously placed in the XRP Ledger's [decentralized exchange](../../../concepts/tokens/decentralized-exchange/index.md). If you never place offers, you cannot receive money this way. Look at the metadata to see what currency the account received, if any, and how much.
- **[PaymentChannelClaim transactions][]** can deliver XRP from a [payment channel](../../concepts/payment-types/payment-channels.md). Look at the metadata to see which accounts, if any, received XRP from the transaction.
- **[PaymentChannelClaim transactions][]** can deliver XRP from a [payment channel](../../../concepts/payment-types/payment-channels.md). Look at the metadata to see which accounts, if any, received XRP from the transaction.
- **[PaymentChannelFund transactions][]** can return XRP from a closed (expired) payment channel to the sender.
- The **`meta` field** contains [transaction metadata](../../references/protocol/transactions/metadata.md), including exactly how much of which currency or currencies was delivered where. See [Look Up transaction Results](../../concepts/transactions/finality-of-results/look-up-transaction-results.md) for more information on how to understand transaction metadata.
- The **`meta` field** contains [transaction metadata](../../../references/protocol/transactions/metadata.md), including exactly how much of which currency or currencies was delivered where. See [Look Up transaction Results](../../../concepts/transactions/finality-of-results/look-up-transaction-results.md) for more information on how to understand transaction metadata.
The following sample code looks at transaction metadata of all the above transaction types to report how much XRP an account received:
@@ -472,9 +472,9 @@ $("#tx_read").click((event) => {
## Next Steps
- [Look Up Transaction Results](../../concepts/transactions/finality-of-results/look-up-transaction-results.md) to see exactly what a transaction did, and build your software to react appropriately.
- Try [Sending XRP](../tasks/send-xrp.md) from your own address.
- Try monitoring for transactions of advanced types like [Escrows](../../concepts/payment-types/escrow.md), [Checks](../../concepts/payment-types/checks.md), or [Payment Channels](../../concepts/payment-types/payment-channels.md), and responding to incoming notifications.
- [Look Up Transaction Results](../../../concepts/transactions/finality-of-results/look-up-transaction-results.md) to see exactly what a transaction did, and build your software to react appropriately.
- Try [Sending XRP](../../tasks/send-xrp.md) from your own address.
- Try monitoring for transactions of advanced types like [Escrows](../../../concepts/payment-types/escrow.md), [Checks](../../../concepts/payment-types/checks.md), or [Payment Channels](../../../concepts/payment-types/payment-channels.md), and responding to incoming notifications.
<!--{# TODO: uncomment when it's ready. - To more robustly handle internet instability, [Follow a Transaction Chain](follow-a-transaction-chain.html) to detect if you missed a notification. #}-->
## Other Programming Languages
@@ -503,14 +503,14 @@ Many programming languages have libraries for sending and receiving data over a
## See Also
- **Concepts:**
- [Transactions](../../concepts/transactions/index.md)
- [Finality of Results](../../concepts/transactions/finality-of-results/index.md) - How to know when a transaction's success or failure is final. (Short version: if a transaction is in a validated ledger, its outcome and metadata are final.)
- [Transactions](../../../concepts/transactions/index.md)
- [Finality of Results](../../../concepts/transactions/finality-of-results/index.md) - How to know when a transaction's success or failure is final. (Short version: if a transaction is in a validated ledger, its outcome and metadata are final.)
- **Tutorials:**
- [Reliable Transaction Submission](../../concepts/transactions/reliable-transaction-submission.md)
- [Look Up Transaction Results](../../concepts/transactions/finality-of-results/look-up-transaction-results.md)
- [Reliable Transaction Submission](../../../concepts/transactions/reliable-transaction-submission.md)
- [Look Up Transaction Results](../../../concepts/transactions/finality-of-results/look-up-transaction-results.md)
- **References:**
- [Transaction Types](../../references/protocol/transactions/types/index.md)
- [Transaction Metadata](../../references/protocol/transactions/metadata.md) - Summary of the metadata format and fields that appear in metadata
- [Transaction Results](../../references/protocol/transactions/transaction-results/transaction-results.md) - Tables of all possible result codes for transactions.
- [Transaction Types](../../../references/protocol/transactions/types/index.md)
- [Transaction Metadata](../../../references/protocol/transactions/metadata.md) - Summary of the metadata format and fields that appear in metadata
- [Transaction Results](../../../references/protocol/transactions/transaction-results/transaction-results.md) - Tables of all possible result codes for transactions.
{% raw-partial file="/docs/_snippets/common-links.md" /%}

View File

@@ -19,10 +19,10 @@ These tutorials walk you through the basics of building a very simple XRP Ledger
<br/>
{% xrpl-card title="Java" body="Using xrpl4j, a pure Java library." href="/docs/tutorials/java/get-started/" image="/img/logos/java.svg" imageAlt="Java logo" /%}
{% xrpl-card title="Java" body="Using xrpl4j, a pure Java library." href="/docs/tutorials/java/" image="/img/logos/java.svg" imageAlt="Java logo" /%}
{% xrpl-card title="PHP" body="Using the XRPL_PHP client library." href="/docs/tutorials/php/get-started/" image="/img/logos/php.svg" imageAlt="PHP logo" /%}
{% xrpl-card title="PHP" body="Using the XRPL_PHP client library." href="/docs/tutorials/php/" image="/img/logos/php.svg" imageAlt="PHP logo" /%}
{% xrpl-card title="HTTP & WebSocket APIs" body="Access the XRP Ledger directly through the APIs of its core server." href="/docs/tutorials/http-websocket-apis/get-started/" image="/img/logos/globe.svg" imageAlt="globe icon" /%}
{% xrpl-card title="HTTP & WebSocket APIs" body="Access the XRP Ledger directly through the APIs of its core server." href="/docs/tutorials/http-websocket-apis/" image="/img/logos/globe.svg" imageAlt="globe icon" /%}
{% /card-grid %}

View File

@@ -1,5 +1,5 @@
---
html: get-started-using-java.html
html: get-started-using-java-library.html
parent: java.html
funnel: Build
doc_type: Tutorials
@@ -13,7 +13,7 @@ labels:
- Development
showcase_icon: assets/img/logos/java.svg
---
# Get Started Using Java
# Get Started Using Java Library
This tutorial walks you through the basics of building an XRP Ledger-connected application using [`xrpl4j`](https://github.com/XRPLF/xrpl4j), a pure Java library built to interact with the XRP Ledger.
@@ -77,7 +77,7 @@ Check out the [xrpl4j sample project](https://github.com/XRPLF/xrpl4j-sample) fo
## Start Building
When you're working with the XRP Ledger, there are a few things you'll need to manage, whether you're adding XRP to your [account](../../concepts/accounts/index.md), integrating with the [decentralized exchange](../../concepts/tokens/decentralized-exchange/index.md), or [issuing tokens](../../concepts/tokens/index.md). This tutorial walks you through basic patterns common to getting started with all of these use cases and provides sample code for implementing them.
When you're working with the XRP Ledger, there are a few things you'll need to manage, whether you're adding XRP to your [account](../../../concepts/accounts/index.md), integrating with the [decentralized exchange](../../../concepts/tokens/decentralized-exchange/index.md), or [issuing tokens](../../../concepts/tokens/index.md). This tutorial walks you through basic patterns common to getting started with all of these use cases and provides sample code for implementing them.
Here are the basic steps you'll need to cover for almost any XRP Ledger project:
@@ -95,9 +95,9 @@ you can use an [`XrplClient`](https://javadoc.io/doc/org.xrpl/xrpl4j-client/3.0.
#### Connect to the production XRP Ledger
The sample code in the previous section shows you how to connect to the Testnet, which is one of the available [parallel networks](../../concepts/networks-and-servers/parallel-networks.md). When you're ready to integrate with the production XRP Ledger, you'll need to connect to the Mainnet. You can do that in two ways:
The sample code in the previous section shows you how to connect to the Testnet, which is one of the available [parallel networks](../../../concepts/networks-and-servers/parallel-networks.md). When you're ready to integrate with the production XRP Ledger, you'll need to connect to the Mainnet. You can do that in two ways:
* By [installing the core server](../../infrastructure/installation/index.md) (`rippled`) and running a node yourself. The core server connects to the Mainnet by default, but you can [change the configuration to use Testnet or Devnet](../../infrastructure/configuration/connect-your-rippled-to-the-xrp-test-net.md). [There are good reasons to run your own core server](../../concepts/networks-and-servers/index.md#reasons-to-run-your-own-server). If you run your own server, you can connect to it like so:
* By [installing the core server](../../../infrastructure/installation/index.md) (`rippled`) and running a node yourself. The core server connects to the Mainnet by default, but you can [change the configuration to use Testnet or Devnet](../../../infrastructure/configuration/connect-your-rippled-to-the-xrp-test-net.md). [There are good reasons to run your own core server](../../../concepts/networks-and-servers/index.md#reasons-to-run-your-own-server). If you run your own server, you can connect to it like so:
```
final HttpUrl rippledUrl = HttpUrl.get("http://localhost:5005/");
@@ -115,7 +115,7 @@ The sample code in the previous section shows you how to connect to the Testnet,
### 2. Get account
To store value and execute transactions on the XRP Ledger, you need to get an account: a [set of keys](../../concepts/accounts/cryptographic-keys.md#key-components) and an [address](../../concepts/accounts/addresses.md) that's been [funded with enough XRP](../../concepts/accounts/index.md#creating-accounts) to meet the [account reserve](../../concepts/accounts/reserves.md). The address is the identifier of your account and you use the [private key](../../concepts/accounts/cryptographic-keys.md#private-key) to sign transactions that you submit to the XRP Ledger. For production purposes, you should take care to store your keys and set up a [secure signing method](../../concepts/transactions/secure-signing.md).
To store value and execute transactions on the XRP Ledger, you need to get an account: a [set of keys](../../../concepts/accounts/cryptographic-keys.md#key-components) and an [address](../../../concepts/accounts/addresses.md) that's been [funded with enough XRP](../../../concepts/accounts/index.md#creating-accounts) to meet the [account reserve](../../../concepts/accounts/reserves.md). The address is the identifier of your account and you use the [private key](../../../concepts/accounts/cryptographic-keys.md#private-key) to sign transactions that you submit to the XRP Ledger. For production purposes, you should take care to store your keys and set up a [secure signing method](../../../concepts/transactions/secure-signing.md).
To generate a new account, `xrpl4j` provides the [`DefaultWalletFactory`](https://javadoc.io/doc/org.xrpl/xrpl4j-keypairs/latest/org/xrpl/xrpl4j/wallet/DefaultWalletFactory.html).
@@ -137,13 +137,13 @@ Wallet {
}
```
For testing and development purposes, you can use a `FaucetClient` connected to the XRP Ledger [Testnet](../../concepts/networks-and-servers/parallel-networks.md):
For testing and development purposes, you can use a `FaucetClient` connected to the XRP Ledger [Testnet](../../../concepts/networks-and-servers/parallel-networks.md):
{% code-snippet file="/_code-samples/get-started/java/GetAccountInfo.java" from="// Fund the account using the testnet Faucet" before="// Look up your Account Info" language="java" /%}
### 3. Query the XRP Ledger
You can query the XRP Ledger to get information about [a specific account](../../references/http-websocket-apis/public-api-methods/account-methods/index.md), [a specific transaction](../../references/http-websocket-apis/public-api-methods/transaction-methods/tx.md), the state of a [current or a historical ledger](../../references/http-websocket-apis/public-api-methods/ledger-methods/index.md), and [the XRP Ledger's decentralized exchange](../../references/http-websocket-apis/public-api-methods/path-and-order-book-methods/index.md). You need to make these queries, among other reasons, to look up account info to follow best practices for [reliable transaction submission](../../concepts/transactions/reliable-transaction-submission.md).
You can query the XRP Ledger to get information about [a specific account](../../../references/http-websocket-apis/public-api-methods/account-methods/index.md), [a specific transaction](../../../references/http-websocket-apis/public-api-methods/transaction-methods/tx.md), the state of a [current or a historical ledger](../../../references/http-websocket-apis/public-api-methods/ledger-methods/index.md), and [the XRP Ledger's decentralized exchange](../../../references/http-websocket-apis/public-api-methods/path-and-order-book-methods/index.md). You need to make these queries, among other reasons, to look up account info to follow best practices for [reliable transaction submission](../../../concepts/transactions/reliable-transaction-submission.md).
Here, we'll use the [`XrplClient` we constructed](#1-connect-to-the-xrp-ledger) to look up information about the [account we got](#2-get-account) in the previous step.
@@ -211,18 +211,18 @@ The response fields contained in `AccountInfoResult` that you want to inspect in
* `accountData.sequence` — This is the sequence number of the next valid transaction for the account. You need to specify the sequence number when you prepare transactions.
* `accountData.balance` — This is the account's balance of XRP, in drops. You can use this to confirm that you have enough XRP to send (if you're making a payment) and to meet the [current transaction cost](../../concepts/transactions/transaction-cost.md#current-transaction-cost) for a given transaction.
* `accountData.balance` — This is the account's balance of XRP, in drops. You can use this to confirm that you have enough XRP to send (if you're making a payment) and to meet the [current transaction cost](../../../concepts/transactions/transaction-cost.md#current-transaction-cost) for a given transaction.
* `validated` — Indicates whether the returned data is from a [validated ledger](../../concepts/ledgers/open-closed-validated-ledgers.md). When inspecting transactions, it's important to confirm that [the results are final](../../concepts/transactions/finality-of-results/index.md) before further processing the transaction. If `validated` is `true` then you know for sure the results won't change. For more information about best practices for transaction processing, see [Reliable Transaction Submission](../../concepts/transactions/reliable-transaction-submission.md).
* `validated` — Indicates whether the returned data is from a [validated ledger](../../../concepts/ledgers/open-closed-validated-ledgers.md). When inspecting transactions, it's important to confirm that [the results are final](../../../concepts/transactions/finality-of-results/index.md) before further processing the transaction. If `validated` is `true` then you know for sure the results won't change. For more information about best practices for transaction processing, see [Reliable Transaction Submission](../../../concepts/transactions/reliable-transaction-submission.md).
For a detailed description of every response field, see [account_info](../../references/http-websocket-apis/public-api-methods/account-methods/account_info.md#response-format).
For a detailed description of every response field, see [account_info](../../../references/http-websocket-apis/public-api-methods/account-methods/account_info.md#response-format).
## Keep on building
Now that you know how to use `xrpl4j` to connect to the XRP Ledger, get an account, and look up information about it, you can also use `xrpl4j` to:
* [Send XRP](../tasks/send-xrp.md).
* [Set up secure signing](../../concepts/transactions/secure-signing.md) for your account.
* [Send XRP](../../tasks/send-xrp.md).
* [Set up secure signing](../../../concepts/transactions/secure-signing.md) for your account.
{% raw-partial file="/docs/_snippets/common-links.md" /%}

View File

@@ -0,0 +1,13 @@
---
html: build-apps-with-java.html
parent: java.html
top_nav_grouping: Article Types
metadata:
indexPage: true
---
# Build Applications with Java Library
Build full-featured applications in Java.
{% child-pages /%}

View File

@@ -7,7 +7,17 @@ metadata:
---
# Java
XRPL tutorials in Java.
You can create your own interface to try out the capabilities and support your specific business needs. These tutorials build a test harness interface to try out features of the XRP Ledger. The harness displays multiple accounts, so that you can transfer tokens from one account to the other and see the results in real time.
Typically, the example functions involve four steps.
{% child-pages /%}
- Connect to the XRP Ledger and instantiate your wallet.
- Make changes to the XRP Ledger using transactions.
- Get the state of accounts and tokens on the XRP Ledger using requests.
- Disconnect from the XRP Ledger.
Once familiar with the library functions, you can build sample applications in Java. We anticipate that the applications you build greatly improve upon these examples. Your feedback and contributions are most welcome.
## Tutorial Modules
{% child-pages /%}

View File

@@ -1,5 +1,5 @@
---
html: get-started-using-javascript.html
html: get-started-using-javascript-library.html
parent: javascript.html
seo:
description: Build an entry-level JavaScript application for querying the XRP Ledger.
@@ -9,7 +9,7 @@ labels:
- Development
showcase_icon: assets/img/logos/javascript.svg
---
# Get Started Using JavaScript
# Get Started Using JavaScript Library
This tutorial guides you through the basics of building an XRP Ledger-connected application in JavaScript or TypeScript using the [`xrpl.js`](https://github.com/XRPLF/xrpl.js/) client library in either Node.js or web browsers.

View File

@@ -5,7 +5,7 @@ top_nav_grouping: Article Types
metadata:
indexPage: true
---
# Build Applications with JavaScript
# Build Applications with JavaScript Library
Build full-featured applications in JavaScript.

View File

@@ -2,8 +2,8 @@
html: javascript.html
parent: tutorials.html
top_nav_grouping: Article Types
<!-- metadata:
indexPage: true -->
metadata:
indexPage: true
---
# JavaScript
@@ -31,24 +31,4 @@ To get started:
## Tutorial Modules
- **Send Payments on the XRPL**
- [Create Accounts and Send XRP](./modular-tutorials/send-payments/create-accounts-send-xrp/)
- [Create Trust Line and Send Currency](./modular-tutorials/send-payments/create-trust-line-send-currency/)
- [Create Time-based Escrows](./modular-tutorials/send-payments/create-time-based-escrows/)
- [Create Conditional Escrows](./modular-tutorials/send-payments/create-conditional-escrows/)
- **NFTs Using JavaScript**
- [Mint and Burn NFTs](./modular-tutorials/nfts/mint-and-burn-nfts/)
- [Transfer NFTs](./modular-tutorials/nfts/transfer-nfts/)
- [Broker an NFT Sale](./modular-tutorials/nfts/broker-an-nft-sale/)
- [Assign an Authorized Minter](./modular-tutorials/nfts/assign-an-authorized-minter/)
- [Batch Mint NFTs](./modular-tutorials/nfts/batch-mint-nfts/)
- **Build Applications with JavaScript**
- [Get Started Using JavaScript](./build-apps/get-started/)
- [Build a Browser Wallet in JavaScript](./build-apps/build-a-browser-wallet-in-javascript/)
- [Build a Desktop Wallet in JavaScript](./build-apps/build-a-desktop-wallet-in-javascript/)
<!--
{% child-pages /%}
-->
{% child-pages /%}

View File

@@ -209,7 +209,7 @@ Report success
standbyResultField.value = results
```
This transaction blob is the same as the one used for the previous [`mintToken()` function](mint-and-burn-nfts.md#mint-token), with the addition of the `Issuer` field.
This transaction blob is the same as the one used for the previous [`mintToken()` function](./mint-and-burn-nfts.md#mint-token), with the addition of the `Issuer` field.
```javascript
const tx_json = {

View File

@@ -42,7 +42,7 @@ This example lets you mint multiple NFTs for a single unique item. The NFT might
To batch mint a non-fungible token objects:
1. Set the **Flags** field. For testing purposes, we recommend setting the value to _8_. This sets the _tsTransferable_ flag, meaning that the NFT object can be transferred to another account. Otherwise, the NFT object can only be transferred back to the issuing account. See [NFTokenMint](../../../../references/protocol/transactions/types/nftokenmint.md) for information about all of the available flags for minting NFTs.
1. Set the **Flags** field. For testing purposes, we recommend setting the value to _8_. This sets the _tsTransferable_ flag, meaning that the NFT object can be transferred to another account. Otherwise, the NFT object can only be transferred back to the issuing account. See [NFTokenMint](../../../../docs/references/protocol/transactions/types/nftokenmint.md) for information about all of the available flags for minting NFTs.
2. Enter the **Token URL**. This is a URI that points to the data or metadata associated with the NFT object. You can use the sample URI provided if you do not have one of your own.
3. Enter a **Token Count** of up to 200 NFTs to create in one batch.
4. Enter the **Transfer Fee**, a percentage of the proceeds that the original creator receives from future sales of the NFT. This is a value of 0-50000 inclusive, allowing transfer fees between 0.000% and 50.000% in increments of 0.001%. If you do not set the **Flags** field to allow the NFT to be transferrable, set this field to 0.

View File

@@ -43,7 +43,7 @@ You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-port
To mint a non-fungible token object:
1. Set the **Flags** field. For testing purposes, we recommend setting the value to _8_. This sets the _tsTransferable_ flag, meaning that the NFT object can be transferred to another account. Otherwise, the NFT object can only be transferred back to the issuing account. See [NFTokenMint](../../../../references/protocol/transactions/types/nftokenmint.md) for information about all of the available flags for minting NFTs.
1. Set the **Flags** field. For testing purposes, we recommend setting the value to _8_. This sets the _tsTransferable_ flag, meaning that the NFT object can be transferred to another account. Otherwise, the NFT object can only be transferred back to the issuing account.
2. Enter the **Token URL**. This is a URI that points to the data or metadata associated with the NFT object. You can use the sample URI provided if you do not have one of your own.
3. Enter the **Transfer Fee**, a percentage of the proceeds from future sales of the NFT that will be returned to the original creator. This is a value of 0-50000 inclusive, allowing transfer rates between 0.000% and 50.000% in increments of 0.001%. If you do not set the **Flags** field to allow the NFT to be transferrable, set this field to 0.
4. Click **Mint NFT**.

View File

@@ -1,7 +1,6 @@
---
html: send-and-cash-checks.html
parent: send-payments-using-javascript.html
blurb: Send checks to facilitate a two-step payment.
labels:
- Accounts
- Quickstart

View File

@@ -13,7 +13,7 @@ labels:
- Development
showcase_icon: assets/img/logos/java.svg
---
# Get Started Using PHP
# Get Started Using PHP Library
This tutorial walks you through the basics of building an XRP Ledger-connected application using [`XRPL_PHP`](https://github.com/AlexanderBuzz/xrpl-php), a PHP library built to interact with the XRP Ledger.
@@ -45,7 +45,7 @@ composer require hardcastle/xrpl_php
## Start Building
When you're working with the XRP Ledger, there are a few things you'll need to manage, whether you're adding XRP to your [account](../../concepts/accounts/index.md), integrating with the [decentralized exchange](../../concepts/tokens/decentralized-exchange/index.md), or [issuing tokens](../../concepts/tokens/index.md). This tutorial walks you through basic patterns common to getting started with all of these use cases and provides sample code for implementing them.
When you're working with the XRP Ledger, there are a few things you'll need to manage, whether you're adding XRP to your [account](../../../concepts/accounts/index.md), integrating with the [decentralized exchange](../../../concepts/tokens/decentralized-exchange/index.md), or [issuing tokens](../../../concepts/tokens/index.md). This tutorial walks you through basic patterns common to getting started with all of these use cases and provides sample code for implementing them.
Here are the basic steps you'll need to cover for almost any XRP Ledger project:
@@ -75,9 +75,9 @@ Note that PHP has no native support for WebSockets, so the Client does not estab
#### Connect to the production XRP Ledger
The sample code in the previous section shows you how to connect to the Testnet, which is one of the available [parallel networks](../../concepts/networks-and-servers/parallel-networks.md). When you're ready to integrate with the production XRP Ledger, you'll need to connect to the Mainnet. You can do that in two ways:
The sample code in the previous section shows you how to connect to the Testnet, which is one of the available [parallel networks](../../../concepts/networks-and-servers/parallel-networks.md). When you're ready to integrate with the production XRP Ledger, you'll need to connect to the Mainnet. You can do that in two ways:
* By [installing the core server](../../infrastructure/installation/index.md) (`rippled`) and running a node yourself. The core server connects to the Mainnet by default, but you can [change the configuration to use Testnet or Devnet](../../infrastructure/configuration/connect-your-rippled-to-the-xrp-test-net.md). [There are good reasons to run your own core server](../../concepts/networks-and-servers/index.md#reasons-to-run-your-own-server). If you run your own server, you can connect to it like so:
* By [installing the core server](../../../infrastructure/installation/index.md) (`rippled`) and running a node yourself. The core server connects to the Mainnet by default, but you can [change the configuration to use Testnet or Devnet](../../../infrastructure/configuration/connect-your-rippled-to-the-xrp-test-net.md). [There are good reasons to run your own core server](../../../concepts/networks-and-servers/index.md#reasons-to-run-your-own-server). If you run your own server, you can connect to it like so:
```
use XRPL_PHP\Client\JsonRpcClient;
@@ -99,7 +99,7 @@ The sample code in the previous section shows you how to connect to the Testnet,
### 2. Get account
To store value and execute transactions on the XRP Ledger, you need to get an account: a [set of keys](../../concepts/accounts/cryptographic-keys.md#key-components) and an [address](../../concepts/accounts/addresses.md) that's been [funded with enough XRP](../../concepts/accounts/index.md#creating-accounts) to meet the [account reserve](../../concepts/accounts/reserves.md). The address is the identifier of your account and you use the [private key](../../concepts/accounts/cryptographic-keys.md#private-key) to sign transactions that you submit to the XRP Ledger. For production purposes, you should take care to store your keys and set up a [secure signing method](../../concepts/transactions/secure-signing.md).
To store value and execute transactions on the XRP Ledger, you need to get an account: a [set of keys](../../../concepts/accounts/cryptographic-keys.md#key-components) and an [address](../../../concepts/accounts/addresses.md) that's been [funded with enough XRP](../../../concepts/accounts/index.md#creating-accounts) to meet the [account reserve](../../../concepts/accounts/reserves.md). The address is the identifier of your account and you use the [private key](../../../concepts/accounts/cryptographic-keys.md#private-key) to sign transactions that you submit to the XRP Ledger. For production purposes, you should take care to store your keys and set up a [secure signing method](../../../concepts/transactions/secure-signing.md).
To generate a new account, `PHP_XRPL` provides the static `generate()` method in the `Wallet` class:
@@ -138,13 +138,13 @@ print_r([
```
For testing and development purposes, you can use the `fundWallet()` helper function on the XRP Ledger [Testnet](../../concepts/networks-and-servers/parallel-networks.md):
For testing and development purposes, you can use the `fundWallet()` helper function on the XRP Ledger [Testnet](../../../concepts/networks-and-servers/parallel-networks.md):
{% code-snippet file="/_code-samples/get-started/php/get-account-info.php" from="<?php" before="// Create an AccountInfoRequest" language="php" /%}
### 3. Query the XRP Ledger
You can query the XRP Ledger to get information about [a specific account](../../references/http-websocket-apis/public-api-methods/account-methods/index.md), [a specific transaction](../../references/http-websocket-apis/public-api-methods/transaction-methods/tx.md), the state of a [current or a historical ledger](../../references/http-websocket-apis/public-api-methods/ledger-methods/index.md), and [the XRP Ledger's decentralized exchange](../../references/http-websocket-apis/public-api-methods/path-and-order-book-methods/index.md). You need to make these queries, among other reasons, to look up account info to follow best practices for [reliable transaction submission](../../concepts/transactions/reliable-transaction-submission.md).
You can query the XRP Ledger to get information about [a specific account](../../../references/http-websocket-apis/public-api-methods/account-methods/index.md), [a specific transaction](../../../references/http-websocket-apis/public-api-methods/transaction-methods/tx.md), the state of a [current or a historical ledger](../../../references/http-websocket-apis/public-api-methods/ledger-methods/index.md), and [the XRP Ledger's decentralized exchange](../../../references/http-websocket-apis/public-api-methods/path-and-order-book-methods/index.md). You need to make these queries, among other reasons, to look up account info to follow best practices for [reliable transaction submission](../../../concepts/transactions/reliable-transaction-submission.md).
Here, we'll use the [`JsonRpcClient` we constructed](#1-connect-to-the-xrp-ledger) to look up information about the [account we got](#2-get-account) in the previous step.
@@ -221,18 +221,18 @@ The response fields contained in `AccountInfoResponse` that you want to inspect
* `['account_data']['Sequence']` — This is the sequence number of the next valid transaction for the account. You need to specify the sequence number when you prepare transactions.
* `['account_data']['Balance']` — This is the account's balance of XRP, in drops. You can use this to confirm that you have enough XRP to send (if you're making a payment) and to meet the [current transaction cost](../../concepts/transactions/transaction-cost.md#current-transaction-cost) for a given transaction.
* `['account_data']['Balance']` — This is the account's balance of XRP, in drops. You can use this to confirm that you have enough XRP to send (if you're making a payment) and to meet the [current transaction cost](../../../concepts/transactions/transaction-cost.md#current-transaction-cost) for a given transaction.
* `['validated']` — Indicates whether the returned data is from a [validated ledger](../../concepts/ledgers/open-closed-validated-ledgers.md). When inspecting transactions, it's important to confirm that [the results are final](../../concepts/transactions/finality-of-results/index.md) before further processing the transaction. If `validated` is `true` then you know for sure the results won't change. For more information about best practices for transaction processing, see [Reliable Transaction Submission](../../concepts/transactions/reliable-transaction-submission.md).
* `['validated']` — Indicates whether the returned data is from a [validated ledger](../../../concepts/ledgers/open-closed-validated-ledgers.md). When inspecting transactions, it's important to confirm that [the results are final](../../../concepts/transactions/finality-of-results/index.md) before further processing the transaction. If `validated` is `true` then you know for sure the results won't change. For more information about best practices for transaction processing, see [Reliable Transaction Submission](../../../concepts/transactions/reliable-transaction-submission.md).
For a detailed description of every response field, see [account_info](../../references/http-websocket-apis/public-api-methods/account-methods/account_info.md#response-format).
For a detailed description of every response field, see [account_info](../../../references/http-websocket-apis/public-api-methods/account-methods/account_info.md#response-format).
## Keep on building
Now that you know how to use `XRPL_PHP` to connect to the XRP Ledger, get an account, and look up information about it, you can also use `XRPL_PHP` to:
* [Send XRP](../tasks/send-xrp.md).
* [Set up secure signing](../../concepts/transactions/secure-signing.md) for your account.
* [Send XRP](../../tasks/send-xrp.md).
* [Set up secure signing](../../../concepts/transactions/secure-signing.md) for your account.
{% raw-partial file="/docs/_snippets/common-links.md" /%}

View File

@@ -0,0 +1,14 @@
---
html: build-apps-with-php.html
parent: php.html
top_nav_grouping: Article Types
metadata:
indexPage: true
---
# Build Applications in PHP
Build applications in PHP.
{% child-pages /%}

View File

@@ -1,13 +1,23 @@
---
html: php.html
parent: tutorials.html
html: index.html
parent: php.html
top_nav_grouping: Article Types
metadata:
indexPage: true
---
# PHP
XRPL tutorials in PHP.
You can create your own interface to try out the capabilities and support your specific business needs. These tutorials build a test harness interface to try out features of the XRP Ledger. The harness displays multiple accounts, so that you can transfer tokens from one account to the other and see the results in real time.
Typically, the example functions involve four steps.
- Connect to the XRP Ledger and instantiate your wallet.
- Make changes to the XRP Ledger using transactions.
- Get the state of accounts and tokens on the XRP Ledger using requests.
- Disconnect from the XRP Ledger.
Once familiar with the library functions, you can build sample applications in PHP. We anticipate that the applications you build greatly improve upon these examples. Your feedback and contributions are most welcome.
## Tutorial Modules
{% child-pages /%}

View File

@@ -4,7 +4,7 @@ seo:
labels:
- Development
---
# Get Started Using Python
# Get Started Using Python Library
This tutorial walks you through the basics of building an XRP Ledger-connected application using [`xrpl-py`](https://github.com/XRPLF/xrpl-py), a pure [Python](https://www.python.org) library built to interact with the XRP Ledger using native Python models and methods.

View File

@@ -2,6 +2,8 @@
html: python.html
parent: tutorials.html
top_nav_grouping: Article Types
metadata:
indexPage: true
---
# Python
@@ -29,24 +31,6 @@ To get started:
**Note**: Without the sample modules, you won't be able to try the examples that follow.
## Tutorial Modules
- **Send Payments on the XRPL**
- [Create Accounts and Send XRP](./modular-tutorials/send-payments/create-accounts-send-xrp/)
- [Create TrustLine and Send Currency](./modular-tutorials/send-payments/create-trust-line-send-currency/)
- [Create Time-based Escrows](./modular-tutorials/send-payments/create-time-based-escrows/)
- [Create Conditional Escrows](./modular-tutorials/send-payments/create-conditional-escrows/)
- [Send and Cash Checks](./modular-tutorials/send-payments/send-and-cash-checks/)
- **Mint and Trade NFTs on the XRPL**
- [Mint and Burn NFTs](./modular-tutorials/nfts/mint-and-burn-nfts/)
- [Transfer NFTs](./modular-tutorials/nfts/transfer-nfts/)
- [Broker an NFT Sale](./modular-tutorials/nfts/broker-an-nft-sale/)
- [Assign an Authorized Minter](./modular-tutorials/nfts/assign-an-authorized-minter/)
- [Batch Mint NFTs](./modular-tutorials/nfts/batch-mint-nfts)
- **Build Applications with Python**
- [Get Started Using Python](./build-apps/get-started/)
- [Build a Desktop Wallet in Python](./build-apps/build-a-desktop-wallet-in-python/)
{% child-pages /%}

View File

@@ -1,56 +0,0 @@
---
html: send-payments-using-python.html
parent: modular-tutorials-in-python.html
seo:
description: Use a Python test harness to send XRP,trade currencies, and more.
labels:
- Accounts
- Cross-Currency
- Non-fungible Tokens, NFTs
- Payments
- Quickstart
- Tokens
- XRP
---
# Send Payments Using Python
The XRP Ledger (XRPL) is a robust, secure, customizable service. You can create your own interface to try out the capabilities and support your specific business needs.
This quickstart describes a test harness interface you can build to try out the XRP Ledger. The test harness displays multiple accounts, so that you can transfer tokens from one account to the other and see the results in real time. The image below shows the Token Test Harness at the completion of step 4.
[![Quickstart Tutorial Window](/docs/img/quickstart-py15.png)](/docs/img/quickstart-py15.png)
That is a lot of fields and buttons, all working together to perform some significant practical tasks. But getting _started_ with the XRP Ledger is not that complicated. When you eat the elephant a bite at a time, none of the tasks are difficult to consume.
Typically, the example functions for interacting with the XRP Ledger involve four steps.
1. Connect to the XRP Ledger and instantiate your wallet.
2. Make changes to the XRP Ledger using transactions.
3. Get the state of accounts and tokens on the XRP Ledger using requests.
4. Disconnect from the XRP Ledger.
Each lesson shows you how to build the Token Test Harness one section at a time. Each module lets you try out meaningful interactions with the test ledger, with complete Python code samples and a code walkthrough. There is also a link to the complete source code for each section that can be modified with a text editor and run in a Python environment. You can try out the examples in any order.
This quickstart tutorial introduces you to the API used to implement features and explore the capabilities of XRP Ledger. It does not represent _all_ of the capabilities of the API and this example is not intended for production or secure payment use.
Much of this is “brute force” code that sacrifices conciseness for readability. Each example builds on the previous step, adding a new Python UI file and a module to support the new behavior in the lesson. We expect the applications you build to greatly improve upon these examples. Your feedback and contributions are most welcome.
In this quickstart, you can:
1. [Create Accounts and Send XRP](create-accounts-send-xrp.md)
2. [Create Trust Line and Send Currency](create-trust-line-send-currency.md).
3. [Create Time-Based Escrows](create-time-based-escrows.md)
4. [Create Conditional Escrows](create-conditional-escrows.md)
## Prerequisites
To get started, create a new folder on your local disk and install the Python library (xrpl-py) using `pip`.
```
pip3 install xrpl-py
```
Download the python [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/quickstart/py/)<!-- {.github-code-download} -->.
**Note:** Without the Quickstart Samples, you will not be able to try the examples that follow.

View File

@@ -44,7 +44,7 @@ This example lets you mint multiple NFTs for a single unique item. The NFT might
To batch mint non-fungible token objects:
1. Enter the **NFT URI**. This is a URI that points to the data or metadata associated with the NFT object. You can use this sample URI if you do not have one of your own: ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf4dfuylqabf3oclgtqy55fbzdi.
2. Set the **Flags** field. For testing purposes, we recommend setting the value to _8_. This sets the _tsTransferable_ flag, meaning that the NFT object can be transferred to another account. Otherwise, the NFT object can only be transferred back to the issuing account. See [NFTokenMint](../../../../references/protocol/transactions/types/nftokenmint.md) for available NFT minting flags.
2. Set the **Flags** field. For testing purposes, we recommend setting the value to _8_. This sets the _tsTransferable_ flag, meaning that the NFT object can be transferred to another account. Otherwise, the NFT object can only be transferred back to the issuing account. See [NFTokenMint](../../../references/protocol/transactions/types/nftokenmint.md) for available NFT minting flags.
3. Enter the **Transfer Fee**, a percentage of the proceeds that the original creator receives from future sales of the NFT. This is a value of 0-50000 inclusive, allowing transfer fees between 0.000% and 50.000% in increments of 0.001%. If you do not set the **Flags** field to allow the NFT to be transferrable, set this field to 0.
4. Enter the **Taxon** for the NFT. If you do not have a need for the Taxon field, set this value to 0.
5. Enter an **NFT Count** of up to 200 NFTs to create in one batch.

View File

@@ -221,7 +221,7 @@ Return the result.
### configure_account
This example shows how to set and clear configuration flags using the `AccountSet` method. The `ASF_DEFAULT_RIPPLE` flag is pertinent to experimentation with transfer of issued currencies to third-party accounts, so it is demonstrated here. You can set any of the configuration flags using the same structure, substituting the particular flags you want to set. See [AccountSet Flags](../../../../references/protocol/transactions/types/accountset.md#accountset-flags).
This example shows how to set and clear configuration flags using the `AccountSet` method. The `ASF_DEFAULT_RIPPLE` flag is pertinent to experimentation with transfer of issued currencies to third-party accounts, so it is demonstrated here. You can set any of the configuration flags using the same structure, substituting the particular flags you want to set. See [AccountSet Flags](../../../references/protocol/transactions/types/accountset.md#accountset-flags).
Send the account seed and a Boolean value for whether to enable or disable rippling.
```python

View File

@@ -0,0 +1,22 @@
---
html: send-payments-using-python.html
parent: modular-tutorials-in-python.html
seo:
description: Use a Python test harness to send XRP,trade currencies, and more.
labels:
- Accounts
- Cross-Currency
- Non-fungible Tokens, NFTs
- Payments
- Quickstart
- Tokens
- XRP
metadata:
indexPage: true
---
# Send Payments Using Python
Send XRP and issued currency on the XRP Ledger using JavaScript.
{% child-pages /%}

View File

@@ -1,7 +1,6 @@
---
html: send-and-cash-checks.html
parent: send-payments-using-python.html
blurb: Send checks to facilitate a two-step payment.
labels:
- Accounts
- Quickstart

View File

@@ -18,7 +18,7 @@ A highly secure [signing configuration](../../../concepts/transactions/secure-si
To use offline signing, you must meet the following prerequisites:
- You must have one computer to use as an offline machine. This machine must be set up with a [supported operating system](../../../infrastructure/installation/system-requirements.md). See your operating system's support for offline setup instructions. (For example, [Red Hat Enterprise Linux DVD ISO installation instructions](https://access.redhat.com/solutions/7227).) Be sure that the software and physical media you use are not infected with malware.
- You must have a separate computer to use as an online machine. This machine does not need to run `rippled` but it must be able to connect to the XRP Ledger network and receive information about the state of the shared ledger. For example, you can use a [WebSocket connection to a public server](../../http-websocket-apis/get-started.md).
- You must have a separate computer to use as an online machine. This machine does not need to run `rippled` but it must be able to connect to the XRP Ledger network and receive information about the state of the shared ledger. For example, you can use a [WebSocket connection to a public server](../../http-websocket-apis/build-apps/get-started.md).
- You must have a secure way to transfer signed transaction binary data from the offline machine to the online machine.
- One way to do this is with a QR code generator on the offline machine, and a QR code scanner on the online machine. (In this case, your "online machine" could be a handheld device such as a smartphone.)
- Another way is to copy files from the offline machine to an online machine using physical media. If you use this method, be sure not to use physical media that could infect your offline machine with malicious software. (For example, do not reuse the same USB drive on both online and offline machines.)

View File

@@ -26,8 +26,8 @@ To interact with the XRP Ledger, you need to set up a dev environment with the n
- **JavaScript** with the [xrpl.js library](https://github.com/XRPLF/xrpl.js/). See [Get Started Using JavaScript](../javascript/build-apps/get-started.md) for setup steps.
- **Python** with the [`xrpl-py` library](https://xrpl-py.readthedocs.io/). See [Get Started using Python](../python/build-apps/get-started.md) for setup steps.
- **Java** with the [xrpl4j library](https://github.com/XRPLF/xrpl4j). See [Get Started Using Java](../java/get-started.md) for setup steps.
- **PHP** with the [XRPL_PHP library](https://github.com/AlexanderBuzz/xrpl-php). See [Get Started Using PHP](../php/get-started.md) for setup steps.
- **Java** with the [xrpl4j library](https://github.com/XRPLF/xrpl4j). See [Get Started Using Java](../java/build-apps/get-started.md) for setup steps.
- **PHP** with the [XRPL_PHP library](https://github.com/AlexanderBuzz/xrpl-php). See [Get Started Using PHP](../php/build-apps/get-started.md) for setup steps.
## Send a Payment on the Test Net

View File

@@ -22,7 +22,7 @@ Anyone can issue various types of tokens in the XRP Ledger, ranging from informa
- You should be familiar with the Getting Started instructions for your preferred client library. This page provides examples for the following:
- **JavaScript** with the [xrpl.js library](https://github.com/XRPLF/xrpl.js/). See [Get Started Using JavaScript](../../javascript/build-apps/get-started.md) for setup steps.
- **Python** with the [`xrpl-py` library](https://xrpl-py.readthedocs.io/). See [Get Started using Python](../../python/build-apps/get-started.md) for setup steps.
- **Java** with the [xrpl4j library](https://github.com/XRPLF/xrpl4j). See [Get Started Using Java](../../java/get-started.md) for setup steps.
- **Java** with the [xrpl4j library](https://github.com/XRPLF/xrpl4j). See [Get Started Using Java](../../java/build-apps/get-started.md) for setup steps.
- You can also read along and use the interactive steps in your browser without any setup.
<!-- Source for this specific tutorial's interactive bits: -->

View File

@@ -74,7 +74,7 @@ The legal requirements for trading on a blockchain vary by jurisdiction. In many
Buying and selling _fungible_ tokens and XRP within the XRP Ledger's decentralized exchange typically involves sending [OfferCreate transactions](../../references/protocol/transactions/types/offercreate.md). For a detailed walkthrough of the code and technical steps to place a trade this way, see [Trade in the Decentralized Exchange](../../tutorials/tasks/use-tokens/trade-in-the-decentralized-exchange.md). It is also possible to exchange currencies using the [Payment transaction type](../../references/protocol/transactions/types/payment.md). You could send a [cross-currency payment](../../concepts/payment-types/cross-currency-payments.md) to another user or even send it back to yourself, using a long [path](../../concepts/tokens/fungible-tokens/paths.md) to link arbitrage opportunities together into a single operation.
Non-fungible tokens work differently; for the code and technical steps to trade NFTs, see [Transfer NFTokens Using JavaScript](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
Non-fungible tokens work differently; for the code and technical steps to trade NFTs, see [Transfer NFTokens Using JavaScript](../../tutorials/javascript/nfts/transfer-nfts.md).
### Reading Trade Data

View File

@@ -616,7 +616,7 @@ Off-Ledger Balances</td>
- [Install `rippled`](../../infrastructure/installation/index.md)
- [Send XRP](../../tutorials/tasks/send-xrp.md)
- [Set Up Secure Signing](../../concepts/transactions/secure-signing.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/monitor-incoming-payments-with-websocket.md)
- [Monitor Incoming Payments with WebSocket](../../tutorials/http-websocket-apis/build-apps/monitor-incoming-payments-with-websocket.md)
- **References:**
- [Payment transaction][]
- [account_info method][]

View File

@@ -12,7 +12,7 @@ _As an authorized minter, I want to mint tokens for a token issuer at an agreed
You can act as an authorized minter for token issuers. When you do this, you own the NFToken, but royalties flow to the NFToken issuer. When you make a sale of that NFToken, the proceeds of the initial sale go to you. You can have an agreement with your issuer to pay them some or all of your portion of the initial sale amount.
You can learn more in the tutorial [Assign an Authorized Minter](../../tutorials/javascript/modular-tutorials/nfts/assign-an-authorized-minter.md).
You can learn more in the tutorial [Assign an Authorized Minter](../../tutorials/javascript/nfts/assign-an-authorized-minter.md).
[![Authorized Minter Flow](/docs/img/nft-mkt-auth-minter.png "Authorized Minter Flow")](/docs/img/nft-mkt-auth-minter.png)
@@ -28,7 +28,7 @@ Once you finish creating NFTs, the creator can revoke your privileges and reasse
![Auctioning NFTs](/docs/img/uc-nft-transferring-nfts.png)
To mint your first NFTs on behalf of another account, see [Authorizing Another Account to Mint Your NFTs](../../tutorials/javascript/modular-tutorials/nfts/assign-an-authorized-minter.md).
To mint your first NFTs on behalf of another account, see [Authorizing Another Account to Mint Your NFTs](../../tutorials/javascript/nfts/assign-an-authorized-minter.md).
If you, as the owner or issuer, want to be able to burn the token in the future, set the `Flags` field to _1._ To make the NFT transferable, set the `Flags` field to _8_. Set the `Flags` field to _9_ to make the NFT both burnable and transferable. See[ Burnable flag](../../references/protocol/data-types/nftoken.md#nftoken-flags) and [Transferable flag](../../references/protocol/data-types/nftoken.md#nftoken-flags).
@@ -47,11 +47,11 @@ You can assure scarcity of NFTs you create by creating them with what might be c
## Transferring NFTs
You transfer NFTs by creating a sell offer or accepting a buy offer. See [Transfer NFTokens](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
You transfer NFTs by creating a sell offer or accepting a buy offer. See [Transfer NFTokens](../../tutorials/javascript/nfts/transfer-nfts.md).
You can sell your NFTs in an auction format. See [Running an NFT Auction](../../concepts/tokens/nfts/running-an-nft-auction.md).
You can act as a broker, connecting sellers with bidders, completing the transfer and keeping a percentage of the purchase price. See [Broker a NFToken sale](../../tutorials/javascript/modular-tutorials/nfts/broker-an-nft-sale.md).
You can act as a broker, connecting sellers with bidders, completing the transfer and keeping a percentage of the purchase price. See [Broker a NFToken sale](../../tutorials/javascript/nfts/broker-an-nft-sale.md).
### Reserve requirements
@@ -71,7 +71,7 @@ See:
### Checkout
The most straightforward payment for XRPL NFTs is XRP. For examples of selling and buying NFTs using XRP, see [Transfer NFTokens](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
The most straightforward payment for XRPL NFTs is XRP. For examples of selling and buying NFTs using XRP, see [Transfer NFTokens](../../tutorials/javascript/nfts/transfer-nfts.md).
![Checkout](/docs/img/uc-nft-checkout.png)

View File

@@ -18,7 +18,7 @@ As a digital artist, youre focused on creating NFTs, presumably to sell on th
You can create NFTokens using an app such as the [Xumm app](https://xumm.app).
For a more hands-on experience, you can follow the steps in the [Quickstart Tutorial 3 - Mint and Burn NFTokens](../../tutorials/javascript/modular-tutorials/nfts/mint-and-burn-nfts.md).
For a more hands-on experience, you can follow the steps in the [Quickstart Tutorial 3 - Mint and Burn NFTokens](../../tutorials/javascript/nfts/mint-and-burn-nfts.md).
[![Digital Artist Flow](/docs/img/nft-mkt-digital-artist.png "Digital Artist Flow")](/docs/img/nft-mkt-digital-artist.png)
@@ -37,11 +37,11 @@ To create your first NFTs, follow the instructions in the tutorial _Mint and Bur
* You can mint NFTs in logical collections using the <code>TokenTaxon</code> field. See [Minting NFTs into Collections](../../concepts/tokens/nfts/collections.md).
* If you, as the issuer, want to be able to burn the token in the future, set the <code>Flags</code> field to <em>1.</em> To make the NFT transferable, set the <code>Flags</code> field to <em>8</em>. Set the <code>Flags</code> field to <em>9</em> to make the NFT both burnable and transferable. See[ Burnable flag](../../references/protocol/data-types/nftoken.md#nftoken-flags) and [Transferable flag](../../references/protocol/data-types/nftoken.md#nftoken-flags).
See [Mint and Burn NFTokens](../../tutorials/javascript/modular-tutorials/nfts/mint-and-burn-nfts.md).
See [Mint and Burn NFTokens](../../tutorials/javascript/nfts/mint-and-burn-nfts.md).
## Sell NFTs
You transfer NFTs by creating a sell offer. See [Transfer NFTokens](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
You transfer NFTs by creating a sell offer. See [Transfer NFTokens](../../tutorials/javascript/nfts/transfer-nfts.md).
![Transferring NFTs](/docs/img/uc-nft-transferring-nfts.png)
@@ -65,7 +65,7 @@ See:
### Checkout
The most straightforward payment for XRPL NFTs is XRP. For examples of selling and buying NFTs using XRP, see [Transfer NFTokens](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
The most straightforward payment for XRPL NFTs is XRP. For examples of selling and buying NFTs using XRP, see [Transfer NFTokens](../../tutorials/javascript/nfts/transfer-nfts.md).
![Checkout](/docs/img/uc-nft-checkout.png)

View File

@@ -52,7 +52,7 @@ See also:
You can begin to build your marketplace by minting some NFTs to sell.
To create your first NFTs, follow the instructions in the tutorial _Mint and Burn NFTokens_. See [Mint and Burn NFTokens](../../tutorials/javascript/modular-tutorials/nfts/mint-and-burn-nfts.md).
To create your first NFTs, follow the instructions in the tutorial _Mint and Burn NFTokens_. See [Mint and Burn NFTokens](../../tutorials/javascript/nfts/mint-and-burn-nfts.md).
The NFToken URL is a link to the location where the content of the NFT is stored. One option is create an IPFS account and store the NFToken content at a persistent URL. See [Best Practices for Storing NFT Data](https://docs.ipfs.io/how-to/best-practices-for-nft-data).
@@ -83,13 +83,13 @@ When you set up your account, keep in mind that there is a base reserve requirem
### Transferring NFTs
You transfer NFTs by creating a sell offer or accepting a buy offer. See [Transfer NFTokens](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
You transfer NFTs by creating a sell offer or accepting a buy offer. See [Transfer NFTokens](../../tutorials/javascript/nfts/transfer-nfts.md).
![Transferring NFTs](/docs/img/uc-nft-transferring-nfts.png)
You can sell your NFTs in an auction format. See [Running an NFT Auction](../../concepts/tokens/nfts/running-an-nft-auction.md).
You can act as a broker, connecting sellers with bidders, completing the transfer and keeping a percentage of the purchase price. See [Broker a NFToken sale](../../tutorials/javascript/modular-tutorials/nfts/broker-an-nft-sale.md).
You can act as a broker, connecting sellers with bidders, completing the transfer and keeping a percentage of the purchase price. See [Broker a NFToken sale](../../tutorials/javascript/nfts/broker-an-nft-sale.md).
#### Reserve requirements
@@ -109,7 +109,7 @@ See:
#### Checkout
The most straightforward payment for XRPL NFTs is XRP. For examples of selling and buying NFTs using XRP, see [Transfer NFTokens](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
The most straightforward payment for XRPL NFTs is XRP. For examples of selling and buying NFTs using XRP, see [Transfer NFTokens](../../tutorials/javascript/nfts/transfer-nfts.md).
![Checkout](/docs/img/uc-nft-checkout.png)

View File

@@ -32,13 +32,13 @@ Base reserve requirements See [Reserves](../../concepts/accounts/reserves.md#bas
### Transferring NFTs
You transfer NFTs by creating a sell offer or accepting a buy offer. See [Transfer NFTokens](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
You transfer NFTs by creating a sell offer or accepting a buy offer. See [Transfer NFTokens](../../tutorials/javascript/nfts/transfer-nfts.md).
![Transferring NFTs](/docs/img/uc-nft-transferring-nfts.png)
You can sell your NFTs in an auction format. See [Running an NFT Auction](../../concepts/tokens/nfts/running-an-nft-auction.md).
You can act as a broker, connecting sellers with bidders, completing the transfer and keeping a percentage of the purchase price. See [Broker a NFToken sale](../../tutorials/javascript/modular-tutorials/nfts/broker-an-nft-sale.md).
You can act as a broker, connecting sellers with bidders, completing the transfer and keeping a percentage of the purchase price. See [Broker a NFToken sale](../../tutorials/javascript/nfts/broker-an-nft-sale.md).
### Reserve requirements
@@ -61,11 +61,11 @@ You can learn more about brokered sales in the topic [Trading Tokens on the XRP
Learn more about token transfer fees in the topic [Transfer Fees](../../concepts/tokens/transfer-fees.md).
You can get started building a brokered sales marketplace by following the steps in the [Broker a NFToken Sale](../../tutorials/javascript/modular-tutorials/nfts/broker-an-nft-sale.md).
You can get started building a brokered sales marketplace by following the steps in the [Broker a NFToken Sale](../../tutorials/javascript/nfts/broker-an-nft-sale.md).
### Checkout
The most straightforward payment for XRPL NFTs is XRP. For examples of selling and buying NFTs using XRP, see [Transfer NFTokens](../../tutorials/javascript/modular-tutorials/nfts/transfer-nfts.md).
The most straightforward payment for XRPL NFTs is XRP. For examples of selling and buying NFTs using XRP, see [Transfer NFTokens](../../tutorials/javascript/nfts/transfer-nfts.md).
![Checkout](/docs/img/uc-nft-checkout.png)