uor-addr-1 0.1.0

Pure-UOR content addressing for JSON-serialisable payloads — the JCS-RFC8785+NFC+SHA-256 transform as a Prism application of the UOR Foundation.
Documentation

uor-addr-1

Reference Rust implementation of UOR-ADDR-1 — chain-agnostic canonical content addressing for JSON-serializable data.

uor-addr-1 is a Prism application of the UOR Foundation that derives a 71-byte sha256:<64hex> content address from any JSON-serializable input. Output is byte-identical to the UOR Foundation's canonical reference at mcp.uor.foundation/tools/encode_address.

The pipeline is **JCS-RFC8785 canonicalization + Unicode NFC normalization

  • SHA-256**, exposed through a single function:
use uor_addr_1::address;

let outcome = address(br#"{"foo": "bar"}"#).unwrap();
assert_eq!(
    outcome.address,
    "sha256:7a38bf81f383f69433ad6e900d35b3e2385593f76a7b7ab5d4355b8ba41ee24b"
);

What this crate guarantees

The implementation carries a numbered conformance contract covering structural, deterministic, probabilistic, formal-Lean, and live-network invariants. Highlights:

  • Determinism (CD-D01). address(b) is a pure function of the canonical-form bytes; identical inputs always yield identical κ-labels.
  • Invariance (CD-I01a–d). Key ordering, whitespace, and Unicode normalization form (NFC/NFD/NFKC/NFKD) do not affect the output.
  • Wire format (CL-W01). The κ-label is exactly 71 ASCII bytes — "sha256:" followed by 64 lowercase hex digits — proved at the type level by a Lean theorem.
  • Byte identity (CD-D02). The 12 reference fixtures harvested from the UOR Foundation canonical endpoint reproduce byte-for-byte.
  • Cryptographic precision. Collision probability bounded by SHA-256's standard 2^{-128} security margin.

See VERIFICATION.md for the full V&V gate (just vv) and reproduction commands.

Features

  • std (default) — uses the standard library. Disable for no_std environments; alloc is always required.

Architecture

The crate is the single PrismModel<HostTypes, HostBounds, Hasher, ResolverTuple> declared over uor-foundation@0.4.5. Internally the ψ-pipeline derives the κ-label through four typed stages — Nerve → PostnikovTower → HomotopyGroups → KInvariants — with the canonical hash axis consumed exactly once in the terminal ψ_9 resolver per wiki ADR-046.

For the full architectural specification (substitution axes, discipline-scope boundaries, algebraic-closure encoding, seal regime), see ARCHITECTURE.md.

MSRV

Rust 1.83 or later.

License

Licensed under the Apache License, Version 2.0. See LICENSE.

Author

Standard authored by Maura Clark. Reference implementation by Alex Flom, grounded against the UOR Foundation wiki specification.