mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-16 01:46:50 -05:00
21 lines
610 B
Rust
21 lines
610 B
Rust
//! `eth_` RPC API for pubsub subscription.
|
|
|
|
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;
|
|
}
|