toJSON method

Map<String, dynamic> toJSON()

Implementation

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