Applesauce
    Preparing search index...

    Interface IEventMemory<E>

    The base interface for the in-memory database of events

    interface IEventMemory<E extends StoreEvent = NostrEvent> {
        add(event: E): E;
        claim(event: E): void;
        clearClaim(event: E): void;
        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;
        isClaimed(event: E): boolean;
        remove(event: string | E): boolean;
        removeClaim(event: E): void;
        touch(event: E): void;
        unclaimed(): Generator<E>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index