reth_rpc_api/web3.rs
1use alloy_primitives::{Bytes, B256};
2use jsonrpsee::{core::RpcResult, proc_macros::rpc};
3
4/// Web3 rpc interface.
5#[rpc(server, namespace = "web3")]
6pub trait Web3Api {
7 /// Returns current client version.
8 #[method(name = "clientVersion")]
9 async fn client_version(&self) -> RpcResult<String>;
10
11 /// Returns sha3 of the given data.
12 #[method(name = "sha3")]
13 fn sha3(&self, input: Bytes) -> RpcResult<B256>;
14}