/** * JSON Schema Validation for Proof Bundles * * Validates proof bundles against the v1 schema using AJV. * * @see docs/rfc/proof-bundle-v1.md#7-json-schema */ /** * Validation result */ export interface ValidationResult { valid: boolean; errors?: string[]; } /** * Validate proof bundle against schema * * @param bundle - Proof bundle to validate * @returns Validation result with errors if invalid */ export declare function validateProofBundle(bundle: any): ValidationResult; /** * Get the JSON Schema object * * @returns Proof Bundle v1 schema */ export declare function getSchema(): { $schema: string; $id: string; title: string; type: string; required: string[]; additionalProperties: boolean; properties: { spec: { type: string; const: string; }; run: { type: string; required: string[]; additionalProperties: boolean; properties: { id: { type: string; format: string; }; startedAt: { type: string; format: string; }; finishedAt: { type: string; format: string; }; environment: { type: string; required: string[]; additionalProperties: boolean; properties: { os: { type: string; enum: string[]; }; node: { type: string; pattern: string; }; arch: { type: string; enum: string[]; }; ci: { type: string; }; }; }; packHash: { type: string; pattern: string; }; ciContext: { type: string; properties: { provider: { type: string[]; }; }; }; }; }; artifacts: { type: string; items: { type: string; required: string[]; additionalProperties: boolean; properties: { name: { type: string; minLength: number; }; sha256: { type: string; pattern: string; }; size: { type: string; minimum: number; }; path: { type: string; }; }; }; }; results: { type: string; required: string[]; additionalProperties: boolean; properties: { trustScore: { type: string; minimum: number; maximum: number; }; gates: { type: string; items: { type: string; required: string[]; additionalProperties: boolean; properties: { name: { type: string; minLength: number; }; status: { type: string; enum: string[]; }; metrics: { type: string; }; }; }; }; }; }; signing: { type: string; required: string[]; additionalProperties: boolean; properties: { algo: { type: string; const: string; }; signerId: { type: string; minLength: number; }; timestamp: { type: string; required: string[]; properties: { type: { type: string; enum: string[]; }; token: { type: string[]; }; }; }; identity: { type: string; required: string[]; properties: { type: { type: string; enum: string[]; }; evidence: { type: string[]; }; }; }; }; }; signature: { type: string; pattern: string; }; }; }; /** * Validate specific field patterns */ export declare const patterns: { /** * Validate SHA-256 hash format */ sha256: (hash: string) => boolean; /** * Validate UUID v4 format */ uuid: (id: string) => boolean; /** * Validate Ed25519 signature format (base64, 88 chars) */ signature: (sig: string) => boolean; /** * Validate Node.js version format */ nodeVersion: (version: string) => boolean; };