BigInt toBigIntBE(Uint8List bytes) { String hex = Hex.encode(bytes); if (hex.isEmpty) { return BigInt.from(0); } return BigInt.parse('0x$hex'); }