Burn an NFT
Prerequisites
How to burn an NFT using Ternoa-JS
import {
burnNft,
initializeApi,
getKeyringFromSeed,
WaitUntil,
} from "ternoa-js";
const burnNFT = async () => {
try {
await initializeApi();
const keyring = await getKeyringFromSeed("//TernoaTestAccount");
const NFT_ID = 1; // the NFT id to burn
const nftData = await burnNft(
NFT_ID,
keyring,
WaitUntil.BlockInclusion
);
console.log(`NFT ${nftData.nftId} undelegated`);
} catch (e) {
console.error(e);
}
};The expected params
Response
Support
Last updated