CAVYAR

CAVYAR AI

Unverify Collection NFT with Umi

Unverify Collection
Umi
Verify
Collection
Collection NFT

Once the Collection attribute is set on an NFT, an authority of the Collection NFT can send an Unverify instruction on the Token Metadata to flip its verify attribute from true to false.

import { unverifyCollectionV1, mplTokenMetadata, } from "@metaplex-foundation/mpl-token-metadata"; import { generateSigner, publicKey } from "@metaplex-foundation/umi"; import { createUmi } from "@metaplex-foundation/umi-bundle-defaults"; const umi = createUmi("https://api.mainnet-beta.solana.com", "processed").use( mplTokenMetadata() ); const metadata = publicKey("YourMetadataAccount"); // Address of the NFTs metadata account const collectionMint = publicKey("YourCollectionMint"); // The mint account of the collection const collectionAuthority = generateSigner(umi); // Authority of the collection NFT, can also be a Delegate await unverifyCollectionV1(umi, { metadata, collectionMint, authority: collectionAuthority, }).sendAndConfirm(umi);

CAVYAR AI

CAVYAR AI is in its earliest stages of development and the quality of generated descriptions will improve massively over time. At this stage, there is a risk of false information being generated.

The given Solana code snippet is used to unverify a collection NFT using the Umi framework. It performs the following steps:

  1. Imports the necessary functions and modules from the "@metaplex-foundation/mpl-token-metadata" and "@metaplex-foundation/umi" packages.

  2. Creates an instance of Umi using the createUmi function, specifying the Solana API endpoint and the network environment ("processed" in this case). The mplTokenMetadata plugin is also added to the Umi instance.

  3. Defines the metadata variable, which represents the address of the NFT's metadata account.

  4. Defines the collectionMint variable, which represents the mint account of the collection.

  5. Generates the collectionAuthority using the generateSigner function, passing in the Umi instance. This authority is responsible for performing the unverification action.

  6. Calls the unverifyCollectionV1 function, passing in the Umi instance and an object containing the metadata, collectionMint, and authority properties. This function initiates the unverification process for the collection NFT.

  7. Calls the sendAndConfirm method on the result of the unverifyCollectionV1 function, passing in the Umi instance. This method sends the unverification transaction to the Solana network and waits for confirmation.

In summary, the code snippet uses the Umi framework to unverify a collection NFT by calling the unverifyCollectionV1 function with the necessary parameters and then confirming the transaction using the sendAndConfirm method.

Ask

Soon™

Created by:

Axax...GsG2

Give this snippet a feedback!

Published on

April 24, 2025

Want to support the author?