Skip to main content

Function: hexToBytes()

function hexToBytes(hex): Uint8Array

Converts a hex string to a byte array.

Parameters

ParameterTypeDescription

hex

0x${string}

The hex string to convert.

Returns

Uint8Array

The byte array representation of the input.

Defined

@nilfoundation/niljs/src/encoding/fromHex.ts:47