1. Hook boundary
Place x402 in an optional middleware hook with explicit lifecycle points: quote, pre-authorization, verify, settle, receipt, and audit append.
This packet is tailored to OpenZeppelin/guardian#252 and its parent modularization issue. It turns the draft “Guardian as an x402 payment facilitator” idea into a reviewable module boundary before live credentials, private account state, or settlement authority enter the design.
Place x402 in an optional middleware hook with explicit lifecycle points: quote, pre-authorization, verify, settle, receipt, and audit append.
Require spending caps, resource allow-lists, expiry, replay protection, chain/token allow-lists, and user-visible approvals before any facilitator path can settle.
Bind each x402 result to Guardian account id, delta/proposal id, resource URL, payment hash, facilitator response, and canonical audit timestamp.
Guardian already has sensitive private-account state, delta/canonicalization concepts, auth, acknowledger, network, and storage components. An agentic payment module should not be a generic “call facilitator from server” feature; it needs a narrow boundary that preserves Guardian’s existing invariants.
This readback deliberately avoids live keys, private account material, payments, or facilitator credentials. The first implementation should be mocked, fail-closed, and feature-gated until maintainers decide what authority Guardian may hold on behalf of users.