Cryptographic Verification Specification · EIP-712 & EAS

On-Chain Verification Spec

Exact HopperAuditProof v1 domain separator, normative 8-field AuditProofV1 struct, refutation revocation hooks (refutedProofs / revokeProof), optional live IEAS mirroring, and drop-in verification patterns for smart contracts and off-chain verifiers.

EIP-712 Domain Separator

HopperAuditProof v1 Domain Binding

Every Auditeur proof signature is bound to chain ID and verifying contract address to prevent cross-chain and cross-deployment replay.

Domain FieldTypeNormative Value
namestring"HopperAuditProof"
versionstring"1"
chainIduint256Target EVM chain ID (e.g. Local Anvil 31337, Base Sepolia 84532, Sepolia 11155111)
verifyingContractaddressDeployed AttestationBridge address

Canonical EIP-712 Type String

AUDIT_PROOF_TYPEHASH = 0x143234ac9dc6561d13da9b7219261fe397f04ea3330d6556efd8c851ed5ed37b computed over the exact whitespace-free canonical type encoding below:

AuditProofV1(bytes32 targetHash,bytes32 commitHash,bytes32 receiptRoot,bytes32 reportDigest,uint16 score,uint16 verifiedFindings,uint64 issuedAt,uint64 expiresAt)

Normative Payload Schema

AuditProofV1 Struct Fields (8 Canonical Fields)

All 8 fields are fixed-size value types for deterministic ABI encoding, byte-for-byte parity between hopper-engines-attestation and AttestationBridge.sol, and 1:1 EAS schema alignment.

FieldSolidity TypeEncoding / DerivationOn-Chain Verification Rule
targetHashbytes32keccak256(bytes(canonicalTargetIdentifier))Must be non-zero; binds the attestation to one exact normalized repository or deployment target.
commitHashbytes32Exact Git commit digest (keccak256(bytes(commitSha)) or canonical 32-byte digest)Must be non-zero; subsequent commits invalidate coverage for (targetHash, commitHash).
receiptRootbytes32Merkle / SHA-256 root over canonical tool execution & refutation receiptsCommits on-chain to the full reproducible scan and adversarial refutation receipt chain.
reportDigestbytes32SHA-256 digest of the immutable canonical audit report JSON / SARIF bundleAllows anyone to verify off-chain audit report bytes against on-chain AttestationRecord state.
scoreuint16Normalized deterministic rubric score in range 0..100AttestationBridge enforces score <= MAX_SCORE (100); downstream gates enforce their own minScore floor.
verifiedFindingsuint16Count of independently verified, unrefuted security findingsExcludes refuted or unverified LLM-only claims; strict integrators typically require verifiedFindings == 0.
issuedAtuint64Unix timestamp (seconds, UTC) when Auditeur sealed the reportOrders latestProofIdByTarget and latestProofIdByTargetCommit updates deterministically.
expiresAtuint64Unix timestamp (seconds, UTC) when freshness expires (or 0 for non-expiring)When non-zero, must satisfy expiresAt > issuedAt and expiresAt > block.timestamp on submission and verification.

Revocation & Ecosystem Interoperability

Proof Revocation & Optional Live IEAS Mirroring

AttestationBridge stands on its own as the canonical proof verifier, wires refutedProofs + revokeProof directly to RefutationStake, and optionally mirrors every attestation and revocation to an external IEAS registry.

Revocation & Optional Live IEAS Mirror

Mirrored with revocable: true whenever timelock configures a non-zero easRegistry and easSchemaUid via setEasConfig():

bytes32 targetHash, bytes32 commitHash, bytes32 receiptRoot, bytes32 reportDigest, uint16 score, uint16 verifiedFindings, uint64 issuedAt, uint64 expiresAt

Interactive Gate Evaluator

minScore=85 · maxFindings=0

Inspect how AttestationBridge.isVerified(targetHash, commitHash) plus a strict consumer deployment gate deterministically evaluate an AuditProofV1:

isVerified & policy → true

VALID_AUDIT_PROOF

Recorded, authorized, non-expired HopperAuditProof v1 meeting consumer score and findings policy.

Reference Integration Patterns

How any smart contract or user verifies an Auditeur proof

Verify on-chain inside protocol deployment/upgrade guards, or independently off-chain from raw EIP-712 signature bytes using standard tooling.

Solidity · On-Chain Contract Gate (IAttestationBridge)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;

interface IAttestationBridge {
    struct AuditProofV1 {
        bytes32 targetHash;
        bytes32 commitHash;
        bytes32 receiptRoot;
        bytes32 reportDigest;
        uint16  score;
        uint16  verifiedFindings;
        uint64  issuedAt;
        uint64  expiresAt;
    }

    struct AttestationRecord {
        bytes32 proofId;
        bytes32 targetHash;
        bytes32 commitHash;
        bytes32 receiptRoot;
        bytes32 reportDigest;
        uint16  score;
        uint16  verifiedFindings;
        uint64  issuedAt;
        uint64  expiresAt;
        address attestor;
        uint64  recordedAt;
    }

    function submitAttestationWithSig(AuditProofV1 calldata proof, bytes calldata signature)
        external
        returns (bytes32 proofId);

    function isProofActive(bytes32 proofId) external view returns (bool active);

    function isVerified(bytes32 targetHash, bytes32 commitHash)
        external
        view
        returns (bool verified);

    function refutedProofs(bytes32 proofId) external view returns (bool);

    function easUidByProof(bytes32 proofId) external view returns (bytes32);

    function getAttestationForTargetCommit(bytes32 targetHash, bytes32 commitHash)
        external
        view
        returns (AttestationRecord memory record);
}

contract AuditedDeploymentGate {
    IAttestationBridge public immutable bridge;

    error AuditProofInvalid(bytes32 targetHash, bytes32 commitHash);
    error AuditPolicyNotMet(uint16 score, uint16 verifiedFindings);

    constructor(IAttestationBridge _bridge) {
        bridge = _bridge;
    }

    /// @notice Require an active, unrefuted, non-expired Auditeur proof with score >= minScore and 0 verified findings.
    function requireCleanAudit(bytes32 targetHash, bytes32 commitHash, uint16 minScore) external view {
        if (!bridge.isVerified(targetHash, commitHash)) {
            revert AuditProofInvalid(targetHash, commitHash);
        }
        IAttestationBridge.AttestationRecord memory rec =
            bridge.getAttestationForTargetCommit(targetHash, commitHash);
        if (rec.score < minScore || rec.verifiedFindings != 0) {
            revert AuditPolicyNotMet(rec.score, rec.verifiedFindings);
        }
    }
}
TypeScript (viem) · Off-Chain User / CI Verification
import { verifyTypedData } from "viem";

const domain = {
  name: "HopperAuditProof",
  version: "1",
  chainId: 84532, // Base Sepolia testnet candidate (mainnet TBD post-legal-gate)
  verifyingContract: "0x0000000000000000000000000000000000000000", // Deployed AttestationBridge
} as const;

const types = {
  AuditProofV1: [
    { name: "targetHash", type: "bytes32" },
    { name: "commitHash", type: "bytes32" },
    { name: "receiptRoot", type: "bytes32" },
    { name: "reportDigest", type: "bytes32" },
    { name: "score", type: "uint16" },
    { name: "verifiedFindings", type: "uint16" },
    { name: "issuedAt", type: "uint64" },
    { name: "expiresAt", type: "uint64" },
  ],
} as const;

// 1. Verify ECDSA signature against the published Auditeur attestor address.
const signatureValid = await verifyTypedData({
  address: auditeurAttestorAddress,
  domain,
  types,
  primaryType: "AuditProofV1",
  message: proofPayload,
  signature,
});

// 2. Confirm freshness, minimum score floor, and zero verified findings before trusting.
const now = BigInt(Math.floor(Date.now() / 1000));
const acceptable =
  signatureValid &&
  proofPayload.score >= 85 &&
  proofPayload.verifiedFindings === 0 &&
  (proofPayload.expiresAt === 0n || now < proofPayload.expiresAt);