loadNip05 method

  1. @override
Future<Nip05?> loadNip05(
  1. String pubKey
)
override

Implementation

@override
Future<Nip05?> loadNip05(String pubKey) async {
  await dbRdy;
  final box = _objectBox.store.box<DbNip05>();
  final existing = box
      .query(DbNip05_.pubKey.equals(pubKey))
      .order(DbNip05_.networkFetchTime, flags: Order.descending)
      .build()
      .findFirst();
  if (existing == null) {
    return null;
  }
  return existing.toNdk();
}