pub struct TransferV1Builder { /* private fields */ }
Expand description
Instruction builder for TransferV1
.
Accounts:
[writable]
token[]
token_owner[writable]
destination_token[]
destination_owner[]
mint[writable]
metadata[optional]
edition[writable, optional]
token_record[writable, optional]
destination_token_record[signer]
authority[writable, signer]
payer[optional]
system_program (default to11111111111111111111111111111111
)[optional]
sysvar_instructions (default toSysvar1nstructions1111111111111111111111111
)[optional]
spl_token_program (default toTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
)[optional]
spl_ata_program (default toATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL
)[optional]
authorization_rules_program[optional]
authorization_rules
Implementations§
source§impl TransferV1Builder
impl TransferV1Builder
pub fn new() -> Self
sourcepub fn token_owner(&mut self, token_owner: Pubkey) -> &mut Self
pub fn token_owner(&mut self, token_owner: Pubkey) -> &mut Self
Token account owner
sourcepub fn destination_token(&mut self, destination_token: Pubkey) -> &mut Self
pub fn destination_token(&mut self, destination_token: Pubkey) -> &mut Self
Destination token account
sourcepub fn destination_owner(&mut self, destination_owner: Pubkey) -> &mut Self
pub fn destination_owner(&mut self, destination_owner: Pubkey) -> &mut Self
Destination token account owner
sourcepub fn metadata(&mut self, metadata: Pubkey) -> &mut Self
pub fn metadata(&mut self, metadata: Pubkey) -> &mut Self
Metadata (pda of [‘metadata’, program id, mint id])
sourcepub fn edition(&mut self, edition: Option<Pubkey>) -> &mut Self
pub fn edition(&mut self, edition: Option<Pubkey>) -> &mut Self
[optional account]
Edition of token asset
sourcepub fn token_record(&mut self, token_record: Option<Pubkey>) -> &mut Self
pub fn token_record(&mut self, token_record: Option<Pubkey>) -> &mut Self
[optional account]
Owner token record account
sourcepub fn destination_token_record(
&mut self,
destination_token_record: Option<Pubkey>
) -> &mut Self
pub fn destination_token_record( &mut self, destination_token_record: Option<Pubkey> ) -> &mut Self
[optional account]
Destination token record account
Transfer authority (token owner or delegate)
sourcepub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
pub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
[optional account, default to '11111111111111111111111111111111']
System Program
sourcepub fn sysvar_instructions(&mut self, sysvar_instructions: Pubkey) -> &mut Self
pub fn sysvar_instructions(&mut self, sysvar_instructions: Pubkey) -> &mut Self
[optional account, default to 'Sysvar1nstructions1111111111111111111111111']
Instructions sysvar account
sourcepub fn spl_token_program(&mut self, spl_token_program: Pubkey) -> &mut Self
pub fn spl_token_program(&mut self, spl_token_program: Pubkey) -> &mut Self
[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']
SPL Token Program
sourcepub fn spl_ata_program(&mut self, spl_ata_program: Pubkey) -> &mut Self
pub fn spl_ata_program(&mut self, spl_ata_program: Pubkey) -> &mut Self
[optional account, default to 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL']
SPL Associated Token Account program
[optional account]
Token Authorization Rules Program
[optional account]
Token Authorization Rules account
[optional argument]
sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an aditional 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.