BigIntConverter is a set of functions to convert between BigInt and Uint8Array in both big-endian and little-endian formats.

The implementation performs bounds checking to ensure that the number fits into the provided number of bytes.

A default instance is provided as converter. A utility to create a new instance is provided as create.

interface BigIntConverter {
    signed: { be: Convert; le: Convert };
    unsigned: { be: Convert; le: Convert };
}

Properties

Properties

signed: { be: Convert; le: Convert }

Signed operations

Type declaration

unsigned: { be: Convert; le: Convert }

Unsigned operations

Type declaration