toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final j = <String, dynamic>{};
  j['version'] = version;
  j['chainIdentifier'] = chainIdentifier;
  j['hash'] = hash.toString();
  j['previousHash'] = previousHash.toString();
  j['height'] = height;
  j['timestamp'] = timestamp;
  j['data'] = data != [] ? BytesUtils.bytesToBase64(data) : '';
  j['content'] = [];
  for (var entry in content) {
    j['content'].add(entry.toString());
  }
  j['changesHash'] = changesHash.toString();
  j['publicKey'] = publicKey;
  j['signature'] = signature;
  j['producer'] = producer.toString();
  return j;
}