declare const SIMPLEFLAKE_EPOCH = 946684800000n; /** * Generates a simpleflake ID * @param timestamp - Timestamp in milliseconds (defaults to current time) * @param randomBits - Random bits for the ID (defaults to a cryptographically secure random value) * @param epoch - Epoch timestamp in milliseconds (defaults to SIMPLEFLAKE_EPOCH) * @returns Generated simpleflake as a BigInt */ export declare function simpleflake(timestamp?: number | bigint, randomBits?: number | bigint, epoch?: number | bigint): bigint; /** * Converts a value to binary representation * @param value - The value to convert to binary * @param padding - Whether to pad to 64 bits (defaults to true) * @returns Binary string representation */ export declare function binary(value: bigint | number | string, padding?: boolean): string; /** * Extracts bits from a data value * @param data - The data to extract bits from * @param shift - Number of bits to shift * @param length - Number of bits to extract * @returns Extracted bits as a BigInt */ export declare function extractBits(data: bigint | number | string, shift: bigint | number, length: bigint | number): bigint; /** * Structure representing a parsed simpleflake */ export declare class SimpleflakeStruct { readonly timestamp: bigint; readonly randomBits: bigint; constructor(timestamp: bigint, randomBits: bigint); } /** * Parses a simpleflake into its components * @param flake - The simpleflake to parse * @param epoch - Epoch timestamp in milliseconds used to reconstruct the absolute timestamp * @returns SimpleflakeStruct containing timestamp and random bits */ export declare function parseSimpleflake(flake: bigint | number | string, epoch?: bigint | number): SimpleflakeStruct; export { SIMPLEFLAKE_EPOCH }; declare const _default: { binary: typeof binary; extractBits: typeof extractBits; parseSimpleflake: typeof parseSimpleflake; SIMPLEFLAKE_EPOCH: bigint; simpleflake: typeof simpleflake; SimpleflakeStruct: typeof SimpleflakeStruct; }; export default _default; //# sourceMappingURL=simpleflakes.d.ts.map