pub enum MetadataInstruction {
Show 36 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,
}
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.

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

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.

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.