{"openapi":"3.1.0","info":{"title":"Agent Owner-Signed Spending Policy","version":"0.1.0"},"servers":[{"url":"https://jzallxzbbdtelcpabfgr.supabase.co/functions/v1/agent-owner-policy"}],"paths":{"/api/v1/prepare":{"post":{"summary":"Generate deterministic EIP-191 message to sign","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object"}},"required":["policy"]}}}},"responses":{"200":{"description":"Message for owner to sign"}}}},"/api/v1/evaluate":{"post":{"summary":"Verify owner EIP-191 signature and evaluate signed policy for $0.25 USDC","description":"A buyer must supply expected_owner_address independently from a trusted owner registry or its own trusted state, NOT copy it from the untrusted agent. Does not enforce cumulative budgets.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["policy","owner_signature","action","expected_owner_address"],"properties":{"policy":{"type":"object"},"owner_signature":{"type":"string"},"action":{"type":"object"},"expected_owner_address":{"type":"string"}}},"example":{"policy":{"owner_address":"0xDe0f8228c0fEcCaD59aC65E5dcd5Bd9A08c45B22","allowed_kinds":["purchase"],"allowed_domains":["example.com"],"max_per_action_usdc":"10.00","review_above_usdc":"5.00","valid_until":1797191914},"owner_signature":"0x6b59b544aaa08e3934171318dbf4a5086b605245a657f9ff832db0945cacdbbc7abcad37e2c80bbddcc776d11e3601c4ccd8949ea009a7776b448c46bf5387fd1c","action":{"kind":"purchase","target_url":"https://example.com/cart","estimated_cost_usdc":"3.00"},"expected_owner_address":"0xDe0f8228c0fEcCaD59aC65E5dcd5Bd9A08c45B22"}}}},"responses":{"200":{"description":"Settled signed-policy verdict"},"400":{"description":"Invalid signature/policy/action"},"402":{"description":"x402 payment required"}}}}}}