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
// Copyright 2019-2026 Apilium Technologies OÜ. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR Commercial
//! Cryptographic proof storage and verification
//!
//! This module provides storage, retrieval, and verification of zero-knowledge proofs
//! from aingle_zk. It serves as the API layer for managing proofs with caching,
//! batch verification, and statistics.
//!
//! ## Features
//!
//! - **Proof Storage**: In-memory storage with optional persistence
//! - **Verification**: Integrate with aingle_zk proof verifiers
//! - **Caching**: LRU cache for verification results
//! - **Batch Operations**: Efficient batch proof submission and verification
//! - **Statistics**: Track proof counts, verification rates, and cache hits
//!
//! ## Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────┐
//! │ Proof API Layer │
//! ├─────────────────────────────────────────────────┤
//! │ ┌─────────────┐ ┌──────────────┐ │
//! │ │ ProofStore │───────▶│ Verification │ │
//! │ │ │ │ Cache │ │
//! │ └──────┬──────┘ └──────────────┘ │
//! │ │ │
//! │ ┌──────▼──────┐ ┌──────────────┐ │
//! │ │ Storage │ │ ProofVerifier│ │
//! │ │ (HashMap) │ │ (aingle_zk) │ │
//! │ └─────────────┘ └──────────────┘ │
//! └─────────────────────────────────────────────────┘
//! ```
//!
//! ## Example
//!
//! ```rust,ignore
//! use aingle_cortex::proofs::{ProofStore, ProofType, SubmitProofRequest};
//!
//! let store = ProofStore::new();
//!
//! // Submit a proof
//! let request = SubmitProofRequest {
//! proof_type: ProofType::Schnorr,
//! proof_data: vec![...],
//! metadata: None,
//! };
//! let proof_id = store.submit(request).await?;
//!
//! // Verify the proof
//! let result = store.verify(&proof_id).await?;
//! assert!(result.valid);
//! ```
pub use ProofBackend;
pub use ;
pub use ;
/// Re-export commonly used types