write method

  1. @override
void write(
  1. Encoder encoder
)
override

Implementation

@override
void write(Encoder encoder) {
  final res = {
    'pubkey': pubkey,
    'expiration': expiration.toInt(),
    if (targets != null)
      'targets': targets?.map((e) => e.toUint8List()).toList(),
  };
  encoder.writeMap(res);
}