diff --git a/crates/net/rpc/src/debug.rs b/crates/net/rpc/src/debug.rs new file mode 100644 index 0000000000..577645fa85 --- /dev/null +++ b/crates/net/rpc/src/debug.rs @@ -0,0 +1,41 @@ +use async_trait::async_trait; +use jsonrpsee::core::RpcResult as Result; +use reth_primitives::{rpc::BlockId, Bytes, H256}; +use reth_rpc_api::DebugApiServer; +use reth_rpc_types::RichBlock; + +/// `debug` API implementation. +/// +/// This type provides the functionality for handling `debug` related requests. +pub struct DebugApi { + // TODO: add proper handler when implementing functions +} + +#[async_trait] +impl DebugApiServer for DebugApi { + async fn raw_header(&self, _block_id: BlockId) -> Result { + todo!() + } + + async fn raw_block(&self, _block_id: BlockId) -> Result { + todo!() + } + + async fn raw_transaction(&self, _hash: H256) -> Result { + todo!() + } + + async fn raw_receipts(&self, _block_id: BlockId) -> Result> { + todo!() + } + + async fn bad_blocks(&self) -> Result> { + todo!() + } +} + +impl std::fmt::Debug for DebugApi { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("DebugApi").finish_non_exhaustive() + } +} diff --git a/crates/net/rpc/src/lib.rs b/crates/net/rpc/src/lib.rs index 33a69c9b35..77d71c0639 100644 --- a/crates/net/rpc/src/lib.rs +++ b/crates/net/rpc/src/lib.rs @@ -12,12 +12,14 @@ //! Provides the implementation of all RPC interfaces. mod admin; +mod debug; mod engine; mod eth; mod net; mod web3; pub use admin::AdminApi; +pub use debug::DebugApi; pub use engine::EngineApi; pub use eth::{EthApi, EthApiSpec, EthPubSub}; pub use net::NetApi;