Skip to main content

chainrpc_core/
lib.rs

1//! chainrpc-core — foundation traits and types for ChainRPC.
2//!
3//! # Overview
4//!
5//! ChainRPC provides a production-grade, multi-provider RPC transport layer
6//! for EVM (and other) blockchains. The core crate defines:
7//!
8//! - [`RpcTransport`] — the central async trait every transport implements
9//! - [`JsonRpcRequest`] / [`JsonRpcResponse`] — wire types
10//! - [`TransportError`] — structured error type
11//! - [`HealthStatus`] — provider liveness check
12//! - [`policy`] module — retry, circuit breaker, rate limiter
13//! - [`pool`] module — multi-provider failover pool
14
15pub mod backpressure;
16pub mod batch;
17pub mod cache;
18pub mod cancellation;
19pub mod cu_tracker;
20pub mod dedup;
21pub mod error;
22pub mod gas;
23pub mod gas_bumper;
24pub mod geo_routing;
25pub mod health_checker;
26pub mod hedging;
27pub mod method_safety;
28pub mod metrics;
29pub mod mev;
30pub mod multi_chain;
31pub mod pending_pool;
32pub mod policy;
33pub mod pool;
34pub mod rate_limit_headers;
35pub mod reorg;
36pub mod request;
37pub mod routing;
38pub mod selection;
39pub mod shutdown;
40pub mod solana;
41pub mod transport;
42pub mod tx;
43pub mod tx_lifecycle;
44
45pub use error::TransportError;
46pub use pool::{ProviderPool, ProviderPoolConfig};
47pub use request::{JsonRpcRequest, JsonRpcResponse, RpcId, RpcParam};
48pub use transport::{HealthStatus, RpcTransport};