specs(exact): propose TON exact scheme for x402 v2 (spec-only)#1455
specs(exact): propose TON exact scheme for x402 v2 (spec-only)#1455ohld wants to merge 2 commits intocoinbase:mainfrom
Conversation
🟡 Heimdall Review Status
|
|
@ohld is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
fbf520a to
86c1427
Compare
|
Really excited to see TON getting a proper x402 spec — the W5/ 1. 2. 3. Relay commission amount is undefined |
|
Thanks for the thorough review, these are all great catches. 1. You're right — 2. Good call. I didn't want to hardcode a specific hash in the spec since W5 has revisions (v5r1, potentially v5r2) and a hardcoded hash would become outdated when TON Foundation ships a new version. Instead I added: facilitator MUST verify that the contract code in 3. Relay commission bounds Added Also tightened rule §4: the W5 message must contain exactly two actions (payment transfer + optional commission transfer), anything else is rejected. All changes in the latest commit + updated the demo repo to enforce exact amount matching (30/30 tests passing). |
Adds scheme_exact_ton.md defining the exact payment scheme for TON blockchain. Uses W5 wallet internal_signed messages for gasless Jetton (TEP-74) transfers. Updates scheme_exact.md with TON-specific validation rules.
… bounds, stateInit verification - Change amount verification from >= to == (exact match), aligning with all other chain specs (SVM, Stellar, EVM). The relay commission is a separate jetton_transfer in the W5 batch, not bundled into the payment. - Add extra.maxRelayCommission field to PaymentRequirements, allowing resource servers to cap the relay commission amount. - Add stateInit verification rule: when seqno == 0, facilitator must verify contract code against a known W5 wallet code hash allowlist. - Tighten action count: W5 message must contain exactly the payment transfer and optionally a relay commission transfer, nothing else.
a418dd0 to
9f6683f
Compare
Description
Adds formal specification for the
exactpayment scheme on TON blockchain, following the same structure as existing network-specific scheme documents (EVM, SVM, Stellar, Aptos).specs/schemes/exact/scheme_exact_ton.md-- full spec for TON exact schemespecs/schemes/exact/scheme_exact.md-- adds TON validation rules to the indexTests
No code affected.
Checklist
Why TON
Working proof
Key design decisions
v2 alignment
Review request
Please review the scheme design, payload shape, and verification/settlement safety constraints. Once aligned, I will open a separate implementation PR in TypeScript.