Create a NFT
Prerequisites:
Getting startedStep 1: Import the following modules
const { Client, CategoryNFT } = require("@xact-wallet-sdk/client");
require("dotenv").config();Step 2: Get Xact Fees
const xactFees = await client.getXactFeesCreateNFT();Step 3: Initializing Create NFT
/* Update the fields with your informations */
const name = 'NFT Test';
const description = 'Description of my NFT';
const category = CategoryNFT.ART;
const creator = 'Johny.B';
const cid = ''; /* cid linked to the NFT - IPFS storage */
const supply = 1; /* Nb of NFT available */
const fromAccountId= ''; /* Account ID of the user */
const customRoyaltyFee = {
numerator: 1,
denominator: 10,
fallbackFee: 100, /* in Hbar */
};/* Optional*/
await client.createNFT({fromAccountId, name, description, category, creator, cid, supply, customRoyaltyFee});Step 4: Listen for the NFT's creation
Code Check ✅
Last updated