Before signing: is this EIP-3009 authorization within the declared spend policy? After signing, the x402 spend evidence chain checks the signature and replay signals instead. This chain lints the payload, decides SPEND, DENY, OVER_LIMIT or INDETERMINATE against a declared policy and a pasted ledger, and only on SPEND recomputes the EIP-712 digest the wallet would sign. ERC-3009 is a Draft.
/decision == "SPEND". DENY, OVER_LIMIT and INDETERMINATE end the chain after the gate: the authorization is outside the declared policy, or the policy does not declare enough to decide.lint_authorization_payload{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "lint_authorization_payload",
"arguments": {
"mode": "typed_data",
"typed_data": {
"domain": {
"name": "USD Coin",
"version": "2",
"chainId": 84532,
"verifyingContract": "0x31c8eacbff8e47cfbefd98d63ab04cbaff51c9cc"
},
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"TransferWithAuthorization": [
{
"name": "from",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "validAfter",
"type": "uint256"
},
{
"name": "validBefore",
"type": "uint256"
},
{
"name": "nonce",
"type": "bytes32"
}
]
},
"primaryType": "TransferWithAuthorization",
"message": {
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"value": "1000000",
"validAfter": "1700000000",
"validBefore": "1700003600",
"nonce": "0xabababababababababababababababababababababababababababababababab"
}
}
}
},
"id": 1
}
/decision == "SPEND" → Step 3 (digest) | else → ENDdecide_eip3009_agent_spend{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "decide_eip3009_agent_spend",
"arguments": {
"authorization": {
"variant": "transfer",
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"value": "1000000",
"validAfter": "1700000000",
"validBefore": "1700003600",
"nonce": "0xabababababababababababababababababababababababababababababababab"
},
"domain": {
"name": "USD Coin",
"version": "2",
"chain_id": "84532",
"verifying_contract": "0x31c8eacbff8e47cfbefd98d63ab04cbaff51c9cc"
},
"policy": {
"agent_address": "0x1111111111111111111111111111111111111111",
"allowed_chain_ids": [
"84532"
],
"allowed_tokens": [
"0x31c8eacbff8e47cfbefd98d63ab04cbaff51c9cc"
],
"payee_allowlist": [
"0x2222222222222222222222222222222222222222"
],
"payee_denylist": [
"0x4444444444444444444444444444444444444444"
],
"per_tx_cap": "1500000",
"window_caps": [
{
"window_seconds": 3600,
"cap": "2000000"
}
],
"velocity": [
{
"window_seconds": 600,
"max_count": 3
}
],
"max_validity_seconds": 7200,
"max_future_start_seconds": 300,
"duplicate_window_seconds": 1800,
"require_receive_for": []
},
"ledger": [],
"now_unix": 1700000100
}
},
"id": 2
}
recompute_x402_eip712_digest{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "recompute_x402_eip712_digest",
"arguments": {
"name": "USD Coin",
"version": "2",
"chainId": 84532,
"verifyingContract": "0x31c8eacbff8e47cfbefd98d63ab04cbaff51c9cc",
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"value": 1000000,
"validAfter": 1700000000,
"validBefore": 1700003600,
"nonce": "0xabababababababababababababababababababababababababababababababab"
}
},
"id": 3
}