use std::fs;
use std::path::Path;
pub struct Manifest {
pub name: String,
pub version: String,
pub dependencies: Vec<String>,
pub license: String,
}
impl Manifest {
pub fn parse_offline(file_path: &Path) -> Result<Self, String> {
let content = fs::read_to_string(file_path).map_err(|e| e.to_string())?;
if !content.contains("BSL-1.1") && content.contains("tier3") {
return Err("License Violation: Tier-3 requires BSL-1.1".to_string());
}
Ok(Manifest {
name: "sovereign-core".to_string(),
version: "1.1.0".to_string(),
dependencies: vec!["stdlib-math".to_string(), "stdlib-crypto".to_string()],
license: "BSL-1.1".to_string(),
})
}
}