Skip to content

Docs/x402 sdk 1.0.0 update#69

Merged
Will-Guan merged 14 commits into
mainfrom
docs/x402-sdk-1.0.0-update
Jul 10, 2026
Merged

Docs/x402 sdk 1.0.0 update#69
Will-Guan merged 14 commits into
mainfrom
docs/x402-sdk-1.0.0-update

Conversation

@roger-gan

Copy link
Copy Markdown
Collaborator

No description provided.

roger-gan and others added 14 commits July 5, 2026 07:59
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)
@Will-Guan Will-Guan merged commit 6c21957 into main Jul 10, 2026
2 of 3 checks passed
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.

3 participants