UNPKG

anon-identity

Version:

Decentralized identity framework with DIDs, Verifiable Credentials, and privacy-preserving selective disclosure

111 lines 3.06 kB
import { AgentActivity, ActivityQuery } from './types'; import { ActivitySearchService } from './activity-search-service'; export interface ExportOptions { format: ExportFormat; includeDetails?: boolean; includeMetadata?: boolean; anonymize?: boolean; compression?: boolean; encryption?: { enabled: boolean; key?: Uint8Array; }; dateRange?: { start: Date; end: Date; }; filters?: Partial<ActivityQuery>; } export declare enum ExportFormat { JSON = "json", CSV = "csv", PDF = "pdf", XML = "xml" } export interface ExportResult { data: Buffer | string; filename: string; contentType: string; size: number; checksum: string; metadata: { exportedAt: Date; totalRecords: number; format: ExportFormat; encrypted: boolean; compressed: boolean; }; } export interface AuditProof { merkleRoot: string; timestamp: Date; activities: string[]; signature: string; verificationData: { totalActivities: number; dateRange: { start: Date; end: Date; }; checksum: string; }; } export declare class ActivityExporter { private searchService; private encryptionService; constructor(searchService: ActivitySearchService); /** * Export activities based on query and options */ exportActivities(query: ActivityQuery, options: ExportOptions): Promise<ExportResult>; /** * Generate compliance report */ generateComplianceReport(agentDID: string, template: ComplianceTemplate, period: { start: Date; end: Date; }): Promise<ExportResult>; /** * Create cryptographic audit proof */ createAuditProof(activities: AgentActivity[], privateKey?: Uint8Array): Promise<AuditProof>; /** * Verify audit proof integrity */ verifyAuditProof(proof: AuditProof, activities: AgentActivity[], publicKey?: Uint8Array): Promise<{ valid: boolean; errors: string[]; }>; private processActivitiesForExport; private exportToJSON; private exportToCSV; private exportToPDF; private exportToXML; private generateComplianceReportData; private generateStandardPDFContent; private generateCompliancePDFContent; private compressData; private encryptExportData; private generateFilename; private calculateChecksum; private signData; private verifySignature; private anonymizeDID; private escapeXML; private determinePeriodType; } export interface ComplianceTemplate { type: 'gdpr' | 'hipaa' | 'sox' | 'iso27001' | 'custom'; periodType?: 'hour' | 'day' | 'week' | 'month' | 'year'; includeDetails: boolean; dataRetention: string; privacyCompliance: string; auditRequirements: string; sections: { summary: boolean; activities: boolean; errors: boolean; compliance: boolean; }; } //# sourceMappingURL=activity-exporter.d.ts.map