ProtectedauthorsProtectedclaimsA weak map of events to claim reference counts
Protectedcreated_LRU cache of last events touched
ProtectedkindComposite index for kind+author queries (common pattern)
ProtectedkindsIndexes
ProtectedlogProtectedreplaceableA sorted array of replaceable events by address
ProtectedtagsInserts an event into the database and notifies all subscriptions
ProtectedgetProtectedgetProtectedgetProtectedgetProtectedgetGets the latest replaceable event
Optionalidentifier: stringGets the history of a replaceable event
Optionalidentifier: stringProtectedgetGets a timeline of events that match the filters
Checks if the database contains an event without touching it
Checks if the event set has a replaceable event
Optionalidentifier: stringIterates over all events by indexable tag and value
Iterates over all events by time
Removes events that are not claimed (free up memory)
Optionallimit: numberRemoves an event from the database and notifies all subscriptions
ProtectedremoveHelper method to remove an event from a sorted array using binary search. Falls back to indexOf if binary search doesn't find exact match.
Resets the event set
Returns a generator of unclaimed events in order of least used
An in-memory database of events