/** * NIP-46 bunker sign-in flows for dashboard auth. * * Two entry points are exposed: * - startNostrConnect(): generates an ephemeral keypair + nostrconnect:// * URI, listens on the configured relays for an * Amber/bunker connect response, then requests a * signed NIP-98 event. Progress is polled over * HTTP via the session id (ephemeral pubkey). * - signWithBunkerUrl(): takes a bunker:// URI and runs the connect + * sign_event flow synchronously with a 30s cap. * * In both cases the remote signer returns a kind-27235 event whose pubkey * must match the configured station owner npub — verifyNip98() enforces * that in the verify endpoint. */ export type BunkerStatus = 'waiting' | 'ok' | 'timeout' | 'error'; export interface BunkerSession { ephemeralPubkey: string; nostrconnectUri: string; relays: string[]; createdAt: number; expiresAt: number; status: BunkerStatus; error?: string; signedEvent?: any; challenge?: string; } export declare function getBunkerSession(eph: string): BunkerSession | null; export declare function consumeBunkerSession(eph: string): BunkerSession | null; export interface NostrConnectStart { ephemeralPubkey: string; nostrconnectUri: string; qrSvg: string; relays: string[]; expiresAt: number; } export declare function startNostrConnect(challenge: string, dashboardUrl: string): Promise; export interface BunkerUrlResult { ok: boolean; signedEvent?: any; error?: string; } export declare function signWithBunkerUrl(bunkerUrl: string, challenge: string, dashboardUrl: string): Promise;