getNip65Data function

Future<List<Nip65>> getNip65Data(
  1. List<String> pubkeys,
  2. CacheManager cacheManager
)

reads the latest nip65 data from cache pubkeys pubkeys you want nip65 data for cacheManger the cache manager you want to use

Implementation

Future<List<Nip65>> getNip65Data(
    List<String> pubkeys, CacheManager cacheManager) async {
  List<Nip01Event> events =
      await cacheManager.loadEvents(kinds: [Nip65.KIND], pubKeys: pubkeys);

  List<Nip65> nip65Data = [];
  for (var event in events) {
    nip65Data.add(Nip65.fromEvent(event));
  }
  return nip65Data;
}