Expand description
Bootstrap [axum] RPC servers.
Re-exportsยง
pub(crate) use error::RpcError;๐pub(crate) use Id;๐pub(crate) use RpcMethodCall;๐pub(crate) use ResponseResult;๐pub(crate) use RpcResponse;๐pub(crate) use Router;๐pub(crate) use extract::DefaultBodyLimit;๐pub(crate) use HeaderValue;๐pub(crate) use Method;๐pub(crate) use header;๐pub(crate) use MethodRouter;๐pub(crate) use post;๐pub(crate) use serde::de::DeserializeOwned;๐pub(crate) use std::fmt;๐pub(crate) use cors::CorsLayer;๐pub(crate) use trace::TraceLayer;๐
Modulesยง
- config ๐
- error ๐
- Error variants used to unify different connection streams
- handler ๐
- ipc
ipc - IPC handling
- pubsub ๐
- ws ๐
Structsยง
- PubSub
Context - Contains additional context and tracks subscriptions
- Server
Config - Additional server options.
Traitsยง
- PubSub
RpcHandler - The general purpose trait for handling RPC requests and subscriptions
- RpcHandler
- Helper trait that is used to execute ethereum rpc calls
Functionsยง
- http_
router - Configures an [
axum::Router] that handles JSON-RPC calls via HTTP. - http_
ws_ router - Configures an [
axum::Router] that handles JSON-RPC calls via both HTTP and WS. - redact_
fork_ ๐credentials - Redacts fork credentials while preserving the rest of a failed request dump. Signed transactions remain available in failed dumps for reproduction.
- redact_
fork_ ๐params - Follows reset wrappers and positional URL slots while preserving other fields.
- redact_
params ๐ - Redacts sensitive information from RPC request parameters for TRACE logging.
- redact_
url_ ๐credentials - Keeps only the URLโs scheme, host, and port, or fully redacts URLs without a host.
- router_
inner ๐