{
  "tool_id": "art-699-x402-permit2-evidence-recomputer",
  "tool_version": "1.0.0",
  "display_name": "X402 Permit2 Evidence Recomputer",
  "mcp_name": "recompute_x402_permit2_digest",
  "mandate_type": "compliance_control",
  "wave": 119,
  "gpu": false,
  "url": "https://ainumbers.co/chaingraph/art-699-x402-permit2-evidence-recomputer.html",
  "description": "Recomputes the Permit2 typed-data digest a payer's wallet signs for an x402 payment, for the three single-item message shapes the exact and upto schemes use: a witness transfer that binds the destination, an unwitnessed signature transfer, and an allowance permit. From caller-supplied domain and message fields it derives the domain separator, the struct hash and the digest, deriving each type hash at run time from the type string rather than carrying a transcribed constant, and it reports binding facts against a caller-supplied payment requirement: whether the spender is the pinned x402 proxy, whether the destination bound into the witness matches payTo, whether the token matches the asset, whether the chain matches the network, and whether the amount holds under the scheme rule, which is equality under exact and a ceiling under upto. It reports nonce facts in the right space, keeping the unordered bitmap decomposition of the transfer shapes apart from the sequential counter of the allowance shape, and it reports that an allowance expiration of zero lasts only the current block rather than never expiring. Signature bytes are classified without recovery: length class, whether s sits above half the curve order, the recovery byte form including the raw parity case an on-chain call cannot use, and the counterfactual wrapper marker. Signer recovery itself is handed off to art-591 in that node's exact input shape, and a sponsored approval leg is handed off to art-612 in its. Scope limits: it reads no chain, so nonce spend state, stored allowance, contract code and the current time are caller-declared inputs echoed back, and any absent input reports NOT_EVALUATED rather than a pass. It never originates, relays or submits a payment.",
  "input_schema_ref": "chaingraph/art-699-x402-permit2-evidence-recomputer.html#manifest",
  "consumes": [],
  "feeds": [
    "art-591-x402-signer-recovery-verifier",
    "art-612-erc2612-permit-binding-verifier"
  ],
  "status": "live",
  "conformance_fixtures": true,
  "compute_capability": "server",
  "compute_images": [
    {
      "system": "sha256-source",
      "image_id": "sha256:0c36a136f75d75a9dbc83a6d6230e082a4d33eb3fb43c2c52de58b9dcc2b39f9",
      "valid_from": "2026-09-29"
    },
    {
      "system": "risc0",
      "image_id": "sha256:a1a0bc89b5b1febaeda3519f6dbade0fa5ac16beeb143c4e1b01689573567bc6",
      "valid_from": "2026-10-06"
    }
  ],
  "export_capability": [
    "json"
  ],
  "standards_basis": "implements_standard",
  "cited_clause_digest": [
    {
      "digest": "sha256:b0d1ea1043743e21eef8e02793422ce320c4d94cd4128dceb6e5f3c583cdfa5e",
      "source_url": "https://raw.githubusercontent.com/Uniswap/permit2/main/src/EIP712.sol",
      "retrieved_at": "2026-09-28",
      "clause_path": "src/EIP712.sol lines 9-41",
      "scheme": "solidity-source",
      "id": "Permit2 EIP712 domain (3 fields)"
    },
    {
      "digest": "sha256:e1a18221b55e1ba4ed3cf1385f6eb9bf5d702439290d4efb9f91de0bbfefdee5",
      "source_url": "https://raw.githubusercontent.com/x402-foundation/x402/main/specs/schemes/exact/scheme_exact_evm.md",
      "retrieved_at": "2026-09-28",
      "clause_path": "Reference Implementation: x402ExactPermit2Proxy, WITNESS_TYPE_STRING and WITNESS_TYPEHASH",
      "scheme": "x402-spec",
      "id": "x402 exact witness type string"
    },
    {
      "digest": "sha256:f74d1e8b582009eeb8393fb679665b104717aaa1f4091317647918ecc35d969a",
      "source_url": "https://raw.githubusercontent.com/x402-foundation/x402/main/contracts/evm/src/x402ExactPermit2Proxy.sol",
      "retrieved_at": "2026-09-28",
      "clause_path": "contract x402ExactPermit2Proxy: settle and settleWithPermit",
      "scheme": "solidity-source",
      "id": "x402 exact x402ExactPermit2Proxy"
    },
    {
      "digest": "sha256:c1cf279c6802fbf3863e8eb7e5d53c66b0d3998fea3140fc6f392252245e9de2",
      "source_url": "https://raw.githubusercontent.com/x402-foundation/x402/main/contracts/evm/src/x402BasePermit2Proxy.sol",
      "retrieved_at": "2026-09-28",
      "clause_path": "x402BasePermit2Proxy._settle require checks (amount, owner, destination, validAfter)",
      "scheme": "solidity-source",
      "id": "x402 exact proxy enforcement (witness.to, validAfter)"
    },
    {
      "digest": "sha256:e0880c4e1c659a69b27ce15796fe0b46ce4cfc9cf7150209416910f6251362c8",
      "source_url": "https://raw.githubusercontent.com/x402-foundation/x402/main/specs/schemes/upto/scheme_upto.md",
      "retrieved_at": "2026-09-28",
      "clause_path": "Sec 4 Maximum Amount Enforcement; Sec 5 Phase-Dependent amount Semantics",
      "scheme": "x402-spec",
      "id": "x402 upto amount semantics"
    },
    {
      "digest": "sha256:db24d77fce5684d45a1d9664e8632166426647c9395e142919f9d3a2671f084b",
      "source_url": "https://raw.githubusercontent.com/Uniswap/permit2/main/src/SignatureTransfer.sol",
      "retrieved_at": "2026-09-28",
      "clause_path": "bitmapPositions + _useUnorderedNonce",
      "scheme": "solidity-source",
      "id": "Permit2 SignatureTransfer bitmap nonce"
    },
    {
      "digest": "sha256:3888022cd3e2798b851154de71683ab079d857a3881bc316857d5f5f147679f5",
      "source_url": "https://raw.githubusercontent.com/Uniswap/permit2/main/src/libraries/Allowance.sol",
      "retrieved_at": "2026-09-28",
      "clause_path": "Allowance library: updateAll / updateAmountAndExpiration expiration==0 handling",
      "scheme": "solidity-source",
      "id": "Permit2 Allowance expiration semantics (incl. 0)"
    },
    {
      "digest": "sha256:002e065fcd87530562d2baa3db3e6f33f33193feb24797e1f4c9475faf904523",
      "source_url": "https://raw.githubusercontent.com/Uniswap/permit2/main/src/AllowanceTransfer.sol",
      "retrieved_at": "2026-09-28",
      "clause_path": "_transfer expiry check and uint160 max-allowance bypass",
      "scheme": "solidity-source",
      "id": "Permit2 AllowanceTransfer transfer-time expiry check"
    },
    {
      "digest": "sha256:2e9acc9950f1b9152d959406a4314af4bf38de63700099064144f72ed05eb4cf",
      "source_url": "https://raw.githubusercontent.com/Uniswap/permit2/main/src/libraries/SignatureVerification.sol",
      "retrieved_at": "2026-09-28",
      "clause_path": "library SignatureVerification.verify (65-byte, 64-byte EIP-2098, ERC-1271; no high-s rejection)",
      "scheme": "solidity-source",
      "id": "Permit2 SignatureVerification paths (65/64/1271, high-s)"
    },
    {
      "digest": "sha256:0497c232e80235d7e8f5a55c6785fe302160369ed98e797a54924eaa6d8e222b",
      "source_url": "https://raw.githubusercontent.com/x402-foundation/x402/main/specs/extensions/eip2612_gas_sponsoring.md",
      "retrieved_at": "2026-09-28",
      "clause_path": "PaymentRequired extension schema and required fields",
      "scheme": "x402-spec",
      "id": "x402 eip2612GasSponsoring payload shape"
    },
    {
      "digest": "sha256:c52a44c68f2fab236498e59c27a79391abf2e15cb1d29c5bec486b1235de4f70",
      "source_url": "https://raw.githubusercontent.com/ethereum/EIPs/master/EIPS/eip-712.md",
      "retrieved_at": "2026-09-28",
      "clause_path": "Definition of encodeType; EIP712Domain chainId field (refuse-to-sign)",
      "scheme": "eip",
      "id": "EIP-712 encodeType ordering and chainId refuse-to-sign"
    },
    {
      "digest": "sha256:912975371d4cfc871411ebf7ab9a193bf919d8a9638d2aaa8708eda2c77a4372",
      "source_url": "https://raw.githubusercontent.com/ethereum/ERCs/master/ERCS/erc-2612.md",
      "retrieved_at": "2026-09-28",
      "clause_path": "permit semantics + Permit typehash; Rationale uint(-1) deadline",
      "scheme": "erc",
      "id": "ERC-2612 permit type and deadline convention"
    },
    {
      "digest": "sha256:030b29feb0dc42fa4c15234ffab7cf9ce6234367c22aab3ffec3e531cd4de60d",
      "source_url": "https://raw.githubusercontent.com/ethereum/ERCs/master/ERCS/erc-2098.md",
      "retrieved_at": "2026-09-28",
      "clause_path": "Compact signature representation: r || yParity<<255 || s",
      "scheme": "erc",
      "id": "EIP-2098 compact signature form"
    },
    {
      "digest": "sha256:9731f21073d8744b2440a6de87c9d19d61e5b315e4fbafe55203837f36404475",
      "source_url": "https://raw.githubusercontent.com/ethereum/ERCs/master/ERCS/erc-6492.md",
      "retrieved_at": "2026-09-28",
      "clause_path": "magicBytes literal (16x 6492 = 32 bytes); check ordering before ERC-1271 and ecrecover",
      "scheme": "erc",
      "id": "ERC-6492 magic suffix"
    }
  ],
  "compute_proof_ready": "ready",
  "compute_proof": {
    "type": "ZkVmReceipt",
    "system": "risc0",
    "receiptFormat": "groth16-bn254",
    "imageId": "sha256:a1a0bc89b5b1febaeda3519f6dbade0fa5ac16beeb143c4e1b01689573567bc6",
    "seal": "Ar5Zbig8JXotyy7yWwLhW+mD+QWTMQgnG6n7xDNjM7UGdDHPg1tS+uX++TRt7psMYo+NxXI36/eyPa4GQ2v5uAd/mJymZsr0K/0YIeHX2q/29JbR8EOVJ8AsWYGyo2KKG9NFty+srtlofXS0f9/X+wYG5pIcnMLB+1IExMXfjgcMzRqZbCUdxEIg5ZpDr7AV5fn0TRQTCKdrTOYXC7beuxLGdmYUWI7Vu1IrseIPp3ZEidLGWmPXiDRRs0S0+FbuKa9lmEtpT/JWWRBDg6mLgvIjC0JK/8V5YE5AL2mgqLcky+WmYVHaljmcDvlsnp3SnLrXS765PclyAvf8f0+iqw==",
    "journal": {
      "chaingraph_version": "0.4.0",
      "kernel_digest": "sha256:0c36a136f75d75a9dbc83a6d6230e082a4d33eb3fb43c2c52de58b9dcc2b39f9",
      "output": {
        "allowance_expiry": null,
        "digest": "0x7d49d112cf01c74a5dce717f5e786ca6774b0e45658eff49d6b871aa480af95b",
        "domain": {
          "chain_id": "84532",
          "field_count": 3,
          "name": "Permit2",
          "verifying_contract": "0x000000000022d473030f116ddee9f6b43ac78ba3",
          "verifying_contract_is_canonical_permit2": true
        },
        "domain_separator": "0x010f27a92fb9a32622f44f001dc4d15706a85b33499cfc2ce9033113ab26592c",
        "domain_typehash": "0x8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866",
        "errors": [],
        "handoff_591": {
          "claimedFrom": "0x2c7536e3605d9c16a7a3d7b1898e529396a65c23",
          "digest": "0x7d49d112cf01c74a5dce717f5e786ca6774b0e45658eff49d6b871aa480af95b",
          "r": "0x25756b2bf033967940a5fdc0735ab623fea0727447b70dbf4980a4e26a10a1e1",
          "s": "0x68a8a260ea84da98a5674371f183b87b966c972e320aac93d1e85916ca50aa84",
          "yParity": 1
        },
        "handoff_612": null,
        "message": {
          "deadline": "1790000600",
          "nonce": "1701411834604692317316873037158841057",
          "permitted": {
            "amount": "10000",
            "token": "0x036cbd53842c5426634e7929541ec2318f3dcf7e"
          },
          "spender": "0x402085c248eea27d92e8b30b2c58ed07f9e20001",
          "token_permissions_hash": "0x8a320c6226077ff73fae601a9ffd16445c55f717ef1cfd2f7905c573e75c03a4",
          "witness": {
            "to": "0x209693bc6afc0c5328ba36faf03c514ef312287c",
            "valid_after": "1790000000"
          },
          "witness_hash": "0x873a63751248b755bfaf45dff43913fce6711cc9b5cf470b2331aec6adb8bfd2",
          "witness_type_string": "Witness(address to,uint256 validAfter)"
        },
        "nonce_facts": {
          "nonce_already_used": null,
          "nonce_bit_pos": 225,
          "nonce_space": "signature_transfer_unordered_bitmap",
          "nonce_word_pos": "6646139978924579364519035301401722",
          "sequential_nonce": null,
          "space_note": "The transfer message shapes use an unordered bitmap: the upper 248 bits index the word and the low 8 bits index the bit within it. It is a different space from the allowance shape's sequential counter, and the two are never conflated."
        },
        "reasons": [],
        "scope_note": "Recomputes the Permit2 typed-data digest for a single-item x402 witness transfer, an unwitnessed signature transfer, or an allowance permit, from caller-supplied domain and message fields, and reports binding facts against a caller-supplied payment requirement. It proves nothing about who signed: signer recovery is the downstream recovery node's job and this kernel emits its input record instead. It reads no chain, so nonce spend state, stored allowance, contract code and the current block time are caller-declared inputs echoed back, and an absent input reports NOT_EVALUATED. Zero network calls. Never a facilitator, proxy or settlement relay.",
        "signature_form": {
          "ecdsa_recovery_applicable": true,
          "erc6492_wrapped": false,
          "notes": [],
          "present": true,
          "r": "0x25756b2bf033967940a5fdc0735ab623fea0727447b70dbf4980a4e26a10a1e1",
          "s": "0x68a8a260ea84da98a5674371f183b87b966c972e320aac93d1e85916ca50aa84",
          "s_above_half_order": false,
          "signature_byte_length": 65,
          "signature_length_class": "65",
          "v_form": "legacy_27_28",
          "v_onchain_compatible": true,
          "y_parity": 1
        },
        "sponsored_approval": null,
        "struct_hash": "0x4a662cd0ab203d6f82055c77d5d7b442845fc55e2ce2b0e4dbaebae838eb96c2",
        "type_string": "PermitWitnessTransferFrom(TokenPermissions permitted,address spender,uint256 nonce,uint256 deadline,Witness witness)TokenPermissions(address token,uint256 amount)Witness(address to,uint256 validAfter)",
        "typehash": "0xebc156cd23678a74c94df13d772ef5478420637f0c94bd10d509e1dc98f521c7",
        "variant": "x402_witness_transfer",
        "verdict": "DIGEST_RECOMPUTED",
        "warnings": [],
        "window": {
          "deadline": "1790000600",
          "deadline_status": "WITHIN",
          "now_unix": "1790000300",
          "valid_after": "1790000000",
          "valid_after_status": "ACTIVE"
        },
        "x402_binding": {
          "amount_vs_requirement": "EQUAL",
          "chain_matches_network": true,
          "network_comparison_note": null,
          "requirement_amount": "10000",
          "requirement_declared": true,
          "scheme": "exact",
          "signed_amount": "10000",
          "spender_is_x402_permit2_proxy": true,
          "token_matches_asset": true,
          "witness_to_matches_pay_to": true
        }
      }
    }
  }
}