pub struct VaultClient {
pub v1: VaultV1Client,
pub v2: VaultV2Client,
}Expand description
Combined client for querying both V1 and V2 vaults.
Fields§
§v1: VaultV1ClientV1 vault client.
v2: VaultV2ClientV2 vault client.
Implementations§
Source§impl VaultClient
impl VaultClient
Sourcepub fn with_config(config: ClientConfig) -> Self
pub fn with_config(config: ClientConfig) -> Self
Create a new combined vault client with custom configuration.
Sourcepub async fn get_vaults_by_chain(&self, chain: Chain) -> Result<Vec<Vault>>
pub async fn get_vaults_by_chain(&self, chain: Chain) -> Result<Vec<Vault>>
Get vaults (V1 and V2) on a specific chain as unified Vault type.
Sourcepub async fn get_whitelisted_vaults(
&self,
chain: Option<Chain>,
) -> Result<Vec<Vault>>
pub async fn get_whitelisted_vaults( &self, chain: Option<Chain>, ) -> Result<Vec<Vault>>
Get whitelisted vaults (V1 and V2) as unified Vault type.
Sourcepub async fn get_user_vault_positions(
&self,
address: &str,
chain: Option<Chain>,
) -> Result<UserVaultPositions>
pub async fn get_user_vault_positions( &self, address: &str, chain: Option<Chain>, ) -> Result<UserVaultPositions>
Get all vault positions (V1 and V2) for a user.
If chain is Some, queries only that chain.
If chain is None, queries all supported chains and aggregates results.
Sourcepub async fn get_user_account_overview(
&self,
address: &str,
chain: Chain,
) -> Result<UserAccountOverview>
pub async fn get_user_account_overview( &self, address: &str, chain: Chain, ) -> Result<UserAccountOverview>
Get complete account overview for a user on a specific chain.
Trait Implementations§
Source§impl Clone for VaultClient
impl Clone for VaultClient
Source§fn clone(&self) -> VaultClient
fn clone(&self) -> VaultClient
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 Debug for VaultClient
impl Debug for VaultClient
Auto Trait Implementations§
impl Freeze for VaultClient
impl !RefUnwindSafe for VaultClient
impl Send for VaultClient
impl Sync for VaultClient
impl Unpin for VaultClient
impl !UnwindSafe for VaultClient
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
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 more