/** * Shared utilities for nostr-biometric-login-service */ /** * Convert npub to hex public key * @param npub The npub to convert */ export declare function npubToHex(npub: string): string; /** * Convert hex public key to npub * @param hex The hex public key to convert */ export declare function hexToNpub(hex: string): string; /** * Generate a random string of specified length * @param length Length of the random string */ export declare function generateRandomString(length: number): string; /** * Check if running in browser environment */ export declare function isBrowser(): boolean; /** * Set a cookie in the browser * * NOTE: HttpOnly cannot be set via document.cookie — it can only be set via * a server-side Set-Cookie header. Session cookies should be set server-side * with the HttpOnly flag to prevent client-side script access. * * @param name Cookie name * @param value Cookie value * @param days Days until expiry */ export declare function setCookie(name: string, value: string, days: number): void; /** * Get a cookie value * @param name Cookie name */ export declare function getCookie(name: string): string | null;