/** * same as ```Math.abs``` but for bigints */ export declare function abs(n: bigint): bigint; /** * @returns {bigint} a ```bigint``` between ```0``` and ```Number.MAX_SAFE_INTEGER``` so that is safe to convert to Number for whatever reason */ export declare function random(): bigint; export declare function max(...nums: bigint[]): bigint; export declare function min(...nums: bigint[]): bigint; /** * `floor( log2( num ) )` for a positive `num`, `-log2( -num )` for a negative one, `0` for `0` */ export declare function log2(num: bigint): bigint; /** * uses the bytes of the buffer to construct a BigInteger * > **IMPORTANT** the bytes are considered in Little Endian order; use ```bigintFromBuffer``` for Big Endian */ export declare function bigintFromBufferLE(buffer: Uint8Array): bigint; /** * converts a Uint8Array to a ```bigint``` * Big-Endian default */ export declare function bigintFromBuffer(buffer: Uint8Array): bigint; /** * converts a ```bigint``` to a ```Uint8Array``` of length ```nBytes``` given as second argument * * if ```nBytes``` is not specified the Uint8Array takes only the bytes needed * @param bigint * @param nBytes * @returns */ export declare function bigintToBuffer(bigint: bigint, nBytes?: number | undefined): Uint8Array;