pub struct LockOrderBuilder { /* private fields */ }Expand description
Instruction builder for LockOrder.
§Accounts:
[writable]fee_vault[writable, signer]taker[optional]deprecated_cosigner[writable]order_state[writable]order_vault[writable]maker[writable, optional]margin_account[writable, optional]maker_broker[writable, optional]taker_broker[optional]token_program (default toTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA)[optional]system_program (default to11111111111111111111111111111111)[optional]associated_token_program (default toATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL)[optional]tensorswap_program (default toTSWAPaqyCSx2KABk68Shruf4rp7CxcNi8hAsbdwmHbN)[]tlock_program[writable, optional]order_nft_receipt
Implementations§
Source§impl LockOrderBuilder
impl LockOrderBuilder
pub fn new() -> Self
pub fn fee_vault(&mut self, fee_vault: Pubkey) -> &mut Self
pub fn taker(&mut self, taker: Pubkey) -> &mut Self
Sourcepub fn deprecated_cosigner(
&mut self,
deprecated_cosigner: Option<Pubkey>,
) -> &mut Self
pub fn deprecated_cosigner( &mut self, deprecated_cosigner: Option<Pubkey>, ) -> &mut Self
[optional account]
Deprecated: In place for backwards compatibility, but can be left to default to program_id.
pub fn order_state(&mut self, order_state: Pubkey) -> &mut Self
pub fn order_vault(&mut self, order_vault: Pubkey) -> &mut Self
pub fn maker(&mut self, maker: Pubkey) -> &mut Self
Sourcepub fn margin_account(&mut self, margin_account: Option<Pubkey>) -> &mut Self
pub fn margin_account(&mut self, margin_account: Option<Pubkey>) -> &mut Self
[optional account]
Sourcepub fn maker_broker(&mut self, maker_broker: Option<Pubkey>) -> &mut Self
pub fn maker_broker(&mut self, maker_broker: Option<Pubkey>) -> &mut Self
[optional account]
Sourcepub fn taker_broker(&mut self, taker_broker: Option<Pubkey>) -> &mut Self
pub fn taker_broker(&mut self, taker_broker: Option<Pubkey>) -> &mut Self
[optional account]
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 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']
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']
Sourcepub fn associated_token_program(
&mut self,
associated_token_program: Pubkey,
) -> &mut Self
pub fn associated_token_program( &mut self, associated_token_program: Pubkey, ) -> &mut Self
[optional account, default to 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL']
Sourcepub fn tensorswap_program(&mut self, tensorswap_program: Pubkey) -> &mut Self
pub fn tensorswap_program(&mut self, tensorswap_program: Pubkey) -> &mut Self
[optional account, default to 'TSWAPaqyCSx2KABk68Shruf4rp7CxcNi8hAsbdwmHbN']
pub fn tlock_program(&mut self, tlock_program: Pubkey) -> &mut Self
Sourcepub fn order_nft_receipt(
&mut self,
order_nft_receipt: Option<Pubkey>,
) -> &mut Self
pub fn order_nft_receipt( &mut self, order_nft_receipt: Option<Pubkey>, ) -> &mut Self
[optional account]
The NFT deposit receipt account, which tracks an NFT to the order state it was deposited to.
pub fn price(&mut self, price: u64) -> &mut Self
pub fn nonce(&mut self, nonce: u32) -> &mut Self
pub fn apr_bps(&mut self, apr_bps: u32) -> &mut Self
Sourcepub fn duration_sec(&mut self, duration_sec: u32) -> &mut Self
pub fn duration_sec(&mut self, duration_sec: u32) -> &mut Self
[optional argument, defaults to '604800']
Sourcepub fn early_close(&mut self, early_close: bool) -> &mut Self
pub fn early_close(&mut self, early_close: bool) -> &mut Self
[optional argument, defaults to 'true']
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 Clone for LockOrderBuilder
impl Clone for LockOrderBuilder
Source§fn clone(&self) -> LockOrderBuilder
fn clone(&self) -> LockOrderBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LockOrderBuilder
impl Debug for LockOrderBuilder
Source§impl Default for LockOrderBuilder
impl Default for LockOrderBuilder
Source§fn default() -> LockOrderBuilder
fn default() -> LockOrderBuilder
Auto Trait Implementations§
impl Freeze for LockOrderBuilder
impl RefUnwindSafe for LockOrderBuilder
impl Send for LockOrderBuilder
impl Sync for LockOrderBuilder
impl Unpin for LockOrderBuilder
impl UnsafeUnpin for LockOrderBuilder
impl UnwindSafe for LockOrderBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more