nucleus-substrate-core
The categorical core of the Nucleus substrate. Three load-bearing types and one signed envelope:
Session— the agent-action object every projection projects fromProjection— sealed, adjacently-tagged sum:Identity,Capability,Flow,Economic(#[non_exhaustive])Receipt— Ed25519-signed colimit envelope binding a session to any subset of its projections
The categorical claim is proved in Lean 4 — see
receipt_factors_through_projections in
formal/Nucleus/Substrate/Colimit.lean.
Quick example
use ;
use SigningKey;
let sk = from_bytes;
let session = Session ;
let projection = Identity;
let receipt = sign;
let vk: = sk.verifying_key.to_bytes;
receipt.verify.expect;
Position in the substrate
This crate is the only required dependency for projection-lifter
crates and the SDK. Server-side hub crates depend on it for the
typed VCG wire shapes in mechanism::vcg. Everything else in the
substrate stack composes on top of these three types.
| Layer | Crate | Depends on |
|---|---|---|
| Core | nucleus-substrate-core (you are here) |
std + serde + ed25519 + blake3 |
| Identity lifter | nucleus-identity-projection |
core |
| Flow lifter | nucleus-flow-projection |
core |
| VCG lifter | nucleus-mechanism-vcg |
core |
| SDK | nucleus-substrate-sdk |
core + 3 lifters + reqwest |
| CLI | nucleus-substrate-cli |
sdk |
License
Dual-licensed under MIT OR Apache-2.0. See
LICENSE-MIT and LICENSE-APACHE.