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