toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'expiration': expiration.toHex(),
    'pubkey': pubkey.toHex(),
    'targets': targets?.map((e) => e.toHex()).toList(),
  }..removeWhere((key, value) => value == null);
}