The PluginNodeServer is the interface that is exposed to client devices
and is in charge of coordinating the various user-controlled
entities. This includes dispatching incoming RPC calls to the JSON-RPC
interface, as well as staging requests from the HSM so that they can be
streamed and replied to by devices that have access to the signing keys.
The RPC socket will not be available right away, so we wrap the
cln-grpc service with this Service which essentially checks for
the file’s existence, and if it doesn’t exist we wait for up to 5
seconds for it to appear.
WrappedNodeServer enables us to quickly add customizations to
the pure passthru of the cln_grpc::Server. In particular it
implements the guarding against RPC commands that’d require a
signature if no HSM is attached (that’d lock up our node) and
providing RouteHints for disconnected and zeroconf channels too.