#[repr(C)]pub enum MetadataInstruction {
Show 56 variants
CreateMetadataAccount,
UpdateMetadataAccount,
DeprecatedCreateMasterEdition,
DeprecatedMintNewEditionFromMasterEditionViaPrintingToken,
UpdatePrimarySaleHappenedViaToken,
DeprecatedSetReservationList,
DeprecatedCreateReservationList,
SignMetadata,
DeprecatedMintPrintingTokensViaToken,
DeprecatedMintPrintingTokens,
CreateMasterEdition,
MintNewEditionFromMasterEditionViaToken(MintNewEditionFromMasterEditionViaTokenArgs),
ConvertMasterEditionV1ToV2,
MintNewEditionFromMasterEditionViaVaultProxy(MintNewEditionFromMasterEditionViaTokenArgs),
PuffMetadata,
UpdateMetadataAccountV2(UpdateMetadataAccountArgsV2),
CreateMetadataAccountV2,
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,
Transfer(TransferArgs),
Update(UpdateArgs),
Use(UseArgs),
Verify(VerificationArgs),
Unverify(VerificationArgs),
Collect,
Print(PrintArgs),
}
Expand description
Instructions supported by the Metadata program.
Variants§
CreateMetadataAccount
Create Metadata object.
UpdateMetadataAccount
Update a Metadata
DeprecatedCreateMasterEdition
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
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
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
Using your update authority, mint printing tokens for your master edition.
CreateMasterEdition
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
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.
Supports burning the following asset types:
- ProgrammableNonFungible
- NonFungible
- NonFungigbleEdition
- Fungible
- FungibleAsset
Parent accounts only required for burning print editions are the accounts for the master edition associated with the print edition. The Token Record account is required for burning a ProgrammableNonFungible asset.
This handler closes the following accounts:
For ProgrammableNonFungible assets:
- Metadata, Edition, Token, TokenRecord
For NonFungible assets:
- Metadata, Edition, Token
For NonFungibleEdition assets:
- Metadata, Edition, Token, and the EditionMarker, if all prints for it are burned.
For Fungible assets:
- Only the token account, if all tokens are burned.
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:
- Persistent delegate: only one delegate can exist at the same time for
Transfer
,Sale
andUtility
actions (pda of [“metadata”, program id, mint id, “persistent_delegate”, token owner id]) - Multiple delegates: for
Authority
,Collection
,Update
andUses
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
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(VerificationArgs)
Verifies that an asset was created by a specific creator or belongs in an specified collection.
Depending on the type of verification (e.g., creator or collection), additional accounts are required.
Unverify(VerificationArgs)
Unverifies that an asset was created by a specific creator or belongs in an specified collection.
Depending on the type of verification (e.g., creator or collection), additional accounts are required.
Collect
Collect fees stored on PDA accounts.
Print(PrintArgs)
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.
Trait Implementations§
source§impl BorshDeserialize for MetadataInstructionwhere
MintNewEditionFromMasterEditionViaTokenArgs: BorshDeserialize,
UpdateMetadataAccountArgsV2: BorshDeserialize,
CreateMasterEditionArgs: BorshDeserialize,
UtilizeArgs: BorshDeserialize,
ApproveUseAuthorityArgs: BorshDeserialize,
CreateMetadataAccountArgsV3: BorshDeserialize,
SetCollectionSizeArgs: BorshDeserialize,
TransferOutOfEscrowArgs: BorshDeserialize,
BurnArgs: BorshDeserialize,
CreateArgs: BorshDeserialize,
MintArgs: BorshDeserialize,
DelegateArgs: BorshDeserialize,
RevokeArgs: BorshDeserialize,
LockArgs: BorshDeserialize,
UnlockArgs: BorshDeserialize,
TransferArgs: BorshDeserialize,
UpdateArgs: BorshDeserialize,
UseArgs: BorshDeserialize,
VerificationArgs: BorshDeserialize,
PrintArgs: BorshDeserialize,
impl BorshDeserialize for MetadataInstructionwhere MintNewEditionFromMasterEditionViaTokenArgs: BorshDeserialize, UpdateMetadataAccountArgsV2: BorshDeserialize, CreateMasterEditionArgs: BorshDeserialize, UtilizeArgs: BorshDeserialize, ApproveUseAuthorityArgs: BorshDeserialize, CreateMetadataAccountArgsV3: BorshDeserialize, SetCollectionSizeArgs: BorshDeserialize, TransferOutOfEscrowArgs: BorshDeserialize, BurnArgs: BorshDeserialize, CreateArgs: BorshDeserialize, MintArgs: BorshDeserialize, DelegateArgs: BorshDeserialize, RevokeArgs: BorshDeserialize, LockArgs: BorshDeserialize, UnlockArgs: BorshDeserialize, TransferArgs: BorshDeserialize, UpdateArgs: BorshDeserialize, UseArgs: BorshDeserialize, VerificationArgs: BorshDeserialize, PrintArgs: BorshDeserialize,
source§impl BorshSerialize for MetadataInstructionwhere
MintNewEditionFromMasterEditionViaTokenArgs: BorshSerialize,
UpdateMetadataAccountArgsV2: BorshSerialize,
CreateMasterEditionArgs: BorshSerialize,
UtilizeArgs: BorshSerialize,
ApproveUseAuthorityArgs: BorshSerialize,
CreateMetadataAccountArgsV3: BorshSerialize,
SetCollectionSizeArgs: BorshSerialize,
TransferOutOfEscrowArgs: BorshSerialize,
BurnArgs: BorshSerialize,
CreateArgs: BorshSerialize,
MintArgs: BorshSerialize,
DelegateArgs: BorshSerialize,
RevokeArgs: BorshSerialize,
LockArgs: BorshSerialize,
UnlockArgs: BorshSerialize,
TransferArgs: BorshSerialize,
UpdateArgs: BorshSerialize,
UseArgs: BorshSerialize,
VerificationArgs: BorshSerialize,
PrintArgs: BorshSerialize,
impl BorshSerialize for MetadataInstructionwhere MintNewEditionFromMasterEditionViaTokenArgs: BorshSerialize, UpdateMetadataAccountArgsV2: BorshSerialize, CreateMasterEditionArgs: BorshSerialize, UtilizeArgs: BorshSerialize, ApproveUseAuthorityArgs: BorshSerialize, CreateMetadataAccountArgsV3: BorshSerialize, SetCollectionSizeArgs: BorshSerialize, TransferOutOfEscrowArgs: BorshSerialize, BurnArgs: BorshSerialize, CreateArgs: BorshSerialize, MintArgs: BorshSerialize, DelegateArgs: BorshSerialize, RevokeArgs: BorshSerialize, LockArgs: BorshSerialize, UnlockArgs: BorshSerialize, TransferArgs: BorshSerialize, UpdateArgs: BorshSerialize, UseArgs: BorshSerialize, VerificationArgs: BorshSerialize, PrintArgs: BorshSerialize,
source§impl Clone for MetadataInstruction
impl Clone for MetadataInstruction
source§fn clone(&self) -> MetadataInstruction
fn clone(&self) -> MetadataInstruction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more