78 lines
2.5 KiB
Rust
78 lines
2.5 KiB
Rust
#![warn(missing_debug_implementations, rust_2018_idioms, unreachable_pub)]
|
|
#![deny(rustdoc::broken_intra_doc_links)]
|
|
#![doc(test(
|
|
no_crate_inject,
|
|
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
|
))]
|
|
|
|
//! # Ethereum light client written in Rust.
|
|
//!
|
|
//! > helios is a fully trustless, efficient, and portable Ethereum light client written in Rust.
|
|
//!
|
|
//! Helios converts an untrusted centralized RPC endpoint into a safe unmanipulable local RPC for its users. It syncs in seconds, requires no storage, and is lightweight enough to run on mobile devices.
|
|
//!
|
|
//! The entire size of Helios's binary is 13Mb and should be easy to compile into WebAssembly. This makes it a perfect target to embed directly inside wallets and dapps.
|
|
//!
|
|
//! ## Quickstart: `prelude`
|
|
//!
|
|
//! The prelude imports all the necessary data types and traits from helios. Use this to quickly bootstrap a new project.
|
|
//!
|
|
//! ```no_run
|
|
//! # #[allow(unused)]
|
|
//! use helios::prelude::*;
|
|
//! ```
|
|
//!
|
|
//! Examples on how you can use the types imported by the prelude can be found in
|
|
//! the [`examples` directory of the repository](https://github.com/a16z/helios/tree/master/examples)
|
|
//! and in the `tests/` directories of each crate.
|
|
//!
|
|
//! ## Breakdown of exported helios modules
|
|
//!
|
|
//! ### `client`
|
|
//!
|
|
//! The `client` module exports three main types: `Client`, `ClientBuilder`, and `FileDB`.
|
|
//!
|
|
//! `ClientBuilder` is a builder for the `Client` type. It allows you to configure the client using the fluent builder pattern.
|
|
//!
|
|
//! `Client` serves Ethereum RPC endpoints locally that call a node on the backend.
|
|
//!
|
|
//! Finally, the `FileDB` type is a simple local database. It is used by the `Client` to store checkpoint data.
|
|
//!
|
|
//! ### `config`
|
|
//!
|
|
//! The `config` module provides the configuration types for all of helios. It is used by the `ClientBuilder` to configure the `Client`.
|
|
//!
|
|
//! ### `types`
|
|
//!
|
|
//! Generic types used across helios.
|
|
//!
|
|
//! ### `errors`
|
|
//!
|
|
//! Errors used across helios.
|
|
|
|
pub mod client {
|
|
pub use client::{database::FileDB, Client, ClientBuilder};
|
|
}
|
|
|
|
pub mod config {
|
|
pub use config::{networks, Config};
|
|
}
|
|
|
|
pub mod types {
|
|
pub use common::types::BlockTag;
|
|
pub use execution::types::CallOpts;
|
|
}
|
|
|
|
pub mod errors {
|
|
pub use common::errors::*;
|
|
pub use consensus::errors::*;
|
|
pub use execution::errors::*;
|
|
}
|
|
|
|
pub mod prelude {
|
|
pub use crate::client::*;
|
|
pub use crate::config::*;
|
|
pub use crate::errors::*;
|
|
pub use crate::types::*;
|
|
}
|