serializeDbNip05 function

  1. @isarProtected
int serializeDbNip05(
  1. IsarWriter writer,
  2. DbNip05 object
)

Implementation

@isarProtected
int serializeDbNip05(IsarWriter writer, DbNip05 object) {
  IsarCore.writeString(writer, 1, object.id);
  IsarCore.writeString(writer, 2, object.pubKey);
  IsarCore.writeString(writer, 3, object.nip05);
  IsarCore.writeBool(writer, 4, object.valid);
  IsarCore.writeLong(
      writer, 5, object.networkFetchTime ?? -9223372036854775808);
  {
    final list = object.relays;
    if (list == null) {
      IsarCore.writeNull(writer, 6);
    } else {
      final listWriter = IsarCore.beginList(writer, 6, list.length);
      for (var i = 0; i < list.length; i++) {
        IsarCore.writeString(listWriter, i, list[i]);
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  return Isar.fastHash(object.id);
}