Function bytesToSignedBigInt

  • Convert a Uint8Array to a signed bigint. This assumes that the bytes are encoded in two's complement.

    To convert a Uint8Array to an unsigned bigint instead, use bytesToBigInt.

    See

    https://en.wikipedia.org/wiki/Two%27s_complement

    Returns

    The signed bigint.

    Parameters

    • bytes: Uint8Array

      The bytes to convert to a signed bigint.

    Returns bigint