serializeLE
serializeLE(
val
,lengthInBytes
):Uint8Array
Serializes a bigint to a little-endian Uint8Array of the specified length.
Parameters
Parameter | Type | Description |
---|---|---|
val | bigint | The bigint value to serialize. |
lengthInBytes | number | The desired length of the output array. |
Returns
The serialized value as a Uint8Array.
Throws
Error if the value is too large for the specified length.