Skip to main content

Module wire

Module wire 

Source
Expand description

Generate TypeScript wire protocol definitions.

Walks Facet shapes and emits:

  • interfaces and tagged unions for all named types
  • discriminant constants for all named enums (auto-derived)
  • narrowed per-variant type aliases for all named enums (auto-derived)
  • messageSchemasCbor: CBOR-encoded Vec<Schema> for the handshake
  • messageRootRef / messageSchemaRegistry: canonical local message schema graph

Structs§

WireType
A wire type to generate TypeScript definitions for.
WireTypeGenConfig

Functions§

generate_wire
Generate a complete TypeScript module with wire protocol type definitions, schema constants, and CBOR helpers. Everything is derived from the shapes — nothing is hardcoded.