Files
reth/crates/rpc/rpc-api/src/eth_pubsub.rs
Filip Laurentiu 4bfbd3a53d Set namespace in one place (#3084)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-06-09 16:21:06 +00:00

19 lines
565 B
Rust

use jsonrpsee::proc_macros::rpc;
use reth_rpc_types::pubsub::{Params, SubscriptionKind};
/// Ethereum pub-sub rpc interface.
#[rpc(server, namespace = "eth")]
pub trait EthPubSubApi {
/// Create an ethereum subscription for the given params
#[subscription(
name = "subscribe" => "subscription",
unsubscribe = "unsubscribe",
item = reth_rpc_types::pubsub::SubscriptionResult
)]
async fn subscribe(
&self,
kind: SubscriptionKind,
params: Option<Params>,
) -> jsonrpsee::core::SubscriptionResult;
}