encodePermissionOperations static method
Encodes permission operations into a bytes representation.
Implementation
static List<int> encodePermissionOperations(
List<TransactionContractType> values) {
final valuesInt = values.map((e) => e.value).toList();
final List<int> operationBuffer = List<int>.filled(32, 0);
for (int value in valuesInt) {
operationBuffer[value ~/ 8] |= (1 << (value % 8));
}
return List<int>.from(operationBuffer);
}