type · Browser and Node

# Frame

`@toip-tools/mesh-transport` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mesh-transport/src/frame.ts#L13)

Import:

```ts
import { type Frame } from "@toip-tools/mesh-transport";
```

## Declaration

type:

```ts
type Frame =
  | { type: "data"; pid: Uint8Array; index: number; count: number; ttl: number; hops: number; attempt: number; chunk: Uint8Array }
  | { type: "ack"; pid: Uint8Array; count: number; bitmap: Uint8Array; mac: Uint8Array }
  | {
      type: "beacon";
      role: "verifier" | "gateway";
      keyHint: Uint8Array;
      body: Uint8Array;
      signature: Uint8Array;
      /** Times relays have repeated it. 0 is sent as the design's 82 bytes; relayed copies add one byte. */
      hops: number;
    };
```

[Usage guide](https://toip.tools/toolkit/mesh-transport/#usage) · [Error handling](https://toip.tools/toolkit/mesh-transport/#errors) · [All exports](https://toip.tools/toolkit/mesh-transport/api/)

---

This is the Markdown version of https://toip.tools/toolkit/mesh-transport/api/Frame/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
