/** * original source code is from https://github.com/anthonynsimon/timeflake/blob/master/timeflake/flake.py * license: MIT License */ import BN from 'bn.js'; export declare const BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; export declare const HEX = "0123456789abcdef"; export declare const MAX_TIMESTAMP: BN; export declare const MAX_RANDOM: BN; export declare const MAX_TIMEFLAKE: BN; /** * typescript implementation of timeflake written in python. */ export declare class Timeflake { private _bytes; /** * creates Timeflake object from given bytes array. * @throws throws Error if flake is not valid. * @param from_bytes */ constructor(from_bytes: BN); get bytes(): Uint8Array; get int(): BN; private _uuid; /** * returns UUID v4 */ get uuid(): string; private _hex; /** * returns hex representation of the timeflake instance. */ get hex(): string; private _base32; /** * returns base32 representation of the timeflake instance. */ get base62(): string; /** * returns timestamp of the timeflake instance. */ get timestamp(): BN; get random(): BN; } //# sourceMappingURL=timeflake.d.ts.map