facezk-core
Version:
ZKP-AI Proof of Humanity: Live Selfie Check with Biometric Template Extraction and Fuzzy Hashing
139 lines • 3.53 kB
TypeScript
/**
* FaceZK - Privacy-First Human Verification
* Modular architecture with secure cryptographic implementation
*/
import type { Input, Backend } from './types';
import type { VerificationResult, VerificationOptions } from './core/facezk-core';
export interface FaceZKConfig {
backend: Backend;
debug: boolean;
systemSalt: string;
enableAudit: boolean;
auditRetentionDays: number;
maxMemoryMB: number;
enableMemoryMonitoring: boolean;
minConfidence: number;
minLivenessScore: number;
enableLiveness: boolean;
livenessChallenges: string[];
cryptoConfig?: any;
memoryConfig?: any;
auditConfig?: any;
}
export declare class FaceZK {
private core;
private pluginManager;
private config;
private isInitialized;
/**
* Private constructor - use FaceZK.create() instead
*/
private constructor();
/**
* Factory method to create and initialize FaceZK instance
*/
static create(config?: Partial<FaceZKConfig>): Promise<FaceZK>;
/**
* Initialize FaceZK with all plugins
*/
private initialize;
/**
* Register and configure plugins
*/
private registerPlugins;
/**
* Build core configuration
*/
private buildCoreConfig;
/**
* Start a new verification session
*/
startSession(): any;
/**
* Process a frame for verification
*/
processFrame(input: Input, options?: Partial<VerificationOptions>): Promise<VerificationResult | null>;
/**
* Get current session
*/
getSession(): any;
/**
* Reset current session
*/
resetSession(): void;
/**
* Check if FaceZK is ready
*/
isReady(): boolean;
/**
* Get current configuration
*/
getConfig(): FaceZKConfig;
/**
* Get system statistics
*/
getSystemStats(): any;
/**
* Get plugin information
*/
getPluginInfo(pluginId: string): any;
/**
* List all plugins
*/
listPlugins(): any[];
/**
* Dispose FaceZK instance
*/
dispose(): Promise<void>;
/**
* Generate humanity code for a biometric ID
*/
generateHumanityCode(biometricId: string, additionalData?: string): Promise<string>;
/**
* Compare two humanity codes for verification
*/
compareHumanityCodes(code1: string, code2: string): Promise<{
match: boolean;
similarity: number;
}>;
/**
* Compare two biometric templates
*/
compareBiometricTemplates(template1: any, template2: any): Promise<{
match: boolean;
similarity: number;
}>;
/**
* Get stored biometric template by ID
*/
getStoredTemplate(biometricId: string): any;
/**
* Clear all stored biometric templates
*/
clearStoredTemplates(): void;
/**
* Encrypt template (legacy method)
*/
encryptTemplate(templateData: Uint8Array, userSalt?: string): Promise<any>;
/**
* Decrypt template (legacy method)
*/
decryptTemplate(encryptedData: any): Promise<Uint8Array>;
/**
* Get audit trail (new method)
*/
getAuditTrail(sessionId: string): Promise<any[]>;
/**
* Export audit log (new method)
*/
exportAuditLog(startDate: Date, endDate: Date): Promise<any>;
/**
* Get memory statistics (new method)
*/
getMemoryStats(): any;
/**
* Cleanup memory (new method)
*/
cleanupMemory(): Promise<void>;
}
//# sourceMappingURL=facezk.d.ts.map