OpenChainGraph Suite · OCG v0.8.7 · Digital-Asset Rails

EIP-3009 Agent Spend Decision

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.

OpenChainGraph · 3 Steps compliance control · Gated Hash-Anchored §4 chain_depth:3 Client-Side · Zero PII
Within the declared policy is not an authorization to move funds and not proof that funds moved. The gate reasons over a caller-declared policy, a caller-pasted ledger and a caller-supplied clock; it recovers no signature, reads no chain state and makes no network calls. Only the token contract enforces nonce uniqueness on chain. Not financial or legal advice.
⚡ Decision gate at Step 2: the chain continues to the digest step only when /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.
Chain Topology (gated): Payload Lint → Spend Gate [GATE] → EIP-712 Digest Recompute
§4 Execution Hash · Chain Definition Anchor
execution_hash:computing…
Chain Stages · 3 Steps · 1 Decision Gate
1 ROOT node
Authorization Payload Linter art-700-authorization-payload-linter
the lint result echoes the authorization in the shape the spend gate reads
MCP Call · 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
}
↓
2 GATE §21.4 gate
EIP-3009 Agent Spend Gate art-816-eip3009-agent-spend-gate
decision is one of SPEND, DENY, OVER_LIMIT or INDETERMINATE; any value other than SPEND stops the chain here, outside the declared policy
△ Gate: if /decision == "SPEND" → Step 3 (digest)  |  else → END
MCP Call · decide_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
}
↓
3 TERMINAL node
x402 EIP-712 Digest Recomputer art-590-x402-eip712-digest-recomputer
recomputes the exact EIP-712 digest the wallet would sign; continue with eip3009-agent-spend-decision once a signature exists
MCP Call · 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
}
After signing
Once a signature exists, continue with the x402 spend evidence chain (signer recovery and domain, nonce and window checks). It is a separate chain and is not repeated here. Before signing, this chain answers whether the authorization is within the declared policy; after signing, that one answers whether the signature and replay signals hold.
Export Chain Artifact
Download the §4 chain definition artifact (hash-anchored JSON). The artifact encodes the complete chain definition. Available after hash computation.