Architecture Overview
Qazna follows a 3-Layer Architecture, designed to bridge sovereign banking systems with the global AI economy.
1. The Core ("Financial Linux")
- Implementation:
core/ledger(Rust) - Role: A high-performance, in-memory double-entry accounting engine.
- Key Capabilities:
- Native ISO 20022: Direct ingestion and processing of banking standards (e.g.,
pacs.008). - Programmable Compliance: "Compliance as Code" engine injecting regulatory rules (Limits, AML) into the kernel.
- Financial Identity: Native Alias Registry mapping human-readable names to Account IDs.
- Offline Resilience: Ed25519-based cryptographic signature verification for trustless transaction submission.
- Native ISO 20022: Direct ingestion and processing of banking standards (e.g.,
2. The Network ("Financial TCP/IP")
- Implementation:
core/gateway(Rust) - Role: Routing and settlement layer connecting independent sovereign ledgers.
- Key Capabilities:
- Liquidity Routing: "Financial BGP" pathfinding to discover optimal currency conversion paths across the network.
- Atomic Swaps: Trustless cross-ledger value transfer (HTLCs).
3. The Interface ("AI Agent Layer")
- Implementation:
clients/python,core/api(Go/gRPC) - Role: SDKs and APIs for human and machine interaction.
- Interfaces:
- gRPC: Low-latency, strongly typed internal communication.
- Python SDK: (
pip install qazna) for AI agents. - REST/HTTP: External API gateway (Legacy support).
Data Flow (Rust Core)
- Ingestion: Transactions arrive via gRPC (from API or Gateway) or File (ISO 20022 XML).
- Validation:
- Crypto: Verifies Ed25519 signatures if
public_keyis registered. - Identity: Resolves Aliases to Account IDs.
- Compliance:
ComplianceEnginechecks transaction against active Rules (e.g.,MaxAmount).
- Crypto: Verifies Ed25519 signatures if
- Execution: Atomic update of
State(in-memory HashMaps). - Persistence: Append-only log for durability and auditability.
- Event Emission: Publishes events (e.g.,
Transaction,LiquidityAdPosted) to detailed audit logs.