boolToBytes

Converts a boolean value to a Uint8Array of bytes.

Example

import { boolToBytes } from "thirdweb/utils";
const bytes = boolToBytes(true);
console.log(bytes); // Uint8Array(1) [ 1 ]

Parameters

Returns

The Uint8Array of bytes representing the boolean value.