pub struct TransferBuilder { /* private fields */ }Expand description
Instruction builder for Transfer.
§Accounts:
[]mint[]verification_config[optional]instructions_sysvar (default toSysvar1nstructions1111111111111111111111111)[]permanent_delegate_authority[]mint_account[writable]from_token_account[writable]to_token_account[]transfer_hook_program[optional]token_program (default toTokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb)
Implementations§
Source§impl TransferBuilder
impl TransferBuilder
pub fn new() -> Self
pub fn mint(&mut self, mint: Pubkey) -> &mut Self
pub fn verification_config(&mut self, verification_config: Pubkey) -> &mut Self
Sourcepub fn instructions_sysvar(&mut self, instructions_sysvar: Pubkey) -> &mut Self
pub fn instructions_sysvar(&mut self, instructions_sysvar: Pubkey) -> &mut Self
[optional account, default to 'Sysvar1nstructions1111111111111111111111111']
pub fn mint_account(&mut self, mint_account: Pubkey) -> &mut Self
pub fn from_token_account(&mut self, from_token_account: Pubkey) -> &mut Self
pub fn to_token_account(&mut self, to_token_account: Pubkey) -> &mut Self
pub fn transfer_hook_program( &mut self, transfer_hook_program: Pubkey, ) -> &mut Self
Sourcepub fn token_program(&mut self, token_program: Pubkey) -> &mut Self
pub fn token_program(&mut self, token_program: Pubkey) -> &mut Self
[optional account, default to 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb']
pub fn amount(&mut self, amount: u64) -> &mut Self
Sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
pub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
Source§impl Clone for TransferBuilder
impl Clone for TransferBuilder
Source§fn clone(&self) -> TransferBuilder
fn clone(&self) -> TransferBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransferBuilder
impl Debug for TransferBuilder
Source§impl Default for TransferBuilder
impl Default for TransferBuilder
Source§fn default() -> TransferBuilder
fn default() -> TransferBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TransferBuilder
impl RefUnwindSafe for TransferBuilder
impl Send for TransferBuilder
impl Sync for TransferBuilder
impl Unpin for TransferBuilder
impl UnsafeUnpin for TransferBuilder
impl UnwindSafe for TransferBuilder
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