Converts a value to an array of bytes.
import { toBytes } from "thirdweb/utils";const bytes = toBytes("0x1a4");console.log(bytes); // Uint8Array(2) [ 1, 164 ]
function toBytes( value: string | number | bigint | boolean, opts: ToBytesParameters,): Uint8Array;
The value to convert.
let value: string | number | bigint | boolean;
Optional parameters for the conversion.
let opts: { size?: number };
let returnType: Uint8Array;
The array of bytes representing the value.