import struct


def pack_ssh_uint64(i: int) -> bytes:
    """
    Packs a 64-bit unsigned integer.
    :param i: integer
    :return: Eight bytes in the order of decreasing significance (network byte order).
    """
    if not isinstance(i, int):
        raise TypeError("Must be an int")
    elif i.bit_length() > 64:
        raise ValueError("Must be a 64bit value.")

    return struct.pack('>Q', i)