Skip to content

feat(x402): standard x402 client — EIP-3009 X-PAYMENT facilitator for interop#5

Open
enot3615 wants to merge 1 commit into
mainfrom
feat/standard-x402-client
Open

feat(x402): standard x402 client — EIP-3009 X-PAYMENT facilitator for interop#5
enot3615 wants to merge 1 commit into
mainfrom
feat/standard-x402-client

Conversation

@enot3615

Copy link
Copy Markdown
Collaborator

Auto-opened. See commit body for details. Verified (tsc clean / round-trip smoke). Behavior unchanged unless feature flags set.

… interop

AiFinPay agents can now pay any standard x402 endpoint (x402 Foundation /
Coinbase / Dexter / 69k-agent economy), not just AiFinPay-native ones.

- facilitators/standard-x402.ts: detect 402 { x402Version, accepts[] }; sign
  EIP-3009 TransferWithAuthorization (gasless) and emit base64 X-PAYMENT with the
  'exact' scheme. EVM only (Base/Polygon/Ethereum/Arbitrum/Optimism/Avalanche/
  BSC); Solana exact is a follow-up.
- agent.ts: derive the agent's EVM account from the same seed (domain-separated
  SHA-256), byte-identical to AiFinPayAgent's EVM address.
- detect.ts: register StandardX402Facilitator (override name 'x402').

Native 'aifinpay' flavor kept for its 3-way fee-on-top split. Verified end-to-end. tsc clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant