//! Data models for the vault crate #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct VaultMetadata { pub name: String, pub keyspaces: Vec, // ... other vault-level metadata } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct KeyspaceMetadata { pub name: String, pub salt: [u8; 16], // Unique salt for this keyspace pub kdf: String, // e.g. "scrypt" or "pbkdf2" pub cipher: String, // e.g. "chacha20poly1305" or "aes-gcm" pub encrypted_blob: Vec, pub created_at: Option, // Unix timestamp pub tags: Option>, // ... other keyspace metadata } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct KeyspaceData { pub keypairs: Vec, // ... other keyspace-level metadata } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct KeyEntry { pub id: String, pub key_type: KeyType, pub private_key: Vec, // Only present in memory after decryption pub public_key: Vec, pub metadata: Option, } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub enum KeyType { Secp256k1, Ed25519, // ... } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct KeyMetadata { pub name: Option, pub created_at: Option, pub tags: Option>, // ... }