/** * Lemma KeyManager * * Handles Pro license key lifecycle: * - Activation via remote validation (https://lemma.nxus.studio/api/v1/validate) * - Graceful fallback to local format check when endpoint is unreachable * - Persistence to ~/.lemma-cache/license.json * - Auto-migration from legacy license.key format * * TODO(v0.4.0): Replace HTTP validate call with direct PostgreSQL check. */ /** * Validates the license key locally using a SHA-256 cryptographic checksum. * Format: LEMMA-PRO-XXXX-YYYY-ZZZZ where ZZZZ is the first 4 chars of SHA256(LEMMA-PRO-XXXX-YYYY + OFFLINE_SALT). */ export declare function verifyOfflineKey(key: string): boolean; export interface LicenseData { key: string; tier: 'pro' | 'free'; isPro: boolean; activatedAt: string; expiresAt?: string; lastValidatedAt?: string; validatedRemotely: boolean; email?: string; } export interface ActivationResult { success: boolean; isPro: boolean; message: string; license?: LicenseData; validatedRemotely: boolean; } export declare class KeyManager { private license; private isCheckingHeartbeat; constructor(); isPro(): boolean; private checkHeartbeat; getLicenseKey(): string | null; getLicense(): LicenseData | null; /** * Activate a license key. * Attempts remote validation first; falls back to format-check if unreachable. */ activate(key: string): Promise; /** * Deactivate / remove the current license. */ deactivate(): void; /** * Reload license from disk (used after activate from another process). */ reload(): void; private load; private save; private ensureCacheDir; /** * POST to https://lemma.nxus.studio/api/v1/validate with a timeout. * Returns the JSON response body. */ private validateRemote; } //# sourceMappingURL=KeyManager.d.ts.map