Expand description
JSON-RPC envelope dispatch + the tier/allowlist boundary.
dispatch is the single entry the server (and any in-process caller) funnels
a raw request through. It resolves the method, enforces the Surface
boundary (which tiers the caller may reach), then calls the node’s
RpcHandler, assembling a canonical JSON-RPC response either way.
The boundary is the security-critical part and mirrors the canonical node:
- unknown method →
-32601; - a method not reachable on the caller’s surface →
-32601on the peer surface (the allowlist is a denylist-by-omission, exactlyMethod::is_peer_reachable), or-32030(UNAUTHORIZED) for a control method reached off the loopback/in-process surface; rpc.discoveris answered here from the generated OpenRPC document (never forwarded to the handler), so discovery can’t drift.
Enums§
- Surface
- Which transport surface a request arrived on — this decides which method tiers are reachable.
Functions§
- dispatch
- Dispatch one JSON-RPC request against
handler, arriving onsurface. - parse_
error_ response - Build a bare error response for a request that failed to even parse into an
envelope (used by the transport before
dispatchcan run).idisRequestId::Nullwhen the id could not be recovered.
Type Aliases§
- Shared
Handler - A handler shared across the tower stack.