Nip01Event.fromJson constructor

Nip01Event.fromJson(
  1. Map data
)

Implementation

factory Nip01Event.fromJson(Map<dynamic, dynamic> data) {
  final id = data['id'] as String;
  final pubKey = data['pubkey'] as String;
  final createdAt = data['created_at'] as int;
  final kind = data['kind'] as int;
  final tags = castToListOfListOfString(data['tags']);
  final content = data['content'] as String;
  final sig = data['sig'] as String;

  return Nip01Event._(id, pubKey, createdAt, kind, tags, content, sig);
}