saorsa_node/lib.rs
1//! # saorsa-node
2//!
3//! A pure quantum-proof network node for the Saorsa decentralized network.
4//!
5//! This crate provides a thin wrapper around `saorsa-core` that adds:
6//! - Auto-upgrade system with ML-DSA signature verification
7//! - CLI interface and configuration
8//! - Content-addressed chunk storage with EVM payment
9//!
10//! ## Architecture
11//!
12//! `saorsa-node` delegates all core functionality to `saorsa-core`:
13//! - Networking via `NetworkCoordinator`
14//! - DHT via `TrustWeightedKademlia`
15//! - Trust via `EigenTrustEngine`
16//! - Security via `SecurityManager`
17//!
18//! ## Data Types
19//!
20//! Currently supports a single data type:
21//! - **Chunk**: Immutable content-addressed data (hash(value) == key)
22//!
23//! ## Example
24//!
25//! ```rust,no_run
26//! use saorsa_node::{NodeBuilder, NodeConfig};
27//!
28//! #[tokio::main]
29//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
30//! let config = NodeConfig::default();
31//! let mut node = NodeBuilder::new(config).build().await?;
32//! node.run().await?;
33//! Ok(())
34//! }
35//! ```
36
37#![forbid(unsafe_code)]
38#![warn(missing_docs)]
39#![warn(clippy::all)]
40#![warn(clippy::pedantic)]
41
42pub mod attestation;
43pub mod client;
44pub mod config;
45pub mod error;
46pub mod event;
47pub mod node;
48pub mod payment;
49#[cfg(test)]
50mod probe;
51pub mod upgrade;
52
53pub use client::{DataChunk, QuantumClient, QuantumConfig, XorName};
54pub use config::{BootstrapCacheConfig, NodeConfig};
55pub use error::{Error, Result};
56pub use event::{NodeEvent, NodeEventsChannel};
57pub use node::{NodeBuilder, RunningNode};
58pub use payment::{PaymentStatus, PaymentVerifier, PaymentVerifierConfig};