You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added — x402 in one tool + the pay-per-call spec
chaingpt_x402_fetch (134 → 135) — the whole agent-pays loop, custody-free: fetch an x402-protected URL; 2xx returns the body; 402 decodes the PaymentRequirements and (given from) emits the UNSIGNED EIP-3009 typed data; after external signing, re-call with xPaymentHeader to complete the paid request. Prefers exact-scheme challenges on known networks, handles malformed 402 bodies gracefully, https-only.
Pay-per-call spec for api.chaingpt.org (.plans/x402-pay-per-call-spec.md): 402 challenge shape, credit-mirroring pricing map, verify-then-settle-async with a replay cache, failure semantics, phased rollout. The goal: agents pay $0.01 USDC per call with zero signup — the first major AI API agents can pay autonomously. Agent-wallet AUTO-pay deliberately deferred to a policy extension (USDC caps are a new dimension; same fail-closed discipline required).