pub struct TwoHopSwapBuilder { /* private fields */ }
Expand description
Instruction builder for TwoHopSwap
.
§Accounts:
[optional]
token_program (default toTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
)[signer]
token_authority[writable]
whirlpool_one[writable]
whirlpool_two[writable]
token_owner_account_one_a[writable]
token_vault_one_a[writable]
token_owner_account_one_b[writable]
token_vault_one_b[writable]
token_owner_account_two_a[writable]
token_vault_two_a[writable]
token_owner_account_two_b[writable]
token_vault_two_b[writable]
tick_array_one0[writable]
tick_array_one1[writable]
tick_array_one2[writable]
tick_array_two0[writable]
tick_array_two1[writable]
tick_array_two2[]
oracle_one[]
oracle_two
Implementations§
§impl TwoHopSwapBuilder
impl TwoHopSwapBuilder
pub fn new() -> TwoHopSwapBuilder
pub fn token_program(&mut self, token_program: Pubkey) -> &mut TwoHopSwapBuilder
pub fn token_program(&mut self, token_program: Pubkey) -> &mut TwoHopSwapBuilder
[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']
pub fn whirlpool_one(&mut self, whirlpool_one: Pubkey) -> &mut TwoHopSwapBuilder
pub fn whirlpool_two(&mut self, whirlpool_two: Pubkey) -> &mut TwoHopSwapBuilder
pub fn token_owner_account_one_a( &mut self, token_owner_account_one_a: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn token_vault_one_a( &mut self, token_vault_one_a: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn token_owner_account_one_b( &mut self, token_owner_account_one_b: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn token_vault_one_b( &mut self, token_vault_one_b: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn token_owner_account_two_a( &mut self, token_owner_account_two_a: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn token_vault_two_a( &mut self, token_vault_two_a: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn token_owner_account_two_b( &mut self, token_owner_account_two_b: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn token_vault_two_b( &mut self, token_vault_two_b: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn tick_array_one0( &mut self, tick_array_one0: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn tick_array_one1( &mut self, tick_array_one1: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn tick_array_one2( &mut self, tick_array_one2: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn tick_array_two0( &mut self, tick_array_two0: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn tick_array_two1( &mut self, tick_array_two1: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn tick_array_two2( &mut self, tick_array_two2: Pubkey, ) -> &mut TwoHopSwapBuilder
pub fn oracle_one(&mut self, oracle_one: Pubkey) -> &mut TwoHopSwapBuilder
pub fn oracle_two(&mut self, oracle_two: Pubkey) -> &mut TwoHopSwapBuilder
pub fn amount(&mut self, amount: u64) -> &mut TwoHopSwapBuilder
pub fn other_amount_threshold( &mut self, other_amount_threshold: u64, ) -> &mut TwoHopSwapBuilder
pub fn amount_specified_is_input( &mut self, amount_specified_is_input: bool, ) -> &mut TwoHopSwapBuilder
pub fn a_to_b_one(&mut self, a_to_b_one: bool) -> &mut TwoHopSwapBuilder
pub fn a_to_b_two(&mut self, a_to_b_two: bool) -> &mut TwoHopSwapBuilder
pub fn sqrt_price_limit_one( &mut self, sqrt_price_limit_one: u128, ) -> &mut TwoHopSwapBuilder
pub fn sqrt_price_limit_two( &mut self, sqrt_price_limit_two: u128, ) -> &mut TwoHopSwapBuilder
pub fn add_remaining_account(
&mut self,
account: AccountMeta,
) -> &mut TwoHopSwapBuilder
pub fn add_remaining_account( &mut self, account: AccountMeta, ) -> &mut TwoHopSwapBuilder
Add an additional account to the instruction.
pub fn add_remaining_accounts(
&mut self,
accounts: &[AccountMeta],
) -> &mut TwoHopSwapBuilder
pub fn add_remaining_accounts( &mut self, accounts: &[AccountMeta], ) -> &mut TwoHopSwapBuilder
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
§impl Clone for TwoHopSwapBuilder
impl Clone for TwoHopSwapBuilder
§fn clone(&self) -> TwoHopSwapBuilder
fn clone(&self) -> TwoHopSwapBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for TwoHopSwapBuilder
impl Debug for TwoHopSwapBuilder
§impl Default for TwoHopSwapBuilder
impl Default for TwoHopSwapBuilder
§fn default() -> TwoHopSwapBuilder
fn default() -> TwoHopSwapBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TwoHopSwapBuilder
impl RefUnwindSafe for TwoHopSwapBuilder
impl Send for TwoHopSwapBuilder
impl Sync for TwoHopSwapBuilder
impl Unpin for TwoHopSwapBuilder
impl UnwindSafe for TwoHopSwapBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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