> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endstate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# encodeFrame

> Compose and frame any TCMP message - the inverse of `decodePacket`.

Compose and frame any TCMP message - the inverse of `decodePacket`.

```ts theme={null}
import { encodeFrame } from "@endstate-sdk/reader/tcmp";
```

```ts theme={null}
encodeFrame(family: readonly [number, number], code: number, payload?: Uint8Array): Uint8Array
```

## Example

```ts theme={null}
const bytes = encodeFrame(BASIC_NFC_FAMILY, CMD.StreamNdef, payload);
```
