import { NostrEvent } from '@nostrify/nostrify'; /** * Validate that an event is a proper DM event */ export declare function validateDMEvent(event: NostrEvent): boolean; /** * Get the recipient pubkey from a DM event */ export declare function getRecipientPubkey(event: NostrEvent): string | undefined; /** * Get the conversation partner pubkey from a DM event * (the other person in the conversation, not the current user) */ export declare function getConversationPartner(event: NostrEvent, userPubkey: string): string | undefined; /** * Format timestamp for display (matches Signal/WhatsApp/Telegram pattern) * Today: Show time (e.g., "2:45 PM") * Yesterday: "Yesterday" * This week: Day name (e.g., "Mon") * This year: Month and day (e.g., "Jan 15") * Older: Full date (e.g., "Jan 15, 2024") */ export declare function formatConversationTime(timestamp: number): string; /** * Format timestamp as full date and time for tooltips * e.g., "Mon, Jan 15, 2024, 2:45 PM" */ export declare function formatFullDateTime(timestamp: number): string; /** * Generate a consistent color for a pubkey (used for avatars and names). * Returns a hex color string that can be used as inline styles. * * @param pubkey - The user's public key * @returns Hex color string (e.g., '#dc2626') */ /** * Format bytes to human-readable string (e.g., "1.5 MB") */ export declare function formatBytes(bytes: number): string; /** * Format bytes per second to human-readable speed (e.g., "1.5 MB/s") */ export declare function formatSpeed(bytesPerSec: number): string; /** * Check if a file is a media file (image, video, or audio) */ export declare function isMediaFile(file: File): boolean; /** * Check if a URL points to an image */ export declare function isImageUrl(url: string): boolean; /** * Check if a URL points to a video */ export declare function isVideoUrl(url: string): boolean; /** * Check if a URL points to an audio file */ export declare function isAudioUrl(url: string): boolean; /** * Check if a URL points to a document */ export declare function isDocUrl(url: string): boolean; /** * Check if a file type can be displayed in the browser (images and videos) * Excludes formats like HEIC that browsers don't support natively */ export declare function isDisplayableMediaType(mimeType?: string, url?: string): boolean; export declare function getPubkeyColor(pubkey: string): string;