pub struct StabilityPoolClient { /* private fields */ }Implementations§
Source§impl StabilityPoolClient
impl StabilityPoolClient
Sourcepub async fn rebalance_stable_to_lever(&self) -> Result<Signature>
pub async fn rebalance_stable_to_lever(&self) -> Result<Signature>
Sourcepub async fn rebalance_lever_to_stable(&self) -> Result<Signature>
pub async fn rebalance_lever_to_stable(&self) -> Result<Signature>
Sourcepub async fn simulate_get_stats(&self) -> Result<StabilityPoolStats>
pub async fn simulate_get_stats(&self) -> Result<StabilityPoolStats>
Simulates the get_stats instruction on the stability pool.
§Errors
- Simulation failure
- Return data access or deserialization
Trait Implementations§
Source§impl ProgramClient for StabilityPoolClient
impl ProgramClient for StabilityPoolClient
const PROGRAM_ID: Pubkey = stability_pool::ID
fn build_client( program: Program<Arc<Keypair>>, keypair: Arc<Keypair>, ) -> StabilityPoolClient
fn program(&self) -> &Program<Arc<Keypair>>
fn keypair(&self) -> Arc<Keypair>
Source§fn new_from_keypair(
cluster: Cluster,
keypair: Keypair,
config: CommitmentConfig,
) -> Result<Self>
fn new_from_keypair( cluster: Cluster, keypair: Keypair, config: CommitmentConfig, ) -> Result<Self>
Constructs the given client with ID
Self::PROGRAM_ID. Read moreSource§fn send_v0_transaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instructions: &'life1 [Instruction],
lookup_tables: &'life2 [AddressLookupTableAccount],
) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_v0_transaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instructions: &'life1 [Instruction],
lookup_tables: &'life2 [AddressLookupTableAccount],
) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Builds a versioned transaction from instructions and lookup tables. Read more
Source§fn load_lst_registry<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(Vec<AccountMeta>, AddressLookupTableAccount)>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn load_lst_registry<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(Vec<AccountMeta>, AddressLookupTableAccount)>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Creates
remaining_accounts array from LST registry table with all
headers writable. Read moreSource§fn load_lookup_table<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<AddressLookupTableAccount>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_lookup_table<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<AddressLookupTableAccount>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads an address lookup table by public key. Read more
Source§fn load_multiple_lookup_tables<'life0, 'life1, 'async_trait>(
&'life0 self,
pubkeys: &'life1 [Pubkey],
) -> Pin<Box<dyn Future<Output = Result<Vec<AddressLookupTableAccount>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_multiple_lookup_tables<'life0, 'life1, 'async_trait>(
&'life0 self,
pubkeys: &'life1 [Pubkey],
) -> Pin<Box<dyn Future<Output = Result<Vec<AddressLookupTableAccount>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads address lookup tables at given addresses. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StabilityPoolClient
impl !UnwindSafe for StabilityPoolClient
impl Freeze for StabilityPoolClient
impl Send for StabilityPoolClient
impl Sync for StabilityPoolClient
impl Unpin for StabilityPoolClient
impl UnsafeUnpin for StabilityPoolClient
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more