Docs

fromHex

Converts a hexadecimal string to the specified type.

Example

import { fromHex } from "thirdweb/utils";
const string = fromHex("0x48656c6c6f2c20776f726c6421", "string");
console.log(string); // "Hello, world!"

Parameters

Returns

The converted value of the specified type.