nucleus-substrate-sdk
Demand-side SDK for the Nucleus substrate. Composes:
nucleus-substrate-core— Session, Receipt, Projectionnucleus-identity-projection— JWT-SVID lifternucleus-flow-projection— Denning-lattice lifternucleus-mechanism-vcg— Pigouvian-VCG lifter
Two top-level affordances:
Client— async HTTP wrapper over the hub's REST surfaceverify_receipt_fully— composite offline verifier that walks every projection in a Receipt
Quick example
use ;
# async
The composite verifier
Pattern lifted from mc_attestation_verifier's And/Or chain.
verify_receipt_fully does:
- Receipt::verify against issuer's Ed25519 verifying key pulled
from JWKS by matching
kid. - For each projection in the receipt:
Identity→verify_identity_projectionFlow→verify_flow_projection_shapeEconomic→verify_economic_projection_shapeCapability→ skipped in v0.1 (no lifter shipped)
Any failure → SubstrateVerifyError.
Categorical foundation
The composite verifier's correctness is certified in Lean 4 —
see receipt_factors_through_projections in
formal/Nucleus/Substrate/Colimit.lean. The Receipt is the cocone
vertex of the projection-functor wedge; AND-composition of per-leg
verifiers is the unique universal map.
License
Dual-licensed under MIT OR Apache-2.0.