Docs/x402 sdk 1.0.0 update#69
Merged
Merged
Conversation
Update all x402 documentation (EN + zh-Hans) from the legacy Python/TS dual-SDK model (v0.6.0) to the TypeScript-only 1.0.0 SDK. Quickstarts (sellers, human, agent): rewritten from Python/FastAPI/ PostgreSQL to TypeScript (Express + agent-wallet), mirroring the runnable examples in examples/typescript/. Removed all x402-demo repository and hosted-endpoint references. Core concepts: payment schemes updated from exact_permit/exact/ exact_gasfree to the five 1.0.0 schemes (exact, upto, batch-settlement, auth-capture, exact_gasfree). http-402 payloads updated to the v2 payload.authorization structure. Facilitator/wallet/client-server token-approval references updated to Permit2/ERC-3009. sdk-features: rebuilt as a TypeScript-only feature matrix (11 packages, 5 schemes, signer factories, observability). index/faq/AGENTS updated to the TS-only SDK. api-catalog scheme names (exact_permit -> exact) synced.
The x402-demo repository is deprecated; point readers to the runnable examples in the x402 repository (examples/typescript/) instead.
… 22)
Address code-review findings across EN + zh-Hans quickstarts and http-402:
P1: Fix install path — examples live at x402/examples/typescript (a separate
workspace), not under x402/typescript. Use cd ../examples/typescript and
run a second pnpm install there (4 quickstarts).
P1: Fix PAYMENT-SIGNATURE examples to match v2 PaymentPayload — top-level
{x402Version, accepted, payload} (no top-level scheme/network), Permit2
data under payload.permit2Authorization with permitted/spender/nonce/
deadline/witness/from, all numeric fields as strings.
P1: Remove erc20ApprovalGasSponsoring from the TRON payment-required example
(EVM-only extension; TRON server does not declare it).
P2: Complete the agent quickstart local-test flow — add clone, install, build,
and split-terminal facilitator/server steps.
P2: Bump Node.js requirement 20 -> 22 and pnpm 11 -> 11.1 (matches the SDK
engines field).
P2: Sync zh-Hans agent quickstart — add SDK 1.0.0 note, MCP examples entry,
BSC EVM_RPC_URL config.
Remove // comments from JSON code blocks (now valid JSON) and strip
trailing whitespace.
…ansferMethod - Remove 5 trailing-whitespace lines flagged by git diff --check (README, client-server, network-and-token-support, faq) - faq.md: 'runnable examples' -> 'reference examples' (per earlier review: Runnable Examples -> Reference Examples) - http-402.md (EN+ZH): convert permit2Authorization addresses (permitted.token, spender, witness.to, from) to 0x hex for EIP-712/TIP-712 signing; accepted.asset/payTo stay Base58 (TRON) - http-402.md (EN+ZH): replace extra name/version with assetTransferMethod: "permit2" for TRON + BSC so clients pick Permit2 over ERC-3009
- fee model (mechanisms/tron/src/shared/fee.ts) only has feeTo,
feeAmount, caller? — facilitatorId does not exist; drop it from
TRON fee blocks and the field table (EN+ZH)
- BSC exact has no TRON fee model, so remove the fee object from
the BSC PAYMENT-REQUIRED example (extra keeps assetTransferMethod)
- BSC extensions.erc20ApprovalGasSponsoring was shown as {} but the
server declares info (description+version) and a JSON schema; show
the real info plus an abbreviated schema (real required array) with
a note marking the omitted properties (EN+ZH)
jizhen181-dot
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.