UNPKG

@lightninglabs/lnc-web

Version:

Lightning Node Connect npm module for web

36 lines 1.14 kB
import SessionManager from '../sessions/sessionManager'; import { UnlockOptions } from '../types/lightningNodeConnect'; import { AuthStrategy } from './authStrategy'; /** * Session-based authentication strategy. * Handles session restoration and temporary credential access. */ export declare class SessionStrategy implements AuthStrategy { private sessionManager; readonly method: "session"; constructor(sessionManager: SessionManager); get isSupported(): boolean; get isUnlocked(): boolean; get hasAnyCredentials(): boolean; /** * Clear the session strategy */ clear(): void; /** * Unlock the session strategy */ unlock(options: UnlockOptions): Promise<boolean>; /** * Check if the session can be automatically restored */ canAutoRestore(): Promise<boolean>; /** * Get a credential from the session strategy */ getCredential(key: string): Promise<string | undefined>; /** * Set a credential in the session strategy */ setCredential(key: string, value: string): Promise<void>; } //# sourceMappingURL=sessionStrategy.d.ts.map