import { Observable } from "rxjs"; import { NostrEvent } from "../helpers/event.js"; import { Filter } from "../helpers/filter.js"; import { ProfilePointer } from "../helpers/pointers.js"; import { ChainableObservable } from "../observable/chainable.js"; import type { CastConstructor, CastRefEventStore } from "./cast.js"; import { PubkeyCast } from "./pubkey.js"; import { EventCast } from "./event.js"; /** Cast a Nostr event or pointer into a {@link User} */ export declare function castUser(event: NostrEvent, store: CastRefEventStore): User; export declare function castUser(user: string | ProfilePointer, store: CastRefEventStore): User; /** A class representing a Nostr user */ export declare class User extends PubkeyCast { /** A global cache of pubkey -> weak {@link User} reference */ static cache: Map>; /** Returns the NIP-19 npub for this user */ get npub(): `npub1${string}`; /** Returns the NIP-19 nprofile for this user */ get nprofile(): `nprofile1${string}`; /** Subscribe to a replaceable event for this user */ replaceable(kind: number, identifier?: string, relays?: string[]): ChainableObservable; /** Subscribe to an addressable event for this user */ addressable(kind: number, identifier: string, relays?: string[]): ChainableObservable; /** * Creates an observable of a timeline of events created by this user * @param input - The filter(s) for the timeline or kind(s) * @returns A timeline observable of events by the user rom the event store */ timeline$(input: Omit | Omit[] | number | number[]): Observable; timeline$(input: Omit | Omit[] | number | number[], cast?: CastConstructor): Observable; }