toJson method

  1. @override
Map<String, dynamic> toJson()
override

Convert the ReceiveDescription object to a JSON representation.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'value_commitment': BytesUtils.tryToHexString(valueCommitment),
    'note_commitment': BytesUtils.tryToHexString(noteCommitment),
    'epk': BytesUtils.tryToHexString(epk),
    'c_enc': BytesUtils.tryToHexString(cEnc),
    'c_out': BytesUtils.tryToHexString(cOut),
    'zkproof': BytesUtils.tryToHexString(zkproof),
  }..removeWhere((key, value) => value == null);
}