bytesBEToBigInt function
Interprets bytes as a big-endian unsigned integer.
Implementation
BigInt bytesBEToBigInt(List<int> bytes) {
if (bytes.isEmpty) {
return BigInt.zero;
}
final hex = bytes.map((b) => b.toRadixString(16).padLeft(2, '0')).join();
return BigInt.parse('0x$hex');
}