import { Theme } from './types'; import { ensureInitialized, getPublicKey } from './nostr-login-service'; export type AuthAction = 'like' | 'zap' | 'follow'; export type EnsureSignerStatus = 'already-connected' | 'connected' | 'dismissed' | 'unavailable'; interface AuthOnboardingContent { eyebrow: string; title: string; description: string; whyItMatters: string; } interface ShowAuthOnboardingOptions { action: AuthAction; theme?: Theme; } interface ShowAuthOnboardingResult { status: 'connect' | 'dismissed'; } export interface EnsureSignerForActionOptions { action: AuthAction; theme?: Theme; } export interface EnsureSignerForActionResult { status: EnsureSignerStatus; publicKey: string | null; message?: string; } interface EnsureSignerDependencies { ensureInitialized: typeof ensureInitialized; getPublicKey: typeof getPublicKey; hasConnectedSigner: typeof hasConnectedSigner; showAuthOnboarding: (options: ShowAuthOnboardingOptions) => Promise; } /** * Passive check for a signer that is usable without opening any connect UI: * a NIP-07 extension, or a window.nostr.js session stored by a previous * connect. * * window.nostr.js marks its shim with `isWnj`, and its `getPublicKey()` * opens the connect widget when no session exists — so calling * `getPublicKey()` is not a safe way to probe for an existing connection. */ export declare function hasConnectedSigner(): boolean; export declare function getAuthOnboardingContent(action: AuthAction): AuthOnboardingContent; export declare function getAuthOnboardingLinks(): { quickSetupUrl: string; signerInstallUrl: string; }; export declare function getSignerUnavailableMessage(action: AuthAction): string; export declare function createEnsureSignerForAction(dependencies?: EnsureSignerDependencies): (options: EnsureSignerForActionOptions) => Promise; export declare const ensureSignerForAction: (options: EnsureSignerForActionOptions) => Promise; export declare function showAuthOnboarding(options: ShowAuthOnboardingOptions): Promise; export {};