Magic Bytes & Constants
Magic Bytes
Every Vein binary starts with the magic bytes 0x4C, 0x44 — the ASCII characters "LD" (short for Lode Data).
Offset 0: 0x4C ('L')
Offset 1: 0x44 ('D')The decoder validates these bytes before attempting to parse. If they don’t match, it throws:
Invalid magic: expected 0x4C44 ("LD"), got 0x<actual>Header Constants
| Constant | Value | Description |
|---|---|---|
MAGIC[0] | 0x4C | First magic byte ('L') |
MAGIC[1] | 0x44 | Second magic byte ('D') |
HEADER_SIZE | 4 | Total header size: magic(2) + version(1) + count(1) |
FIELD_HEADER_SIZE | 4 | Per-field header: field_id(1) + type_tag(1) + length(2) |
MIME Type
application/x-veinUsed as the Content-Type when serving Vein binaries over HTTP.
Fingerprint Header
X-Lode-Fingerprint: <64-char hex SHA-256>Custom HTTP header for transmitting the fingerprint alongside a Vein binary response.
Token Limit Constants
Used in prompt contracts:
| Constant | Value | Description |
|---|---|---|
DEFAULT_TOKEN_LIMIT | 1,000,000 | Default token budget per request |
MAX_TOKEN_LIMIT | 10,000,000 | Hard ceiling for any request |
File Extensions
| Extension | Description |
|---|---|
.lode | LODE schema file (JSON) |
.vein | Compiled Vein binary |
.json | Source data (input to compile) |
Last updated on