JSON deserialization
factory Hash.fromJson(Map<String, dynamic> json) { return Hash.fromHex(json['hash'] as String); }