pub trait LiquidationReader: Send + Sync {
// Required methods
fn get_liquidation_state<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<LiquidationStateRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_all_liquidation_states<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LiquidationStateRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_liquidation_history<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<(Vec<LiquidationHistoryRecord>, i64)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_recent_liquidation_history<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<LiquidationHistoryRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_liquidation_auction<'life0, 'life1, 'async_trait>(
&'life0 self,
auction_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<LiquidationAuctionRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_max_liquidation_observed_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_active_auctions_for_wallet<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<LiquidationAuctionRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Read-only liquidation queries.
Required Methods§
Sourcefn get_liquidation_state<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<LiquidationStateRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_liquidation_state<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<LiquidationStateRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Current liquidation state for a wallet (or None if healthy and never tracked).
Sourcefn get_all_liquidation_states<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LiquidationStateRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_liquidation_states<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LiquidationStateRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
All liquidation states across all wallets.
Sourcefn get_liquidation_history<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<(Vec<LiquidationHistoryRecord>, i64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_liquidation_history<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<(Vec<LiquidationHistoryRecord>, i64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Paginated liquidation history for a wallet. Returns (rows, total_count).
Sourcefn get_recent_liquidation_history<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<LiquidationHistoryRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_recent_liquidation_history<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<LiquidationHistoryRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Most recent liquidation history entries across all wallets.
Sourcefn get_liquidation_auction<'life0, 'life1, 'async_trait>(
&'life0 self,
auction_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<LiquidationAuctionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_liquidation_auction<'life0, 'life1, 'async_trait>(
&'life0 self,
auction_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<LiquidationAuctionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a single auction by ID.
Sourcefn get_max_liquidation_observed_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_max_liquidation_observed_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Highest last_observed_block across all auction rows.