@pwngh/economy-lab
    Preparing search index...

    Function fromHex

    Decodes lowercase hex into bytes, for stores that keep hashes as text. Throws a MALFORMED_OPERATION coded fault on an odd length or any character outside 0-9a-f — uppercase digits are rejected — so a malformed head cannot decode into the wrong bytes.

    • Decodes a lowercase hex string back into its byte array.

      Throws on an odd length or any non-hex-digit character. Such input is a caller bug to fix at the source, not a recoverable outcome.

      Parameters

      • hex: string

      Returns Uint8Array