mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 19:55:54 +00:00
Merge branch 'master' into add-memo-to-faucet-transaction
This commit is contained in:
@@ -16,6 +16,13 @@ async function wait_for_seq(network_url, address) {
|
||||
}
|
||||
console.log(response)
|
||||
$("#sequence").html('<h3>Sequence Number</h3> '+response.result.account_data.Sequence)
|
||||
$("#balance").html(
|
||||
"<h3>Balance</h3> " +
|
||||
(Number(response.result.account_data.Balance) * 0.000001).toLocaleString(
|
||||
"en"
|
||||
) +
|
||||
" XRP"
|
||||
)
|
||||
api.disconnect()
|
||||
}
|
||||
|
||||
@@ -37,6 +44,8 @@ function rippleTestNetCredentials(url, altnet_name) {
|
||||
sequence.html('')
|
||||
loader.css('display', 'inline')
|
||||
|
||||
// generate the test wallet
|
||||
const test_wallet = xrpl.Wallet.generate();
|
||||
|
||||
//call the alt-net and get key generations
|
||||
$.ajax({
|
||||
@@ -44,6 +53,7 @@ function rippleTestNetCredentials(url, altnet_name) {
|
||||
type: 'POST',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({
|
||||
destination: test_wallet.address,
|
||||
memos: [
|
||||
{
|
||||
Memo: {
|
||||
@@ -57,18 +67,19 @@ function rippleTestNetCredentials(url, altnet_name) {
|
||||
loader.hide();
|
||||
credentials.hide().html('<h2>Your '+altnet_name+' Credentials</h2>').fadeIn('fast')
|
||||
address.hide().html('<h3>Address</h3> ' +
|
||||
data.account.address).fadeIn('fast')
|
||||
test_wallet.address).fadeIn('fast')
|
||||
secret.hide().html('<h3>Secret</h3> ' +
|
||||
data.account.secret).fadeIn('fast')
|
||||
test_wallet.seed).fadeIn('fast')
|
||||
// TODO: currently the faucet api doesn't return balance unless the account is generated server side, need to make upates when faucet repo is updated.
|
||||
balance.hide().html('<h3>Balance</h3> ' +
|
||||
Number(data.balance).toLocaleString('en') + ' XRP').fadeIn('fast')
|
||||
Number(data.amount).toLocaleString('en') + ' XRP').fadeIn('fast')
|
||||
sequence.html('<h3>Sequence</h3> <img class="throbber" src="assets/img/xrp-loader-96.png"> Waiting...').fadeIn('fast')
|
||||
if (altnet_name=="Testnet") {
|
||||
wait_for_seq("wss://s.altnet.rippletest.net:51233", data.account.address)
|
||||
wait_for_seq("wss://s.altnet.rippletest.net:51233", test_wallet.address)
|
||||
} else if (altnet_name=="NFT-Devnet") {
|
||||
wait_for_seq("wss://xls20-sandbox.rippletest.net:51233", data.account.address)
|
||||
wait_for_seq("wss://xls20-sandbox.rippletest.net:51233", test_wallet.address)
|
||||
} else {
|
||||
wait_for_seq("wss://s.devnet.rippletest.net:51233", data.account.address)
|
||||
wait_for_seq("wss://s.devnet.rippletest.net:51233", test_wallet.address)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
42
content/concepts/tokens/nftoken-batch-minting.md
Normal file
42
content/concepts/tokens/nftoken-batch-minting.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
html: nftoken-batch-minting.html
|
||||
parent: non-fungible-tokens.html
|
||||
blurb: Minting NFToken objects in batches.
|
||||
filters:
|
||||
- include_code
|
||||
labels:
|
||||
- Non-fungible Tokens, NFTs
|
||||
status: not_enabled
|
||||
---
|
||||
|
||||
# Batch minting
|
||||
|
||||
There are two common approaches to minting NFToken objects in batches: mint on demand and scripted minting.
|
||||
|
||||
## Mint On Demand (Lazy Minting)
|
||||
|
||||
When using a mint on demand model, you and potential customers make buy or sell offers for initial sales of a NFToken object off the XRP Ledger. When you are ready to commence the initial sale, you mint the token, create a sell offer or accept a buy offer, then complete the transaction.
|
||||
|
||||
### Benefits
|
||||
|
||||
* There is no reserve requirement for holding unsold NFToken objects.
|
||||
* You mint NFToken objects in real time when you know that it will sell.
|
||||
|
||||
### Downside
|
||||
|
||||
Any market activity prior to the initial sale of the NFToken object is not recorded on the XRP Ledger. This might not be an issue for some applications.
|
||||
|
||||
## Scripted Minting
|
||||
|
||||
Use a program or script to mint many tokens at once. You might find the XRP Ledger ticket functionality helps you submit transactions in parallel, up to a current limit of 200 transactions in one group.
|
||||
|
||||
For a practical example, see the [Batch Mint NFTokens](batch-minting.html) tutorial.
|
||||
|
||||
### Benefits
|
||||
|
||||
* NFToken objects are minted ahead of time
|
||||
* Market activity for the initial sale of the NFToken object is captured on the ledger
|
||||
|
||||
Downside
|
||||
|
||||
You need to retain the appropriate XRP reserve for all of the NFToken objects you mint. As a rule of thumb, this is roughly 1/12th XRP per NFToken object at the current reserve rate. In the event that you do not have sufficient XRP in reserve, your mint transactions fail until you add sufficient XRP to your account.
|
||||
@@ -22,7 +22,7 @@ This example shows how to:
|
||||
|
||||
# Usage
|
||||
|
||||
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 the sample in your own browser.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try the sample in your own browser.
|
||||
|
||||
## Get Accounts
|
||||
|
||||
@@ -90,7 +90,7 @@ When you examine the results field, you'll find that the Issuer account is credi
|
||||
|
||||
# Code Walkthrough
|
||||
|
||||
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.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try each of the samples in your own browser.
|
||||
|
||||
## Set Minter
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ A best practice is to use `Tickets` to reserve the transaction sequence numbers.
|
||||
|
||||
## Usage
|
||||
|
||||
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 the sample in your own browser.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try the sample in your own browser.
|
||||
|
||||
## Get an Account
|
||||
|
||||
@@ -50,7 +50,7 @@ The difference between this function and the getTokens() function used earlier i
|
||||
|
||||
# Code Walkthrough
|
||||
|
||||
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.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try each of the samples in your own browser.
|
||||
|
||||
## Get Account From Seed
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ This example shows how to:
|
||||
|
||||

|
||||
|
||||
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.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try each of the samples in your own browser.
|
||||
|
||||
## Get Accounts
|
||||
|
||||
@@ -90,7 +90,7 @@ After accepting a buy offer, a best practice for the broker is to cancel all oth
|
||||
|
||||
# Code Walkthrough
|
||||
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip) archive to examine the code samples.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to examine the code samples.
|
||||
|
||||
## ripplex5-broker-nfts.js
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ To get started, create a new folder on your local disk and install the JavaScrip
|
||||
```
|
||||
|
||||
|
||||
Download and expand the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip) archive.
|
||||
Download and expand the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -74,7 +74,7 @@ To transfer XRP between accounts:
|
||||
|
||||
# Code Walkthrough
|
||||
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip) in the source repository for this website.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} in the source repository for this website.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ This example shows how to:
|
||||

|
||||
|
||||
|
||||
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.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try each of the samples in your own browser.
|
||||
|
||||
|
||||
## Usage
|
||||
@@ -81,7 +81,7 @@ To transfer an issued currency token, once you have created a trust line:
|
||||
|
||||
# Code Walkthrough
|
||||
|
||||
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.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try each of the samples in your own browser.
|
||||
|
||||
## ripplex2-send-currency.js
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ This example shows how to:
|
||||
|
||||
# Usage
|
||||
|
||||
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 the sample in your own browser.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try the sample in your own browser.
|
||||
|
||||
## Get Accounts
|
||||
|
||||
@@ -91,7 +91,7 @@ To permanently destroy a NFToken:
|
||||
|
||||
# Code Walkthrough
|
||||
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip) archive to examine the code samples.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to examine the code samples.
|
||||
|
||||
## ripplex3-mint-nfts.js
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ This example shows how to:
|
||||
|
||||

|
||||
|
||||
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.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try each of the samples in your own browser.
|
||||
|
||||
|
||||
# Usage
|
||||
@@ -152,7 +152,7 @@ To cancel a buy or sell offer that you have created:
|
||||
|
||||
# Code Walkthrough
|
||||
|
||||
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.
|
||||
You can download the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive to try each of the samples in your own browser.
|
||||
|
||||
|
||||
## Create Sell Offer
|
||||
|
||||
@@ -54,7 +54,7 @@ To get started, create a new folder on your local disk and install the JavaScrip
|
||||
```
|
||||
|
||||
|
||||
Download and expand the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip) archive.
|
||||
Download and expand the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/quickstart/js/quickstart.zip){.github-code-download} archive.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -764,6 +764,11 @@ pages:
|
||||
- en
|
||||
- ja
|
||||
|
||||
- md: concepts/tokens/nftoken-batch-minting.md
|
||||
targets:
|
||||
- en
|
||||
- ja
|
||||
|
||||
- md: concepts/tokens/freezes.md
|
||||
targets:
|
||||
- en
|
||||
|
||||
Reference in New Issue
Block a user