Skip to content

feat(svm): add atomic-batch payment scheme - #75

Open
Solizardking wants to merge 2 commits into
solana-foundation:mainfrom
themusebook:feat/svm-atomic-batch-only
Open

Solizardking wants to merge 2 commits into
solana-foundation:mainfrom
themusebook:feat/svm-atomic-batch-only

Conversation

@Solizardking

@Solizardking Solizardking commented Oct 29, 2026 •

Copy link
Copy Markdown

Supersedes #71.

Description

Adds the atomic-batch SVM scheme: one client-signed transaction pays 1–8 recipients atomically. The payer is fee payer and sole signer; the facilitator verifies, simulates, and broadcasts unchanged. Spec: specs/schemes/atomic-batch/.

This is a rebase of #71 onto current main, with only the scheme kept (extension docs and deployment notes dropped).

Why not batch-settlement: batch-settlement defers payment to one payee through channels and vouchers. Atomic-batch settles one payment split across several payees now, for example seller + royalty + platform fee.

Tests

  • @x402/svm: build, lint:check and format:check pass; vitest passes 1096 tests in 57 files.
  • No devnet or mainnet end-to-end run.

Related

x402-foundation#3944, x402-foundation#3943

AI disclosure

AI-assisted (Grok Bot); the maintainer reviewed it.

Ports only the atomic-batch scheme from solana-foundation#71 onto current main: spec, docs, client/server/facilitator, unit tests, changeset, tsup entries. Rejects non-legacy/v0 (e.g. v1) messages explicitly.

AI-assisted (Grok Bot), reviewed by maintainer before PR.
Atomic-batch duplicated the exact facilitator's Ed25519 check and used a
scheme-specific version error where exact/upto specs define
unsupported_transaction_version. Reusing the shared helpers keeps one
implementation and one error code, and peeking the wire version rejects v1
before a decoder can misread it. Test decimals now come from default assets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant