/** * Pattern Library — persistent, IPFS-ready storage for threat findings. * The library grows smarter with every submission. */ import type { ThreatReport, AttackPattern } from './schemas.js'; export interface LibraryEntry { id: string; reportId: string; scenarioId: string; scenarioName: string; attackPattern: AttackPattern; severity: string; summary: string; findings: Array<{ title: string; description: string; evidence: string; }>; recommendations: string[]; confidence: number; submittedBy?: string; submittedAt: string; txHashes: string[]; chainId: number; ipfsCid?: string; viewCount: number; citationCount: number; } /** * Add a new submission to the pattern library. */ export declare function addToLibrary(report: ThreatReport, metadata: { submittedBy?: string; txHashes?: string[]; chainId?: number; }): Promise; /** * Search the library by pattern, severity, or keyword. */ export declare function searchLibrary(query: { pattern?: AttackPattern; severity?: string; keyword?: string; minConfidence?: number; limit?: number; }): Promise; /** * Get similar entries from the library based on attack pattern. */ export declare function findSimilar(pattern: AttackPattern, limit?: number): Promise; /** * Get the full library stats. */ export declare function getLibraryStats(): Promise<{ totalEntries: number; byPattern: Record; bySeverity: Record; avgConfidence: number; newestEntry: string | null; }>; /** * Get all unique attack patterns in the library. */ export declare function getPatternCounts(): Promise>; /** * Get the full list of all entries. */ export declare function getLibrary(): Promise; /** * Increment the view count for an entry. */ export declare function trackView(id: string): Promise; /** * Export the full library as a single JSON blob (IPFS-ready). */ export declare function exportLibrary(): Promise; /** * Import entries from a previous export. */ export declare function importLibrary(jsonData: string): Promise; //# sourceMappingURL=library.d.ts.map