Map<String, dynamic> toMap() { return { 'role': role.value, 'fingerprints': fingerprints.map((DtlsFingerprint fp) => fp.toMap()).toList(), }; }