# encodeInt64Key

> **encodeInt64Key**(`value`): `Uint8Array`

Defined in: [packages/key-encoding/src/scalars.ts:121](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/key-encoding/src/scalars.ts#L121)

Encode a signed 64-bit `bigint` as 8 big-endian bytes with the sign bit flipped.

## Parameters

### value

`bigint`

## Returns

`Uint8Array`

## Throws

`INVALID_KEY_VALUE` when `value` is not a `bigint` in `-(2n ** 63n) .. 2n ** 63n - 1n`.
