mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-11 23:45:05 -05:00
* feat(rpc): add rpc-api client feature * refactor: combine proc macro * feat: add missing deserialize functions * add missing derive
16 lines
504 B
Rust
16 lines
504 B
Rust
use jsonrpsee::{core::RpcResult as Result, proc_macros::rpc};
|
|
use reth_primitives::{Bytes, H256};
|
|
|
|
/// Web3 rpc interface.
|
|
#[cfg_attr(not(feature = "client"), rpc(server))]
|
|
#[cfg_attr(feature = "client", rpc(server, client))]
|
|
pub trait Web3Api {
|
|
/// Returns current client version.
|
|
#[method(name = "web3_clientVersion")]
|
|
fn client_version(&self) -> Result<String>;
|
|
|
|
/// Returns sha3 of the given data.
|
|
#[method(name = "web3_sha3")]
|
|
fn sha3(&self, input: Bytes) -> Result<H256>;
|
|
}
|