/** * User identity + backup-relay list persisted at * ~/.config/nostr-station/identity.json. * * Only the npub (public) and a list of read relays are stored. nsec is * never accepted — the API layer rejects any input starting with "nsec" * before it reaches the lib. */ export interface Identity { npub: string; readRelays: string[]; ngitRelay?: string; requireAuth?: boolean; setupComplete?: boolean; } export declare const DEFAULT_READ_RELAYS: string[]; export declare function identityExists(): boolean; export declare function readIdentity(): Identity; export declare function writeIdentity(ident: Identity): void; export declare function isNpubOrHex(s: string): boolean; export declare function isNsec(s: string): boolean; export declare function isValidRelayUrl(s: string): boolean; export declare function addReadRelay(url: string): { ok: boolean; error?: string; relays?: string[]; }; export declare function removeReadRelay(url: string): { ok: boolean; relays: string[]; }; export declare function setNgitRelay(url: string): { ok: boolean; error?: string; ngitRelay?: string; }; export declare function setNpub(npub: string): { ok: boolean; error?: string; npub?: string; }; export declare function setSetupComplete(complete: boolean): void;