bnToHex function

String bnToHex(
  1. BigInt bn, {
  2. int bitLength = -1,
  3. Endian endian = Endian.big,
  4. bool isNegative = false,
  5. bool include0x = false,
})

Implementation

String bnToHex(
  BigInt bn, {
  int bitLength = -1,
  Endian endian = Endian.big,
  bool isNegative = false,
  bool include0x = false,
}) {
  final u8a = bnToU8a(
    bn,
    bitLength: bitLength,
    endian: endian,
    isNegative: isNegative,
  );
  return u8aToHex(u8a, include0x: include0x);
}