# decodeUint64Key

> **decodeUint64Key**(`bytes`, `offset?`): `bigint`

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

Decode the 8-byte `encodeUint64Key` encoding at `offset`.

## Parameters

### bytes

`Uint8Array`

### offset?

`number`

## Returns

`bigint`

## Throws

`INVALID_KEY_VALUE` or `INVALID_OFFSET`, as [decodeUint32Key](/reference/knotkit/key-encoding/functions/decodeuint32key/).

## Throws

`TRUNCATED_KEY` when fewer than 8 bytes follow `offset`, or `TRAILING_BYTES` as [decodeUint32Key](/reference/knotkit/key-encoding/functions/decodeuint32key/).
