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
// src/lib.rs
//! # Zaru Core
//!
//! A secure payment model engine with transaction state machine and cryptographic verification.
//!
//! ## Features
//! - Type-safe amount handling
//! - Transaction state machine (Unsigned → Signed → Verified)
//! - ED25519 cryptographic verification
//! - Wallet abstraction (Bank + Crypto)
//! - Optional Python bindings
//!
//! ## Quick Start
//! ```rust
//! use zaru_core::{Amount, Transaction, TxId, WalletId, Keypair};
//!
//! let from = WalletId::from("sender");
//! let to = WalletId::from_crypto("receiver");
//! let amount = Amount::new(1000).unwrap();
//!
//! let tx = Transaction::<Unsigned>::new(
//! TxId("txn_001".to_string()),
//! from,
//! to,
//! amount,
//! 1
//! );
//!
//! let keypair = Keypair::generate();
//! let signed = tx.sign(&keypair);
//! let verified = signed.verify().unwrap();
//! ```
// Module declarations
/// Error types for the payment engine.
///
/// Provides comprehensive error handling for all operations.
/// Type-safe monetary mount handling.
///
/// Prevents negative values and ensures mathematical correctness.
/// Transaction state machine with cryptographic verification.
///
/// Implements the Unsigned -> Signed -> Verified lifecycle.
/// Wallet abstraction supporting bank accounts and crypto addresses.
/// Settlement layer for transaction finality.
/// In-memory ledger implementation.
/// Cryptographic primitives including ED25519 signatures.
/// Convenience module for common imports.
///
/// Use use zaru_core::prelude::*; to import all commonly used types.
// Prelude for convenient imports
// Re-exports
pub use crateAmount;
pub use crateKeypair;
pub use crateSignature;
pub use crateCryptoVerifier;
pub use crate;
pub use crate;
pub use crateWalletId;
// Python bindings (conditional)
// Test utilities