#[repr(C)]
pub enum MetadataInstruction {
Show 53 variants CreateMetadataAccount(CreateMetadataAccountArgs), UpdateMetadataAccount(UpdateMetadataAccountArgs), DeprecatedCreateMasterEdition(CreateMasterEditionArgs), DeprecatedMintNewEditionFromMasterEditionViaPrintingToken, UpdatePrimarySaleHappenedViaToken, DeprecatedSetReservationList(SetReservationListArgs), DeprecatedCreateReservationList, SignMetadata, DeprecatedMintPrintingTokensViaToken(MintPrintingTokensViaTokenArgs), DeprecatedMintPrintingTokens(MintPrintingTokensViaTokenArgs), CreateMasterEdition(CreateMasterEditionArgs), MintNewEditionFromMasterEditionViaToken(MintNewEditionFromMasterEditionViaTokenArgs), ConvertMasterEditionV1ToV2, MintNewEditionFromMasterEditionViaVaultProxy(MintNewEditionFromMasterEditionViaTokenArgs), PuffMetadata, UpdateMetadataAccountV2(UpdateMetadataAccountArgsV2), CreateMetadataAccountV2(CreateMetadataAccountArgsV2), CreateMasterEditionV3(CreateMasterEditionArgs), VerifyCollection, Utilize(UtilizeArgs), ApproveUseAuthority(ApproveUseAuthorityArgs), RevokeUseAuthority, UnverifyCollection, ApproveCollectionAuthority, RevokeCollectionAuthority, SetAndVerifyCollection, FreezeDelegatedAccount, ThawDelegatedAccount, RemoveCreatorVerification, BurnNft, VerifySizedCollectionItem, UnverifySizedCollectionItem, SetAndVerifySizedCollectionItem, CreateMetadataAccountV3(CreateMetadataAccountArgsV3), SetCollectionSize(SetCollectionSizeArgs), SetTokenStandard, BubblegumSetCollectionSize(SetCollectionSizeArgs), BurnEditionNft, CreateEscrowAccount, CloseEscrowAccount, TransferOutOfEscrow(TransferOutOfEscrowArgs), Burn(BurnArgs), Create(CreateArgs), Mint(MintArgs), Delegate(DelegateArgs), Revoke(RevokeArgs), Lock(LockArgs), Unlock(UnlockArgs), Migrate(MigrateArgs), Transfer(TransferArgs), Update(UpdateArgs), Use(UseArgs), Verify(VerifyArgs),
}
Expand description

Instructions supported by the Metadata program.

Variants§

§

CreateMetadataAccount(CreateMetadataAccountArgs)

Create Metadata object.

§

UpdateMetadataAccount(UpdateMetadataAccountArgs)

Update a Metadata

§

DeprecatedCreateMasterEdition(CreateMasterEditionArgs)

Register a Metadata as a Master Edition V1, which means Editions can be minted. Henceforth, no further tokens will be mintable from this primary mint. Will throw an error if more than one token exists, and will throw an error if less than one token exists in this primary mint.

§

DeprecatedMintNewEditionFromMasterEditionViaPrintingToken

Given an authority token minted by the Printing mint of a master edition, and a brand new non-metadata-ed mint with one token make a new Metadata + Edition that is a child of the master edition denoted by this authority token.

§

UpdatePrimarySaleHappenedViaToken

Allows updating the primary sale boolean on Metadata solely through owning an account containing a token from the metadata’s mint and being a signer on this transaction. A sort of limited authority for limited update capability that is required for things like Metaplex to work without needing full authority passing.

§

DeprecatedSetReservationList(SetReservationListArgs)

Reserve up to 200 editions in sequence for up to 200 addresses in an existing reservation PDA, which can then be used later by redeemers who have printing tokens as a reservation to get a specific edition number as opposed to whatever one is currently listed on the master edition. Used by Auction Manager to guarantee printing order on bid redemption. AM will call whenever the first person redeems a printing bid to reserve the whole block of winners in order and then each winner when they get their token submits their mint and account with the pda that was created by that first bidder - the token metadata can then cross reference these people with the list and see that bidder A gets edition #2, so on and so forth.

NOTE: If you have more than 20 addresses in a reservation list, this may be called multiple times to build up the list, otherwise, it simply wont fit in one transaction. Only provide a total_reservation argument on the first call, which will allocate the edition space, and in follow up calls this will specifically be unnecessary (and indeed will error.)

§

DeprecatedCreateReservationList

Create an empty reservation list for a resource who can come back later as a signer and fill the reservation list with reservations to ensure that people who come to get editions get the number they expect. See SetReservationList for more.

§

SignMetadata

Sign a piece of metadata that has you as an unverified creator so that it is now verified.

§

DeprecatedMintPrintingTokensViaToken(MintPrintingTokensViaTokenArgs)

Using a one time authorization token from a master edition v1, print any number of printing tokens from the printing_mint one time, burning the one time authorization token.

§

DeprecatedMintPrintingTokens(MintPrintingTokensViaTokenArgs)

Using your update authority, mint printing tokens for your master edition.

§

CreateMasterEdition(CreateMasterEditionArgs)

Register a Metadata as a Master Edition V2, which means Edition V2s can be minted. Henceforth, no further tokens will be mintable from this primary mint. Will throw an error if more than one token exists, and will throw an error if less than one token exists in this primary mint.

§

MintNewEditionFromMasterEditionViaToken(MintNewEditionFromMasterEditionViaTokenArgs)

Given a token account containing the master edition token to prove authority, and a brand new non-metadata-ed mint with one token make a new Metadata + Edition that is a child of the master edition denoted by this authority token.

§

ConvertMasterEditionV1ToV2

Converts the Master Edition V1 to a Master Edition V2, draining lamports from the two printing mints to the owner of the token account holding the master edition token. Permissionless. Can only be called if there are currenly no printing tokens or one time authorization tokens in circulation.

§

MintNewEditionFromMasterEditionViaVaultProxy(MintNewEditionFromMasterEditionViaTokenArgs)

Proxy Call to Mint Edition using a Store Token Account as a Vault Authority.

§

PuffMetadata

Puff a Metadata - make all of it’s variable length fields (name/uri/symbol) a fixed length using a null character so that it can be found using offset searches by the RPC to make client lookups cheaper.

§

UpdateMetadataAccountV2(UpdateMetadataAccountArgsV2)

Update a Metadata with is_mutable as a parameter

§

CreateMetadataAccountV2(CreateMetadataAccountArgsV2)

Create Metadata object.

§

CreateMasterEditionV3(CreateMasterEditionArgs)

Register a Metadata as a Master Edition V2, which means Edition V2s can be minted. Henceforth, no further tokens will be mintable from this primary mint. Will throw an error if more than one token exists, and will throw an error if less than one token exists in this primary mint.

§

VerifyCollection

If a MetadataAccount Has a Collection allow the UpdateAuthority of the Collection to Verify the NFT Belongs in the Collection.

§

Utilize(UtilizeArgs)

Utilize or Use an NFT , burns the NFT and returns the lamports to the update authority if the use method is burn and its out of uses. Use Authority can be the Holder of the NFT, or a Delegated Use Authority.

§

ApproveUseAuthority(ApproveUseAuthorityArgs)

Approve another account to call utilize on this NFT.

§

RevokeUseAuthority

Revoke account to call utilize on this NFT.

§

UnverifyCollection

If a MetadataAccount Has a Collection allow an Authority of the Collection to unverify an NFT in a Collection.

§

ApproveCollectionAuthority

Approve another account to verify NFTs belonging to a collection, verify_collection on the collection NFT.

§

RevokeCollectionAuthority

Revoke account to call verify_collection on this NFT.

§

SetAndVerifyCollection

Allows the same Update Authority (Or Delegated Authority) on an NFT and Collection to perform update_metadata_accounts_v2 with collection and verify_collection on the NFT/Collection in one instruction.

§

FreezeDelegatedAccount

Allow freezing of an NFT if this user is the delegate of the NFT.

§

ThawDelegatedAccount

Allow thawing of an NFT if this user is the delegate of the NFT.

§

RemoveCreatorVerification

Remove Creator Verificaton.

§

BurnNft

Completely burn a NFT, including closing the metadata account.

§

VerifySizedCollectionItem

Verify Collection V2, new in v1.3–supports Collection Details. If a MetadataAccount Has a Collection allow the UpdateAuthority of the Collection to Verify the NFT Belongs in the Collection.

§

UnverifySizedCollectionItem

Unverify Collection V2, new in v1.3–supports Collection Details. If a MetadataAccount Has a Collection allow an Authority of the Collection to unverify an NFT in a Collection.

§

SetAndVerifySizedCollectionItem

Allows the same Update Authority (Or Delegated Authority) on an NFT and Collection to perform update_metadata_accounts_v2 with collection and verify_collection on the NFT/Collection in one instruction.

§

CreateMetadataAccountV3(CreateMetadataAccountArgsV3)

Create Metadata object.

§

SetCollectionSize(SetCollectionSizeArgs)

Set size of an existing collection.

§

SetTokenStandard

Set the token standard of the asset.

§

BubblegumSetCollectionSize(SetCollectionSizeArgs)

Set size of an existing collection using CPI from the Bubblegum program. This is how collection size is incremented and decremented for compressed NFTs.

§

BurnEditionNft

Completely burn a print edition NFT.

§

CreateEscrowAccount

Create an escrow account to hold tokens.

§

CloseEscrowAccount

Close the escrow account.

§

TransferOutOfEscrow(TransferOutOfEscrowArgs)

Transfer the token out of Escrow.

§

Burn(BurnArgs)

Burns an asset, closing associated accounts.

The configurable authorization_rules only apply to ProgrammableNonFungible assets and it may require additional accounts to validate the rules.

§

Create(CreateArgs)

Creates the metadata and associated accounts for a new or existing mint account.

This instruction will initialize a mint account if it does not exist and the mint key is a signer on the transaction.

When creating a non-fungible assert, the master_edition needs to be specified.

§

Mint(MintArgs)

Mints tokens from a mint account into the specified token account.

This instruction will also initialized the associated token account if it does not exist – in this case the token_owner will be required. When minting *NonFungible assets, the authority must be the update authority; in all other cases, it must be the mint authority from the mint account.

§

Delegate(DelegateArgs)

Creates a delegate for an asset.

A delegate has a role associated, which determines what actions the delegate can perform. There are two types of delegate:

  1. Persistent delegate: only one delegate can exist at the same time for Transfer, Sale and Utility actions (pda of [“metadata”, program id, mint id, “persistent_delegate”, token owner id])
  2. Multiple delegates: for Authority, Collection, Update and Uses actions (pda of [“metadata”, program id, mint id, role, update authority id, delegate owner id])
§

Revoke(RevokeArgs)

Revokes a delegate.

A delegate can revoke itself by signing the transaction as the ‘approver’.

§

Lock(LockArgs)

Locks an asset. For non-programmable assets, this will also freeze the token account.

The configurable authorization_rules only apply to ProgrammableNonFungible assets and it may require additional accounts to validate the rules.

§

Unlock(UnlockArgs)

Unlocks an asset. For non-programmable assets, this will also thaw the token account.

The configurable authorization_rules only apply to ProgrammableNonFungible assets and it may require additional accounts to validate the rules.

§

Migrate(MigrateArgs)

Migrates an asset to a ProgrammableAsset type.

§

Transfer(TransferArgs)

Transfer an asset.

The configurable authorization_rules only apply to ProgrammableNonFungible assets and it may require additional accounts to validate the rules.

§

Update(UpdateArgs)

Updates the metadata of an asset.

The configurable authorization_rules only apply to ProgrammableNonFungible assets and it may require additional accounts to validate the rules.

§

Use(UseArgs)

Uses an asset.

Use Authority can be the owner of the asset or a delegated use authority.

The configurable authorization_rules only apply to ProgrammableNonFungible assets and it may require additional accounts to validate the rules.

§

Verify(VerifyArgs)

Verifies that an asset belongs in an specified collection.

The configurable authorization_rules only apply to ProgrammableNonFungible assets and it may require additional accounts to validate the rules.

Depending on the type of verification (e.g., creator or collection), additional accounts are required.

Trait Implementations§

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
Deserialize this instance from a slice of bytes.
Serialize this instance into a vector of bytes.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.