# encodeUint64Key

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

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

Encode an unsigned 64-bit `bigint` as 8 big-endian bytes.

## Parameters

### value

`bigint`

## Returns

`Uint8Array`

## Throws

`INVALID_KEY_VALUE` when `value` is not a `bigint` in `0n .. 2n ** 64n - 1n`.
