nostr-websocket-utils / EventStorageManager
Storage management interface for different event types
shouldStore(
event):boolean
Determines if an event should be stored
Record<string, unknown>
Event to check
boolean
True if event should be stored
getStorageDuration(
event):number
Gets storage duration for an event
Record<string, unknown>
Event to check
number
Storage duration in seconds (0 for permanent)
shouldReplace(
newEvent,existingEvent):boolean
Checks if an event should replace another
Record<string, unknown>
New event
Record<string, unknown>
Existing event
boolean
True if new event should replace existing