• Converts a hexadecimal string (with or without '0x' prefix) to a Uint8Array.

    Parameters

    • hexString: string

      The hexadecimal string to convert (e.g., "0x0a1b2c" or "0a1b2c").

    Returns Uint8Array

    The corresponding Uint8Array.

    If the input string (after removing '0x') has an odd length or contains non-hexadecimal characters.