elph_core/scaffold/trust.rs
1use crate::fs::write_json_file;
2use crate::utils::path::AppPaths;
3use anyhow::Result;
4
5pub struct TrustStore;
6
7impl TrustStore {
8 pub fn ensure<P: AppPaths>(paths: &P) -> Result<()> {
9 let path = paths.trust_path();
10 if path.exists() {
11 return Ok(());
12 }
13
14 write_json_file(&path, &serde_json::json!({}))?;
15 Ok(())
16 }
17}