An in-memory database for nostr events

Constructors

Properties

authors: Map<string, Set<Event>> = ...
claims: WeakMap<Event, any> = ...
created_at: Event[] = []
deleted: Subject<Event> = ...

A stream of events removed of the database

events: LRU<Event> = ...

LRU cache of last events touched

inserted: Subject<Event> = ...

A stream of events inserted into the database

kinds: Map<number, Set<Event>> = ...

Indexes

log: Debugger = ...
tags: LRU<Set<Event>> = ...
updated: Subject<Event> = ...

A stream of events that have been updated

Accessors

Methods

  • Gets a replaceable event and touches it

    Parameters

    • kind: number
    • pubkey: string
    • Optionald: string

    Returns undefined | Event

  • Checks if the database contains a replaceable event without touching it

    Parameters

    • kind: number
    • pubkey: string
    • Optionald: string

    Returns boolean

  • Parameters

    • since: undefined | number
    • until: undefined | number

    Returns Generator<never, Set<Event>, unknown>