Add an RPC method to get the local node record #850
Labels
A-rpc
Related to the RPC implementation
C-enhancement
New feature or request
D-good-first-issue
Nice and easy! A great choice to get started
Describe the feature
We should add an RPC method named
admin_nodeInfo
that returns the ENR of the node. This depends on #849.Additionally,
AdminApi
in thereth-rpc
crate should be exported and constructable: currently it is private and impossible to construct.Additional context
To add the new RPC method, first extend the
AdminApiServer
trait here: https://github.com/paradigmxyz/reth/blob/main/crates/net/rpc-api/src/admin.rsThen add the implementation for the new method here: https://github.com/paradigmxyz/reth/blob/main/crates/net/rpc/src/admin/mod.rs
The ENR should be fetched using the
NetworkHandle
in theAdminApi
implementation.The text was updated successfully, but these errors were encountered: