# Build an eval claim with proofbundle's own helper, so `passed` is computed, not typed in.
import json, sys
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from proofbundle.evalclaim import build_eval_claim, issuer_fingerprint

level = sys.argv[1] if len(sys.argv) > 1 else "self_attested"
signer = Ed25519PrivateKey.from_private_bytes(open("signer.key", "rb").read())
claim, salts = build_eval_claim(
    suite="supply-chain-sanity", suite_version="1.0", metric="accuracy",
    comparator=">=", threshold="0.90", score="0.97", n=128,
    model_id="demo-model", dataset_id="supply-chain-sanity-v1",
    issuer=issuer_fingerprint(signer), timestamp="2026-07-10T12:00:00Z",
    assurance_level=level,
)
json.dump(claim, open(f"claim_{level}.json", "w"), indent=2)
json.dump({k: v.hex() for k, v in salts.items()}, open(f"salts_{level}.json", "w"), indent=2)
print(json.dumps(claim, indent=2))
