AppleSauce
    Preparing search index...

    Interface IEventStoreRead

    The read interface for an event store

    interface IEventStoreRead {
        getByFilters(filters: Filter | Filter[]): Event[];
        getEvent(id: string): Event | undefined;
        getReplaceable(
            kind: number,
            pubkey: string,
            identifier?: string,
        ): Event | undefined;
        getReplaceableHistory(
            kind: number,
            pubkey: string,
            identifier?: string,
        ): Event[] | undefined;
        getTimeline(filters: Filter | Filter[]): Event[];
        hasEvent(id: string): boolean;
        hasReplaceable(kind: number, pubkey: string, identifier?: string): boolean;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Get a replaceable event

      Parameters

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

      Returns Event | undefined

    • Get the history of a replaceable event

      Parameters

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

      Returns Event[] | undefined

    • Check if the event store has a replaceable event

      Parameters

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

      Returns boolean