diff --git a/assets/js/test-net.js b/assets/js/test-net.js index 4329d85fb5..ce1f76f39a 100644 --- a/assets/js/test-net.js +++ b/assets/js/test-net.js @@ -16,6 +16,13 @@ async function wait_for_seq(network_url, address) { } console.log(response) $("#sequence").html('

Sequence Number

'+response.result.account_data.Sequence) + $("#balance").html( + "

Balance

" + + (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('

Your '+altnet_name+' Credentials

').fadeIn('fast') address.hide().html('

Address

' + - data.account.address).fadeIn('fast') + test_wallet.address).fadeIn('fast') secret.hide().html('

Secret

' + - 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('

Balance

' + - Number(data.balance).toLocaleString('en') + ' XRP').fadeIn('fast') + Number(data.amount).toLocaleString('en') + ' XRP').fadeIn('fast') sequence.html('

Sequence

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) } }, diff --git a/content/concepts/tokens/nftoken-batch-minting.md b/content/concepts/tokens/nftoken-batch-minting.md new file mode 100644 index 0000000000..c2216d8212 --- /dev/null +++ b/content/concepts/tokens/nftoken-batch-minting.md @@ -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. \ No newline at end of file diff --git a/content/tutorials/quickstart/authorize-minter.md b/content/tutorials/quickstart/authorize-minter.md index a609658de6..72f8506445 100644 --- a/content/tutorials/quickstart/authorize-minter.md +++ b/content/tutorials/quickstart/authorize-minter.md @@ -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 diff --git a/content/tutorials/quickstart/batch-minting.md b/content/tutorials/quickstart/batch-minting.md index ddefc89356..afb56a130e 100644 --- a/content/tutorials/quickstart/batch-minting.md +++ b/content/tutorials/quickstart/batch-minting.md @@ -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 diff --git a/content/tutorials/quickstart/broker-sale.md b/content/tutorials/quickstart/broker-sale.md index e08604c781..2ae7e13eac 100644 --- a/content/tutorials/quickstart/broker-sale.md +++ b/content/tutorials/quickstart/broker-sale.md @@ -23,7 +23,7 @@ This example shows how to: ![Quickstart form with Broker Account](img/quickstart21.png) -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 diff --git a/content/tutorials/quickstart/create-accounts-send-xrp.md b/content/tutorials/quickstart/create-accounts-send-xrp.md index f09dd714e7..90ed61ce3f 100644 --- a/content/tutorials/quickstart/create-accounts-send-xrp.md +++ b/content/tutorials/quickstart/create-accounts-send-xrp.md @@ -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. diff --git a/content/tutorials/quickstart/create-trustline-send-currency.md b/content/tutorials/quickstart/create-trustline-send-currency.md index d089276b36..10d91d6f00 100644 --- a/content/tutorials/quickstart/create-trustline-send-currency.md +++ b/content/tutorials/quickstart/create-trustline-send-currency.md @@ -26,7 +26,7 @@ This example shows how to: ![Test harness with currency transfer](img/quickstart5.png) -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 diff --git a/content/tutorials/quickstart/mint-and-burn-nftokens.md b/content/tutorials/quickstart/mint-and-burn-nftokens.md index 218109bd53..401067aa1a 100644 --- a/content/tutorials/quickstart/mint-and-burn-nftokens.md +++ b/content/tutorials/quickstart/mint-and-burn-nftokens.md @@ -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 diff --git a/content/tutorials/quickstart/transfer-nftokens.md b/content/tutorials/quickstart/transfer-nftokens.md index f369675bd3..a26b4e25c0 100644 --- a/content/tutorials/quickstart/transfer-nftokens.md +++ b/content/tutorials/quickstart/transfer-nftokens.md @@ -27,7 +27,7 @@ This example shows how to: ![Quickstart form with NFToken transfer fields](img/quickstart13.png) -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 diff --git a/content/tutorials/quickstart/xrpl-quickstart.md b/content/tutorials/quickstart/xrpl-quickstart.md index fff63ca7f8..3ab4e38d7a 100644 --- a/content/tutorials/quickstart/xrpl-quickstart.md +++ b/content/tutorials/quickstart/xrpl-quickstart.md @@ -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. --- diff --git a/dactyl-config.yml b/dactyl-config.yml index b9bb4ad28b..3f1d16c8f5 100644 --- a/dactyl-config.yml +++ b/dactyl-config.yml @@ -764,6 +764,11 @@ pages: - en - ja + - md: concepts/tokens/nftoken-batch-minting.md + targets: + - en + - ja + - md: concepts/tokens/freezes.md targets: - en