def METHOD_NAME(cls, line):
    # type: (str) -> Optional[Key]
    fields = line.split(" ")
    if len(fields) < 4:
        return None
    user_id, device_id, key_type, key = fields[:4]
    if key_type == "matrix-ed25519":
        return Ed25519Key(user_id.strip(), device_id.strip(), key.strip())
    else:
        return None