Convert BigInt to little-endian buffer with specified width.
BigInt value to convert
Desired buffer width in bytes
Little-endian buffer of exactly width bytes
width
const buf = toBufferLE(16909060n, 4);// Uint8Array [0x04, 0x03, 0x02, 0x01] Copy
const buf = toBufferLE(16909060n, 4);// Uint8Array [0x04, 0x03, 0x02, 0x01]
Convert BigInt to little-endian buffer with specified width.