//! Domain trust keys for domain-specific reputation.

use super::builders::global_key;

/// Domain trust key: `\x00DT:{agent_hex}:{domain}`
///
/// Stores domain-specific trust for an agent.
pub fn domain_trust_key(agent_hex: &str, domain: &str) -> Vec<u8> {
    let suffix = format!("{}:{}", agent_hex, domain);
    global_key(b"DT:", suffix.as_bytes())
}

/// Domain trust agent prefix: `\x00DT:{agent_hex}:`
///
/// Scan all domains for a specific agent.
pub fn domain_trust_agent_prefix(agent_hex: &str) -> Vec<u8> {
    let suffix = format!("{}:", agent_hex);
    global_key(b"DT:", suffix.as_bytes())
}

/// Domain trust scan prefix: `\x00DT:`
///
/// Scan all domain trust entries.
pub fn domain_trust_scan_prefix() -> Vec<u8> {
    global_key(b"DT:", b"")
}
