Mint a Soulbound NFT
Prerequisites
Minting a Soulbound NFT on-chain using Ternoa-JS
// Imports
import { initializeApi } from "ternoa-js";
import { createNft } from "ternoa-js/nft";
const mintSBT = async () => {
try {
const keyring = await getKeyringFromSeed("//TernoaTestAccount");
const newSBT = await createNft(
"My first SBT",
0,
undefined,
true, // Is soulbound
keyring,
WaitUntil.BlockInclusion
);
console.log("The on-chain NFT id is: ", nftData.nftId);
} catch (e) {
console.error(e);
}
};Next
Support
Last updated