Introduction

The Non-Fungible Token Vari tier offers a comprehensive suite of functionalities tailored specifically to non-fungible tokens (NFTs). These functionalities empower developers to tokenise unique assets, digital collectibles, and proof of ownership on the blockchain.

Prerequisites

  • Obtain an authorization token
    You must obtain an authorisation token to interact with Overledger's API and call any endpoint. This token will authenticate your requests and grant you access to the necessary endpoints. Please follow the authentication process provided by Overledger to get your authorisation token.

The tokenisation APIs are divided into two categories: the first includes APIs that write transactions to the blockchain network, altering the network's state. The second category comprises read operations that solely retrieve data from the blockchain.

Write Operations

Write functions (or 'non-view' functions) to modify the blockchain state. Since they cause permanent changes in the blockchain, they require a transaction signature for authorisation and cost transaction fees to compensate miners for processing the change. The write operations for this tier are listed below:

Mint Tokens

The "Mint Tokens" allow you to issue a new NFT for your QRC721 token. You can find the mint token endpoint under our API references Mint Tokens

To successfully mint a token, the following steps are necessary:

Prepare

You can utilise the curl command to prepare your mint token transaction.

curl --location 'https://api.sandbox.overledger.io/v2/tokenise/preparation/transaction/qrc721/supply' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer authorization' \
--data '{
    "location": {
        "technology": "Ethereum",
        "network": "Ethereum Sepolia Testnet"
    },
    "type": "Mint Tokens",
    "urgency": "normal",
    "overledgerSigningType": "overledger-javascript-library",
    "requestDetails": {
        "beneficiary": {
            "accountId": "0xd8b31B65878a6B1a6cAf9f4819C1A42d68a7A116",
            "mint": {
                "tokenId": "2",
                "tokenName": "QNTNFT",
                "metadata": "something"
            }
        },
        "creator": {
            "accountId": "0xd8b31B65878a6B1a6cAf9f4819C1A42d68a7A116"
        }
    }
}'

Sign

Once the transaction is prepared with the specified details (like recipient address, amount, etc.), it is possible to use the private key that was obtained earlier (in the prerequisites) to sign it cryptographically. You can follow the article for signing a transaction here.

Execute

After signing your request, you can proceed to execute it, which will write this transaction onto the network. For detailed instructions on executing your signed request, please refer to the execute signed request API reference.

Burn Tokens

The "Burn Tokens" allow you to destroy your QRC721 token. You can find the burn token endpoint under our API references Burn Tokens

You must follow the prepare, sign, and execute steps outlined in the previous section for this task as well.

Collect Tokens

The "Collect Asset" creates the transaction to pull the approved NFT from an account into the receiving account. You can find the collect token endpoint under our API references Collect Tokens

You must follow the prepare, sign, and execute steps outlined in the previous section for this task as well.

Transfer Tokens

The "Transfer Asset" allows you to transfer a QRC721 token to another specified account. You can find the transfer token endpoint under our API references Transfer Tokens

You must follow the prepare, sign, and execute steps outlined in the previous section for this task as well.

Approved Asset Collect

The “Approved Asset Collect” allows you to approve someone to subsequently make a transaction that takes the NFT from your address into their own. You can find the approved asset collect endpoint under our API references Approved Asset Collect

You must follow the prepare, sign, and execute steps outlined in the previous section for this task as well.


Read operations

Read functions, also called 'view' functions, retrieve data from the blockchain without altering its state. These functions do not require signing, do not incur transaction fees, execute on a single node, and importantly, do not modify the blockchain's state. The read operations for the base tier are listed below:

Retrieve supply information for a QRC token

The "Retrieve supply information for a QRC token" enables you to retrieve the number of QRC tokens that are currently in circulation after tokens have been minted and burned. You can find the endpoints under our API references Retrieve supply information for a QRC token

Retrieve contract owner information of a QRC token

The "Retrieve contract owner information of a QRC token" enables you to retrieve the address that currently has contract owner permissions for a particular QRC token. You can find the endpoints under our API references Retrieve contract owner information of a QRC token

Retrieve approved account information for a QRC20 token

The "Retrieve approved account information for a QRC20 token" enables you to retrieve whether an account is approved to make payments on behalf of another account for a particular QRC20 token. You can find the endpoints under our API references Retrieve approved account information for a QRC20 token

Retrieve token owner account information for a QRC20 token

The "Retrieve token owner account information for a QRC20 token" enables you to retrieve the address that currently owns a particular QRC721 token. You can find the endpoints under our API references Retrieve token owner account information for a QRC20 token

Retrieve token URI information for a QRC20 token

The "Retrieve token URI information for a QRC20 token" enables you to retrieve the URI that is assigned to a particular QRC721 token. You can find the endpoints under our API references Retrieve token URI information for a QRC20 token

Retrieve supply information for a QRC20 token

The "Retrieve supply information for a QRC20 token" enables you to retrieve the number of QRC tokens that are currently in circulation after tokens have been minted and burned. You can find the endpoints under our API references Retrieve supply information for a QRC20 token