Crate x402_rs

Source
Expand description

Rust implementation of the x402 protocol.

This crate provides the core data structures and logic for working with the x402 protocol, including a reference facilitator implementation for on-chain verification and settlement.

It is designed for reuse across all x402 roles:

  • Facilitator: a server that verifies and settles x402 payments (see facilitator and facilitator_local)
  • Seller: a payment-gated service that consumes shared types from types
  • Buyer: a client that constructs and submits x402-compliant payments

Modules:

Modules§

facilitator
Core trait defining the verification and settlement interface for x402 facilitators.
facilitator_local
Facilitator implementation for x402 payments using on-chain verification and settlement.
network
Network definitions and known token deployments.
provider_cache
Ethereum provider cache and initialization logic.
telemetry
types
Type definitions for the x402 protocol.