1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! # helius-stream
//!
//! A resilient WebSocket client for Helius RPC on Solana.
//!
//! Built for production: gap detection, reconnect backoff with exponential
//! jitter, circuit-breaker-friendly state machine, and zero panic surface.
//!
//! Extracted from `prometheus9`, an MEV engine that ran 15h on Solana mainnet
//! against Raydium AMM v4 and Orca Whirlpool. The original engine subscribed
//! to specific vault accounts; this crate exposes the same machinery as a
//! general-purpose primitive.
//!
//! ## Quick start
//!
//! ```no_run
//! use helius_stream::{HeliusStream, StreamConfig};
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let config = StreamConfig::mainnet(std::env::var("HELIUS_API_KEY")?);
//! let mut stream = HeliusStream::connect(config)?;
//!
//! // USDC mint as an example
//! stream.subscribe_account_b58("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v")?;
//!
//! while let Some(update) = stream.next_update() {
//! if stream.is_safe_for_simulation() {
//! println!("slot={} lamports={} bytes={}",
//! update.slot, update.lamports, update.data.len());
//! }
//! }
//! # Ok(()) }
//! ```
//!
//! ## Why not just use `solana-client`?
//!
//! `solana-client` pulls in 200+ transitive dependencies. This crate has 8.
//! For workloads that only need account subscriptions, that matters.
pub use StreamError;
pub use ;
pub use HeliusStream;
pub use ;