Expand description
XRPL chain support for the x402 payment protocol.
This crate implements the x402 "exact" scheme for the XRP Ledger: the
buyer signs a Payment transaction, and a facilitator submits the signed
blob. The payer pays the network fee; facilitators do not sponsor fees.
§Features
- CAIP-2 Addressing:
xrpl:0(mainnet),xrpl:1(testnet),xrpl:2(devnet) - XRP and IOU payments: native drops or issued-currency decimal values
- Sequence or ticket sequencing:
extra.assetTransferMethod - In-process facilitator: JSON-RPC verify and settle
§Feature Flags
server— server-side price tag generationclient— client-side payment signingfacilitator— facilitator-side payment verification and settlementtelemetry—tracinginstrumentation
Re-exports§
pub use chain::XrplChainProvider;facilitatorpub use chain::XrplJsonRpc;clientorfacilitatorpub use exact::XrplExact;pub use exact::client::XrplExactClient;clientpub use exact::client::XrplSigner;client
Modules§
Structs§
Constants§
- CANONICAL_
SIGNING_ PUB_ KEY_ LEN - Length of a canonical compressed secp256k1 or ed25519 signing public key.
- DEFAULT_
LEDGER_ CLOSE_ SECONDS - Default ledger close interval used to map
maxTimeoutSecondsto ledgers. - DEFAULT_
LEDGER_ TOLERANCE - Extra ledgers added beyond the timeout conversion.
- DEFAULT_
MAX_ FEE_ DROPS - Default maximum transaction fee accepted by the facilitator, in drops.
- LSF_
DISABLE_ MASTER - Account-root flag disabling the master key pair (
lsfDisableMaster). - MAX_
ACCOUNT_ TICKETS - Maximum outstanding tickets an account can hold.
- MAX_
DESTINATION_ TAG - Maximum destination tag (
u32::MAX). - RLUSD_
CURRENCY - RLUSD currency as 160-bit hex (ASCII
"RLUSD"padded). - RLUSD_
DECIMALS - Default RLUSD decimal precision.
- RLUSD_
MAINNET_ ISSUER - Official Ripple RLUSD issuer on XRPL mainnet.
- RLUSD_
TESTNET_ ISSUER - Official Ripple RLUSD issuer on XRPL testnet.
- SETTLEMENT_
TTL_ MS - Settlement cache TTL floor in milliseconds.
- TF_
PARTIAL_ PAYMENT - Partial-payment transaction flag (
tfPartialPayment). - TRANSACTION_
HASH_ PREFIX - SHA-512Half prefix for a signed transaction hash (
TXN\0). - XRP_
DECIMALS - Native XRP decimal precision (drops).
Statics§
- XRPL_
NETWORKS - Well-known XRPL networks with their names and CAIP-2 identifiers.
Functions§
- rlusd_
deployment - Returns the RLUSD deployment for a specific XRPL chain, if known.
- rlusd_
deployments - Returns all known RLUSD deployments.
- xrp_
deployment - Returns the native XRP deployment for a specific XRPL chain.
- xrp_
deployments - Returns all known native XRP deployments.