import { default as NDK } from '@nostr-dev-kit/ndk'; import { Theme } from './types'; export declare const decodeNpub: (npub: string) => string; /** * Convert hex pubkey to npub */ export declare function hexToNpub(hex: string): string; export declare const decodeNip19Entity: (entity: string) => any; export declare function maskNPub(npubString?: string, length?: number): string; export type Stats = { likes: number; reposts: number; zaps: number; replies: number; }; export declare function getPostStats(ndk: NDK, postId: string): Promise; export declare function parseRelays(relaysAttr: string | null): string[]; export declare function parseTheme(themeAttr: string | null): Theme; export declare function parseBooleanAttribute(attr: string | null): boolean; export declare function escapeHtml(text: string): string; export declare function isValidUrl(url: string): boolean; export declare function isValidRelayUrl(url: string): boolean; export declare function isValidHex(hex: string): boolean; export declare function validateNpub(npub: string): boolean; export declare function validateNip05(nip05: string): boolean; export declare function validateNoteId(noteId: string): boolean; export declare function validateEventId(eventId: string): boolean; export declare function copyToClipboard(text: string): Promise; /** * Get the first value of a tag by tag name * @param tags Array of tag arrays from NDKEvent * @param tagName The tag name to search for (e.g., 'd', 'title') * @param index Index of the tag occurrence (0 for first) * @returns The tag value or undefined if not found */ export declare function getTagValue(tags: string[][], tagName: string, index?: number): string | undefined; /** * Get all values for a tag by tag name * @param tags Array of tag arrays from NDKEvent * @param tagName The tag name to search for (e.g., 't', 'relays') * @returns Array of all values for the tag (excluding the tag name itself) */ export declare function getTagValues(tags: string[][], tagName: string): string[]; /** * Parse a timestamp string to a number * @param value String value to parse * @returns Unix timestamp as number, or undefined if invalid */ export declare function parseTimestamp(value: string | undefined): number | undefined; /** * Parse a number string to a number * @param value String value to parse * @returns Number or undefined if invalid */ export declare function parseNumber(value: string | undefined): number | undefined; /** * Format timestamp as relative time (e.g., "2 mins ago", "1 month ago") * @param ts Timestamp in seconds * @returns Formatted relative time string */ export declare function formatRelativeTime(ts: number): string;