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
* feat(runtime): implement x402/USDC wallet payment hostcall
Add wallet_pay hostcall enabling agents to pay for services from their
budget. This completes the self-provisioning story: agents can now
observe prices (HTTP), decide to pay (wallet_pay), and survive crashes
mid-payment (effect lifecycle).
Runtime:
- wallet_pay ABI: amount, recipient, memo → signed payment receipt
- Manifest-driven validation: allowed_recipients, max_payment_microcents
- Budget deduction with Ed25519-signed receipt generation
- Event log recording for deterministic replay (CM-4)
SDK:
- igor.WalletPay(amount, recipient, memo) wrapper with auto-retry
- MockBackend.WalletPay + PaymentHandler for native testing
Demo (agents/x402buyer):
- Encounters HTTP 402 paywall, parses payment terms
- Effect lifecycle: Record → checkpoint → Begin → Pay → Confirm
- Crash recovery: unresolved payments reconciled, no duplicates
- Mock paywall server (agents/x402buyer/cmd/paywall)
- End-to-end demo script (scripts/demo-x402.sh)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(dev): add agent go.mod, move paywall server to cmd/
- Add go.mod for x402buyer agent (same pattern as other agents)
- Move paywall server from agents/x402buyer/cmd/ to cmd/paywall/
so it's part of the main module (not the agent's TinyGo module)
- Update Makefile build path
- Fix errcheck lint warning
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(runtime): add wallet_pay replay support, fix budget deduction ordering
- Register wallet_pay in both registerReplayHostModule and
registerChainReplayHostModule so agents using x402 capability can
pass replay verification (CM-4)
- Move receipt buffer capacity check before budget deduction in
payment.go to prevent double-charge when caller retries with a
larger buffer after receiving -5 (payErrBufferTooSmall)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments