Umbra SDK Docs

convertBigIntToLeBytes

Umbra SDK reference for Convert Big Int To Le Bytes.

client


convertBigIntToLeBytes(bigint, numberOfBytes): LeBytes

Defined in: src/utils/convertors.ts:50

Converts a bigint into a little-endian byte array of fixed length.

Parameters

bigint

bigint

The unsigned bigint value to convert.

numberOfBytes

number

The exact number of bytes to output.

Returns

LeBytes

A LeBytes buffer representing the value in little-endian order.

Throws

RangeError If bigint cannot be represented in numberOfBytes bytes.