Converts a number to bytes.
import { numberToBytes } from "thirdweb/utils";const bytes = numberToBytes(420);console.log(bytes); // Uint8Array(2) [ 1, 164 ]
function numberToBytes( value: number | bigint, opts?: NumberToHexOpts,): Uint8Array;
The number to convert.
let value: number | bigint;
Options for converting the number to hex.
let opts: | { signed?: boolean; size: number } | { signed?: never; size?: number };
let returnType: Uint8Array;
The bytes representation of the number.