hex library

The lowercase hex that NIP-01 requires for ids, pubkeys and signatures: a check for event verifiers to run before they decode it, and the conversions between bytes and hex.

Functions

bytesToHex(List<int> bytes) → String
bytes as lowercase hex. Throws a RangeError when one of them does not fit a byte.
hexToBytes(String hex) → Uint8List
The bytes of hex, in lowercase or uppercase. Throws a FormatException when it is not an even number of hex digits.
isLowercaseHex(String value, {int? length}) → bool
Whether value is lowercase hex, of length characters when given and of an even length otherwise.