Function: parseHex()
function parseHex(value, byteLength?): Hex;
Defined in: packages/overcast-core/src/utils.ts:71
Validate an untrusted string as Hex and normalize it to lower case, or throw a HexError. The entry point for anything crossing a boundary the type system doesn't cover: a wire payload, a CLI argument, an environment variable.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | - |
byteLength? | number | when given, also require exactly this many bytes. |