/** * TP-VC Verification — v0.3 * * Verify the integrity and validity of a received Verification Credential. * Used by agents consuming TP-VCs from other agents. */ import type { TPVerificationCredential } from './types.js'; export interface CredentialVerifyResult { /** Overall validity (hash matches + not expired + well-formed) */ valid: boolean; /** Whether the proof hash matches the VC body */ hash_match: boolean; /** Recomputed hash of the VC body */ current_hash: string; /** Hash from the VC's proof field */ expected_hash: string; /** Whether the credential has expired */ expired: boolean; /** Human-readable status */ status: 'valid' | 'hash-mismatch' | 'expired' | 'malformed'; } /** * Verify a ThoughtProof Verification Credential (TP-VC). * * Checks: * 1. Structure — required fields present * 2. Integrity — proof hash matches canonical body * 3. Expiry — not past expires_at * * @example * ```typescript * const check = verifyCredential(vc); * if (check.valid) { * // VC is authentic and untampered * } * ``` */ export declare function verifyCredential(vc: TPVerificationCredential): CredentialVerifyResult; //# sourceMappingURL=credential.d.ts.map