/** * Helper utilities for Nostr like operations using NIP-25 External Content Reactions. * These are deliberately kept self-contained so `nostr-like` Web Component can import * everything from a single module without polluting the rest of the codebase. */ export interface LikeDetails { authorPubkey: string; date: Date; content: string; } export interface LikeCountResult { totalCount: number; likeDetails: LikeDetails[]; likedCount: number; dislikedCount: number; } /** * Fetch all likes for a URL using NIP-25 kind 17 events */ export declare function fetchLikesForUrl(url: string, relays: string[]): Promise; /** * Create reaction event (kind 17) * @param url - URL to react to * @param content - '+' for like, '-' for unlike */ export declare function createReactionEvent(url: string, content: '+' | '-'): any; /** * Create like event (kind 17) * @deprecated Use createReactionEvent(url, '+') instead */ export declare function createLikeEvent(url: string): any; /** * Create unlike event (kind 17 with '-' content) * @deprecated Use createReactionEvent(url, '-') instead */ export declare function createUnlikeEvent(url: string): any; /** * Check if user has liked a URL */ export declare function hasUserLiked(url: string, userPubkey: string, relays: string[]): Promise; /** * Get user's pubkey from NostrLogin */ export declare function getUserPubkey(): Promise; /** * Sign event with NostrLogin */ export declare function signEvent(event: any): Promise;