dig-rpc 0.4.1

Axum-based JSON-RPC server framework for a DIG node. Serves the dig-rpc-protocol interface over mTLS (peer) / HTTPS (public read) / loopback (control), with tier-based method allow-lists, per-peer rate limiting, and graceful shutdown. The node supplies a handler; this crate owns the transport + envelope + boundary.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Request-boundary middleware for the RPC server.
//!
//! The security-critical boundary — method resolution, the surface/tier
//! allowlist, and `rpc.discover` — lives in [`mod@crate::dispatch`], applied in
//! the HTTP handler itself so it cannot be bypassed. This module carries the
//! stateful cross-cutting concern that must outlive a single request:
//!
//! - [`rate_limit`] — per-(peer, tier) token-bucket limiting.

pub mod rate_limit;

pub use rate_limit::{BucketSpec, PeerKey, RateLimitConfig, RateLimitOutcome, RateLimitState};