uint8ArrayToHex

Converts an array of bytes to a hexadecimal string.

Example

import { uint8arrayToHex } from "thirdweb/utils";
const hex = uint8arrayToHex(
new Uint8Array([
72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100,
]),
);
console.log(hex); // "0x48656c6c6f2c20776f726c64"

Parameters

Returns

The hexadecimal string representation of the bytes.