Repository navigation
feat(svm): add atomic-batch payment scheme - #75
Open
Solizardking wants to merge 2 commits into
Open
Solizardking wants to merge 2 commits into
Solizardking wants to merge 2 commits into
Conversation
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.
4 tasks done
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #71.
Description
Adds the
atomic-batchSVM 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:checkandformat:checkpass; vitest passes 1096 tests in 57 files.Related
x402-foundation#3944, x402-foundation#3943
AI disclosure
AI-assisted (Grok Bot); the maintainer reviewed it.