Anchor programs for x402r on Solana — sibling to x402r-contracts (Solidity, Foundry).
Status: Pilot, unaudited. Mainnet usage is at users' own risk.
Faithful SVM port of the base/commerce-payments authCapture primitives, plus x402r-specific extensions (operator factory, plugin slots, condition programs).
The scheme spec lives at x402r-scheme/specs/schemes/authCapture/scheme_authCapture_svm.md.
- Anchor 0.31+
- Solana CLI 2.x
- Rust stable (with
overflow-checks = truein release) - pnpm 10
- Codama (Kit-client generator)
- Vitest (tests, via Codama-generated Solana Kit client — no
anchor-ts) - Trident (fuzz)
To be filled in by the initial implementation PR. Planned shape:
programs/ # Anchor programs
auth-capture-escrow # AuthCaptureEscrow analog
spl-token-collector # ITokenCollector for SPL Token
payment-operator # x402r factory + slot dispatch
static-address-condition
receiver-condition
payer-condition
tests/ # Vitest + Codama Kit client
fuzz/ # Trident fuzz harnesses
migrations/ # Deploy + program-ID pinning scripts
codama/ # Codama generator
BUSL-1.1. Same parameters as x402r-contracts. Change Date: 2029-12-09. Change License: MIT.
Every Rust source file in this repo MUST carry the SPDX header:
// SPDX-License-Identifier: BUSL-1.1