/** * Storage module for Shakespeare auth persistence * Stores NIP-46 connection state in ~/.config/shakespeare/auth.json */ export interface AuthState { /** Client's secret key (nsec format) for relay communication */ clientSecretKey: string; /** Client's public key (hex) */ clientPubkey: string; /** Remote signer's public key (hex) */ bunkerPubkey: string; /** User's actual public key (hex) - may differ from bunkerPubkey */ userPubkey: string; /** Relays used for NIP-46 communication */ relays: string[]; /** Timestamp when connection was established */ connectedAt: number; /** Permissions granted by the bunker */ permissions: string[]; } /** * Load stored auth state * @returns Auth state if exists, null otherwise */ export declare function loadAuthState(): AuthState | null; /** * Save auth state to disk * @param state - Auth state to persist */ export declare function saveAuthState(state: AuthState): void; /** * Clear stored auth state (disconnect) * @returns true if state was cleared, false if no state existed */ export declare function clearAuthState(): boolean; /** * Check if user is authenticated */ export declare function isAuthenticated(): boolean; /** * Get the config directory path */ export declare function getConfigDir(): string; //# sourceMappingURL=storage.d.ts.map