Expand description
Solana chain support for the x402 payment protocol.
This crate provides implementations of the x402 payment protocol for Solana blockchain
with the “exact” payment scheme based on SPL Token transfer instructions with
pre-signed authorization.
§Features
- CAIP-2 Addressing: Uses CAIP-2 chain IDs for chain identification
- SPL Token Payments: Token transfers using pre-signed transaction authorization
- Compute Budget Management: Automatic compute unit limit and price configuration
WebSocketSupport: Optional pubsub for faster transaction confirmation- Balance Verification: On-chain balance checks before settlement
§Architecture
The crate is organized into several modules:
§Feature Flags
server- Server-side price tag generationclient- Client-side payment signingfacilitator- Facilitator-side payment verification and settlementtelemetry-OpenTelemetrytracing support
Re-exports§
pub use exact::SolanaExact;pub use exact::client::SolanaExactClient;client
Modules§
Structs§
- USDC
- Ergonomic accessors for USDC token deployments on well-known Solana chains.
Statics§
- SOLANA_
NETWORKS - Well-known Solana networks with their names and CAIP-2 identifiers.
Functions§
- usdc_
solana_ deployment - Returns the USDC deployment for a specific Solana chain, if known.
- usdc_
solana_ deployments - Returns all known USDC deployments on Solana chains.