mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-13 00:05:49 +00:00
Add screenshots.
This commit is contained in:
@@ -20,6 +20,8 @@ This example shows how to:
|
||||
2. Get a list of offers for the brokered item.
|
||||
3. Broker a sale between two different accounts.
|
||||
|
||||

|
||||
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip) archive to try each of the samples in your own browser.
|
||||
|
||||
## Get Accounts
|
||||
@@ -35,29 +37,37 @@ You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-port
|
||||
2. Click **Get New Operational Account**.
|
||||
3. Click **Get New Broker Account**
|
||||
|
||||

|
||||
|
||||
## Prepare a Brokered Transaction
|
||||
|
||||
1. Use the Standby account to create a NFToken Sell Offer with the Broker account as the destination.
|
||||
1. Enter the **Amount** of the sell offer in drops (millionths of an XRP).
|
||||
2. Set the **Flags** field to _1_.
|
||||
3. Enter the **Token ID** of the NFToken you want to sell.
|
||||
3. Enter the **NFToken ID** of the NFToken you want to sell.
|
||||
4. Optionally, enter a number of days until **Expiration**.
|
||||
5. Enter the Broker account number as the **Destination**.
|
||||
6. Click **Create Sell Offer**.
|
||||
|
||||
|
||||

|
||||
|
||||
2. Use the Operational account to create a NFToken Buy Offer.
|
||||
1. Enter the **Amount** of your offer.
|
||||
2. Enter the **Token ID**.
|
||||
2. Enter the **NFToken ID**.
|
||||
3. Enter the owner’s account string in the **Owner** field.
|
||||
4. Optionally enter the number of days until **Expiration**.
|
||||
5. Click **Create Buy Offer**.
|
||||
|
||||

|
||||
|
||||
## Get Offers
|
||||
|
||||
1. Enter the **NFToken ID**.
|
||||
2. Click **Get Offers**.
|
||||
|
||||

|
||||
|
||||
## Broker the Sale
|
||||
|
||||
1. Copy the _nft_offer_index_ of the sell offer and paste it in the **Sell NFToken Offer Index** field.
|
||||
@@ -65,13 +75,17 @@ You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-port
|
||||
3. Enter a **Broker Fee**, in drops.
|
||||
4. Click **Broker Sale**.
|
||||
|
||||

|
||||
|
||||
|
||||
## Cancel Offer
|
||||
|
||||
After accepting a buy offer, a best practice for the broker is to cancel all other offers, if possible. Use **Get Offers** to get the full list of buy offers. To cancel an offer:
|
||||
After accepting a buy offer, a best practice for the broker is to cancel all other offers, if the broker has permissions to do so. Use **Get Offers** to get the full list of buy offers. To cancel an offer:
|
||||
|
||||
1. Enter the _nft_offer_index_ of the buy offer you want to cancel in the **Buy NFToken Offer Index** field.
|
||||
2. Click **Cancel Offer**.
|
||||
|
||||

|
||||
|
||||
# Code Walkthrough
|
||||
|
||||
|
||||
Reference in New Issue
Block a user