MevShare
A Rust client library for subscribing to the Flashbots MEV-Share SSE event stream.
Usage
Add this to your Cargo.toml:
[]
= "0.1.1"
Then, add this to your crate:
use Client;
use StreamExt;
async
A Rust client library for subscribing to the Flashbots MEV-Share SSE event stream.
Add this to your Cargo.toml:
[dependencies]
mevshare = "0.1.1"
Then, add this to your crate:
use mevshare::Client;
use futures::StreamExt;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::builder().build();
let sub = client.subscribe().await?;
let mut stream = sub.into_stream();
while let Some(event) = stream.next().await {
println!("{event:#?}");
}
Ok(())
}