pub struct BurnNftCpiBuilder<'a, 'b> { /* private fields */ }
Expand description
Instruction builder for BurnNft
via CPI.
Accounts:
[writable]
metadata[writable, signer]
owner[writable]
mint[writable]
token_account[writable]
master_edition_account[]
spl_token_program[writable, optional]
collection_metadata
Implementations§
source§impl<'a, 'b> BurnNftCpiBuilder<'a, 'b>
impl<'a, 'b> BurnNftCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
sourcepub fn metadata(&mut self, metadata: &'b AccountInfo<'a>) -> &mut Self
pub fn metadata(&mut self, metadata: &'b AccountInfo<'a>) -> &mut Self
Metadata (pda of [‘metadata’, program id, mint id])
sourcepub fn owner(&mut self, owner: &'b AccountInfo<'a>) -> &mut Self
pub fn owner(&mut self, owner: &'b AccountInfo<'a>) -> &mut Self
NFT owner
sourcepub fn mint(&mut self, mint: &'b AccountInfo<'a>) -> &mut Self
pub fn mint(&mut self, mint: &'b AccountInfo<'a>) -> &mut Self
Mint of the NFT
sourcepub fn token_account(&mut self, token_account: &'b AccountInfo<'a>) -> &mut Self
pub fn token_account(&mut self, token_account: &'b AccountInfo<'a>) -> &mut Self
Token account to close
sourcepub fn master_edition_account(
&mut self,
master_edition_account: &'b AccountInfo<'a>
) -> &mut Self
pub fn master_edition_account( &mut self, master_edition_account: &'b AccountInfo<'a> ) -> &mut Self
MasterEdition2 of the NFT
sourcepub fn spl_token_program(
&mut self,
spl_token_program: &'b AccountInfo<'a>
) -> &mut Self
pub fn spl_token_program( &mut self, spl_token_program: &'b AccountInfo<'a> ) -> &mut Self
SPL Token Program
sourcepub fn collection_metadata(
&mut self,
collection_metadata: Option<&'b AccountInfo<'a>>
) -> &mut Self
pub fn collection_metadata( &mut self, collection_metadata: Option<&'b AccountInfo<'a>> ) -> &mut Self
[optional account]
Metadata of the Collection
sourcepub fn add_remaining_account(
&mut self,
account: &'b AccountInfo<'a>,
is_writable: bool,
is_signer: bool
) -> &mut Self
pub fn add_remaining_account( &mut self, account: &'b AccountInfo<'a>, is_writable: bool, is_signer: bool ) -> &mut Self
Add an additional account to the instruction.
sourcepub fn add_remaining_accounts(
&mut self,
accounts: &[(&'b AccountInfo<'a>, bool, bool)]
) -> &mut Self
pub fn add_remaining_accounts( &mut self, accounts: &[(&'b AccountInfo<'a>, bool, bool)] ) -> &mut Self
Add additional accounts to the instruction.
Each account is represented by a tuple of the AccountInfo
, a bool
indicating whether the account is writable or not,
and a bool
indicating whether the account is a signer or not.
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> ProgramResult
Auto Trait Implementations§
impl<'a, 'b> !RefUnwindSafe for BurnNftCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for BurnNftCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for BurnNftCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for BurnNftCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for BurnNftCpiBuilder<'a, 'b>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more