Skip to content

docs: migrate and update x402 v2 specifications - #81

Open
roger-gan wants to merge 12 commits into
mainfrom
docs/migrate-x402-v2-specs
Open

docs: migrate and update x402 v2 specifications#81
roger-gan wants to merge 12 commits into
mainfrom
docs/migrate-x402-v2-specs

Conversation

@roger-gan

@roger-gan roger-gan commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

This PR migrates and updates the x402 v2 specification set. The latest revision changes only specs/extensions/trc20_approval_resource_sponsoring.md and completes the draft TRON Approval Resource Sponsoring contract for SDK 1.1.0.

  • Keeps the normal x402 flow: no Prepare endpoint and no extra Server-to-Facilitator request.
  • Keeps Approval construction and signing on the Client; the Facilitator performs strict local-schema, raw transaction, signature, TAPOS, fee-limit, Token, Permit2, and Payment binding checks.
  • Defines atomic sponsorship admission, exact resource sizing, deployment-wide idempotency, Energy/Bandwidth delegation, durable broadcast, finality, immediate undelegation, and clean-capacity recovery.
  • Defines terminal SettleResponse semantics and identical-payload recovery after transport interruption.
  • Documents unavoidable account-level resource diversion, cross-Facilitator replay, economic exhaustion, and possible payer TRX exposure under concurrent payer activity.

The specification remains Draft. Runtime implementation, SDK registration, and production Resource Manager work will follow in separate 1.1.0 implementation PRs.

Validation

  • pnpm test from typescript: 34 of 34 Turbo tasks successful.
  • All JSON examples parsed successfully.
  • Markdown fences are balanced and relative links resolve.
  • git diff --check passed.
  • pnpm lint:check is currently blocked by a pre-existing Prettier error in typescript/packages/http/axios/src/index.test.ts:11; this revision does not modify that file or any runtime source.

Checklist

  • Latest revision changes only the TRC-20 Approval Resource Sponsoring spec.
  • Markdown examples and links are validated.
  • All TypeScript tests pass.
  • Commits are signed. Existing commits on this branch are unsigned and must be re-signed or rebased before merge.

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