mpl_token_metadata/instruction/
mod.rs

1mod bubblegum;
2mod burn;
3mod collection;
4mod delegate;
5mod edition;
6pub(crate) mod escrow;
7mod freeze;
8mod metadata;
9mod state;
10mod uses;
11mod verification;
12
13use borsh::{BorshDeserialize, BorshSerialize};
14pub use bubblegum::*;
15pub use burn::*;
16pub use collection::*;
17pub use delegate::*;
18pub use edition::*;
19pub use escrow::*;
20pub use freeze::*;
21pub use metadata::*;
22use mpl_token_metadata_context_derive::AccountContext;
23
24#[cfg(feature = "serde-feature")]
25use serde::{Deserialize, Serialize};
26use shank::ShankInstruction;
27use solana_program::account_info::AccountInfo;
28pub use state::*;
29pub use uses::*;
30pub use verification::*;
31
32// Deprecated Instructions
33pub const CREATE_METADATA_ACCOUNT: u8 = 0;
34pub const UPDATE_METADATA_ACCOUNT: u8 = 1;
35pub const DEPRECATED_CREATE_MASTER_EDITION: u8 = 2;
36pub const DEPRECATED_MINT_NEW_EDITION_FROM_MASTER_EDITION_VIA_PRINTING_TOKEN: u8 = 3;
37pub const DEPRECATED_SET_RESERVATION_LIST: u8 = 5;
38pub const DEPRECATED_CREATE_RESERVATION_LIST: u8 = 6;
39pub const DEPRECATED_MINT_PRINTING_TOKENS_VIA_TOKEN: u8 = 8;
40pub const DEPRECATED_MINT_PRINTING_TOKENS: u8 = 9;
41pub const CREATE_METADATA_ACCOUNT_V2: u8 = 16;
42
43#[repr(C)]
44#[cfg_attr(feature = "serde-feature", derive(Serialize, Deserialize))]
45/// Instructions supported by the Metadata program.
46#[derive(BorshSerialize, BorshDeserialize, Clone, ShankInstruction, AccountContext)]
47#[rustfmt::skip]
48pub enum MetadataInstruction {
49    /// Create Metadata object.
50    #[account(0, writable, name="metadata", desc="Metadata key (pda of ['metadata', program id, mint id])")]
51    #[account(1, name="mint", desc="Mint of token asset")]
52    #[account(2, signer, name="mint_authority", desc="Mint authority")]
53    #[account(3, signer, writable, name="payer", desc="payer")]
54    #[account(4, name="update_authority", desc="update authority info")]
55    #[account(5, name="system_program", desc="System program")]
56    #[account(6, name="rent", desc="Rent info")]
57    CreateMetadataAccount,
58
59    /// Update a Metadata
60    #[account(0, writable, name="metadata", desc="Metadata account")]
61    #[account(1, signer, name="update_authority", desc="Update authority key")]
62    UpdateMetadataAccount,
63
64    /// Register a Metadata as a Master Edition V1, which means Editions can be minted.
65    /// Henceforth, no further tokens will be mintable from this primary mint. Will throw an error if more than one
66    /// token exists, and will throw an error if less than one token exists in this primary mint.
67    #[account(0, writable, name="edition", desc="Unallocated edition V1 account with address as pda of ['metadata', program id, mint, 'edition']")]
68    #[account(1, writable, name="mint", desc="Metadata mint")]
69    #[account(2, writable, name="printing_mint", desc="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")]
70    #[account(3, writable, name="one_time_printing_authorization_mint", desc="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.")]
71    #[account(4, signer, name="update_authority", desc="Current Update authority key")]
72    #[account(5, signer, name="printing_mint_authority", desc="Printing mint authority - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY.")]
73    #[account(6, signer, name="mint_authority", desc="Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY")]
74    #[account(7, name="metadata", desc="Metadata account")]
75    #[account(8, signer, name="payer", desc="payer")]
76    #[account(9, name="token_program", desc="Token program")]
77    #[account(10, name="system_program", desc="System program")]
78    #[account(11, name="rent", desc="Rent info")]
79    #[account(12, signer, name="one_time_printing_authorization_mint_authority", desc="One time authorization printing mint authority - must be provided if using max supply. THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY.")]
80    DeprecatedCreateMasterEdition,
81
82    /// Given an authority token minted by the Printing mint of a master edition, and a brand new non-metadata-ed mint with one token
83    /// make a new Metadata + Edition that is a child of the master edition denoted by this authority token.
84    #[account(0, writable, name="metadata", desc="New Metadata key (pda of ['metadata', program id, mint id])")]
85    #[account(1, writable, name="edition", desc="New Edition V1 (pda of ['metadata', program id, mint id, 'edition'])")]
86    #[account(2, writable, name="master_edition", desc="Master Record Edition V1 (pda of ['metadata', program id, master metadata mint id, 'edition'])")]
87    #[account(3, writable, name="mint", desc="Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY")]
88    #[account(4, signer, name="mint_authority", desc="Mint authority of new mint")]
89    #[account(5, writable, name="printing_mint", desc="Printing Mint of master record edition")]
90    #[account(6, writable, name="master_token_account", desc="Token account containing Printing mint token to be transferred")]
91    #[account(7, writable, name="edition_marker", desc="Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master mint id, edition_number])")]
92    #[account(8, signer, name="burn_authority", desc="Burn authority for this token")]
93    #[account(9, signer, name="payer", desc="payer")]
94    #[account(10, name="master_update_authority", desc="update authority info for new metadata account")]
95    #[account(11, name="master_metadata", desc="Master record metadata account")]
96    #[account(12, name="token_program", desc="Token program")]
97    #[account(13, name="system_program", desc="System program")]
98    #[account(14, name="rent", desc="Rent info")]
99    #[account(15, optional, writable, name="reservation_list", desc="Reservation List - If present, and you are on this list, you can get an edition number given by your position on the list.")]
100    DeprecatedMintNewEditionFromMasterEditionViaPrintingToken,
101
102    /// Allows updating the primary sale boolean on Metadata solely through owning an account
103    /// containing a token from the metadata's mint and being a signer on this transaction.
104    /// A sort of limited authority for limited update capability that is required for things like
105    /// Metaplex to work without needing full authority passing.
106    #[account(0, writable, name="metadata", desc="Metadata key (pda of ['metadata', program id, mint id])")]
107    #[account(1, signer, name="owner", desc="Owner on the token account")]
108    #[account(2, name="token", desc="Account containing tokens from the metadata's mint")]
109    UpdatePrimarySaleHappenedViaToken,
110
111    /// Reserve up to 200 editions in sequence for up to 200 addresses in an existing reservation PDA, which can then be used later by
112    /// redeemers who have printing tokens as a reservation to get a specific edition number
113    /// as opposed to whatever one is currently listed on the master edition. Used by Auction Manager
114    /// to guarantee printing order on bid redemption. AM will call whenever the first person redeems a
115    /// printing bid to reserve the whole block
116    /// of winners in order and then each winner when they get their token submits their mint and account
117    /// with the pda that was created by that first bidder - the token metadata can then cross reference
118    /// these people with the list and see that bidder A gets edition #2, so on and so forth.
119    ///
120    /// NOTE: If you have more than 20 addresses in a reservation list, this may be called multiple times to build up the list,
121    /// otherwise, it simply wont fit in one transaction. Only provide a total_reservation argument on the first call, which will
122    /// allocate the edition space, and in follow up calls this will specifically be unnecessary (and indeed will error.)
123    #[account(0, writable, name="master_edition", desc="Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])")]
124    #[account(1, writable, name="reservation_list", desc="PDA for ReservationList of ['metadata', program id, master edition key, 'reservation', resource-key]")]
125    #[account(2, signer, name="resource", desc="The resource you tied the reservation list too")]
126    DeprecatedSetReservationList,
127
128    /// Create an empty reservation list for a resource who can come back later as a signer and fill the reservation list
129    /// with reservations to ensure that people who come to get editions get the number they expect. See SetReservationList for more.
130    #[account(0, writable, name="reservation_list", desc="PDA for ReservationList of ['metadata', program id, master edition key, 'reservation', resource-key]")]
131    #[account(1, signer, name="payer", desc="Payer")]
132    #[account(2, signer, name="update_authority", desc="Update authority")]
133    #[account(3, name="master_edition", desc=" Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])")]
134    #[account(4, name="resource", desc="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.")]
135    #[account(5, name="metadata", desc="Metadata key (pda of ['metadata', program id, mint id])")]
136    #[account(6, name="system_program", desc="System program")]
137    #[account(7, name="rent", desc="Rent info")]
138    DeprecatedCreateReservationList,
139
140    /// Sign a piece of metadata that has you as an unverified creator so that it is now verified.
141    #[account(0, writable, name="metadata", desc="Metadata (pda of ['metadata', program id, mint id])")]
142    #[account(1, signer, name="creator", desc="Creator")]
143    SignMetadata,
144
145    /// Using a one time authorization token from a master edition v1, print any number of printing tokens from the printing_mint
146    /// one time, burning the one time authorization token.
147    #[account(0, writable, name="destination", desc="Destination account")]
148    #[account(1, writable, name="token", desc="Token account containing one time authorization token")]
149    #[account(2, writable, name="one_time_printing_authorization_mint", desc="One time authorization mint")]
150    #[account(3, writable, name="printing_mint", desc="Printing mint")]
151    #[account(4, signer, name="burn_authority", desc="Burn authority")]
152    #[account(5, name="metadata", desc="Metadata key (pda of ['metadata', program id, mint id])")]
153    #[account(6, name="master_edition", desc="Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])")]
154    #[account(7, name="token_program", desc="Token program")]
155    #[account(8, name="rent", desc="Rent")]
156    DeprecatedMintPrintingTokensViaToken,
157
158    /// Using your update authority, mint printing tokens for your master edition.
159    #[account(0, writable, name="destination", desc="Destination account")]
160    #[account(1, writable, name="printing_mint", desc="Printing mint")]
161    #[account(2, signer, name="update_authority", desc="Update authority")]
162    #[account(3, name="metadata", desc="Metadata key (pda of ['metadata', program id, mint id])")]
163    #[account(4, name="master_edition", desc="Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])")]
164    #[account(5, name="token_program", desc="Token program")]
165    #[account(6, name="rent", desc="Rent")]
166    DeprecatedMintPrintingTokens,
167
168    /// Register a Metadata as a Master Edition V2, which means Edition V2s can be minted.
169    /// Henceforth, no further tokens will be mintable from this primary mint. Will throw an error if more than one
170    /// token exists, and will throw an error if less than one token exists in this primary mint.
171    #[account(0, writable, name="edition", desc="Unallocated edition V2 account with address as pda of ['metadata', program id, mint, 'edition']")]
172    #[account(1, writable, name="mint", desc="Metadata mint")]
173    #[account(2, signer, name="update_authority", desc="Update authority")]
174    #[account(3, signer, name="mint_authority", desc="Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY")]
175    #[account(4, signer, writable, name="payer", desc="payer")]
176    #[account(5, name="metadata", desc="Metadata account")]
177    #[account(6, name="token_program", desc="Token program")]
178    #[account(7, name="system_program", desc="System program")]
179    #[account(8, name="rent", desc="Rent info")]
180    CreateMasterEdition,
181
182    /// Given a token account containing the master edition token to prove authority, and a brand new non-metadata-ed mint with one token
183    /// make a new Metadata + Edition that is a child of the master edition denoted by this authority token.
184    #[account(0, writable, name="new_metadata", desc="New Metadata key (pda of ['metadata', program id, mint id])")]
185    #[account(1, writable, name="new_edition", desc="New Edition (pda of ['metadata', program id, mint id, 'edition'])")]
186    #[account(2, writable, name="master_edition", desc="Master Record Edition V2 (pda of ['metadata', program id, master metadata mint id, 'edition'])")]
187    #[account(3, writable, name="new_mint", desc="Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY")]
188    #[account(4, writable, name="edition_mark_pda", desc="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).")]
189    #[account(5, signer, name="new_mint_authority", desc="Mint authority of new mint")]
190    #[account(6, signer, writable, name="payer", desc="payer")]
191    #[account(7, signer, name="token_account_owner", desc="owner of token account containing master token (#8)")]
192    #[account(8, name="token_account", desc="token account containing token from master metadata mint")]
193    #[account(9, name="new_metadata_update_authority", desc="Update authority info for new metadata")]
194    #[account(10, name="metadata", desc="Master record metadata account")]
195    #[account(11, name="token_program", desc="Token program")]
196    #[account(12, name="system_program", desc="System program")]
197    #[account(13, optional, name="rent", desc="Rent info")]
198    MintNewEditionFromMasterEditionViaToken(MintNewEditionFromMasterEditionViaTokenArgs),
199
200    /// Converts the Master Edition V1 to a Master Edition V2, draining lamports from the two printing mints
201    /// to the owner of the token account holding the master edition token. Permissionless.
202    /// Can only be called if there are currenly no printing tokens or one time authorization tokens in circulation.
203    #[account(0, writable, name="master_edition", desc="Master Record Edition V1 (pda of ['metadata', program id, master metadata mint id, 'edition'])")]
204    #[account(1, writable, name="one_time_auth", desc="One time authorization mint")]
205    #[account(2, writable, name="printing_mint", desc="Printing mint")]
206    ConvertMasterEditionV1ToV2,
207
208    /// Proxy Call to Mint Edition using a Store Token Account as a Vault Authority.
209    #[account(0, writable, name="new_metadata", desc="New Metadata key (pda of ['metadata', program id, mint id])")]
210    #[account(1, writable, name="new_edition", desc="New Edition (pda of ['metadata', program id, mint id, 'edition'])")]
211    #[account(2, writable, name="master_edition", desc="Master Record Edition V2 (pda of ['metadata', program id, master metadata mint id, 'edition']")]
212    #[account(3, writable, name="new_mint", desc="Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY")]
213    #[account(4, writable, name="edition_mark_pda", desc="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).")]
214    #[account(5, signer, name="new_mint_authority", desc="Mint authority of new mint")]
215    #[account(6, signer, writable, name="payer", desc="payer")]
216    #[account(7, signer, name="vault_authority", desc="Vault authority")]
217    #[account(8, name="safety_deposit_store", desc="Safety deposit token store account")]
218    #[account(9, name="safety_deposit_box", desc="Safety deposit box")]
219    #[account(10, name="vault", desc="Vault")]
220    #[account(11, name="new_metadata_update_authority", desc="Update authority info for new metadata")]
221    #[account(12, name="metadata", desc="Master record metadata account")]
222    #[account(13, name="token_program", desc="Token program")]
223    #[account(14, name="token_vault_program", desc="Token vault program")]
224    #[account(15, name="system_program", desc="System program")]
225    #[account(16, optional, name="rent", desc="Rent info")]
226    MintNewEditionFromMasterEditionViaVaultProxy(MintNewEditionFromMasterEditionViaTokenArgs),
227
228    /// Puff a Metadata - make all of it's variable length fields (name/uri/symbol) a fixed length using a null character
229    /// so that it can be found using offset searches by the RPC to make client lookups cheaper.
230    #[account(0, writable, name="metadata", desc="Metadata account")]
231    PuffMetadata,
232
233    /// Update a Metadata with is_mutable as a parameter
234    #[account(0, writable, name="metadata", desc="Metadata account")]
235    #[account(1, signer, name="update_authority", desc="Update authority key")]
236    UpdateMetadataAccountV2(UpdateMetadataAccountArgsV2),
237
238    /// Create Metadata object.
239    #[account(0, writable, name="metadata", desc="Metadata key (pda of ['metadata', program id, mint id])")]
240    #[account(1, name="mint", desc="Mint of token asset")]
241    #[account(2, signer, name="mint_authority", desc="Mint authority")]
242    #[account(3, signer, writable, name="payer", desc="payer")]
243    #[account(4, name="update_authority", desc="update authority info")]
244    #[account(5, name="system_program", desc="System program")]
245    #[account(6, optional, name="rent", desc="Rent info")]
246    CreateMetadataAccountV2,
247
248    /// Register a Metadata as a Master Edition V2, which means Edition V2s can be minted.
249    /// Henceforth, no further tokens will be mintable from this primary mint. Will throw an error if more than one
250    /// token exists, and will throw an error if less than one token exists in this primary mint.
251    #[account(0, writable, name="edition", desc="Unallocated edition V2 account with address as pda of ['metadata', program id, mint, 'edition']")]
252    #[account(1, writable, name="mint", desc="Metadata mint")]
253    #[account(2, signer, name="update_authority", desc="Update authority")]
254    #[account(3, signer, name="mint_authority", desc="Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY")]
255    #[account(4, signer, writable, name="payer", desc="payer")]
256    #[account(5, writable, name="metadata", desc="Metadata account")]
257    #[account(6, name="token_program", desc="Token program")]
258    #[account(7, name="system_program", desc="System program")]
259    #[account(8, optional, name="rent", desc="Rent info")]
260    CreateMasterEditionV3(CreateMasterEditionArgs),
261
262    /// If a MetadataAccount Has a Collection allow the UpdateAuthority of the Collection to Verify the NFT Belongs in the Collection.
263    #[account(0, writable, name="metadata", desc="Metadata account")]
264    #[account(1, signer, writable, name="collection_authority", desc="Collection Update authority")]
265    #[account(2, signer, writable, name="payer", desc="payer")]
266    #[account(3, name="collection_mint", desc="Mint of the Collection")]
267    #[account(4, name="collection", desc="Metadata Account of the Collection")]
268    #[account(5, name="collection_master_edition_account", desc="MasterEdition2 Account of the Collection Token")]
269    VerifyCollection,
270
271    /// 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.
272    /// Use Authority can be the Holder of the NFT, or a Delegated Use Authority.
273    #[account(0, writable, name="metadata", desc="Metadata account")]
274    #[account(1, writable, name="token_account", desc="Token Account Of NFT")]
275    #[account(2, writable, name="mint", desc="Mint of the Metadata")]
276    #[account(3, signer, writable, name="use_authority", desc="A Use Authority / Can be the current Owner of the NFT")]
277    #[account(4, name="owner", desc="Owner")]
278    #[account(5, name="token_program", desc="Token program")]
279    #[account(6, name="ata_program", desc="Associated Token program")]
280    #[account(7, name="system_program", desc="System program")]
281    // Rent is technically not needed but there isn't a way to "ignore" an account without 
282    // preventing latter accounts from being passed in.
283    #[account(8, name="rent", desc="Rent info")]
284    #[account(9, optional, writable, name="use_authority_record", desc="Use Authority Record PDA If present the program Assumes a delegated use authority")]
285    #[account(10, optional, name="burner", desc="Program As Signer (Burner)")]
286    Utilize(UtilizeArgs),
287
288    /// Approve another account to call [utilize] on this NFT.
289    #[account(0, writable, name="use_authority_record", desc="Use Authority Record PDA")]
290    #[account(1, signer, writable, name="owner", desc="Owner")]
291    #[account(2, signer, writable, name="payer", desc="Payer")]
292    #[account(3, name="user", desc="A Use Authority")]
293    #[account(4, writable, name="owner_token_account", desc="Owned Token Account Of Mint")]
294    #[account(5, name="metadata", desc="Metadata account")]
295    #[account(6, name="mint", desc="Mint of Metadata")]
296    #[account(7, name="burner", desc="Program As Signer (Burner)")]
297    #[account(8, name="token_program", desc="Token program")]
298    #[account(9, name="system_program", desc="System program")]
299    #[account(10, optional, name="rent", desc="Rent info")]
300    ApproveUseAuthority(ApproveUseAuthorityArgs),
301
302    /// Revoke account to call [utilize] on this NFT.
303    #[account(0, writable, name="use_authority_record", desc="Use Authority Record PDA")]
304    #[account(1, signer, writable, name="owner", desc="Owner")]
305    #[account(2, name="user", desc="A Use Authority")]
306    #[account(3, writable, name="owner_token_account", desc="Owned Token Account Of Mint")]
307    #[account(4, name="mint", desc="Mint of Metadata")]
308    #[account(5, name="metadata", desc="Metadata account")]
309    #[account(6, name="token_program", desc="Token program")]
310    #[account(7, name="system_program", desc="System program")]
311    #[account(8, optional, name="rent", desc="Rent info")]
312    RevokeUseAuthority,
313
314    /// If a MetadataAccount Has a Collection allow an Authority of the Collection to unverify an NFT in a Collection.
315    #[account(0, writable, name="metadata", desc="Metadata account")]
316    #[account(1, signer, writable, name="collection_authority", desc="Collection Authority")]
317    #[account(2, name="collection_mint", desc="Mint of the Collection")]
318    #[account(3, name="collection", desc="Metadata Account of the Collection")]
319    #[account(4, name="collection_master_edition_account", desc="MasterEdition2 Account of the Collection Token")]
320    #[account(5, optional, name="collection_authority_record", desc="Collection Authority Record PDA")]
321    UnverifyCollection,
322
323    /// Approve another account to verify NFTs belonging to a collection, [verify_collection] on the collection NFT.
324    #[account(0, writable, name="collection_authority_record", desc="Collection Authority Record PDA")]
325    #[account(1, name="new_collection_authority", desc="A Collection Authority")]
326    #[account(2, signer, writable, name="update_authority", desc="Update Authority of Collection NFT")]
327    #[account(3, signer, writable, name="payer", desc="Payer")]
328    #[account(4, name="metadata", desc="Collection Metadata account")]
329    #[account(5, name="mint", desc="Mint of Collection Metadata")]
330    #[account(6, name="system_program", desc="System program")]
331    #[account(7, optional, name="rent", desc="Rent info")]
332    ApproveCollectionAuthority,
333
334    /// Revoke account to call [verify_collection] on this NFT.
335    #[account(0, writable, name="collection_authority_record", desc="Collection Authority Record PDA")]
336    #[account(1, writable, name="delegate_authority", desc="Delegated Collection Authority")]
337    #[account(2, signer, writable, name="revoke_authority", desc="Update Authority, or Delegated Authority, of Collection NFT")]
338    #[account(3, name="metadata", desc="Metadata account")]
339    #[account(4, name="mint", desc="Mint of Metadata")]
340    RevokeCollectionAuthority,
341
342    /// Allows the same Update Authority (Or Delegated Authority) on an NFT and Collection to perform [update_metadata_accounts_v2] 
343    /// with collection and [verify_collection] on the NFT/Collection in one instruction.
344    #[account(0, writable, name="metadata", desc="Metadata account")]
345    #[account(1, signer, writable, name="collection_authority", desc="Collection Update authority")]
346    #[account(2, signer, writable, name="payer", desc="Payer")]
347    #[account(3, name="update_authority", desc="Update Authority of Collection NFT and NFT")]
348    #[account(4, name="collection_mint", desc="Mint of the Collection")]
349    #[account(5, name="collection", desc="Metadata Account of the Collection")]
350    #[account(6, name="collection_master_edition_account", desc="MasterEdition2 Account of the Collection Token")]
351    #[account(7, optional, name="collection_authority_record", desc="Collection Authority Record PDA")]
352    SetAndVerifyCollection,
353
354    /// Allow freezing of an NFT if this user is the delegate of the NFT.
355    #[account(0, signer, writable, name="delegate", desc="Delegate")]
356    #[account(1, writable, name="token_account", desc="Token account to freeze")]
357    #[account(2, name="edition", desc="Edition")]
358    #[account(3, name="mint", desc="Token mint")]
359    #[account(4, name="token_program", desc="Token Program")]
360    FreezeDelegatedAccount,
361
362    /// Allow thawing of an NFT if this user is the delegate of the NFT.
363    #[account(0, signer, writable, name="delegate", desc="Delegate")]
364    #[account(1, writable, name="token_account", desc="Token account to thaw")]
365    #[account(2, name="edition", desc="Edition")]
366    #[account(3, name="mint", desc="Token mint")]
367    #[account(4, name="token_program", desc="Token Program")]
368    ThawDelegatedAccount,
369
370    /// Remove Creator Verificaton.
371    #[account(0, writable, name="metadata", desc="Metadata (pda of ['metadata', program id, mint id])")]
372    #[account(1, signer, name="creator", desc="Creator")]
373    RemoveCreatorVerification,
374
375    /// Completely burn a NFT, including closing the metadata account.
376    #[account(0, writable, name="metadata", desc="Metadata (pda of ['metadata', program id, mint id])")]
377    #[account(1, signer, writable, name="owner", desc="NFT owner")]
378    #[account(2, writable, name="mint", desc="Mint of the NFT")]
379    #[account(3, writable, name="token_account", desc="Token account to close")]
380    #[account(4, writable, name="master_edition_account", desc="MasterEdition2 of the NFT")]
381    #[account(5, name="spl_token_program", desc="SPL Token Program")]
382    #[account(6, optional, writable, name="collection_metadata", desc="Metadata of the Collection")]
383    BurnNft,
384
385    /// Verify Collection V2, new in v1.3--supports Collection Details.
386    /// If a MetadataAccount Has a Collection allow the UpdateAuthority of the Collection to Verify the NFT Belongs in the Collection.
387    #[account(0, writable, name="metadata", desc="Metadata account")]
388    #[account(1, signer, name="collection_authority", desc="Collection Update authority")]
389    #[account(2, signer, writable, name="payer", desc="payer")]
390    #[account(3, name="collection_mint", desc="Mint of the Collection")]
391    #[account(4, writable, name="collection", desc="Metadata Account of the Collection")]
392    #[account(5, name="collection_master_edition_account", desc="MasterEdition2 Account of the Collection Token")]
393    #[account(6, optional, name="collection_authority_record", desc="Collection Authority Record PDA")]
394    VerifySizedCollectionItem,
395
396    /// Unverify Collection V2, new in v1.3--supports Collection Details.
397    /// If a MetadataAccount Has a Collection allow an Authority of the Collection to unverify an NFT in a Collection.
398    #[account(0, writable, name="metadata", desc="Metadata account")]
399    #[account(1, signer, name="collection_authority", desc="Collection Authority")]
400    #[account(2, signer, writable, name="payer", desc="payer")]
401    #[account(3, name="collection_mint", desc="Mint of the Collection")]
402    #[account(4, writable, name="collection", desc="Metadata Account of the Collection")]
403    #[account(5, name="collection_master_edition_account", desc="MasterEdition2 Account of the Collection Token")]
404    #[account(6, optional, name="collection_authority_record", desc="Collection Authority Record PDA")]
405    UnverifySizedCollectionItem,
406
407    // Set And Verify V2, new in v1.3--supports Collection Details.
408    /// Allows the same Update Authority (Or Delegated Authority) on an NFT and Collection to perform [update_metadata_accounts_v2] 
409    /// with collection and [verify_collection] on the NFT/Collection in one instruction.
410    #[account(0, writable, name="metadata", desc="Metadata account")]
411    #[account(1, signer, name="collection_authority", desc="Collection Update authority")]
412    #[account(2, signer, writable, name="payer", desc="payer")]
413    #[account(3, name="update_authority", desc="Update Authority of Collection NFT and NFT")]
414    #[account(4, name="collection_mint", desc="Mint of the Collection")]
415    #[account(5, writable, name="collection", desc="Metadata Account of the Collection")]
416    #[account(6, writable, name="collection_master_edition_account", desc="MasterEdition2 Account of the Collection Token")]
417    #[account(7, optional, name="collection_authority_record", desc="Collection Authority Record PDA")]
418    SetAndVerifySizedCollectionItem,
419
420    /// Create Metadata object.
421    #[account(0, writable, name="metadata", desc="Metadata key (pda of ['metadata', program id, mint id])")]
422    #[account(1, name="mint", desc="Mint of token asset")]
423    #[account(2, signer, name="mint_authority", desc="Mint authority")]
424    #[account(3, signer, writable, name="payer", desc="payer")]
425    #[account(4, name="update_authority", desc="update authority info")]
426    #[account(5, name="system_program", desc="System program")]
427    #[account(6, optional, name="rent", desc="Rent info")]
428    CreateMetadataAccountV3(CreateMetadataAccountArgsV3),
429
430    /// Set size of an existing collection.
431    #[account(0, writable, name="collection_metadata", desc="Collection Metadata account")]
432    #[account(1, signer, writable, name="collection_authority", desc="Collection Update authority")]
433    #[account(2, name="collection_mint", desc="Mint of the Collection")]
434    #[account(3, optional, name="collection_authority_record", desc="Collection Authority Record PDA")]
435    SetCollectionSize(SetCollectionSizeArgs),
436
437    /// Set the token standard of the asset.
438    #[account(0, writable, name="metadata", desc="Metadata account")]
439    #[account(1, signer, writable, name="update_authority", desc="Metadata update authority")]
440    #[account(2, name="mint", desc="Mint account")]
441    #[account(3, optional, name="edition", desc="Edition account")]
442    SetTokenStandard,
443
444    /// Set size of an existing collection using CPI from the Bubblegum program.  This is how
445    /// collection size is incremented and decremented for compressed NFTs.
446    #[account(0, writable, name="collection_metadata", desc="Collection Metadata account")]
447    #[account(1, signer, writable, name="collection_authority", desc="Collection Update authority")]
448    #[account(2, name="collection_mint", desc="Mint of the Collection")]
449    #[account(3, signer, name="bubblegum_signer", desc="Signing PDA of Bubblegum program")]
450    #[account(4, optional, name="collection_authority_record", desc="Collection Authority Record PDA")]
451    BubblegumSetCollectionSize(SetCollectionSizeArgs),
452
453    /// Completely burn a print edition NFT.
454    #[account(0, writable, name="metadata", desc="Metadata (pda of ['metadata', program id, mint id])")]
455    #[account(1, signer, writable, name="owner", desc="NFT owner")]
456    #[account(2, writable, name="print_edition_mint", desc="Mint of the print edition NFT")]
457    #[account(3, name="master_edition_mint", desc="Mint of the original/master NFT")]
458    #[account(4, writable, name="print_edition_token_account", desc="Token account the print edition NFT is in")]
459    #[account(5, name="master_edition_token_account", desc="Token account the Master Edition NFT is in")]
460    #[account(6, writable, name="master_edition_account", desc="MasterEdition2 of the original NFT")]
461    #[account(7, writable, name="print_edition_account", desc="Print Edition account of the NFT")]
462    #[account(8, writable, name="edition_marker_account", desc="Edition Marker PDA of the NFT")]
463    #[account(9, name="spl_token_program", desc="SPL Token Program")]
464    BurnEditionNft,
465
466    /// Create an escrow account to hold tokens.
467    #[account(0, writable, name="escrow", desc="Escrow account")]
468    #[account(1, writable, name="metadata", desc="Metadata account")]
469    #[account(2, name="mint", desc="Mint account")]
470    #[account(3, name="token_account", desc="Token account of the token")]
471    #[account(4, name="edition", desc="Edition account")]
472    #[account(5, writable, signer, name="payer", desc="Wallet paying for the transaction and new account")]
473    #[account(6, name="system_program", desc="System program")]
474    #[account(7, name="sysvar_instructions", desc="Instructions sysvar account")]
475    #[account(8, optional, signer, name="authority", desc="Authority/creator of the escrow account")]
476    CreateEscrowAccount,
477
478    /// Close the escrow account.
479    #[account(0, writable, name="escrow", desc="Escrow account")]
480    #[account(1, writable, name="metadata", desc="Metadata account")]
481    #[account(2, name="mint", desc="Mint account")]
482    #[account(3, name="token_account", desc="Token account")]
483    #[account(4, name="edition", desc="Edition account")]
484    #[account(5, writable, signer, name="payer", desc="Wallet paying for the transaction and new account")]
485    #[account(6, name="system_program", desc="System program")]
486    #[account(7, name="sysvar_instructions", desc="Instructions sysvar account")]
487    CloseEscrowAccount,
488
489    /// Transfer the token out of Escrow.
490    #[account(0, name="escrow", desc="Escrow account")]
491    #[account(1, writable, name="metadata", desc="Metadata account")]
492    #[account(2, writable, signer, name="payer", desc="Wallet paying for the transaction and new account")]
493    #[account(3, name="attribute_mint", desc="Mint account for the new attribute")]
494    #[account(4, writable, name="attribute_src", desc="Token account source for the new attribute")]
495    #[account(5, writable, name="attribute_dst", desc="Token account, owned by TM, destination for the new attribute")]
496    #[account(6, name="escrow_mint", desc="Mint account that the escrow is attached")]
497    #[account(7, name="escrow_account", desc="Token account that holds the token the escrow is attached to")]
498    #[account(8, name="system_program", desc="System program")]
499    #[account(9, name="ata_program", desc="Associated Token program")]
500    #[account(10, name="token_program", desc="Token program")]
501    #[account(11, name="sysvar_instructions", desc="Instructions sysvar account")]
502    #[account(12, optional, signer, name="authority", desc="Authority/creator of the escrow account")]
503    TransferOutOfEscrow(TransferOutOfEscrowArgs),
504
505    //---- New API
506
507    /// Burns an asset, closing associated accounts.
508    /// 
509    /// Supports burning the following asset types:
510    /// - ProgrammableNonFungible
511    /// - NonFungible
512    /// - NonFungigbleEdition
513    /// - Fungible
514    /// - FungibleAsset
515    ///
516    /// Parent accounts only required for burning print editions are the accounts for the master edition
517    /// associated with the print edition.
518    /// The Token Record account is required for burning a ProgrammableNonFungible asset.
519    ///
520    /// This handler closes the following accounts:
521    ///
522    /// For ProgrammableNonFungible assets:
523    /// - Metadata, Edition, Token, TokenRecord
524    ///
525    /// For NonFungible assets:
526    /// - Metadata, Edition, Token
527    ///
528    /// For NonFungibleEdition assets:
529    /// - Metadata, Edition, Token, and the EditionMarker, if all prints for it are burned.
530    ///
531    /// For Fungible assets:
532    /// - Only the token account, if all tokens are burned.
533    #[account(0, signer, writable, name="authority", desc="Asset owner or Utility delegate")]
534    #[account(1, optional, writable, name="collection_metadata", desc="Metadata of the Collection")]
535    #[account(2, writable, name="metadata", desc="Metadata (pda of ['metadata', program id, mint id])")]
536    #[account(3, optional, writable, name="edition", desc="Edition of the asset")]
537    #[account(4, writable, name="mint", desc="Mint of token asset")]
538    #[account(5, writable, name="token", desc="Token account to close")]
539    #[account(6, optional, writable, name="master_edition", desc="Master edition account")]
540    #[account(7, optional, name="master_edition_mint", desc="Master edition mint of the asset")]
541    #[account(8, optional, name="master_edition_token", desc="Master edition token account")]
542    #[account(9, optional, writable, name="edition_marker", desc="Edition marker account")]
543    #[account(10, optional, writable, name="token_record", desc="Token record account")]
544    #[account(11, name="system_program", desc="System program")]
545    #[account(12, name="sysvar_instructions", desc="Instructions sysvar account")]
546    #[account(13, name="spl_token_program", desc="SPL Token Program")]
547    #[default_optional_accounts]
548    Burn(BurnArgs),
549
550    /// Creates the metadata and associated accounts for a new or existing mint account.
551    /// 
552    /// This instruction will initialize a mint account if it does not exist and
553    /// the mint key is a signer on the transaction.
554    ///
555    /// When creating a non-fungible assert, the `master_edition` needs to be specified.
556    #[account(0, writable, name="metadata", desc="Unallocated metadata account with address as pda of ['metadata', program id, mint id]")]
557    #[account(1, optional, writable, name="master_edition", desc="Unallocated edition account with address as pda of ['metadata', program id, mint, 'edition']")]
558    #[account(2, writable, name="mint", desc="Mint of token asset")]
559    #[account(3, signer, name="authority", desc="Mint authority")]
560    #[account(4, signer, writable, name="payer", desc="Payer")]
561    #[account(5, name="update_authority", desc="Update authority for the metadata account")]
562    #[account(6, name="system_program", desc="System program")]
563    #[account(7, name="sysvar_instructions", desc="Instructions sysvar account")]
564    #[account(8, name="spl_token_program", desc="SPL Token program")]
565    #[args(initialize_mint: bool)]
566    #[args(update_authority_as_signer: bool)]
567    #[default_optional_accounts]
568    Create(CreateArgs),
569
570    /// Mints tokens from a mint account into the specified token account.
571    ///
572    /// This instruction will also initialized the associated token account if it does not exist – in
573    /// this case the `token_owner` will be required. When minting `*NonFungible` assets, the `authority`
574    /// must be the update authority; in all other cases, it must be the mint authority from the mint
575    /// account.
576    #[account(0, writable, name="token", desc="Token or Associated Token account")]
577    #[account(1, optional, name="token_owner", desc="Owner of the token account")]
578    #[account(2, name="metadata", desc="Metadata account (pda of ['metadata', program id, mint id])")]
579    #[account(3, optional, writable, name="master_edition", desc="Master Edition account")]
580    #[account(4, optional, writable, name="token_record", desc="Token record account")]
581    #[account(5, writable, name="mint", desc="Mint of token asset")]
582    #[account(6, signer, name="authority", desc="(Mint or Update) authority")]
583    #[account(7, optional, name="delegate_record", desc="Metadata delegate record")]
584    #[account(8, signer, writable, name="payer", desc="Payer")]
585    #[account(9, name="system_program", desc="System program")]
586    #[account(10, name="sysvar_instructions", desc="Instructions sysvar account")]
587    #[account(11, name="spl_token_program", desc="SPL Token program")]
588    #[account(12, name="spl_ata_program", desc="SPL Associated Token Account program")]
589    #[account(13, optional, name="authorization_rules_program", desc="Token Authorization Rules program")]
590    #[account(14, optional, name="authorization_rules", desc="Token Authorization Rules account")]
591    #[default_optional_accounts]
592    Mint(MintArgs),
593
594    /// Creates a delegate for an asset.
595    /// 
596    /// A delegate has a role associated, which determines what actions the delegate can perform. There are
597    /// two types of delegate:
598    ///   1. Persistent delegate: only one delegate can exist at the same time for `Transfer`, `Sale` and
599    ///      `Utility` actions (pda of ["metadata", program id, mint id, "persistent_delegate", token owner id])
600    ///   2. Multiple delegates: for `Authority`, `Collection`, `Update` and `Uses` actions (pda of ["metadata",
601    ///      program id, mint id, role, update authority id, delegate owner id])
602    #[account(0, optional, writable, name="delegate_record", desc="Delegate record account")]
603    #[account(1, name="delegate", desc="Owner of the delegated account")]
604    #[account(2, writable, name="metadata", desc="Metadata account")]
605    #[account(3, optional, name="master_edition", desc="Master Edition account")]
606    #[account(4, optional, writable, name="token_record", desc="Token record account")]
607    #[account(5, name="mint", desc="Mint of metadata")]
608    #[account(6, optional, writable, name="token", desc="Token account of mint")]
609    #[account(7, signer, name="authority", desc="Update authority or token owner")]
610    #[account(8, signer, writable, name="payer", desc="Payer")]
611    #[account(9, name="system_program", desc="System Program")]
612    #[account(10, name="sysvar_instructions", desc="Instructions sysvar account")]
613    #[account(11, optional, name="spl_token_program", desc="SPL Token Program")]
614    #[account(12, optional, name="authorization_rules_program", desc="Token Authorization Rules Program")]
615    #[account(13, optional, name="authorization_rules", desc="Token Authorization Rules account")]
616    #[default_optional_accounts]
617    Delegate(DelegateArgs),
618
619    /// Revokes a delegate.
620    /// 
621    /// A delegate can revoke itself by signing the transaction as the 'approver'.
622    #[account(0, optional, writable, name="delegate_record", desc="Delegate record account")]
623    #[account(1, name="delegate", desc="Owner of the delegated account")]
624    #[account(2, writable, name="metadata", desc="Metadata account")]
625    #[account(3, optional, name="master_edition", desc="Master Edition account")]
626    #[account(4, optional, writable, name="token_record", desc="Token record account")]
627    #[account(5, name="mint", desc="Mint of metadata")]
628    #[account(6, optional, writable, name="token", desc="Token account of mint")]
629    #[account(7, signer, name="authority", desc="Update authority or token owner")]
630    #[account(8, signer, writable, name="payer", desc="Payer")]
631    #[account(9, name="system_program", desc="System Program")]
632    #[account(10, name="sysvar_instructions", desc="Instructions sysvar account")]
633    #[account(11, optional, name="spl_token_program", desc="SPL Token Program")]
634    #[account(12, optional, name="authorization_rules_program", desc="Token Authorization Rules Program")]
635    #[account(13, optional, name="authorization_rules", desc="Token Authorization Rules account")]
636    #[default_optional_accounts]
637    Revoke(RevokeArgs),
638
639    /// Locks an asset. For non-programmable assets, this will also freeze the token account.
640    /// 
641    /// The configurable `authorization_rules` only apply to `ProgrammableNonFungible` assets and
642    /// it may require additional accounts to validate the rules.
643    #[account(0, signer, name="authority", desc="Delegate or freeze authority")]
644    #[account(1, optional, name="token_owner", desc="Token owner account")]
645    #[account(2, writable, name="token", desc="Token account")]
646    #[account(3, name="mint", desc="Mint account")]
647    #[account(4, writable, name="metadata", desc="Metadata account")]
648    #[account(5, optional, name="edition", desc="Edition account")]
649    #[account(6, optional, writable, name="token_record", desc="Token record account")]
650    #[account(7, signer, writable, name="payer", desc="Payer")]
651    #[account(8, name="system_program", desc="System program")]
652    #[account(9, name="sysvar_instructions", desc="System program")]
653    #[account(10, optional, name="spl_token_program", desc="SPL Token Program")]
654    #[account(11, optional, name="authorization_rules_program", desc="Token Authorization Rules Program")]
655    #[account(12, optional, name="authorization_rules", desc="Token Authorization Rules account")]
656    #[default_optional_accounts]
657    Lock(LockArgs),
658
659    /// Unlocks an asset. For non-programmable assets, this will also thaw the token account.
660    /// 
661    /// The configurable `authorization_rules` only apply to `ProgrammableNonFungible` assets and
662    /// it may require additional accounts to validate the rules.
663    #[account(0, signer, name="authority", desc="Delegate or freeze authority")]
664    #[account(1, optional, name="token_owner", desc="Token owner account")]
665    #[account(2, writable, name="token", desc="Token account")]
666    #[account(3, name="mint", desc="Mint account")]
667    #[account(4, writable, name="metadata", desc="Metadata account")]
668    #[account(5, optional, name="edition", desc="Edition account")]
669    #[account(6, optional, writable, name="token_record", desc="Token record account")]
670    #[account(7, signer, writable, name="payer", desc="Payer")]
671    #[account(8, name="system_program", desc="System program")]
672    #[account(9, name="sysvar_instructions", desc="System program")]
673    #[account(10, optional, name="spl_token_program", desc="SPL Token Program")]
674    #[account(11, optional, name="authorization_rules_program", desc="Token Authorization Rules Program")]
675    #[account(12, optional, name="authorization_rules", desc="Token Authorization Rules account")]
676    #[default_optional_accounts]
677    Unlock(UnlockArgs),
678
679    /// Migrates an asset to a ProgrammableAsset type.
680    #[account(0, writable, name="metadata", desc="Metadata account")]
681    #[account(1, writable, name="edition", desc="Edition account")]
682    #[account(2, writable, name="token", desc="Token account")]
683    #[account(3, name="token_owner", desc="Token account owner")]
684    #[account(4, name="mint", desc="Mint account")]
685    #[account(5, writable, signer, name="payer", desc="Payer")]
686    #[account(6, signer, name="authority", desc="Update authority")]
687    #[account(7, name="collection_metadata", desc="Collection metadata account")]
688    #[account(8, name="delegate_record", desc="Delegate record account")]
689    #[account(9, writable, name="token_record", desc="Token record account")]
690    #[account(10, name="system_program", desc="System program")]
691    #[account(11, name="sysvar_instructions", desc="Instruction sysvar account")]
692    #[account(12, name="spl_token_program", desc="SPL Token Program")]
693    #[account(13, optional, name="authorization_rules_program", desc="Token Authorization Rules Program")]
694    #[account(14, optional, name="authorization_rules", desc="Token Authorization Rules account")]
695    #[default_optional_accounts]
696    Migrate(MigrateArgs),
697
698    /// Transfer an asset.
699    /// 
700    /// The configurable `authorization_rules` only apply to `ProgrammableNonFungible` assets and
701    /// it may require additional accounts to validate the rules.
702    #[account(0, writable, name="token", desc="Token account")]
703    #[account(1, name="token_owner", desc="Token account owner")]
704    #[account(2, writable, name="destination", desc="Destination token account")]
705    #[account(3, name="destination_owner", desc="Destination token account owner")]
706    #[account(4, name="mint", desc="Mint of token asset")]
707    #[account(5, writable, name="metadata", desc="Metadata (pda of ['metadata', program id, mint id])")]
708    #[account(6, optional, name="edition", desc="Edition of token asset")]
709    #[account(7, optional, writable, name="owner_token_record", desc="Owner token record account")]
710    #[account(8, optional, writable, name="destination_token_record", desc="Destination token record account")]
711    #[account(9, signer, name="authority", desc="Transfer authority (token owner or delegate)")]
712    #[account(10, signer, writable, name="payer", desc="Payer")]
713    #[account(11, name="system_program", desc="System Program")]
714    #[account(12, name="sysvar_instructions", desc="Instructions sysvar account")]
715    #[account(13, name="spl_token_program", desc="SPL Token Program")]
716    #[account(14, name="spl_ata_program", desc="SPL Associated Token Account program")]
717    #[account(15, optional, name="authorization_rules_program", desc="Token Authorization Rules Program")]
718    #[account(16, optional, name="authorization_rules", desc="Token Authorization Rules account")]
719    #[default_optional_accounts]
720    Transfer(TransferArgs),
721
722    /// Updates the metadata of an asset.
723    /// 
724    /// The configurable `authorization_rules` only apply to `ProgrammableNonFungible` assets and
725    /// it may require additional accounts to validate the rules.
726    #[account(0, signer, name="authority", desc="Update authority or delegate")]
727    #[account(1, optional, name="delegate_record", desc="Delegate record PDA")]
728    #[account(2, optional, name="token", desc="Token account")]
729    #[account(3, name="mint", desc="Mint account")]
730    #[account(4, writable, name="metadata", desc="Metadata account")]
731    #[account(5, optional, name="edition", desc="Edition account")]
732    #[account(6, signer, writable, name="payer", desc="Payer")]
733    #[account(7, name="system_program", desc="System program")]
734    #[account(8, name="sysvar_instructions", desc="Instructions sysvar account")]
735    #[account(9, optional, name="authorization_rules_program", desc="Token Authorization Rules Program")]
736    #[account(10, optional, name="authorization_rules", desc="Token Authorization Rules account")]
737    #[default_optional_accounts]
738    Update(UpdateArgs),
739
740    /// Uses an asset.
741    /// 
742    /// Use Authority can be the owner of the asset or a delegated use authority.
743    /// 
744    /// The configurable `authorization_rules` only apply to `ProgrammableNonFungible` assets and
745    /// it may require additional accounts to validate the rules.
746    #[account(0, signer, name="authority", desc="Token owner or delegate")]
747    #[account(1, writable, optional, name="delegate_record", desc="Delegate record PDA")]
748    #[account(2, writable, optional, name="token", desc="Token account")]
749    #[account(3, name="mint", desc="Mint account")]
750    #[account(4, writable, name="metadata", desc="Metadata account")]
751    #[account(5, optional, writable, name="edition", desc="Edition account")]
752    #[account(6, signer, name="payer", desc="Payer")]
753    #[account(7, name="system_program", desc="System program")]
754    #[account(8, name="sysvar_instructions", desc="System program")]
755    #[account(9, optional, name="spl_token_program", desc="SPL Token Program")]
756    #[account(10, optional, name="authorization_rules_program", desc="Token Authorization Rules Program")]
757    #[account(11, optional, name="authorization_rules", desc="Token Authorization Rules account")]
758    #[default_optional_accounts]
759    Use(UseArgs),
760
761    /// Verifies that an asset was created by a specific creator or belongs in an specified collection.
762    ///
763    /// Depending on the type of verification (e.g., creator or collection), additional accounts
764    /// are required.
765    #[account(0, signer, name="authority", desc="Creator to verify, collection update authority or delegate")]
766    #[account(1, optional, name="delegate_record", desc="Delegate record PDA")]
767    #[account(2, writable, name="metadata", desc="Metadata account")]
768    #[account(3, optional, name="collection_mint", desc="Mint of the Collection")]
769    #[account(4, optional, writable, name="collection_metadata", desc="Metadata Account of the Collection")]
770    #[account(5, optional, name="collection_master_edition", desc="Master Edition Account of the Collection Token")]
771    #[account(6, name="system_program", desc="System program")]
772    #[account(7, name="sysvar_instructions", desc="Instructions sysvar account")]
773    #[default_optional_accounts]
774    Verify(VerificationArgs),
775
776    /// Unverifies that an asset was created by a specific creator or belongs in an specified collection.
777    ///
778    /// Depending on the type of verification (e.g., creator or collection), additional accounts
779    /// are required.
780    #[account(0, signer, name="authority", desc="Creator to verify, collection (or metadata if parent burned) update authority or delegate")]
781    #[account(1, optional, name="delegate_record", desc="Delegate record PDA")]
782    #[account(2, writable, name="metadata", desc="Metadata account")]
783    #[account(3, optional, name="collection_mint", desc="Mint of the Collection")]
784    #[account(4, optional, writable, name="collection_metadata", desc="Metadata Account of the Collection")]
785    #[account(5, name="system_program", desc="System program")]
786    #[account(6, name="sysvar_instructions", desc="Instructions sysvar account")]
787    #[default_optional_accounts]
788    Unverify(VerificationArgs),
789}
790
791pub struct Context<'a, T> {
792    pub accounts: T,
793    pub remaining_accounts: Vec<&'a AccountInfo<'a>>,
794}
795
796pub trait InstructionBuilder {
797    fn instruction(&self) -> solana_program::instruction::Instruction;
798}