Converts a value to its hexadecimal representation.
import { toHex } from "thirdweb/utils";const hex = toHex(420);console.log(hex); // "0x1a4"
function toHex( value: string | number | bigint | boolean | Uint8Array, opts: ToHexParameters,): Hex;
The value to convert to hexadecimal.
let value: string | number | bigint | boolean | Uint8Array;
Optional parameters for the conversion.
let opts: { size?: number };
let returnType: `0x${string}`;
The hexadecimal representation of the value.