pub struct OpenPositionWithLiquidityOrcaBuilder { /* private fields */ }Expand description
Instruction builder for OpenPositionWithLiquidityOrca.
§Accounts:
[writable, signer]authority[]tuna_config[]mint_a[]mint_b[writable]market[writable]vault_a[writable]vault_b[writable]vault_a_ata[writable]vault_b_ata[writable]tuna_position[writable, signer]tuna_position_mint[writable]tuna_position_ata[writable]tuna_position_ata_a[writable]tuna_position_ata_b[writable]tuna_position_owner_ata_a[writable]tuna_position_owner_ata_b[writable]fee_recipient_ata_a[writable]fee_recipient_ata_b[]pyth_oracle_price_feed_a[]pyth_oracle_price_feed_b[]whirlpool_program[writable]whirlpool[writable]orca_position[]token_program_a[]token_program_b[]metadata_update_auth[]memo_program[]token2022_program[optional]system_program (default to11111111111111111111111111111111)[]associated_token_program
Implementations§
Source§impl OpenPositionWithLiquidityOrcaBuilder
impl OpenPositionWithLiquidityOrcaBuilder
pub fn new() -> Self
TUNA accounts
pub fn tuna_config(&mut self, tuna_config: Pubkey) -> &mut Self
pub fn mint_a(&mut self, mint_a: Pubkey) -> &mut Self
pub fn mint_b(&mut self, mint_b: Pubkey) -> &mut Self
pub fn market(&mut self, market: Pubkey) -> &mut Self
pub fn vault_a(&mut self, vault_a: Pubkey) -> &mut Self
pub fn vault_b(&mut self, vault_b: Pubkey) -> &mut Self
pub fn vault_a_ata(&mut self, vault_a_ata: Pubkey) -> &mut Self
pub fn vault_b_ata(&mut self, vault_b_ata: Pubkey) -> &mut Self
pub fn tuna_position(&mut self, tuna_position: Pubkey) -> &mut Self
pub fn tuna_position_mint(&mut self, tuna_position_mint: Pubkey) -> &mut Self
pub fn tuna_position_ata(&mut self, tuna_position_ata: Pubkey) -> &mut Self
pub fn tuna_position_ata_a(&mut self, tuna_position_ata_a: Pubkey) -> &mut Self
pub fn tuna_position_ata_b(&mut self, tuna_position_ata_b: Pubkey) -> &mut Self
pub fn tuna_position_owner_ata_a( &mut self, tuna_position_owner_ata_a: Pubkey, ) -> &mut Self
pub fn tuna_position_owner_ata_b( &mut self, tuna_position_owner_ata_b: Pubkey, ) -> &mut Self
pub fn fee_recipient_ata_a(&mut self, fee_recipient_ata_a: Pubkey) -> &mut Self
pub fn fee_recipient_ata_b(&mut self, fee_recipient_ata_b: Pubkey) -> &mut Self
pub fn pyth_oracle_price_feed_a( &mut self, pyth_oracle_price_feed_a: Pubkey, ) -> &mut Self
pub fn pyth_oracle_price_feed_b( &mut self, pyth_oracle_price_feed_b: Pubkey, ) -> &mut Self
Sourcepub fn whirlpool_program(&mut self, whirlpool_program: Pubkey) -> &mut Self
pub fn whirlpool_program(&mut self, whirlpool_program: Pubkey) -> &mut Self
ORCA accounts
pub fn whirlpool(&mut self, whirlpool: Pubkey) -> &mut Self
pub fn orca_position(&mut self, orca_position: Pubkey) -> &mut Self
pub fn token_program_a(&mut self, token_program_a: Pubkey) -> &mut Self
pub fn token_program_b(&mut self, token_program_b: Pubkey) -> &mut Self
pub fn metadata_update_auth( &mut self, metadata_update_auth: Pubkey, ) -> &mut Self
pub fn memo_program(&mut self, memo_program: Pubkey) -> &mut Self
Sourcepub fn token2022_program(&mut self, token2022_program: Pubkey) -> &mut Self
pub fn token2022_program(&mut self, token2022_program: Pubkey) -> &mut Self
Other accounts
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']
pub fn associated_token_program( &mut self, associated_token_program: Pubkey, ) -> &mut Self
pub fn tick_lower_index(&mut self, tick_lower_index: i32) -> &mut Self
pub fn tick_upper_index(&mut self, tick_upper_index: i32) -> &mut Self
pub fn tick_stop_loss_index(&mut self, tick_stop_loss_index: i32) -> &mut Self
pub fn tick_take_profit_index( &mut self, tick_take_profit_index: i32, ) -> &mut Self
pub fn flags(&mut self, flags: u32) -> &mut Self
pub fn collateral_a(&mut self, collateral_a: u64) -> &mut Self
pub fn collateral_b(&mut self, collateral_b: u64) -> &mut Self
pub fn borrow_a(&mut self, borrow_a: u64) -> &mut Self
pub fn borrow_b(&mut self, borrow_b: u64) -> &mut Self
pub fn min_added_amount_a(&mut self, min_added_amount_a: u64) -> &mut Self
pub fn min_added_amount_b(&mut self, min_added_amount_b: u64) -> &mut Self
pub fn max_swap_slippage(&mut self, max_swap_slippage: u32) -> &mut Self
pub fn remaining_accounts_info( &mut self, remaining_accounts_info: RemainingAccountsInfo, ) -> &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 OpenPositionWithLiquidityOrcaBuilder
impl Clone for OpenPositionWithLiquidityOrcaBuilder
Source§fn clone(&self) -> OpenPositionWithLiquidityOrcaBuilder
fn clone(&self) -> OpenPositionWithLiquidityOrcaBuilder
Returns a duplicate 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 moreSource§impl Default for OpenPositionWithLiquidityOrcaBuilder
impl Default for OpenPositionWithLiquidityOrcaBuilder
Source§fn default() -> OpenPositionWithLiquidityOrcaBuilder
fn default() -> OpenPositionWithLiquidityOrcaBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpenPositionWithLiquidityOrcaBuilder
impl RefUnwindSafe for OpenPositionWithLiquidityOrcaBuilder
impl Send for OpenPositionWithLiquidityOrcaBuilder
impl Sync for OpenPositionWithLiquidityOrcaBuilder
impl Unpin for OpenPositionWithLiquidityOrcaBuilder
impl UnwindSafe for OpenPositionWithLiquidityOrcaBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.