reth_rpc_api/
rpc.rs

1use alloy_rpc_types::RpcModules;
2use jsonrpsee::{core::RpcResult, proc_macros::rpc};
3
4/// RPC namespace, used to find the versions of all rpc modules
5#[cfg_attr(not(feature = "client"), rpc(server, namespace = "rpc"))]
6#[cfg_attr(feature = "client", rpc(server, client, namespace = "rpc"))]
7pub trait RpcApi {
8    /// Lists enabled APIs and the version of each.
9    #[method(name = "modules")]
10    fn rpc_modules(&self) -> RpcResult<RpcModules>;
11}