pub enum MetadataInstruction {
Show 26 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,
}
Expand description
Instructions supported by the Metadata program.
Variants
CreateMetadataAccount(CreateMetadataAccountArgs)
Create Metadata object.
0. [writable]
Metadata key (pda of [‘metadata’, program id, mint id])
[]
Mint of token asset[signer]
Mint authority[signer]
payer[]
update authority info[]
System program[]
Rent info
UpdateMetadataAccount(UpdateMetadataAccountArgs)
Update a Metadata
0. [writable]
Metadata account
[signer]
Update authority key
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.
0. [writable]
Unallocated edition V1 account with address as pda of [‘metadata’, program id, mint, ‘edition’]
[writable]
Metadata mint[writable]
Printing mint - A mint you control that can mint tokens that can be exchanged for limited editions of your master edition via the MintNewEditionFromMasterEditionViaToken endpoint[writable]
One time authorization printing mint - A mint you control that prints tokens that gives the bearer permission to mint any number of tokens from the printing mint one time via an endpoint with the token-metadata program for your metadata. Also burns the token.[signer]
Current Update authority key[signer]
Printing mint authority - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY.[signer]
Mint authority on the metadata’s mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY[]
Metadata account[signer]
payer[]
Token program[]
System program[]
Rent info[signer]
One time authorization printing mint authority - must be provided if using max supply. THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY.
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.
0. [writable]
New Metadata key (pda of [‘metadata’, program id, mint id])
[writable]
New Edition V1 (pda of [‘metadata’, program id, mint id, ‘edition’])[writable]
Master Record Edition V1 (pda of [‘metadata’, program id, master metadata mint id, ‘edition’])[writable]
Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY[signer]
Mint authority of new mint[writable]
Printing Mint of master record edition[writable]
Token account containing Printing mint token to be transferred[writable]
Edition pda to mark creation - will be checked for pre-existence. (pda of [‘metadata’, program id, master mint id, edition_number])[signer]
Burn authority for this token[signer]
payer[]
update authority info for new metadata account[]
Master record metadata account[]
Token program[]
System program[]
Rent info[optional/writable]
Reservation List - If present, and you are on this list, you can get an edition number given by your position on the list.
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.
[writable]
Metadata key (pda of [‘metadata’, program id, mint id])[signer]
Owner on the token account[]
Account containing tokens from the metadata’s mint
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.)
[writable]
Master Edition V1 key (pda of [‘metadata’, program id, mint id, ‘edition’])[writable]
PDA for ReservationList of [‘metadata’, program id, master edition key, ‘reservation’, resource-key][signer]
The resource you tied the reservation list too
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.
[writable]
PDA for ReservationList of [‘metadata’, program id, master edition key, ‘reservation’, resource-key][signer]
Payer[signer]
Update authority[]
Master Edition V1 key (pda of [‘metadata’, program id, mint id, ‘edition’])[]
A resource you wish to tie the reservation list to. This is so your later visitors who come to redeem can derive your reservation list PDA with something they can easily get at. You choose what this should be.[]
Metadata key (pda of [‘metadata’, program id, mint id])[]
System program[]
Rent info
SignMetadata
Sign a piece of metadata that has you as an unverified creator so that it is now verified.
0. [writable]
Metadata (pda of [‘metadata’, program id, mint id])
[signer]
Creator
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.
[writable]
Destination account[writable]
Token account containing one time authorization token[writable]
One time authorization mint[writable]
Printing mint[signer]
Burn authority[]
Metadata key (pda of [‘metadata’, program id, mint id])[]
Master Edition V1 key (pda of [‘metadata’, program id, mint id, ‘edition’])[]
Token program[]
Rent
DeprecatedMintPrintingTokens(MintPrintingTokensViaTokenArgs)
Using your update authority, mint printing tokens for your master edition.
[writable]
Destination account[writable]
Printing mint[signer]
Update authority[]
Metadata key (pda of [‘metadata’, program id, mint id])[]
Master Edition V1 key (pda of [‘metadata’, program id, mint id, ‘edition’])[]
Token program[]
Rent
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.
0. [writable]
Unallocated edition V2 account with address as pda of [‘metadata’, program id, mint, ‘edition’]
[writable]
Metadata mint[signer]
Update authority[signer]
Mint authority on the metadata’s mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY[signer]
payer[]
Metadata account[]
Token program[]
System program[]
Rent info
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.
0. [writable]
New Metadata key (pda of [‘metadata’, program id, mint id])
[writable]
New Edition (pda of [‘metadata’, program id, mint id, ‘edition’])[writable]
Master Record Edition V2 (pda of [‘metadata’, program id, master metadata mint id, ‘edition’])[writable]
Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY[writable]
Edition pda to mark creation - will be checked for pre-existence. (pda of [‘metadata’, program id, master metadata mint id, ‘edition’, edition_number]) where edition_number is NOT the edition number you pass in args but actually edition_number = floor(edition/EDITION_MARKER_BIT_SIZE).[signer]
Mint authority of new mint[signer]
payer[signer]
owner of token account containing master token (#8)[]
token account containing token from master metadata mint[]
Update authority info for new metadata[]
Master record metadata account[]
Token program[]
System program[]
Rent info
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.
[writable]
Master Record Edition V1 (pda of [‘metadata’, program id, master metadata mint id, ‘edition’])[writable]
One time authorization mint[writable]
Printing mint
MintNewEditionFromMasterEditionViaVaultProxy(MintNewEditionFromMasterEditionViaTokenArgs)
Proxy Call to Mint Edition using a Store Token Account as a Vault Authority.
[writable]
New Metadata key (pda of [‘metadata’, program id, mint id])[writable]
New Edition (pda of [‘metadata’, program id, mint id, ‘edition’])[writable]
Master Record Edition V2 (pda of [‘metadata’, program id, master metadata mint id, ‘edition’][writable]
Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY[writable]
Edition pda to mark creation - will be checked for pre-existence. (pda of [‘metadata’, program id, master metadata mint id, ‘edition’, edition_number]) where edition_number is NOT the edition number you pass in args but actually edition_number = floor(edition/EDITION_MARKER_BIT_SIZE).[signer]
Mint authority of new mint[signer]
payer[signer]
Vault authority[]
Safety deposit token store account[]
Safety deposit box[]
Vault[]
Update authority info for new metadata[]
Master record metadata account[]
Token program[]
Token vault program[]
System program[]
Rent info
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.
0. [writable]
Metadata account
UpdateMetadataAccountV2(UpdateMetadataAccountArgsV2)
Update a Metadata with is_mutable as a parameter
0. [writable]
Metadata account
[signer]
Update authority key
CreateMetadataAccountV2(CreateMetadataAccountArgsV2)
Create Metadata object.
0. [writable]
Metadata key (pda of [‘metadata’, program id, mint id])
[]
Mint of token asset[signer]
Mint authority[signer]
payer[]
update authority info[]
System program[]
Rent info
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.
0. [writable]
Unallocated edition V2 account with address as pda of [‘metadata’, program id, mint, ‘edition’]
[writable]
Metadata mint[signer]
Update authority[signer]
Mint authority on the metadata’s mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY[signer]
payer- [writable] Metadata account
[]
Token program[]
System program[]
Rent info
VerifyCollection
See verify_collection for Doc
Utilize(UtilizeArgs)
See utilize for Doc
ApproveUseAuthority(ApproveUseAuthorityArgs)
See approve_use_authority for Doc
RevokeUseAuthority
See revoke_use_authority for Doc
UnverifyCollection
See unverify_collection for Doc
ApproveCollectionAuthority
See approve_collection_authority for Doc
RevokeCollectionAuthority
See revoke_collection_authority for Doc
SetAndVerifyCollection
See set_and_verify_collection for Doc
Trait Implementations
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,
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,
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,
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,
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
pub default fn example() -> T
Mutably borrows from an owned value. Read more