use crate::generated::types::AuthorizationData;
#[cfg(feature = "anchor")]
use anchor_lang::prelude::{AnchorDeserialize, AnchorSerialize};
#[cfg(not(feature = "anchor"))]
use borsh::{BorshDeserialize, BorshSerialize};
pub struct UnlockV1 {
pub authority: solana_program::pubkey::Pubkey,
pub token_owner: Option<solana_program::pubkey::Pubkey>,
pub token: solana_program::pubkey::Pubkey,
pub mint: solana_program::pubkey::Pubkey,
pub metadata: solana_program::pubkey::Pubkey,
pub edition: Option<solana_program::pubkey::Pubkey>,
pub token_record: Option<solana_program::pubkey::Pubkey>,
pub payer: solana_program::pubkey::Pubkey,
pub system_program: solana_program::pubkey::Pubkey,
pub sysvar_instructions: solana_program::pubkey::Pubkey,
pub spl_token_program: Option<solana_program::pubkey::Pubkey>,
pub authorization_rules_program: Option<solana_program::pubkey::Pubkey>,
pub authorization_rules: Option<solana_program::pubkey::Pubkey>,
}
impl UnlockV1 {
pub fn instruction(
&self,
args: UnlockV1InstructionArgs,
) -> solana_program::instruction::Instruction {
self.instruction_with_remaining_accounts(args, &[])
}
#[allow(clippy::vec_init_then_push)]
pub fn instruction_with_remaining_accounts(
&self,
args: UnlockV1InstructionArgs,
remaining_accounts: &[solana_program::instruction::AccountMeta],
) -> solana_program::instruction::Instruction {
let mut accounts = Vec::with_capacity(13 + remaining_accounts.len());
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.authority,
true,
));
if let Some(token_owner) = self.token_owner {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
token_owner,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
accounts.push(solana_program::instruction::AccountMeta::new(
self.token, false,
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.mint, false,
));
accounts.push(solana_program::instruction::AccountMeta::new(
self.metadata,
false,
));
if let Some(edition) = self.edition {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
edition, false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
if let Some(token_record) = self.token_record {
accounts.push(solana_program::instruction::AccountMeta::new(
token_record,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
accounts.push(solana_program::instruction::AccountMeta::new(
self.payer, true,
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.system_program,
false,
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
self.sysvar_instructions,
false,
));
if let Some(spl_token_program) = self.spl_token_program {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
spl_token_program,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
if let Some(authorization_rules_program) = self.authorization_rules_program {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
authorization_rules_program,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
if let Some(authorization_rules) = self.authorization_rules {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
authorization_rules,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
accounts.extend_from_slice(remaining_accounts);
let mut data = borsh::to_vec(&(UnlockV1InstructionData::new())).unwrap();
let mut args = borsh::to_vec(&args).unwrap();
data.append(&mut args);
solana_program::instruction::Instruction {
program_id: crate::MPL_TOKEN_METADATA_ID,
accounts,
data,
}
}
}
#[cfg_attr(not(feature = "anchor"), derive(BorshSerialize, BorshDeserialize))]
#[cfg_attr(feature = "anchor", derive(AnchorSerialize, AnchorDeserialize))]
pub struct UnlockV1InstructionData {
discriminator: u8,
unlock_v1_discriminator: u8,
}
impl UnlockV1InstructionData {
pub fn new() -> Self {
Self {
discriminator: 47,
unlock_v1_discriminator: 0,
}
}
}
#[cfg_attr(not(feature = "anchor"), derive(BorshSerialize, BorshDeserialize))]
#[cfg_attr(feature = "anchor", derive(AnchorSerialize, AnchorDeserialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UnlockV1InstructionArgs {
pub authorization_data: Option<AuthorizationData>,
}
#[derive(Default)]
pub struct UnlockV1Builder {
authority: Option<solana_program::pubkey::Pubkey>,
token_owner: Option<solana_program::pubkey::Pubkey>,
token: Option<solana_program::pubkey::Pubkey>,
mint: Option<solana_program::pubkey::Pubkey>,
metadata: Option<solana_program::pubkey::Pubkey>,
edition: Option<solana_program::pubkey::Pubkey>,
token_record: Option<solana_program::pubkey::Pubkey>,
payer: Option<solana_program::pubkey::Pubkey>,
system_program: Option<solana_program::pubkey::Pubkey>,
sysvar_instructions: Option<solana_program::pubkey::Pubkey>,
spl_token_program: Option<solana_program::pubkey::Pubkey>,
authorization_rules_program: Option<solana_program::pubkey::Pubkey>,
authorization_rules: Option<solana_program::pubkey::Pubkey>,
authorization_data: Option<AuthorizationData>,
__remaining_accounts: Vec<solana_program::instruction::AccountMeta>,
}
impl UnlockV1Builder {
pub fn new() -> Self {
Self::default()
}
#[inline(always)]
pub fn authority(&mut self, authority: solana_program::pubkey::Pubkey) -> &mut Self {
self.authority = Some(authority);
self
}
#[inline(always)]
pub fn token_owner(
&mut self,
token_owner: Option<solana_program::pubkey::Pubkey>,
) -> &mut Self {
self.token_owner = token_owner;
self
}
#[inline(always)]
pub fn token(&mut self, token: solana_program::pubkey::Pubkey) -> &mut Self {
self.token = Some(token);
self
}
#[inline(always)]
pub fn mint(&mut self, mint: solana_program::pubkey::Pubkey) -> &mut Self {
self.mint = Some(mint);
self
}
#[inline(always)]
pub fn metadata(&mut self, metadata: solana_program::pubkey::Pubkey) -> &mut Self {
self.metadata = Some(metadata);
self
}
#[inline(always)]
pub fn edition(&mut self, edition: Option<solana_program::pubkey::Pubkey>) -> &mut Self {
self.edition = edition;
self
}
#[inline(always)]
pub fn token_record(
&mut self,
token_record: Option<solana_program::pubkey::Pubkey>,
) -> &mut Self {
self.token_record = token_record;
self
}
#[inline(always)]
pub fn payer(&mut self, payer: solana_program::pubkey::Pubkey) -> &mut Self {
self.payer = Some(payer);
self
}
#[inline(always)]
pub fn system_program(&mut self, system_program: solana_program::pubkey::Pubkey) -> &mut Self {
self.system_program = Some(system_program);
self
}
#[inline(always)]
pub fn sysvar_instructions(
&mut self,
sysvar_instructions: solana_program::pubkey::Pubkey,
) -> &mut Self {
self.sysvar_instructions = Some(sysvar_instructions);
self
}
#[inline(always)]
pub fn spl_token_program(
&mut self,
spl_token_program: Option<solana_program::pubkey::Pubkey>,
) -> &mut Self {
self.spl_token_program = spl_token_program;
self
}
#[inline(always)]
pub fn authorization_rules_program(
&mut self,
authorization_rules_program: Option<solana_program::pubkey::Pubkey>,
) -> &mut Self {
self.authorization_rules_program = authorization_rules_program;
self
}
#[inline(always)]
pub fn authorization_rules(
&mut self,
authorization_rules: Option<solana_program::pubkey::Pubkey>,
) -> &mut Self {
self.authorization_rules = authorization_rules;
self
}
#[inline(always)]
pub fn authorization_data(&mut self, authorization_data: AuthorizationData) -> &mut Self {
self.authorization_data = Some(authorization_data);
self
}
#[inline(always)]
pub fn add_remaining_account(
&mut self,
account: solana_program::instruction::AccountMeta,
) -> &mut Self {
self.__remaining_accounts.push(account);
self
}
#[inline(always)]
pub fn add_remaining_accounts(
&mut self,
accounts: &[solana_program::instruction::AccountMeta],
) -> &mut Self {
self.__remaining_accounts.extend_from_slice(accounts);
self
}
#[allow(clippy::clone_on_copy)]
pub fn instruction(&self) -> solana_program::instruction::Instruction {
let accounts = UnlockV1 {
authority: self.authority.expect("authority is not set"),
token_owner: self.token_owner,
token: self.token.expect("token is not set"),
mint: self.mint.expect("mint is not set"),
metadata: self.metadata.expect("metadata is not set"),
edition: self.edition,
token_record: self.token_record,
payer: self.payer.expect("payer is not set"),
system_program: self
.system_program
.unwrap_or(solana_program::pubkey!("11111111111111111111111111111111")),
sysvar_instructions: self.sysvar_instructions.unwrap_or(solana_program::pubkey!(
"Sysvar1nstructions1111111111111111111111111"
)),
spl_token_program: self.spl_token_program,
authorization_rules_program: self.authorization_rules_program,
authorization_rules: self.authorization_rules,
};
let args = UnlockV1InstructionArgs {
authorization_data: self.authorization_data.clone(),
};
accounts.instruction_with_remaining_accounts(args, &self.__remaining_accounts)
}
}
pub struct UnlockV1CpiAccounts<'a, 'b> {
pub authority: &'b solana_program::account_info::AccountInfo<'a>,
pub token_owner: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub token: &'b solana_program::account_info::AccountInfo<'a>,
pub mint: &'b solana_program::account_info::AccountInfo<'a>,
pub metadata: &'b solana_program::account_info::AccountInfo<'a>,
pub edition: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub token_record: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub payer: &'b solana_program::account_info::AccountInfo<'a>,
pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
pub sysvar_instructions: &'b solana_program::account_info::AccountInfo<'a>,
pub spl_token_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub authorization_rules_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub authorization_rules: Option<&'b solana_program::account_info::AccountInfo<'a>>,
}
pub struct UnlockV1Cpi<'a, 'b> {
pub __program: &'b solana_program::account_info::AccountInfo<'a>,
pub authority: &'b solana_program::account_info::AccountInfo<'a>,
pub token_owner: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub token: &'b solana_program::account_info::AccountInfo<'a>,
pub mint: &'b solana_program::account_info::AccountInfo<'a>,
pub metadata: &'b solana_program::account_info::AccountInfo<'a>,
pub edition: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub token_record: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub payer: &'b solana_program::account_info::AccountInfo<'a>,
pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
pub sysvar_instructions: &'b solana_program::account_info::AccountInfo<'a>,
pub spl_token_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub authorization_rules_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub authorization_rules: Option<&'b solana_program::account_info::AccountInfo<'a>>,
pub __args: UnlockV1InstructionArgs,
}
impl<'a, 'b> UnlockV1Cpi<'a, 'b> {
pub fn new(
program: &'b solana_program::account_info::AccountInfo<'a>,
accounts: UnlockV1CpiAccounts<'a, 'b>,
args: UnlockV1InstructionArgs,
) -> Self {
Self {
__program: program,
authority: accounts.authority,
token_owner: accounts.token_owner,
token: accounts.token,
mint: accounts.mint,
metadata: accounts.metadata,
edition: accounts.edition,
token_record: accounts.token_record,
payer: accounts.payer,
system_program: accounts.system_program,
sysvar_instructions: accounts.sysvar_instructions,
spl_token_program: accounts.spl_token_program,
authorization_rules_program: accounts.authorization_rules_program,
authorization_rules: accounts.authorization_rules,
__args: args,
}
}
#[inline(always)]
pub fn invoke(&self) -> solana_program::entrypoint::ProgramResult {
self.invoke_signed_with_remaining_accounts(&[], &[])
}
#[inline(always)]
pub fn invoke_with_remaining_accounts(
&self,
remaining_accounts: &[(
&'b solana_program::account_info::AccountInfo<'a>,
bool,
bool,
)],
) -> solana_program::entrypoint::ProgramResult {
self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
}
#[inline(always)]
pub fn invoke_signed(
&self,
signers_seeds: &[&[&[u8]]],
) -> solana_program::entrypoint::ProgramResult {
self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
}
#[allow(clippy::clone_on_copy)]
#[allow(clippy::vec_init_then_push)]
pub fn invoke_signed_with_remaining_accounts(
&self,
signers_seeds: &[&[&[u8]]],
remaining_accounts: &[(
&'b solana_program::account_info::AccountInfo<'a>,
bool,
bool,
)],
) -> solana_program::entrypoint::ProgramResult {
let mut accounts = Vec::with_capacity(13 + remaining_accounts.len());
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.authority.key,
true,
));
if let Some(token_owner) = self.token_owner {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*token_owner.key,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
accounts.push(solana_program::instruction::AccountMeta::new(
*self.token.key,
false,
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.mint.key,
false,
));
accounts.push(solana_program::instruction::AccountMeta::new(
*self.metadata.key,
false,
));
if let Some(edition) = self.edition {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*edition.key,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
if let Some(token_record) = self.token_record {
accounts.push(solana_program::instruction::AccountMeta::new(
*token_record.key,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
accounts.push(solana_program::instruction::AccountMeta::new(
*self.payer.key,
true,
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.system_program.key,
false,
));
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*self.sysvar_instructions.key,
false,
));
if let Some(spl_token_program) = self.spl_token_program {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*spl_token_program.key,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
if let Some(authorization_rules_program) = self.authorization_rules_program {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*authorization_rules_program.key,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
if let Some(authorization_rules) = self.authorization_rules {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
*authorization_rules.key,
false,
));
} else {
accounts.push(solana_program::instruction::AccountMeta::new_readonly(
crate::MPL_TOKEN_METADATA_ID,
false,
));
}
remaining_accounts.iter().for_each(|remaining_account| {
accounts.push(solana_program::instruction::AccountMeta {
pubkey: *remaining_account.0.key,
is_writable: remaining_account.1,
is_signer: remaining_account.2,
})
});
let mut data = borsh::to_vec(&(UnlockV1InstructionData::new())).unwrap();
let mut args = borsh::to_vec(&self.__args).unwrap();
data.append(&mut args);
let instruction = solana_program::instruction::Instruction {
program_id: crate::MPL_TOKEN_METADATA_ID,
accounts,
data,
};
let mut account_infos = Vec::with_capacity(13 + 1 + remaining_accounts.len());
account_infos.push(self.__program.clone());
account_infos.push(self.authority.clone());
if let Some(token_owner) = self.token_owner {
account_infos.push(token_owner.clone());
}
account_infos.push(self.token.clone());
account_infos.push(self.mint.clone());
account_infos.push(self.metadata.clone());
if let Some(edition) = self.edition {
account_infos.push(edition.clone());
}
if let Some(token_record) = self.token_record {
account_infos.push(token_record.clone());
}
account_infos.push(self.payer.clone());
account_infos.push(self.system_program.clone());
account_infos.push(self.sysvar_instructions.clone());
if let Some(spl_token_program) = self.spl_token_program {
account_infos.push(spl_token_program.clone());
}
if let Some(authorization_rules_program) = self.authorization_rules_program {
account_infos.push(authorization_rules_program.clone());
}
if let Some(authorization_rules) = self.authorization_rules {
account_infos.push(authorization_rules.clone());
}
remaining_accounts
.iter()
.for_each(|remaining_account| account_infos.push(remaining_account.0.clone()));
if signers_seeds.is_empty() {
solana_program::program::invoke(&instruction, &account_infos)
} else {
solana_program::program::invoke_signed(&instruction, &account_infos, signers_seeds)
}
}
}
pub struct UnlockV1CpiBuilder<'a, 'b> {
instruction: Box<UnlockV1CpiBuilderInstruction<'a, 'b>>,
}
impl<'a, 'b> UnlockV1CpiBuilder<'a, 'b> {
pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
let instruction = Box::new(UnlockV1CpiBuilderInstruction {
__program: program,
authority: None,
token_owner: None,
token: None,
mint: None,
metadata: None,
edition: None,
token_record: None,
payer: None,
system_program: None,
sysvar_instructions: None,
spl_token_program: None,
authorization_rules_program: None,
authorization_rules: None,
authorization_data: None,
__remaining_accounts: Vec::new(),
});
Self { instruction }
}
#[inline(always)]
pub fn authority(
&mut self,
authority: &'b solana_program::account_info::AccountInfo<'a>,
) -> &mut Self {
self.instruction.authority = Some(authority);
self
}
#[inline(always)]
pub fn token_owner(
&mut self,
token_owner: Option<&'b solana_program::account_info::AccountInfo<'a>>,
) -> &mut Self {
self.instruction.token_owner = token_owner;
self
}
#[inline(always)]
pub fn token(&mut self, token: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.token = Some(token);
self
}
#[inline(always)]
pub fn mint(&mut self, mint: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.mint = Some(mint);
self
}
#[inline(always)]
pub fn metadata(
&mut self,
metadata: &'b solana_program::account_info::AccountInfo<'a>,
) -> &mut Self {
self.instruction.metadata = Some(metadata);
self
}
#[inline(always)]
pub fn edition(
&mut self,
edition: Option<&'b solana_program::account_info::AccountInfo<'a>>,
) -> &mut Self {
self.instruction.edition = edition;
self
}
#[inline(always)]
pub fn token_record(
&mut self,
token_record: Option<&'b solana_program::account_info::AccountInfo<'a>>,
) -> &mut Self {
self.instruction.token_record = token_record;
self
}
#[inline(always)]
pub fn payer(&mut self, payer: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
self.instruction.payer = Some(payer);
self
}
#[inline(always)]
pub fn system_program(
&mut self,
system_program: &'b solana_program::account_info::AccountInfo<'a>,
) -> &mut Self {
self.instruction.system_program = Some(system_program);
self
}
#[inline(always)]
pub fn sysvar_instructions(
&mut self,
sysvar_instructions: &'b solana_program::account_info::AccountInfo<'a>,
) -> &mut Self {
self.instruction.sysvar_instructions = Some(sysvar_instructions);
self
}
#[inline(always)]
pub fn spl_token_program(
&mut self,
spl_token_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
) -> &mut Self {
self.instruction.spl_token_program = spl_token_program;
self
}
#[inline(always)]
pub fn authorization_rules_program(
&mut self,
authorization_rules_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
) -> &mut Self {
self.instruction.authorization_rules_program = authorization_rules_program;
self
}
#[inline(always)]
pub fn authorization_rules(
&mut self,
authorization_rules: Option<&'b solana_program::account_info::AccountInfo<'a>>,
) -> &mut Self {
self.instruction.authorization_rules = authorization_rules;
self
}
#[inline(always)]
pub fn authorization_data(&mut self, authorization_data: AuthorizationData) -> &mut Self {
self.instruction.authorization_data = Some(authorization_data);
self
}
#[inline(always)]
pub fn add_remaining_account(
&mut self,
account: &'b solana_program::account_info::AccountInfo<'a>,
is_writable: bool,
is_signer: bool,
) -> &mut Self {
self.instruction
.__remaining_accounts
.push((account, is_writable, is_signer));
self
}
#[inline(always)]
pub fn add_remaining_accounts(
&mut self,
accounts: &[(
&'b solana_program::account_info::AccountInfo<'a>,
bool,
bool,
)],
) -> &mut Self {
self.instruction
.__remaining_accounts
.extend_from_slice(accounts);
self
}
#[inline(always)]
pub fn invoke(&self) -> solana_program::entrypoint::ProgramResult {
self.invoke_signed(&[])
}
#[allow(clippy::clone_on_copy)]
#[allow(clippy::vec_init_then_push)]
pub fn invoke_signed(
&self,
signers_seeds: &[&[&[u8]]],
) -> solana_program::entrypoint::ProgramResult {
let args = UnlockV1InstructionArgs {
authorization_data: self.instruction.authorization_data.clone(),
};
let instruction = UnlockV1Cpi {
__program: self.instruction.__program,
authority: self.instruction.authority.expect("authority is not set"),
token_owner: self.instruction.token_owner,
token: self.instruction.token.expect("token is not set"),
mint: self.instruction.mint.expect("mint is not set"),
metadata: self.instruction.metadata.expect("metadata is not set"),
edition: self.instruction.edition,
token_record: self.instruction.token_record,
payer: self.instruction.payer.expect("payer is not set"),
system_program: self
.instruction
.system_program
.expect("system_program is not set"),
sysvar_instructions: self
.instruction
.sysvar_instructions
.expect("sysvar_instructions is not set"),
spl_token_program: self.instruction.spl_token_program,
authorization_rules_program: self.instruction.authorization_rules_program,
authorization_rules: self.instruction.authorization_rules,
__args: args,
};
instruction.invoke_signed_with_remaining_accounts(
signers_seeds,
&self.instruction.__remaining_accounts,
)
}
}
struct UnlockV1CpiBuilderInstruction<'a, 'b> {
__program: &'b solana_program::account_info::AccountInfo<'a>,
authority: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_owner: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token: Option<&'b solana_program::account_info::AccountInfo<'a>>,
mint: Option<&'b solana_program::account_info::AccountInfo<'a>>,
metadata: Option<&'b solana_program::account_info::AccountInfo<'a>>,
edition: Option<&'b solana_program::account_info::AccountInfo<'a>>,
token_record: Option<&'b solana_program::account_info::AccountInfo<'a>>,
payer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
system_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
sysvar_instructions: Option<&'b solana_program::account_info::AccountInfo<'a>>,
spl_token_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
authorization_rules_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
authorization_rules: Option<&'b solana_program::account_info::AccountInfo<'a>>,
authorization_data: Option<AuthorizationData>,
__remaining_accounts: Vec<(
&'b solana_program::account_info::AccountInfo<'a>,
bool,
bool,
)>,
}