jito-client-0.2.0 has been yanked.
Jito Client
A Rust client for interacting with the Jito network, supporting rate limiting, multi-IP usage, and broadcasting requests to multiple endpoints.
Features
- Send single transactions or transaction bundles.
- Rate limiting (requests per second).
- Support for multiple IPv4 and IPv6 addresses.
- Broadcast requests to multiple URLs simultaneously.
- Easy-to-use builder pattern for client configuration.
- Fetch Jito tips and bundle statuses.
Usage
Default
use jito_client::*;
#[tokio::main]
async fn main() {
let client = JitoClient::new();
let response = client.send_bundle(&["tx"]).await.unwrap();
println!("{:?}", response);
let bid = client.send_bundle_bid(&["tx"]).await.unwrap();
println!("{:?}", bid);
}
Customized
use jito_client::*;
#[tokio::main]
async fn main() {
let client = JitoClientBuilder::new()
.interval(Duration::from_millis(1000))
.ip(get_ipv4_list().unwrap())
.url(&[
"https://amsterdam.mainnet.block-engine.jito.wtf",
"https://tokyo.mainnet.block-engine.jito.wtf",
"https://london.mainnet.block-engine.jito.wtf",
])
.build()
.unwrap();
let client = JitoClientBuilder::new()
.broadcast(true)
.interval(Duration::from_millis(1000))
.ip(get_ipv4_list().unwrap())
.url(&[
"https://amsterdam.mainnet.block-engine.jito.wtf",
"https://tokyo.mainnet.block-engine.jito.wtf",
"https://london.mainnet.block-engine.jito.wtf",
])
.build()
.unwrap();
let client = JitoClientBuilder::new()
.timeout(Duration::from_millis(5000))
.headers(HeaderMap::new())
.proxy(Proxy::all("http://127.0.0.1:7890"))
.build()
.unwrap();
}
Tip
The Jito server may enforce rate limits at multiple levels: global, IP, and wallet.
-
Global: For example, the server may handle up to 10000 requests per second in total, regardless of which IP or wallet the requests come from.
-
IP: For example, each IP can make up to 5 requests per second.
-
Wallet: For example, each wallet can submit up to 5 transaction requests per second.