x402-rs

  • Name: x402-rs
  • URL: https://github.com/x402-rs/x402-rs
  • Category: x402 Rust toolkit / facilitator scaffold / paid-request middleware
  • Tags: ethereum-ecosystem solana-ecosystem
  • Summary: x402-rs is the Rust toolkit around x402: client middleware, server middleware, facilitator code, and a runnable facilitator binary. Useful if you want the Rust-side 402 -> verify -> settle path in one place. Not a protocol center of gravity.
  • What it does:
    • Provides core Rust crates for x402 protocol types, utilities, and facilitator traits
    • Ships Axum middleware that lets Rust services protect routes with x402 payment requirements
    • Ships Reqwest middleware that lets Rust clients automatically handle x402 payment flows and retries
    • Includes local facilitator libraries plus a runnable facilitator server binary for verification and onchain settlement
    • Supports multiple chains and scheme variants, including EVM/EIP-155, Solana, and Git-only Aptos support, with both v1 and v2 protocol implementations
    • Documents custom facilitator construction, custom chain-provider behavior, feature-flagged deployments, and minimal chain-specific facilitator builds
    • Supports production deployment patterns through Docker, cargo install, JSON configuration, CORS, health endpoints, and optional OpenTelemetry telemetry
  • Key claims:
    • The main README calls x402-rs a comprehensive, production-ready Rust toolkit for x402, which is much broader than a single crate or sample implementation
    • The crate table in the README shows distinct server, client, facilitator, and core-type packages, which is strong evidence that the project is packaging the full Rust control plane around x402 rather than one narrow integration point
    • The build-your-own-facilitator guide explicitly frames custom facilitators as a first-class use case, including custom blockchains, custom middleware, and reduced-attack-surface deployments via feature flags
    • The facilitator README documents a real runnable binary with /verify, /settle, /supported, and /health endpoints, which materially strengthens the case that x402-rs is aimed at operators and not only library consumers
    • The support for several chains and protocol versions, plus planned extensions like Bazaar integration and additional payment schemes, positions x402-rs as ecosystem infrastructure rather than as a one-chain experiment
    • The configuration examples and deployment guidance show that the project expects users to run settlement infrastructure in production, not merely link a client crate into an application
  • Whitepaper: No canonical standalone x402-rs whitepaper or litepaper surfaced in this pass. The clearest source of truth was the monorepo README plus the first-party facilitator and customization docs; see ../whitepapers/x402-rs-primary-sources-2026-05-03.md.
  • Sources:

Internal linkages

  • Underlying protocol family and main anchor: x402

  • Stronger operator-side packaging on the same rail: t402

  • Last reviewed: 2026-05-23 UTC