Skip to main content

Crate anvil_server

Crate anvil_server 

Source
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 ๐Ÿ”’
ipcipc
IPC handling
pubsub ๐Ÿ”’
ws ๐Ÿ”’

Structsยง

PubSubContext
Contains additional context and tracks subscriptions
ServerConfig
Additional server options.

Traitsยง

PubSubRpcHandler
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 ๐Ÿ”’