Crate reth_rpc_builder

Source
Expand description

Configure reth RPC.

This crate contains several builder and config types that allow to configure the selection of RethRpcModule specific to transports (ws, http, ipc).

The RpcModuleBuilder is the main entrypoint for configuring all reth modules. It takes instances of components required to start the servers, such as provider impls, network and transaction pool. RpcModuleBuilder::build returns a TransportRpcModules which contains the transport specific config (what APIs are available via this transport).

The RpcServerConfig is used to assemble and start the http server, ws server, ipc servers, it requires the TransportRpcModules so it can start the servers with the configured modules.

Re-exports§

pub use eth::EthHandlers;

Modules§

auth
Auth server utilities.
config
RPC server utilities.
constants
Common RPC constants.
error
Rpc error utilities.
eth
Eth utils
rate_limiter
[jsonrpsee] helper layer for rate limiting certain methods.

Structs§

Identity
A no-op middleware.
IpcRpcServiceBuilder
Similar to [tower::ServiceBuilder] but doesn’t support any tower middleware implementations.
IpcServerBuilder
Builder to configure and create a JSON-RPC server
MeteredRequestFuture
Response future to update the metrics for a single request/response pair.
RpcModuleBuilder
A builder type to configure the RPC module: See [RpcModule]
RpcModuleConfig
Bundles settings for modules
RpcModuleConfigBuilder
Configures RpcModuleConfig
RpcRegistryInner
A Helper type the holds instances of the configured modules.
RpcRequestMetricsService
A [RpcServiceT] middleware that captures RPC metrics for the server.
RpcServerConfig
A builder type for configuring and launching the servers that will handle RPC requests.
RpcServerHandle
A handle to the spawned servers.
ServerBuilder
Builder to configure and create a JSON-RPC server
Stack
Two middlewares chained together.
TransportRpcModuleConfig
Holds modules to be installed per transport type
TransportRpcModules
Holds installed modules per transport type.

Enums§

CorsDomainError
Error thrown when parsing cors domains went wrong
RethRpcModule
Represents RPC modules that are supported by reth
RpcModuleSelection
Describes the modules that should be installed.

Functions§

launch
Convenience function for starting a server in one step.