lit_rust_sdk/
lib.rs

1//! # Lit Protocol Rust SDK
2//!
3//! A native Rust implementation of the Lit Protocol SDK, providing programmatic access
4//! to the Lit Network for distributed key management, conditional access control,
5//! and programmable signing.
6//!
7//! ## Quick Start
8//!
9//! ```no_run
10//! use lit_rust_sdk::{LitNetwork, LitNodeClient, LitNodeClientConfig};
11//! use std::time::Duration;
12//!
13//! #[tokio::main]
14//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
15//!     // Configure the client
16//!     let config = LitNodeClientConfig {
17//!         lit_network: LitNetwork::DatilDev,
18//!         alert_when_unauthorized: true,
19//!         debug: true,
20//!         connect_timeout: Duration::from_secs(30),
21//!         check_node_attestation: false,
22//!     };
23//!
24//!     // Create and connect to the Lit Network
25//!     let mut client = LitNodeClient::new(config).await?;
26//!     client.connect().await?;
27//!     
28//!     println!("Connected to {} nodes", client.connected_nodes().len());
29//!     Ok(())
30//! }
31//! ```
32//!
33//! ## Features
34//!
35//! - **PKP Management**: Mint and manage Programmable Key Pairs (PKPs)
36//! - **Session Signatures**: Generate and manage session signatures for authentication
37//! - **Lit Actions**: Execute JavaScript code on the Lit Network
38//! - **Capacity Delegation**: Delegate network capacity using Rate Limit NFTs
39//! - **Multi-Network Support**: Connect to Datil, DatilDev, and DatilTest networks
40//!
41//! ## Main Components
42//!
43//! - [`LitNodeClient`]: Main client for interacting with the Lit Network
44//! - [`LitNodeClientConfig`]: Configuration for the client
45//! - [`ExecuteJsParams`]: Parameters for executing Lit Actions
46//! - [`auth::EthWalletProvider`]: Ethereum wallet authentication provider
47//!
48//! For comprehensive documentation and examples, see the
49//! [GitHub repository](https://github.com/LIT-Protocol/rust-sdk).
50
51pub mod auth;
52pub mod blockchain;
53pub mod bls;
54pub mod client;
55pub mod config;
56pub mod types;
57
58pub use client::LitNodeClient;
59pub use config::{LitNetwork, LitNodeClientConfig};
60pub use types::{AuthMethod, AuthSig, ExecuteJsParams, ExecuteJsResponse, SessionSignatures, PKP};