Files
reth/crates/rpc/rpc-api/src/rpc.rs
2024-09-22 14:29:35 +00:00

12 lines
448 B
Rust

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