r402-stellar
Stellar chain support for the x402 payment protocol, part of the
r402 workspace.
Highlights
- Exact scheme — one SEP-41
transferauthorized as Soroban auth entries. The facilitator is the transaction source, pays fees, and optionally wraps a fee-bump. - CAIP-2 networks —
stellar:pubnetandstellar:testnet. Pubnet requires an operator RPC URL. - Sponsored fees —
price_tagcopiesareFeesSponsored: truefrom/supported. Clients must set the same extra;falseis rejected. - In-process facilitator —
stellar-rpc-client27 verify, rebuild, submit, and confirm. Duplicate settle is blocked bySettlementCache(120s TTL) keyed by the payload transaction XDR.
Cargo Features
| Feature | Surface |
|---|---|
client |
Buyer-side auth-entry signing. |
server |
Server-side PriceTag generation. |
facilitator |
On-chain verify and settle (Soroban RPC). |
telemetry |
tracing instrumentation. |
full |
All of the above. |
Quick Start (server price tag)
use ;
let tag = price_tag;
Documentation
- Crate docs: https://docs.rs/r402-stellar
- Project README:
../../README.md
License
Dual-licensed under MIT and Apache-2.0.