pub struct UtilizeCpiBuilder<'a, 'b> { /* private fields */ }
Expand description
Instruction builder for Utilize
via CPI.
Accounts:
[writable]
metadata[writable]
token_account[writable]
mint[writable, signer]
use_authority[]
owner[]
token_program[]
ata_program[]
system_program[]
rent[writable, optional]
use_authority_record[optional]
burner
Implementations§
source§impl<'a, 'b> UtilizeCpiBuilder<'a, 'b>
impl<'a, 'b> UtilizeCpiBuilder<'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 account
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 Of NFT
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 Metadata
A Use Authority / Can be the current Owner of the NFT
sourcepub fn owner(&mut self, owner: &'b AccountInfo<'a>) -> &mut Self
pub fn owner(&mut self, owner: &'b AccountInfo<'a>) -> &mut Self
Owner
sourcepub fn token_program(&mut self, token_program: &'b AccountInfo<'a>) -> &mut Self
pub fn token_program(&mut self, token_program: &'b AccountInfo<'a>) -> &mut Self
Token program
sourcepub fn ata_program(&mut self, ata_program: &'b AccountInfo<'a>) -> &mut Self
pub fn ata_program(&mut self, ata_program: &'b AccountInfo<'a>) -> &mut Self
Associated Token program
sourcepub fn system_program(
&mut self,
system_program: &'b AccountInfo<'a>
) -> &mut Self
pub fn system_program( &mut self, system_program: &'b AccountInfo<'a> ) -> &mut Self
System program
sourcepub fn rent(&mut self, rent: &'b AccountInfo<'a>) -> &mut Self
pub fn rent(&mut self, rent: &'b AccountInfo<'a>) -> &mut Self
Rent info
[optional account]
Use Authority Record PDA If present the program Assumes a delegated use authority
sourcepub fn burner(&mut self, burner: Option<&'b AccountInfo<'a>>) -> &mut Self
pub fn burner(&mut self, burner: Option<&'b AccountInfo<'a>>) -> &mut Self
[optional account]
Program As Signer (Burner)
pub fn number_of_uses(&mut self, number_of_uses: u64) -> &mut Self
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 UtilizeCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for UtilizeCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for UtilizeCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for UtilizeCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for UtilizeCpiBuilder<'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