1#![doc(
2 html_logo_url = "https://raw.githubusercontent.com/dyologician/a1/main/docs/assets/logo.png"
3)]
4#![doc(
5 html_favicon_url = "https://raw.githubusercontent.com/dyologician/a1/main/docs/assets/favicon.ico"
6)]
7#![cfg_attr(docsrs, feature(doc_cfg))]
8#![deny(unsafe_code)]
80
81mod crypto;
82
83pub mod audit;
84pub mod cert;
85pub mod chain;
86pub mod context;
87pub mod error;
88pub mod hybrid;
89pub mod identity;
90pub mod intent;
91pub mod passport;
92pub mod policy;
93pub mod provenance;
94pub mod registry;
95
96#[cfg(feature = "wire")]
97#[cfg_attr(docsrs, doc(cfg(feature = "wire")))]
98pub mod cert_extensions;
99
100#[cfg(feature = "wire")]
101#[cfg_attr(docsrs, doc(cfg(feature = "wire")))]
102pub mod wire;
103
104#[cfg(feature = "did")]
105#[cfg_attr(docsrs, doc(cfg(feature = "did")))]
106pub mod did;
107
108#[cfg(feature = "zk")]
109#[cfg_attr(docsrs, doc(cfg(feature = "zk")))]
110pub mod zk;
111
112#[cfg(feature = "anchor")]
113#[cfg_attr(docsrs, doc(cfg(feature = "anchor")))]
114pub mod anchor;
115
116#[cfg(feature = "negotiate")]
117#[cfg_attr(docsrs, doc(cfg(feature = "negotiate")))]
118pub mod negotiate;
119
120#[cfg(feature = "swarm")]
121#[cfg_attr(docsrs, doc(cfg(feature = "swarm")))]
122pub mod swarm;
123
124#[cfg(feature = "governance")]
125#[cfg_attr(docsrs, doc(cfg(feature = "governance")))]
126pub mod governance;
127
128#[cfg(feature = "ffi")]
129#[cfg_attr(docsrs, doc(cfg(feature = "ffi")))]
130#[allow(unsafe_code)]
131pub mod ffi;
132
133pub use audit::{
134 AuditEvent, AuditOutcome, AuditSink, CompositeAuditSink, LogAuditSink, NoopAuditSink,
135};
136pub use cert::{CertBuilder, CertBundle, DelegationCert, CERT_VERSION};
137pub use chain::{
138 AuthorizedAction, BatchAuthorizeResult, Clock, DyoloChain, SystemClock, VerificationReceipt,
139};
140pub use context::A1Context;
141pub use error::{A1Error, A1StorageError, StorageErrorKind};
142pub use hybrid::{
143 negotiate_algorithm, ChainAlgorithmCompatibility, ClassicalHybridAdapter, HybridPublicKey,
144 HybridSignature, HybridSigner, SignatureAlgorithm,
145};
146pub use identity::narrowing::{CapabilityRegistry, NarrowingMatrix};
147pub use identity::receipt::ProvableReceipt;
148pub use identity::{DyoloIdentity, SharedIdentity, Signer};
149#[allow(deprecated)]
150pub use intent::{
151 intent_hash, Intent, IntentHash, IntentTree, MerkleProof, SiblingNode, SubScopeProof,
152};
153pub use passport::DyoloPassport;
154pub use policy::{CapabilitySet, DelegationPolicy, PolicySet};
155pub use provenance::{
156 ProvenanceRoot, ProvenanceStepProof, ReasoningStep, ReasoningStepKind, ReasoningTrace,
157};
158pub use registry::{
159 fresh_nonce, MemoryNonceStore, MemoryRateLimitStore, MemoryRevocationStore, NonceStore,
160 RateLimitStore, RevocationStore,
161};
162
163#[cfg(feature = "wire")]
164#[cfg_attr(docsrs, doc(cfg(feature = "wire")))]
165pub use cert_extensions::{CertExtensions, ExtValue};
166
167#[cfg(feature = "did")]
168#[cfg_attr(docsrs, doc(cfg(feature = "did")))]
169pub use did::{
170 AgentDid, CredentialSubject, DidDocument, VcProof, VerifiableCredential, VerificationMethod,
171};
172
173#[cfg(feature = "zk")]
174#[cfg_attr(docsrs, doc(cfg(feature = "zk")))]
175pub use zk::{anchor_hash, ZkChainCommitment, ZkProofMode, ZkTraceProof};
176
177#[cfg(feature = "anchor")]
178#[cfg_attr(docsrs, doc(cfg(feature = "anchor")))]
179pub use anchor::{AnchorNetwork, AnchoredReceipt};
180
181#[cfg(feature = "negotiate")]
182#[cfg_attr(docsrs, doc(cfg(feature = "negotiate")))]
183pub use negotiate::{CapabilityRequest, DelegationAcceptance, DelegationOffer, NegotiationResult};
184
185#[cfg(feature = "swarm")]
186#[cfg_attr(docsrs, doc(cfg(feature = "swarm")))]
187pub use swarm::{SwarmMember, SwarmPassport, SwarmRole};
188
189#[cfg(feature = "governance")]
190#[cfg_attr(docsrs, doc(cfg(feature = "governance")))]
191pub use governance::{
192 ApprovalGate, ApprovalToken, AuditReport, GovernancePolicy, KeyRotationPolicy,
193};
194
195#[cfg(feature = "async")]
196#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
197pub use context::AsyncA1Context;
198
199#[cfg(feature = "async")]
200#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
201pub use registry::r#async::{
202 AsyncNonceStore, AsyncRateLimitStore, AsyncRevocationStore, SyncNonceAdapter,
203 SyncRevocationAdapter,
204};
205
206#[cfg(feature = "async")]
207#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
208pub use audit::r#async::{AsyncAuditSink, SyncAuditAdapter};
209
210#[cfg(feature = "async")]
211#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
212pub use identity::AsyncSigner;