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<ArrayBufferLike>, opts: ToHexParameters,): Hex;
The value to convert to hexadecimal.
let value: | string | number | bigint | boolean | Uint8Array<ArrayBufferLike>;
Optional parameters for the conversion.
let opts: { size?: number };
let returnType: ox__Hex.Hex;
The hexadecimal representation of the value.