loadEvents method
Implementation
@override
Future<List<Nip01Event>> loadEvents({
List<String>? pubKeys,
List<int>? kinds,
String? pTag,
int? since,
int? until,
}) async {
List<Nip01Event> result = [];
for (var event in events.values) {
if (pubKeys != null && !pubKeys.contains(event.pubKey)) {
continue;
}
if (kinds != null && !kinds.contains(event.kind)) {
continue;
}
if (pTag != null && !event.pTags.contains(pTag)) {
continue;
}
if (since != null && event.createdAt < since) {
continue;
}
if (until != null && event.createdAt > until) {
continue;
}
result.add(event);
}
return result;
}