From 9e2043091fcde5bc12a20fd617b784db6105408f Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 29 Apr 2025 14:01:01 +0200 Subject: [PATCH] docs: add more docs for RpcAddsOns (#15986) Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> --- crates/node/builder/src/rpc.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/node/builder/src/rpc.rs b/crates/node/builder/src/rpc.rs index eda66ce025..249b156035 100644 --- a/crates/node/builder/src/rpc.rs +++ b/crates/node/builder/src/rpc.rs @@ -346,6 +346,15 @@ where } /// Node add-ons containing RPC server configuration, with customizable eth API handler. +/// +/// This struct can be used to provide the RPC server functionality. It is responsible for launching +/// the regular RPC and the authenticated RPC server (engine API). It is intended to be used and +/// modified as part of the [`NodeAddOns`] see for example `OpRpcAddons`, `EthereumAddOns`. +/// +/// It can be modified to register RPC API handlers, see [`RpcAddOns::launch_add_ons_with`] which +/// takes a closure that provides access to all the configured modules (namespaces), and is invoked +/// just before the servers are launched. This can be used to extend the node with custom RPC +/// methods or even replace existing method handlers, see also [`TransportRpcModules`]. pub struct RpcAddOns< Node: FullNodeComponents, EthB: EthApiBuilder,