Applesauce
    Preparing search index...

    Interface IEventDatabase<E>

    The base interface for a database of events

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

    Type Parameters

    Hierarchy (View Summary)

    Index
    update?: (event: E) => void

    Notifies the database that an event has updated