pub enum MetadataInstruction {
Show 29 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,
}
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.
Trait Implementations
sourceimpl BorshDeserialize for MetadataInstruction where
CreateMetadataAccountArgs: BorshDeserialize,
UpdateMetadataAccountArgs: BorshDeserialize,
CreateMasterEditionArgs: BorshDeserialize,
SetReservationListArgs: BorshDeserialize,
MintPrintingTokensViaTokenArgs: BorshDeserialize,
MintPrintingTokensViaTokenArgs: BorshDeserialize,
CreateMasterEditionArgs: BorshDeserialize,
MintNewEditionFromMasterEditionViaTokenArgs: BorshDeserialize,
MintNewEditionFromMasterEditionViaTokenArgs: BorshDeserialize,
UpdateMetadataAccountArgsV2: BorshDeserialize,
CreateMetadataAccountArgsV2: BorshDeserialize,
CreateMasterEditionArgs: BorshDeserialize,
UtilizeArgs: BorshDeserialize,
ApproveUseAuthorityArgs: BorshDeserialize,
impl BorshDeserialize for MetadataInstruction where
CreateMetadataAccountArgs: BorshDeserialize,
UpdateMetadataAccountArgs: BorshDeserialize,
CreateMasterEditionArgs: BorshDeserialize,
SetReservationListArgs: BorshDeserialize,
MintPrintingTokensViaTokenArgs: BorshDeserialize,
MintPrintingTokensViaTokenArgs: BorshDeserialize,
CreateMasterEditionArgs: BorshDeserialize,
MintNewEditionFromMasterEditionViaTokenArgs: BorshDeserialize,
MintNewEditionFromMasterEditionViaTokenArgs: BorshDeserialize,
UpdateMetadataAccountArgsV2: BorshDeserialize,
CreateMetadataAccountArgsV2: BorshDeserialize,
CreateMasterEditionArgs: BorshDeserialize,
UtilizeArgs: BorshDeserialize,
ApproveUseAuthorityArgs: BorshDeserialize,
sourceimpl BorshSerialize for MetadataInstruction where
CreateMetadataAccountArgs: BorshSerialize,
UpdateMetadataAccountArgs: BorshSerialize,
CreateMasterEditionArgs: BorshSerialize,
SetReservationListArgs: BorshSerialize,
MintPrintingTokensViaTokenArgs: BorshSerialize,
MintPrintingTokensViaTokenArgs: BorshSerialize,
CreateMasterEditionArgs: BorshSerialize,
MintNewEditionFromMasterEditionViaTokenArgs: BorshSerialize,
MintNewEditionFromMasterEditionViaTokenArgs: BorshSerialize,
UpdateMetadataAccountArgsV2: BorshSerialize,
CreateMetadataAccountArgsV2: BorshSerialize,
CreateMasterEditionArgs: BorshSerialize,
UtilizeArgs: BorshSerialize,
ApproveUseAuthorityArgs: BorshSerialize,
impl BorshSerialize for MetadataInstruction where
CreateMetadataAccountArgs: BorshSerialize,
UpdateMetadataAccountArgs: BorshSerialize,
CreateMasterEditionArgs: BorshSerialize,
SetReservationListArgs: BorshSerialize,
MintPrintingTokensViaTokenArgs: BorshSerialize,
MintPrintingTokensViaTokenArgs: BorshSerialize,
CreateMasterEditionArgs: BorshSerialize,
MintNewEditionFromMasterEditionViaTokenArgs: BorshSerialize,
MintNewEditionFromMasterEditionViaTokenArgs: BorshSerialize,
UpdateMetadataAccountArgsV2: BorshSerialize,
CreateMetadataAccountArgsV2: BorshSerialize,
CreateMasterEditionArgs: BorshSerialize,
UtilizeArgs: BorshSerialize,
ApproveUseAuthorityArgs: BorshSerialize,
sourceimpl Clone for MetadataInstruction
impl Clone for MetadataInstruction
sourcefn clone(&self) -> MetadataInstruction
fn clone(&self) -> MetadataInstruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for MetadataInstruction
impl Send for MetadataInstruction
impl Sync for MetadataInstruction
impl Unpin for MetadataInstruction
impl UnwindSafe for MetadataInstruction
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more