toip.tools

type · Browser and Node

Frame

@toip-tools/mesh-transportView source
TypeScriptImport
import { type Frame } from "@toip-tools/mesh-transport";

Declaration

TypeScripttype
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;
    };