Use NFT Express to Mint NFTs on Algorand

NFT Express uses the same simple API endpoint that you would use to mint NFTs for your own smart contracts with Tatum.

However, with NFT Express you no longer need to enter the following:

  • Private key

  • Smart contract address

  • Token ID

This guide explains how to use NFT Express to mint NFTs specifically on Algorand. To learn how to use NFT Express on other blockchains:

Prerequisites

Tatum plan

When used on the mainnet, NFT Express works only with paid Tatum plans. Tatum covers the minting fee for you and then deducts the corresponding number of credits from your monthly credit allowance.

To use NFT Express, you need an API key with a paid Tatum plan. Visit the Tatum Dashboard to sign up for one.

For details about Tatum’s plans pricing and allowances, visit Pricing & Plans.

Tatum JavaScript SDK (optional)

You must enter the API key in the environment variables in your IDE or into the header of the direct API request.

To use JavaScript, download and install the Tatum JavaScript SDK.

Mint an NFT with NFT Express

Minting NFTs on Algorand is a two-step process:

  1. You mint an NFT.

  2. You transfer the NFT upon the recipient's approval.

This is because Algorand charges users for storing NFTs on their addresses and an Algorand blockchain address by default does not receive NFTs unless the owner of the address explicitly agrees to receiving an NFT.

Mint an NFT

Enter the API key in the environment variables in your IDE or into the header of the direct API request.

Request

const resp = await fetch(
  `https://api.tatum.io/v3/nft/mint`,
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY_HERE'
    },
    body: JSON.stringify({
      chain: 'ALGO',
      url: 'https://my_token_data.com',
      name: 'My Crazy NFT',
      attr: {
        assetUnit: 'USDT',
        clawback: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4',
        manager: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4',
        reserve: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4',
        freeze: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4'
      }
    })
  }
);

Request parameters:

  • chain ALGO for Algorand in this specific case.

  • url Metadata of the minted NFT. For details, see the Ethereum site.

  • name The name of the minted NFT.

  • attr Attributes

    • assetUnit The name of the minted NFT unit.

    • clawback The address of the clawback account.

    • manager The address of the manager account.

    • reserve The address of the reserve account.

    • freeze The address of the freeze account.

What happens on the background?

  • The private key and contract address will be by default set to Tatum’s pre-deployed smart contract and our private key on the blockchain that you specified.

  • The gas fees will be deducted as credits from your monthly credit allowance from the paid Tatum plan you have selected.

You can mint as many NFTs as you want without devising the logic and setting up your own NFT solution.

Transfer the minted NFT

An NFT that you mint on Algorand is automatically transferred to your blockchain address. After the NFT is minted, you have to transfer it to the recipient's address. The recipient has to agree in advance to receive your NFT (by default, Algorand charges users for storing NFTs on their addresses which, by default, does not receive NFTs unless agreed).

Step 1

The recipient agrees to receive the NFT. Recipient enables accepting assets on an Algorand address using the mintNftExpressAlgorand schema:

Request

const resp = await fetch(
  `https://api.tatum.io/v3/algorand/asset/receive`,
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY_HERE'
    },
    body: JSON.stringify({
      assetId: '116363571',
      fromPrivateKey: '72TCV5BRQPBMSAFPYO3CPWVDBYWNGAYNMTW5QHENOMQF7I6QLNMJWCJZ7A3V5YKD7QD6ZZPEHG2PV2ZVVEDDO6BCRGXWIL3DIUMSUCI'
    })
  }
);

const data = await resp.json();
console.log(data);

Step 2

You transfer the NFT to the recipient's address using the transferNftAlgoExpress schema:

const resp = await fetch(
  `https://api.tatum.io/v3/nft/transaction`,
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY_HERE'
    },
    body: JSON.stringify({
      chain: 'ALGO',
      to: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4',
      contractAddress: '100000'
    })
  }
);

const data = await resp.json();
console.log(data);

On the mainnet, Tatum covers your transaction fees for the NFT transfer and pays for them from its own blockchain address. Then, the fee amount paid by Tatum is converted to the number of credits, and these credits are deducted from the monthly credit allowance of your paid pricing plan. On the testnet, no credits are deducted from the monthly credit allowance.

Last updated