Solana Suite Develpoment Guide
  • Overview
  • Features
    • Install
    • Function Driven
    • Result Type
    • Configuring settings
  • Usage
    • Airdrop in devnet
    • Compressed NFT(cNGFT)
      • Overview
      • Create a space
      • Calculate a space
      • Mint a collection
      • Mint the cNFT
    • Upload to decentrized storage
  • API Reference
  • Github
Powered by GitBook
On this page
  1. Usage
  2. Compressed NFT(cNGFT)

Mint the cNFT

PreviousMint a collectionNextUpload to decentrized storage

Last updated 1 year ago

To mint cNFTs, you need to first create a Space and mint collection. Please store the addresses of the Space and mint collection in an RDB or Config file.

example

import { CompressedNft } from "@solana-suite/compressed-nft";

const inst = await CompressedNft.mint(
  "HTpCqDfm7NwxKrwaQw...",  // mint's owner Secret 
  {
    filePath: "./lion.png", // upload image path or uri
    name: "Lion ",          // mint name
    symbol: "LION",         // mint symbole
    royalty: 20,            // royalty percentage
  },
  "5am8mNavUnVQvdjVL3...",  // space address
  "4nfN9iymjRaYBpiy1j...",  // collection address
);

await inst.submit();

filePath or uri: You can specify a URI in addition to a filePath. The URI allows you to specify the URL of already uploaded content, such as images or videos. When you specify a filePath, the content upload is handled in the background, which means that the time for minting to complete may vary depending on the size of the content.


Full example code
mint | Solana Suite API Reference