BigInt edBytesToBigInt(Uint8List bytes) { var result = BigInt.zero; for (var i = bytes.length - 1; i >= 0; i--) { result = (result << 8) + BigInt.from(bytes[i]); } return result; }