AppleSauce
    Preparing search index...

    Interface IEventDatabase

    The base interface for a database of events

    interface IEventDatabase {
        update?: (event: NostrEvent) => void;
        add(event: NostrEvent): NostrEvent;
        getByFilters(filters: Filter | Filter[]): NostrEvent[];
        getEvent(id: string): NostrEvent | undefined;
        getReplaceable(
            kind: number,
            pubkey: string,
            identifier?: string,
        ): NostrEvent | undefined;
        getReplaceableHistory(
            kind: number,
            pubkey: string,
            identifier?: string,
        ): NostrEvent[] | undefined;
        getTimeline(filters: Filter | Filter[]): NostrEvent[];
        hasEvent(id: string): boolean;
        hasReplaceable(kind: number, pubkey: string, identifier?: string): boolean;
        remove(event: string | NostrEvent): boolean;
        removeByFilters(filters: Filter | Filter[]): number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    update?: (event: NostrEvent) => void

    Notifies the database that an event has updated

    Methods