/** * Proof Bundle Verification * * Verifies cryptographic signatures and integrity of proof bundles. * * @see docs/rfc/proof-bundle-v1.md#6-verification-procedure */ import type { ProofBundle, Artifact } from './bundle.js'; /** * Verification result */ export interface VerificationResult { valid: boolean; code: VerificationCode; message: string; details?: VerificationDetails; } /** * Verification error codes (matches RFC) */ export declare enum VerificationCode { PROOF_OK = 0, PROOF_INVALID_SIG = 1, PROOF_INVALID_SCHEMA = 2, PROOF_ARTIFACT_MISMATCH = 3, PROOF_MISSING_KEY = 4, PROOF_MALFORMED = 5 } /** * Verification details */ export interface VerificationDetails { signerId?: string; hash?: string; artifactsVerified?: number; artifactsTotal?: number; trustScore?: number; runId?: string; startedAt?: string; finishedAt?: string; } /** * Artifact verification options */ export interface ArtifactVerificationOptions { basePath?: string; skipMissing?: boolean; } /** * Verify proof bundle signature * * @param bundle - Proof bundle to verify * @param publicKey - Optional public key (loads from ~/.qa360/keys if not provided) * @returns Verification result */ export declare function verifyProofBundle(bundle: ProofBundle, publicKey?: Uint8Array): Promise; /** * Verify artifact integrity * * @param artifact - Artifact metadata * @param filePath - Path to artifact file * @returns true if hash matches */ export declare function verifyArtifact(artifact: Artifact, filePath: string): Promise; /** * Verify all artifacts in proof bundle * * @param bundle - Proof bundle * @param options - Verification options * @returns Verification result with artifact details */ export declare function verifyArtifacts(bundle: ProofBundle, options?: ArtifactVerificationOptions): Promise; /** * Verify proof bundle and artifacts (complete verification) * * @param bundle - Proof bundle * @param options - Artifact verification options * @param publicKey - Optional public key * @returns Complete verification result */ export declare function verifyComplete(bundle: ProofBundle, options?: ArtifactVerificationOptions, publicKey?: Uint8Array): Promise; /** * Load and verify proof bundle from file * * @param filePath - Path to proof bundle JSON file * @param options - Artifact verification options * @param publicKey - Optional public key * @returns Verification result */ export declare function verifyProofFile(filePath: string, options?: ArtifactVerificationOptions, publicKey?: Uint8Array): Promise; /** * Verify Phase3 proof format (simplified) * * @param filePath - Path to Phase3 proof JSON * @returns Verification result */ export declare function verifyPhase3Proof(filePath: string): Promise;