Skip to content

x402 protocol v2, network/facilitator abstraction, and real Base Sepolia settlement - #1

Merged
Revinand merged 4 commits into
masterfrom
x402-v2
Aug 23, 2026
Merged

x402 protocol v2, network/facilitator abstraction, and real Base Sepolia settlement#1
Revinand merged 4 commits into
masterfrom
x402-v2

Conversation

@SergeevDmitry

Copy link
Copy Markdown
Member
  • x402 v1 → v2. @x402/core + @x402/evm 2.23.0, CAIP-2 networks,
    PAYMENT-SIGNATURE / PAYMENT-RESPONSE / PAYMENT-REQUIRED headers. No v1
    fallback. Drops 437 transitive packages.
  • Three environments, one config. local | testnet | mainnet is derived
    from the network and the facilitator — chain id 84532 belongs to both the
    local chain and Base Sepolia, so the id alone can't say which.
  • Remote facilitators, behind the SDK's own FacilitatorClient. With one
    configured the gateway holds no signing key at all.
  • Mainnet guardrails refused at config load: missing allowMainnet, local
    facilitator, unauthenticated facilitator, non-HTTPS URL, dev payTo,
    non-canonical asset.
  • Real Base Sepolia settlement, verified on chain —
    0xf3288399…,
    0.01 USDC, gas paid by the facilitator. New npm run test:testnet suite and a
    manual-only CI workflow, both kept out of the offline test paths.
  • Fixed an upstream misattribution: the v2 scheme reports an unreachable RPC
    as an invalid signature, blaming the buyer for an outage. Now
    PAYMENT_PROVIDER_UNAVAILABLE.
  • Behaviour change: a post-settlement replay now surfaces as
    PAYMENT_INVALID, not PAYMENT_REPLAYED. Fail-closed unchanged; the
    pre-settlement replayKey reservation still covers the concurrent case.
  • Not claimed: mainnet. Configurable and guarded, nothing settled on it.

@Revinand Revinand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@Revinand
Revinand merged commit 93efa8a into master Aug 23, 2026
@Revinand
Revinand deleted the x402-v2 branch August 23, 2026 12:44
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.

2 participants