boolToHex

Converts a boolean value to a hexadecimal string representation.

Example

import { boolToHex } from "thirdweb/utils";
const hex = boolToHex(true);
console.log(hex); // "0x01"
function boolToHex(value: boolean, opts: Options): Hex;

Parameters

The boolean value to convert.

Type

let value: boolean;

Optional options for the conversion.

Type

let opts: Options;

Returns

let returnType: ox__Hex.Hex;

The hexadecimal string representation of the boolean value.