Introduction to NFT on the XRP Ledger

Welcome all to my blog where I will be posting my findings and research about the concept of NFTs on the XRPL. For my thesis I will also research how to apply this to real artworks. Wietse showed me how you can give the tokens (formerly called IOUs) the properties of a NFT.

https://twitter.com/XRPLLabs/status/1361216610640547842?s=20

Tokens can be issued by anyone with access to a account on the ledger. The cost of this (of an XRPL transaction) is 12 drops. In today's use the tokens are used to represent any currency that is owed by the counterparty, for example exchanges to there users and the other way around.

To issue (mint) a token, a trust line has to be created between two accounts. A limit will be set a limit for the amount of tokens to be sent.

The smallest amount of units for an issued token is as little as 80 zero's after the decimal and then a 1.

The scientific notation, as used “under the hood” by the XRPL (when requesting transaction / Trust Line information from a node) is 1000000000000000e-96.

The proposal of XRPL Labs is that numbers smaller than 70 zero's after the decimal will be considered as NFTs. and the last 11 digits will be seen as whole numbers.

For example:

0.0000000000000000000000000000000000000000000000000000000000000000000000 | 00000000001 Would be 1 NFT.

0.0000000000000000000000000000000000000000000000000000000000000000000000 | 00000000010 Would be 10 NFTs.

There are considerably 3 possible ways of creating NFTs on the XRPL:

For a more detailed overview of technical aspects of the methodology check out the proposal from XRPL Labs regarding NFT on the XRP Ledger.

Let's say we go for the last one and see how this works out on the testnet.

We use two accounts for this which the first one is the issuer (minter) and the other one the hot wallet for the NFT to be sent to a buyer.

First we set a default flag which enables rippling. That is because we want the token to be moved between future recievers of the token with that trust line later on.

https://gist.github.com/HubertG97/13ccb958dcbd036eb8fbf860ade9373b

After that we set a trustline for the token between the two accounts with the smallest amount possible. For now I will call this one “De Nachtwacht”, since I will also be researching the registration of real artworks on the XRPL. The name is converted to hexadecimal code, this is the way the XRPL handles token names.

https://gist.github.com/HubertG97/149331b7c2740966363f5841e4715112

Next up we will send the token from the issuer to the hot wallet.

https://gist.github.com/HubertG97/c7021a952da57c6930a511d6c4442d55

Now we have our token in the hot wallet. and can be seen on the balance sheet.

From here we could send it to a buyer. Any new account has to set a trust line with the initial issuer (minter) first.

This is because the XRPL has an 'opt in' (explicit trust) model, where to be able to receive a token, one has to trust the token issuer (minter) first After that the token can be sent to that account.

XUMM support for the the described methodology will be added on version 1.1 late Q1 2021.