loadHiddenEvents method
- List<
String> ? ids, - List<
String> ? pubKeys, - List<
int> ? kinds, - List<
String> ? coordinates, - Map<
String, List< ? tags,String> > - int? since,
- int? until,
- String? search,
- int? limit,
- Set<
HiddenEventReason> reasons = kAllHiddenEventReasons,
Loads the events loadEvents hides, newest first.
A superseded version of a replaceable event, an author-deleted event and an expired event all stay stored, and loadEvents never returns them. This read exposes them, which is what an app needs to show the edit history of an addressable event or the content behind a deletion.
Filters combine with AND and behave like the loadEvents ones, with two additions:
coordinates: replaceable conflict domains,kind:pubkey:d-tagfor addressable kinds andkind:pubkeyfor other replaceable kinds. A trailing empty d-tag is accepted, so a NIP-01atag value can be passed as is.reasons: which hidden categories to return. Pass a single reason to ask a precise question, for example onlysupersededto list previous versions without resurfacing deleted content.
limit applies after hidden events are selected, unlike the pre-filter
limit some backends push into their query for visible reads.
Eviction removes exactly these rows: EvictionPolicy sweeps superseded and deleted events by default. An app that shows history must disable those two sweeps, otherwise what it wants to display is swept in the background.
Implementation
@override
Future<List<HiddenEvent>> loadHiddenEvents({
List<String>? ids,
List<String>? pubKeys,
List<int>? kinds,
List<String>? coordinates,
Map<String, List<String>>? tags,
int? since,
int? until,
String? search,
int? limit,
Set<HiddenEventReason> reasons = kAllHiddenEventReasons,
}) {
return _visibility.loadHiddenEvents(
ids: ids,
pubKeys: pubKeys,
kinds: kinds,
coordinates: coordinates,
tags: tags,
since: since,
until: until,
search: search,
limit: limit,
reasons: reasons,
);
}