1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
//! StateChronicle: a pure-logic, domain-extensible verifiable state protocol
//! engine.
//!
//! This is the **umbrella crate**: the single dependency consumers add to use
//! the whole protocol surface. It re-exports the underlying protocol
//! crates under collision-safe namespaces and surfaces the most-used types
//! directly at the top level.
//!
//! ```rust
//! use statechronicle::domain::intent::{Intent, Operation};
//! use statechronicle::core::amount::Amount;
//! use statechronicle::domain::signed::Signed;
//! ```
//!
//! The [`ports`] module holds the eleven trait boundaries consumers implement
//! to wire their own storage, authority, and transport backends (intent store,
//! event store, commit store, state index, proof index, trade index, snapshot
//! store, tenant store, TrustGrant evaluator, transaction manager, event
//! publisher). Those traits are wired into the engine at the consumer's
//! composition root. This crate ships no storage, HTTP, or authority
//! implementation.
/// Sparse-Merkle state accumulator and state roots.
pub use statechronicle_accumulator as accumulator;
/// Commit formation, deterministic ordering, and signing.
pub use statechronicle_commit as commit;
/// Protocol primitives: amounts, digests, signatures, limits, canonicalization.
pub use statechronicle_core as core;
/// Canonical domain objects: tenants, resources, intents, events, commits,
/// proofs, and state projections.
pub use statechronicle_domain as domain;
/// The ยง18.1 execution pipeline that runs validated intents through the port
/// gates and emits events.
pub use statechronicle_executor as executor;
/// The trade read-side vertical slice (index, history, proof serving).
pub use statechronicle_index as index;
/// Intent parsing and validation into `ValidatedIntent`.
pub use statechronicle_intent as intent;
/// Allocation-free codecs and integrity verification for bounded consumers.
pub use statechronicle_portable as portable;
/// The eleven backend-agnostic port traits consumers implement.
pub use statechronicle_ports as ports;
/// Baseline resource profiles and their rule sets.
pub use statechronicle_profiles as profiles;
/// Proof serving and verification (state, ownership, inclusion, non-membership).
pub use statechronicle_proof as proof;
/// Protected prepared plans, signing, atomic commit outcomes and recovery.
// ---- Curated top-level facade ----
//
// The most-used protocol types, re-exported directly. Everything here resolves
// to the exact canonical module path in the corresponding crate; consumers can
// use either the flat names or the namespaced forms interchangeably.
/// Exact fixed-point amount. See [`core::amount::Amount`].
pub use ;
/// SHA-256 content digest in canonical `sha256:<hex>` form. See [`core::digest::ContentDigest`].
pub use ContentDigest;
/// An Ed25519 signature over canonicalized content. See [`core::signature::Signature`].
pub use Signature;
/// Authority proofs and TrustGrant evaluation outcomes. See [`domain::authority`].
pub use ;
/// A signed batch of events. See [`domain::commit::Commit`].
pub use ;
/// A validated, append-only transition. See [`domain::event::Event`].
pub use ;
/// Prefixed newtype identifiers. See [`domain::ids`].
pub use ;
/// A requested state transition. See [`domain::intent::Intent`].
pub use ;
/// Identifies a resource within a tenant namespace. See [`domain::resource::ResourceId`].
pub use ResourceId;
/// The ADR-004 signed envelope (`body` + detached `signature`). See [`domain::signed::Signed`].
pub use Signed;
/// A derived projection of a resource's current state. See [`domain::state::StateProjection`].
pub use StateProjection;
/// A resource state type. See [`domain::state_type::StateType`].
pub use StateType;
/// Identifies a user, account, service, or authority. See [`domain::subject::SubjectId`].
pub use SubjectId;
/// Identifies an isolated tenant scope. See [`domain::tenant::TenantId`].
pub use TenantId;
/// The trade proof schema identifier. See [`domain::trade::TRADE_PROOF_SCHEMA`].
pub use TRADE_PROOF_SCHEMA;
/// A full trade event in history. See [`domain::trade::TradeEvent`].
pub use TradeEvent;
/// A reference to a trade event. See [`domain::trade::TradeEventRef`].
pub use TradeEventRef;
/// The ordered trade history view. See [`domain::trade::TradeHistory`].
pub use TradeHistory;
/// A portable trade proof. See [`domain::trade::TradeProof`].
pub use TradeProof;
/// One per-tenant trade proof leg. See [`domain::trade::TradeProofLeg`].
pub use TradeProofLeg;
/// The accumulated trade read-side record. See [`domain::trade::TradeRecord`].
pub use TradeRecord;
/// One settled tenant leg of a trade. See [`domain::trade::TradeSide`].
pub use TradeSide;
/// Trade lifecycle status. See [`domain::trade::TradeStatus`].
pub use TradeStatus;
/// The deterministic trade summary. See [`domain::trade::TradeSummary`].
pub use TradeSummary;
/// One declared fungible value leg. See [`domain::trade::TradeValueLeg`].
pub use TradeValueLeg;
/// The pure trade index builder. See [`index::build`].
pub use build;
/// The pure trade index `apply` entry point. See [`index::build::IngestBatch`].
pub use IngestBatch;
/// The trade history reconstruction. See [`index::history`].
pub use history;
/// The trade read-side port set. See [`index::service::TradePorts`].
pub use TradePorts;
/// The async trade read-side service. See [`index::service::TradeService`].
pub use TradeService;
/// Required composition-root persistence boundary for multi-intent batches.
pub use DurableBatchSink;
/// Required composition-root persistence boundary for player mutations.
pub use DurableMutationSink;
/// The execution engine. See [`executor::pipeline::Executor`].
pub use Executor;
/// The execution engine's fluent builder. See [`executor::pipeline::ExecutorBuilder`].
pub use ExecutorBuilder;
/// One authenticated player request in a durable player batch.
pub use PlayerBatchItem;
/// The executor's injected port bundle. See [`executor::pipeline::Ports`].
pub use Ports;
/// The executor's port-bundle builder. See [`executor::pipeline::PortsBuilder`].
pub use PortsBuilder;
/// An authenticated, uncommitted event plan with protected inputs.
pub use ;
/// A validated intent with its idempotency key. See [`intent::validated::ValidatedIntent`].
pub use ;
/// An opaque SMT state key. See [`accumulator::key::StateKey`].
pub use StateKey;
/// Sparse-Merkle state accumulator. See [`accumulator::sparse_merkle::StateAccumulator`].
pub use ;
/// Baseline profile registry. See [`profiles::registry::ProfileRegistry`].
pub use ProfileRegistry;
/// The gate every state transition passes through. See [`profiles::registry::ProfileRules`].
pub use ProfileRules;
/// The proof service's read-side port set. See [`proof::service::ProofPorts`].
pub use ProofPorts;
/// Async proof service. See [`proof::service::ProofService`].
pub use ProofService;
/// Trade proof assembly. See [`proof::trade::build_trade_proof`].
pub use build_trade_proof;
/// Trade proof verification. See [`proof::trade::verify_trade_proof`].
pub use verify_trade_proof;
/// Domain-separated canonical custom state.
pub use CustomState;
/// Portable consumer-defined domain transition contracts.
pub use statechronicle_profile as profile;
/// Consumer-defined deterministic transition contract.
pub use StateProfile;
/// Typed adapter for domain registration.
pub use TypedProfile;
/// Define a command discriminator and static operation list from one mapping.
pub use command_operations;