pub struct MempoolWsClient { /* private fields */ }Expand description
WebSocket client for real-time mempool data.
Note: This is a high-level API. Actual WebSocket connectivity
requires the tokio-tungstenite crate which can be added as
an optional dependency.
Implementations§
Source§impl MempoolWsClient
impl MempoolWsClient
Sourcepub async fn status(&self) -> WsConnectionStatus
pub async fn status(&self) -> WsConnectionStatus
Get current connection status.
Sourcepub async fn set_subscription(&self, subscription: WsSubscription)
pub async fn set_subscription(&self, subscription: WsSubscription)
Update subscription configuration.
Sourcepub async fn get_subscription(&self) -> WsSubscription
pub async fn get_subscription(&self) -> WsSubscription
Get current subscription.
Sourcepub async fn track_address(&self, address: impl Into<String>)
pub async fn track_address(&self, address: impl Into<String>)
Track an address for transactions.
Sourcepub async fn untrack_address(&self, address: &str)
pub async fn untrack_address(&self, address: &str)
Untrack an address.
Sourcepub async fn track_transaction(&self, txid: impl Into<String>)
pub async fn track_transaction(&self, txid: impl Into<String>)
Track a transaction for confirmation.
Sourcepub async fn untrack_transaction(&self, txid: &str)
pub async fn untrack_transaction(&self, txid: &str)
Untrack a transaction.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MempoolWsClient
impl !RefUnwindSafe for MempoolWsClient
impl Send for MempoolWsClient
impl Sync for MempoolWsClient
impl Unpin for MempoolWsClient
impl !UnwindSafe for MempoolWsClient
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