Skip to main content

reth_ethereum/
lib.rs

1//! Ethereum meta crate that provides access to commonly used reth dependencies.
2
3#![doc(
4    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5    html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6    issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7)]
8#![cfg_attr(not(test), warn(unused_crate_dependencies))]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10#![cfg_attr(not(feature = "std"), no_std)]
11
12/// Re-exported ethereum types
13#[doc(inline)]
14pub use reth_ethereum_primitives::*;
15
16/// Re-exported reth primitives
17pub mod primitives {
18    #[doc(inline)]
19    pub use reth_primitives_traits::*;
20}
21
22/// Re-exported cli types
23#[cfg(feature = "cli")]
24pub mod cli {
25    #[doc(inline)]
26    pub use reth_cli_util::*;
27    #[doc(inline)]
28    pub use reth_ethereum_cli::*;
29}
30
31/// Re-exported pool types
32#[cfg(feature = "pool")]
33pub use reth_transaction_pool as pool;
34
35/// Re-exported consensus types
36#[cfg(feature = "consensus")]
37pub mod consensus {
38    #[doc(inline)]
39    pub use reth_consensus::*;
40    pub use reth_consensus_common::*;
41    pub use reth_ethereum_consensus::*;
42}
43
44/// Re-exported from `reth_chainspec`
45pub mod chainspec {
46    #[doc(inline)]
47    pub use reth_chainspec::*;
48}
49
50/// Re-exported evm types
51#[cfg(feature = "evm")]
52pub mod evm {
53    #[doc(inline)]
54    pub use reth_evm_ethereum::*;
55
56    #[doc(inline)]
57    pub use reth_evm as primitives;
58}
59
60/// Re-exported exex types
61#[cfg(feature = "exex")]
62pub use reth_exex as exex;
63
64/// Re-exported from `tasks`.
65#[cfg(feature = "tasks")]
66pub mod tasks {
67    pub use reth_tasks::*;
68}
69
70/// Re-exported reth network types
71#[cfg(feature = "network")]
72pub mod network {
73    #[doc(inline)]
74    pub use reth_eth_wire as eth_wire;
75    #[doc(inline)]
76    pub use reth_network::*;
77    #[doc(inline)]
78    pub use reth_network_api as api;
79}
80
81/// Re-exported reth provider types
82#[cfg(feature = "provider")]
83pub mod provider {
84    #[doc(inline)]
85    pub use reth_provider::*;
86
87    #[doc(inline)]
88    pub use reth_db as db;
89}
90
91/// Re-exported codec crate
92#[cfg(feature = "provider")]
93pub use reth_codecs as codec;
94
95/// Re-exported reth storage api types
96#[cfg(feature = "storage-api")]
97pub mod storage {
98    #[doc(inline)]
99    pub use reth_storage_api::*;
100}
101
102/// Re-exported ethereum node
103#[cfg(feature = "node-api")]
104pub mod node {
105    #[doc(inline)]
106    pub use reth_node_api as api;
107    #[cfg(feature = "node")]
108    pub use reth_node_builder as builder;
109    #[doc(inline)]
110    pub use reth_node_core as core;
111    #[cfg(feature = "node")]
112    pub use reth_node_ethereum::*;
113}
114
115/// Re-exported ethereum engine types
116#[cfg(feature = "node")]
117pub mod engine {
118    #[doc(inline)]
119    pub use reth_engine_local as local;
120    #[doc(inline)]
121    pub use reth_node_ethereum::engine::*;
122}
123
124/// Re-exported reth trie types
125#[cfg(feature = "trie")]
126pub mod trie {
127    #[doc(inline)]
128    pub use reth_trie::*;
129
130    #[cfg(feature = "trie-db")]
131    #[doc(inline)]
132    pub use reth_trie_db::*;
133}
134
135/// Re-exported rpc types
136#[cfg(feature = "rpc")]
137pub mod rpc {
138    #[doc(inline)]
139    pub use reth_rpc::*;
140
141    #[doc(inline)]
142    pub use reth_rpc_api as api;
143    #[doc(inline)]
144    pub use reth_rpc_builder as builder;
145
146    /// Re-exported eth types
147    #[allow(ambiguous_glob_reexports)]
148    pub mod eth {
149        #[doc(inline)]
150        pub use alloy_rpc_types_eth as primitives;
151        #[doc(inline)]
152        pub use reth_rpc_eth_types::*;
153
154        pub use reth_rpc::eth::*;
155    }
156
157    /// Re-exported types
158    pub mod types {
159        #[doc(inline)]
160        pub use alloy_rpc_types_engine as engine;
161    }
162}