EventRepository is an interface for storing and retrieving events. You can implement this interface to create your own event repository based on your favorite database.

Hierarchy

  • EventRepository

    Constructors

    Methods

    • Count distinct events matching any of the filters (NIP-45). Repositories may override this method to opt into COUNT support.

      Parameters

      • filters: Filter[]

        Query filters

      • excludedKinds: number[] = []

        Event kinds that must not contribute to the count

      Returns Promise<number>