Integration Overview

Canonical mental model and integration contract: Value ↔ .scb bytes, hashing, and .st parsing.

Strata integration has three surfaces:

  • Value: an in-memory representation.

  • .scb: the canonical binary encoding of a Value.

  • .st: a text format that parses into a Value.

Canonical vs representational (non-negotiable)

  • Integrations MUST treat .scb bytes as canonical.

  • Integrations MUST hash canonical .scb bytes.

  • Integrations MUST NOT hash JSON, stringified Values, or object identity.

Determinism contract

  • Same Value ⇒ same canonical .scb bytes ⇒ same hash.

  • Decoding canonical .scb bytes MUST yield an equivalent Value (value semantics).

Pipeline diagram (conceptual)

  • Value -> encode -> .scb -> hash

  • .scb -> decode -> Value

  • .st -> parse -> Value -> encode -> .scb

Hashing

  • Hash function is BLAKE3.

  • Digest is 32 bytes.

Canonical map ordering

  • Canonical .scb map entry order is lexicographic by key UTF-8 bytes.

  • Rust achieves this via BTreeMap<String, Value> ordering.

  • JavaScript encoder ordering details are not specified here.

  • Cross-language interoperability requires encodeValue (JS) to produce the canonical .scb bytes for a given Value. This page does not specify how JS achieves canonical ordering internally.

Copy-paste: end-to-end pipeline

For exact install/import steps, see Installation & Setup.

Last updated

Was this helpful?