Tatum: How To Mint NFTs on Solana with Tatum

Learn how to mint NFTs on the Solana network with Tatum.

What is Tatum?

Tatum is a blockchain development platform that unifies over 40 blockchain protocols, creating a simple and central point of creation for thousands of digital assets across different networks.

Read below to learn how to mint NFTs on the Solana network with Tatum.

Prerequisites:

1. Next, we need a Filebase IPFS bucket.

To do this, navigate to console.filebase.com. If you don’t have an account already, sign up, then log in.

2. Select ‘Buckets’ from the left side bar menu, or navigate to console.filebase.com/buckets.

Select ‘Create Bucket’ in the top right corner to create a new bucket.

3. Enter a bucket name and choose the IPFS storage network to create the bucket.

Bucket names must be unique across all Filebase users, be between 3 and 63 characters long, and can contain only lowercase characters, numbers, and dashes.

4. Next, select the bucket from your list of buckets, then select ‘Upload’ in the top right corner to upload an image file.

5. Select an image to be uploaded.

Once uploaded, it will be listed in the bucket.

6. You can view the object’s IPFS CID in the CID column, or you can click on your uploaded object to display the metadata for the object, which includes the IPFS CID.

Choose the method you prefer, and take note of the IPFS CID.

7. Next, login to the Tatum API Dashboard.

8. Select ‘Create API Key’ or choose one of your existing API keys. Take note of this API key.

9. Next, get your crypto wallet address and your crypto wallet private key.

For more information on getting your wallet address and wallet private key, please see here.

10. To mint an NFT on Solana with Tatum, you can use the Tatum API endpoint and cURL, or you can use the TatumJS package.

11. To use the Tatum API endpoint, use the following cURL command structure:

curl --location --request POST 'https://api-eu1.tatum.io/v3/nft/mint/' \\
--header 'x-api-key: TATUM_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '{
   "from": "CRYPTO_WALLET_ADDRESS",
   "chain": "SOL",
   "fromPrivateKey": "CRYPTO_WALLET_PRIVATE_KEY",
   "to": "CRYPTO_WALLET_ADDRESS",
   "metadata": {
       "name": "NFT_NAME",
       "symbol": "NFT_SYMBOL",
       "sellerFeeBasisPoints": 0,
       "uri": "https://ipfs.filebase.io/ipfs/[IPFS-CID]",
       "creators": [
           {
               "address": "CRYPTO_WALLET_ADDRESS",
               "verified": true,
               "share": 100
           }
       ]
   }
}’

Replace the following values:

  • header x-api-key: Tatum API Key

  • from: Your Crypto Wallet Address

  • fromPrivateKey: Your Crypto Wallet Private Key

  • to: Your Crypto Wallet Address

  • name: Your NFT’s Metadata Name

  • symbol: Your NFT’s Metadata Symbol

  • IPFS_CID: Your NFT’s CID you recorded when you uploaded the NFT image to your Filebase IPFS Bucket.

  • address: Your Crypto Wallet Address

12. To use the TatumJS package, use the following piece of code:

import { mintNft, SolanaNftMetadata } from '@tatumio/tatum-solana'
  await mintNft(
    {
      from: 'CRYPTO_WALLET_ADDRESS',
      fromPrivateKey:
        'CRYPTO_WALLET_PRIVATE_KEY',
      to: 'CRYPTO_WALLET_ADDRESS',
      metadata: new SolanaNftMetadata('NFT_NAME', 'NFT_SYMBOL', 'https://IPFS_CID.ipfs.dweb.link', 0),
    }
)

Replace the following values:

  • CRYPTO_WALLET_ADDRESS: Your Crypto Wallet Address

  • CRYPTO_WALLET_PRIVATE_KEY: Your Crypto Wallet Private Key

  • NFT_NAME: Your NFT’s Metadata Name

  • NFT_SYMBOL: Your NFT’s Metadata Symbol

  • IPFS_CID: Your NFT’s CID you recorded when you uploaded the NFT image to your Filebase IPFS Bucket.

Either method, using the Tatum API or TatumJS package, will result in a response that resembles the following:

{
    "txId": "5GAwhRcMR7h5Dx71KCQax4CAcCFA6FcrVE5fwNedq7wXDYS1qpZaGd4Bj2zh8dCUfAz7fqVSXhdZzXRigsNoTZsb",
    "nftAddress": "7dQWANaodDyttJNz3seaXoAe6VA8cLpPV1bM4cPGuNhG",
    "nftAccountAddress": "3z2bPwKzfTAFDKPNKTM4vvffBSDvcBvkuRJeME5iALs3"
}

If you have any questions, please join our Discord server, or send us an email at hello@filebase.com

Last updated