hexToBytes

Converts a hexadecimal string to a Uint8Array of bytes.

Example

import { hexToBytes } from "thirdweb/utils";
const bytes = hexToBytes("0x1a4");
console.log(bytes); // Uint8Array(2) [ 1, 164 ]

Parameters

Returns

The Uint8Array of bytes.