Algorand - NFTs Mint and Transfer to Recipient

On Algorand, an address receives an NFT only after its owner agrees to receive the asset, so you mint the NFT, the recipient opts in, and then you transfer it.

NFTs on Algorand work a bit differently than on EVM chains such as Ethereum. To create and fund an Algorand wallet first, see the Algorand API quickstart.

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 receive an NFT.

NFT Mint Example - Algorand

The Mint an NFT endpoint (POST /v3/nft/mint) accepts these request body schemas for Algorand:

  • MintNftExpressAlgorand
  • MintNftAlgorand
  • MintNftAlgorandKMS

The following example uses the MintNftExpressAlgorand schema (NFT Express): Tatum's pre-deployed smart contract and Tatum's private key are used, so the request has no fromPrivateKey. On the mainnet, the fees are deducted as credits from the monthly credit allowance of your paid Tatum plan.

curl -i -X POST \
  https://api.tatum.io/v3/nft/mint \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {YOUR_API_KEY}' \
  -d '{
    "chain": "ALGO",
    "url": "https://my_token_data.com",
    "name": "My Crazy NFT",
    "attr": {
      "assetUnit": "USDT",
      "clawback": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
      "manager": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
      "reserve": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
      "freeze": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4"
    }
  }'

Parameters

NameDescription
chainALGO for Algorand in this specific case.
urlThe URL pointing to the NFT metadata. For details, see EIP-721. On Algorand, use an ipfs:// URL of at most 96 bytes; see Algorand NFT token URI: IPFS format and size limit.
nameThe name of the minted NFT.
attrAttributes
assetUnitThe unit name of the minted NFT (up to 8 characters).
clawbackThe address of the clawback account that can claw back holdings of the NFT.
managerThe address of the manager account that can change the NFT configuration or burn it. Set it if you want to burn the NFT later.
reserveThe address of the reserve account that holds the reserve (non-minted) units of the NFT.
freezeThe address of the freeze account that can freeze holdings of the NFT.

NFT Transfer Example - Algorand

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 with the NFT reception

The recipient agrees to receive the NFT. The recipient enables accepting the asset on their Algorand address with the POST /v3/algorand/asset/receive endpoint, signing with their own private key. assetId is the asset ID of the NFT the recipient agrees to receive:

Request Example:

curl -i -X POST \
  https://api.tatum.io/v3/algorand/asset/receive \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {YOUR_API_KEY}' \
  -d '{
    "assetId": 116363571,
    "fromPrivateKey": "{RECIPIENT_PRIVATE_KEY}"
  }'

Step_2 - The sender sends the NFT to the recipient

You transfer the NFT to the recipient's address. contractAddress is the asset ID of the NFT. For an NFT minted with NFT Express, use the TransferNftAlgoExpress schema: Tatum signs the transaction, so no private key is needed. If you minted the NFT with your own private key (MintNftAlgorand), use the TransferNftAlgo schema and add fromPrivateKey. amount is needed only for fractional NFTs (the number of fractions to transfer, default 1).

Request Example:

curl -i -X POST \
  https://api.tatum.io/v3/nft/transaction \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {YOUR_API_KEY}' \
  -d '{
    "chain": "ALGO",
    "to": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
    "contractAddress": "116363571"
  }'
curl -i -X POST \
  https://api.tatum.io/v3/nft/transaction \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {YOUR_API_KEY}' \
  -d '{
    "chain": "ALGO",
    "to": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
    "contractAddress": "116363571",
    "amount": 1,
    "fromPrivateKey": "{SENDER_PRIVATE_KEY}"
  }'

Did this page help you?