AppleSauce
    Preparing search index...

    Interface IEventStoreRead

    The read interface for an event store

    interface IEventStoreRead {
        getByFilters(filters: Filter | Filter[]): Set<Event>;
        getEvent(id: string): undefined | Event;
        getReplaceable(
            kind: number,
            pubkey: string,
            identifier?: string,
        ): undefined | Event;
        getReplaceableHistory(
            kind: number,
            pubkey: string,
            identifier?: string,
        ): undefined | Event[];
        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 undefined | Event

    • Get the history of a replaceable event

      Parameters

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

      Returns undefined | Event[]

    • Check if the event store has a replaceable event

      Parameters

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

      Returns boolean