An in-memory database for nostr events NOTE: does not handle replaceable 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 = ...
replaceable: Map<string, Event[]> = ...
tags: LRU<Set<Event>> = ...
updated: Subject<Event> = ...

A stream of events that have been updated

Accessors

Methods

  • Gets an array of replaceable events

    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