UNPKG

velocid

Version:

Revolutionary high-performance distributed ID generator with military-grade security

84 lines 2.06 kB
/** * Statistics about the Velocid generator */ export interface VelocidStats { /** Total number of IDs generated */ generatedCount: bigint; /** Node identifier in hexadecimal */ nodeId: string; /** Current memory usage in bytes */ memoryUsage: number; /** Generator creation timestamp */ createdAt: Date; /** Last generation timestamp */ lastGenerated: Date | undefined; } /** * Configuration options for Velocid generator */ export interface VelocidConfig { /** Custom node identifier (optional) */ nodeId?: number; /** Enable performance monitoring */ enableStats?: boolean; /** Custom entropy seed (for testing) */ customSeed?: Uint8Array; } /** * Velocid generation result with metadata */ export interface VelocidResult { /** Generated ID */ id: bigint; /** Generation timestamp */ timestamp: Date; /** Node that generated this ID */ nodeId: number; /** Counter value used */ counter: number; } /** * Batch generation result */ export interface VelocidBatchResult { /** Generated IDs */ ids: bigint[]; /** Generation start time */ startTime: Date; /** Generation end time */ endTime: Date; /** Total generation time in milliseconds */ duration: number; /** IDs per second */ throughput: number; } /** * Platform detection result */ export interface PlatformInfo { /** Platform type */ type: 'browser' | 'node' | 'webworker' | 'unknown'; /** Has native crypto support */ hasCrypto: boolean; /** Has SharedArrayBuffer support */ hasSharedArrayBuffer: boolean; /** Hardware concurrency */ hardwareConcurrency: number; } /** * ID validation result */ export interface ValidationResult { /** Is the ID valid */ valid: boolean; /** Error message if invalid */ error?: string; /** Extracted components */ components?: { counter: number; nodeId: number; entropy: number; crc: number; }; } //# sourceMappingURL=index.d.ts.map