lightspeed_sdk/lib.rs
1//! # Lightspeed SDK for Rust
2//!
3//! Official Rust SDK for the Solana Vibe Station Lightspeed RPC service.
4//!
5//! Lightspeed provides prioritized transaction processing on Solana through
6//! an optimized RPC endpoint with automatic tip management.
7//!
8//! ## Features
9//!
10//! - Automatic tip injection for transaction prioritization
11//! - Multiple priority levels (Standard, Rush, Custom)
12//! - Built-in keep-alive connection management
13//! - Simple and intuitive API
14//! - Full compatibility with solana-sdk
15//!
16//! ## Quick Start
17//!
18//! ```rust
19//! use lightspeed_sdk::{LightspeedClientBuilder, Priority};
20//!
21//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
22//! let client = LightspeedClientBuilder::new("your-api-key")
23//! .svs_rpc_url("https://basic.rpc.solanavibestation.com")
24//! .default_priority(Priority::Minimum)
25//! .build()?;
26//!
27//! // Start keep-alive to maintain connection
28//! client.start_keep_alive().await?;
29//!
30//! // Send transactions with automatic tip management
31//! // ... transaction code here ...
32//! # Ok(())
33//! # }
34//! ```
35
36mod client;
37mod config;
38mod error;
39mod types;
40
41// Re-export main types for convenience
42pub use client::LightspeedClient;
43pub use config::{LightspeedConfig, LightspeedClientBuilder};
44pub use error::LightspeedError;
45pub use types::{Priority, TransactionResult};
46
47// Re-export constants
48pub use client::{LIGHTSPEED_TIP_ADDRESS, MIN_TIP_LAMPORTS};