pub struct ApproveUseAuthorityCpiBuilder<'a, 'b> { /* private fields */ }
Expand description
Instruction builder for ApproveUseAuthority
via CPI.
Accounts:
[writable]
use_authority_record[writable, signer]
owner[writable, signer]
payer[]
user[writable]
owner_token_account[]
metadata[]
mint[]
burner[]
token_program[]
system_program[optional]
rent
Implementations§
source§impl<'a, 'b> ApproveUseAuthorityCpiBuilder<'a, 'b>
impl<'a, 'b> ApproveUseAuthorityCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Use Authority Record PDA
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 payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
pub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
Payer
sourcepub fn user(&mut self, user: &'b AccountInfo<'a>) -> &mut Self
pub fn user(&mut self, user: &'b AccountInfo<'a>) -> &mut Self
A Use Authority
sourcepub fn owner_token_account(
&mut self,
owner_token_account: &'b AccountInfo<'a>
) -> &mut Self
pub fn owner_token_account( &mut self, owner_token_account: &'b AccountInfo<'a> ) -> &mut Self
Owned Token Account Of Mint
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 mint(&mut self, mint: &'b AccountInfo<'a>) -> &mut Self
pub fn mint(&mut self, mint: &'b AccountInfo<'a>) -> &mut Self
Mint of Metadata
sourcepub fn burner(&mut self, burner: &'b AccountInfo<'a>) -> &mut Self
pub fn burner(&mut self, burner: &'b AccountInfo<'a>) -> &mut Self
Program As Signer (Burner)
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 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: Option<&'b AccountInfo<'a>>) -> &mut Self
pub fn rent(&mut self, rent: Option<&'b AccountInfo<'a>>) -> &mut Self
[optional account]
Rent info
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 ApproveUseAuthorityCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for ApproveUseAuthorityCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for ApproveUseAuthorityCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for ApproveUseAuthorityCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for ApproveUseAuthorityCpiBuilder<'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