Applesauce
    Preparing search index...

    Class RumorStore

    An EventStore for unsigned NIP-59 rumors. On add, non-deletion rumors are verified by recomputing the event hash and checking it equals rumor.id (via verifyRumor) instead of checking a signature. verifyEvent defaults to verifyRumor and cannot be supplied through the constructor options (it is Omit-ted), though it remains reassignable via the inherited verifyEvent setter at runtime.

    Like the base signed store, kind-5 delete rumors are applied without per-event verification — the rumor store is intended to hold events from an upstream protocol layer that already verifies validity and authorization; the local verifier only guarantees a stored rumor's id matches its serialized contents.

    Hierarchy (View Summary)

    Index
    destroy$: ReplaySubject<void> = ...

    Emits when EventModels.dispose is called to tear down all models. A ReplaySubject so reset notifiers subscribed after disposal fire immediately.

    eventLoader?: (
        pointer: AddressPointer | EventPointer | AddressPointerWithoutD,
    ) => Observable<Helpers.Rumor> | Promise<Helpers.Rumor | undefined>

    A method that will be called when an event isn't found in the store

    insert$: Subject<Helpers.Rumor> = ...

    A stream of new events added to the store

    keepDeleted: boolean = false

    Keep deleted events in the store

    keepExpired: boolean = false

    Keep expired events in the store

    keepOldVersions: boolean = false

    Enable this to keep old versions of replaceable events

    Optional memory database for ensuring single event instances

    modelKeepWarm: number = 60_000

    How long a model should be kept "warm" while nothing is subscribed to it

    models: Map<
        ModelConstructor<
            any,
            any[],
            Helpers.Rumor,
            IEventStore<Helpers.Rumor>
            | IAsyncEventStore<Helpers.Rumor>,
        >,
        Map<string, Observable<any>>,
    > = ...

    A directory of all active models

    remove$: Subject<Helpers.Rumor> = ...

    A stream of events that have been removed

    update$: Subject<Helpers.Rumor> = ...

    A stream of events that have been updated (Warning: this is a very noisy stream, use with caution)

    • get verifyEvent(): ((event: E) => boolean) | undefined

      Get the method used to verify events

      Returns ((event: E) => boolean) | undefined

    • set verifyEvent(method: ((event: E) => boolean) | undefined): void

      Sets the method used to verify events

      Parameters

      • method: ((event: E) => boolean) | undefined

      Returns void

    • Tears down the store: disposes the attached event loader, completes the event streams, releases model keep-warm timers, and unsubscribes internal manager listeners.

      Returns void

      This is a terminal operation; the store should be discarded after calling it.