pub struct CreateEscrowAccountCpiBuilder<'a, 'b> { /* private fields */ }
Expand description
Instruction builder for CreateEscrowAccount
via CPI.
Accounts:
[writable]
escrow[writable]
metadata[]
mint[]
token_account[]
edition[writable, signer]
payer[]
system_program[]
sysvar_instructions[signer, optional]
authority
Implementations§
source§impl<'a, 'b> CreateEscrowAccountCpiBuilder<'a, 'b>
impl<'a, 'b> CreateEscrowAccountCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
sourcepub fn escrow(&mut self, escrow: &'b AccountInfo<'a>) -> &mut Self
pub fn escrow(&mut self, escrow: &'b AccountInfo<'a>) -> &mut Self
Escrow account
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 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 the token
sourcepub fn edition(&mut self, edition: &'b AccountInfo<'a>) -> &mut Self
pub fn edition(&mut self, edition: &'b AccountInfo<'a>) -> &mut Self
Edition account
sourcepub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
pub fn payer(&mut self, payer: &'b AccountInfo<'a>) -> &mut Self
Wallet paying for the transaction and new account
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 sysvar_instructions(
&mut self,
sysvar_instructions: &'b AccountInfo<'a>
) -> &mut Self
pub fn sysvar_instructions( &mut self, sysvar_instructions: &'b AccountInfo<'a> ) -> &mut Self
Instructions sysvar account
[optional account]
Authority/creator of the escrow account
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 CreateEscrowAccountCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for CreateEscrowAccountCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for CreateEscrowAccountCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for CreateEscrowAccountCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for CreateEscrowAccountCpiBuilder<'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