import { NDKEvent } from '@nostr-dev-kit/ndk'; export interface CommentEvent { id: string; pubkey: string; content: string; created_at: number; tags: string[][]; sig: string; } export interface ParsedComment { id: string; pubkey: string; content: string; created_at: number; replyTo?: string; rootUrl?: string; } /** * Normalize URL for consistent comment identification */ export declare function normalizeURL(raw: string): string; /** * Parse Nostr event into comment structure */ export declare function parseCommentEvent(event: NDKEvent): ParsedComment | null; /** * Create a comment event for publishing */ export declare function createCommentEvent(content: string, pubkey: string, url: string, replyTo?: string): Omit; /** * Validate if a string is a valid Nostr public key */ export declare function isValidPublicKey(pubkey: string): boolean; /** * Validate if a string is a valid Nostr event ID */ export declare function isValidEventId(eventId: string): boolean; /** * Truncate public key for display */ export declare function truncatePublicKey(pubkey: string, length?: number): string; /** * Format timestamp to relative time */ export declare function formatRelativeTime(timestamp: number): string; /** * Sanitize HTML content to prevent XSS */ export declare function sanitizeContent(content: string): string; /** * Parse URLs in content and make them clickable */ export declare function linkifyContent(content: string): string; /** * Generate a simple hash for content deduplication */ export declare function hashContent(content: string, pubkey: string): string; /** * Check if user has a Nostr extension (NIP-07) */ export declare function hasNostrExtension(): boolean; /** * Get stored private key from localStorage */ export declare function getStoredPrivateKey(): string | null; /** * Store private key in localStorage */ export declare function storePrivateKey(privateKey: string): boolean; /** * Validate if a string is a valid private key */ export declare function isValidPrivateKey(privateKey: string): boolean; /** * Clear stored private key (for logout functionality) */ export declare function clearStoredPrivateKey(): void; /** * Debounce function for rate limiting */ export declare function debounce any>(func: T, wait: number): (...args: Parameters) => void;