-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.rs
More file actions
54 lines (45 loc) · 1.4 KB
/
lib.rs
File metadata and controls
54 lines (45 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#![doc = include_str!("../README.md")]
#![warn(
missing_copy_implementations,
missing_debug_implementations,
missing_docs,
unreachable_pub,
clippy::missing_const_for_fn,
rustdoc::all
)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
pub(crate) mod config;
pub use config::{
BlockTags, ChainNotifier, StorageRpcConfig, StorageRpcConfigEnv, StorageRpcCtx, SyncStatus,
};
mod eth;
pub use eth::EthError;
mod interest;
pub use interest::{ChainEvent, NewBlockNotification, RemovedBlock, ReorgNotification};
mod debug;
pub use debug::DebugError;
mod trace;
pub use trace::TraceError;
mod signet;
pub use signet::error::SignetError;
mod net;
mod web3;
pub mod serve;
pub use serve::{RpcServerGuard, ServeConfig, ServeConfigEnv, ServeError};
/// Instantiate a combined router with `eth`, `debug`, `trace`, `signet`,
/// `web3`, and `net` namespaces.
pub fn router<H>() -> ajj::Router<StorageRpcCtx<H>>
where
H: signet_hot::HotKv + Send + Sync + 'static,
<H::RoTx as signet_hot::model::HotKvRead>::Error: trevm::revm::database::DBErrorMarker,
{
ajj::Router::new()
.nest("eth", eth::eth())
.nest("debug", debug::debug())
.nest("trace", trace::trace())
.nest("signet", signet::signet())
.nest("web3", web3::web3())
.nest("net", net::net())
}