pub struct LockBuilder { /* private fields */ }Expand description
Instruction builder for Lock.
§Accounts:
[signer]authority[optional]token_owner[writable]token[]mint[writable]metadata[optional]edition[writable, optional]token_record[writable, signer]payer[optional]system_program (default to11111111111111111111111111111111)[optional]sysvar_instructions (default toSysvar1nstructions1111111111111111111111111)[optional]spl_token_program[optional]authorization_rules_program[optional]authorization_rules
Implementations§
Source§impl LockBuilder
impl LockBuilder
pub fn new() -> Self
Delegate or freeze authority
Sourcepub fn token_owner(&mut self, token_owner: Option<Pubkey>) -> &mut Self
pub fn token_owner(&mut self, token_owner: Option<Pubkey>) -> &mut Self
[optional account]
Token owner account
Sourcepub fn edition(&mut self, edition: Option<Pubkey>) -> &mut Self
pub fn edition(&mut self, edition: Option<Pubkey>) -> &mut Self
[optional account]
Edition account
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]
Token record account
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']
System program
Sourcepub fn spl_token_program(
&mut self,
spl_token_program: Option<Pubkey>,
) -> &mut Self
pub fn spl_token_program( &mut self, spl_token_program: Option<Pubkey>, ) -> &mut Self
[optional account]
SPL Token Program
[optional account]
Token Authorization Rules Program
[optional account]
Token Authorization Rules account
pub fn lock_args(&mut self, lock_args: LockArgs) -> &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 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.
pub fn instruction(&self) -> Instruction
Trait Implementations§
Source§impl Default for LockBuilder
impl Default for LockBuilder
Source§fn default() -> LockBuilder
fn default() -> LockBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LockBuilder
impl RefUnwindSafe for LockBuilder
impl Send for LockBuilder
impl Sync for LockBuilder
impl Unpin for LockBuilder
impl UnsafeUnpin for LockBuilder
impl UnwindSafe for LockBuilder
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