Applesauce
    Preparing search index...

    Interface IEventStoreRead<E>

    The read interface for an event store

    interface IEventStoreRead<E extends StoreEvent = NostrEvent> {
        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;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index
    • Get a replaceable event

      Parameters

      • kind: number
      • pubkey: string
      • Optionalidentifier: string

      Returns E | undefined

    • Get the history of a replaceable event

      Parameters

      • kind: number
      • pubkey: string
      • Optionalidentifier: string

      Returns E[] | undefined

    • Check if the event store has a replaceable event

      Parameters

      • kind: number
      • pubkey: string
      • Optionalidentifier: string

      Returns boolean