Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying x402-exec with
|
| Latest commit: |
10c0db0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5038a441.x402-exec.pages.dev |
| Branch Preview URL: | https://client-extensions.x402-exec.pages.dev |
There was a problem hiding this comment.
Pull request overview
This PR adds client-side extension support and CAIP-2 network normalization to enable x402x router settlement with the official x402 SDK. The implementation introduces a dynamic pricing mechanism using the probe-quote-replay pattern, client scheme registration utilities, and network ID normalization for v1/v2 compatibility.
Key Changes:
- Dynamic pricing with facilitator fee calculation during probe phase and replay on retry
- Client-side scheme (
ExactEvmSchemeWithRouterSettlement) and registration helpers for x402 SDK integration - Network ID normalization layer supporting both v1 aliases and v2 CAIP-2 formats
Reviewed changes
Copilot reviewed 36 out of 39 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
typescript/packages/extensions/src/settlement-routes.ts |
Implements dynamic pricing with probe/retry flow and per-option extension generation |
typescript/packages/extensions/src/client/exact-evm-scheme.ts |
New client scheme for router settlement with commitment-based nonces |
typescript/packages/extensions/src/client/extension-handler.ts |
Extension handler to inject x402x parameters into x402Client |
typescript/packages/facilitator-sdk/src/settlement.ts |
Enhanced parameter parsing with v2 extensions support and legacy fallback |
facilitator/src/network-id.ts |
New network normalization utilities for v1/v2 compatibility |
facilitator/src/routes/supported.ts |
Network readiness filtering based on configuration availability |
examples/showcase/client/src/hooks/usePaymentV2.ts |
New hook using official x402 SDK with x402x scheme |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import type { AccountPoolConfig, NetworkConfig } from "./config.js"; | ||
| import { getLogger } from "./telemetry.js"; | ||
| import { getCanonicalNetwork, getNetworkDisplayName } from "./network-utils.js"; | ||
| import { getConfigForNetwork, normalizeNetwork, hasNetworkConfig } from "./network-id.js"; |
There was a problem hiding this comment.
Unused imports hasNetworkConfig, normalizeNetwork.
| import { getConfigForNetwork, normalizeNetwork, hasNetworkConfig } from "./network-id.js"; | |
| import { getConfigForNetwork } from "./network-id.js"; |
| const auth = result.payload.authorization; | ||
|
|
||
| // Manually calculate expected commitment | ||
| const now = Math.floor(Date.now() / 1000); |
There was a problem hiding this comment.
Unused variable now.
| const now = Math.floor(Date.now() / 1000); |
| }, | ||
| }; | ||
|
|
||
| const result = await scheme.createPaymentPayload(2, paymentRequirements); |
There was a problem hiding this comment.
Unused variable result.
| const result = await scheme.createPaymentPayload(2, paymentRequirements); | |
| await scheme.createPaymentPayload(2, paymentRequirements); |
No description provided.