loadEvents method

  1. @override
Future<List<Nip01Event>> loadEvents({
  1. List<String>? ids,
  2. List<String>? pubKeys,
  3. List<int>? kinds,
  4. Map<String, List<String>>? tags,
  5. int? since,
  6. int? until,
  7. String? search,
  8. int? limit,
})
override

Load visible events from cache with flexible filtering.

Parameters:

  • ids: event ids
  • pubKeys: author pubkeys
  • kinds: event kinds
  • tags: tag filters, e.g. {'p': ['pubkey1'], 'e': ['eventid1']}
  • since/until: created_at bounds
  • search: content search string
  • limit: maximum number of returned events

Visibility rules apply here:

  • only the latest visible replaceable/addressable winner is returned
  • expired events are filtered out
  • author-deleted events are filtered out

Implementation

@override
Future<List<Nip01Event>> loadEvents({
  List<String>? ids,
  List<String>? pubKeys,
  List<int>? kinds,
  Map<String, List<String>>? tags,
  int? since,
  int? until,
  String? search,
  int? limit,
}) async {
  return _loadEventsInternal(
    ids: ids,
    pubKeys: pubKeys,
    kinds: kinds,
    tags: tags,
    since: since,
    until: until,
    search: search,
    limit: limit,
    applyVisibilityRules: true,
  );
}