write method

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

Implementation

@override
void write(Encoder encoder) {
  var targetLists = targets?.map((e) => e.toUint8Array()).toList() ?? [];

  var _targets = targets != null ? {"targets": targetLists} : {};
  var res = {"pubkey": pubkey, "expiration": expiration.toInt(), ..._targets};

  encoder.writeMap(res);
}