[NO-JIRA] - Fix Mainnet Domain signature #5
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.
Title
Fix mainnet X402 payment flow and harden facilitator API typing
Description
This PR fixes a mainnet-only failure in the Facilitator SDK and hardens the API client with strict runtime validation.
Bug Fix: Mainnet EIP-3009 Signature Domain
Mainnet verification was failing because the EIP-712 domain used for USDC.e signing was configured with an incorrect version.
Before
version: '2'After
version: '1'Cronos USDC.e implements the EIP-3009
TransferWithAuthorizationdomain with version"1". Using"2"causes signature verification to fail on mainnet, while testnet appeared to work due to relaxed/local verification.This change makes mainnet settlement work correctly.
Hard-Typed Facilitator API Responses
The Facilitator HTTP client is now fully runtime-typed using assertion guards:
anyusageunknownThis guarantees that SDK consumers only ever receive correctly shaped data from:
/v2/x402/supported/v2/x402/verify/v2/x402/settleType Cleanup
Replaced an empty interface alias:
with:
This avoids
@typescript-eslint/no-empty-object-typeviolations and keeps the type model clean.Result
Mainnet X402 payments now verify and settle correctly
API client is fully type-safe at runtime
No
any, no unsafe castsNo breaking public API changes
Notes for Reviewers
/verifywith correct EIP-712 domain