Serialize command to CBOR bytes
List<int> toCbor() { final map = toMap(); final cborMap = CborMap(map .map((key, value) => MapEntry(CborString(key), _toCborValue(value)))); return cborEncode(cborMap); }