pub trait RethApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn reth_get_balance_changes_in_block(
&self,
block_id: BlockId,
) -> impl Future<Output = RpcResult<AddressMap<U256>>> + Send;
fn reth_get_block_execution_outcome(
&self,
block_id: BlockId,
count: Option<U64>,
) -> impl Future<Output = RpcResult<Option<Box<RawValue>>>> + Send;
fn reth_jit(
&self,
action: RethJitAction,
) -> impl Future<Output = RpcResult<()>> + Send;
fn reth_subscribe_chain_notifications(
&self,
subscription_sink: PendingSubscriptionSink,
) -> impl Future<Output = SubscriptionResult> + Send;
fn reth_subscribe_persisted_block(
&self,
subscription_sink: PendingSubscriptionSink,
) -> impl Future<Output = SubscriptionResult> + Send;
fn reth_subscribe_finalized_chain_notifications(
&self,
subscription_sink: PendingSubscriptionSink,
) -> impl Future<Output = SubscriptionResult> + Send;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}Expand description
Server trait implementation for the RethApi RPC API.
Required Methods§
Sourcefn reth_get_balance_changes_in_block(
&self,
block_id: BlockId,
) -> impl Future<Output = RpcResult<AddressMap<U256>>> + Send
fn reth_get_balance_changes_in_block( &self, block_id: BlockId, ) -> impl Future<Output = RpcResult<AddressMap<U256>>> + Send
Returns all ETH balance changes in a block
Sourcefn reth_get_block_execution_outcome(
&self,
block_id: BlockId,
count: Option<U64>,
) -> impl Future<Output = RpcResult<Option<Box<RawValue>>>> + Send
fn reth_get_block_execution_outcome( &self, block_id: BlockId, count: Option<U64>, ) -> impl Future<Output = RpcResult<Option<Box<RawValue>>>> + Send
Re-executes a block (or a range of blocks) and returns the execution outcome including receipts, state changes, and EIP-7685 requests.
If count is provided, re-executes count consecutive blocks starting from block_id
and returns the merged execution outcome.
The receipt type depends on the node’s network, which this trait cannot name, so the outcome is returned serialized.
Sourcefn reth_jit(
&self,
action: RethJitAction,
) -> impl Future<Output = RpcResult<()>> + Send
fn reth_jit( &self, action: RethJitAction, ) -> impl Future<Output = RpcResult<()>> + Send
Controls the JIT backend, if one is configured.
Sourcefn reth_subscribe_chain_notifications(
&self,
subscription_sink: PendingSubscriptionSink,
) -> impl Future<Output = SubscriptionResult> + Send
fn reth_subscribe_chain_notifications( &self, subscription_sink: PendingSubscriptionSink, ) -> impl Future<Output = SubscriptionResult> + Send
Subscribe to json ChainNotifications
Sourcefn reth_subscribe_persisted_block(
&self,
subscription_sink: PendingSubscriptionSink,
) -> impl Future<Output = SubscriptionResult> + Send
fn reth_subscribe_persisted_block( &self, subscription_sink: PendingSubscriptionSink, ) -> impl Future<Output = SubscriptionResult> + Send
Subscribe to persisted block notifications.
Emits a notification with the block number and hash when a new block is persisted to disk.
Sourcefn reth_subscribe_finalized_chain_notifications(
&self,
subscription_sink: PendingSubscriptionSink,
) -> impl Future<Output = SubscriptionResult> + Send
fn reth_subscribe_finalized_chain_notifications( &self, subscription_sink: PendingSubscriptionSink, ) -> impl Future<Output = SubscriptionResult> + Send
Subscribe to finalized chain notifications.
Buffers committed chain notifications and emits them once a new finalized block is received. Each notification contains all committed chain segments up to the finalized block.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".