toProto method

ReservationVoucher toProto()

Converts this voucher to a protocol buffer message.

Implementation

ReservationVoucher toProto() {
  final expiration = Int64(this.expiration.millisecondsSinceEpoch ~/ 1000);
  return ReservationVoucher(
    relay: relay.toBytes(),
    peer: peer.toBytes(),
    expiration: expiration,
  );
}