use anyhow::Result;
use std::path::PathBuf;
use crate::keypair::Keypair;
#[derive(Clone)]
pub struct Passfile {
pub filepath: PathBuf,
pub keypair: Keypair,
}
impl Passfile {
pub async fn load_file(filepath: PathBuf, _interactive: bool) -> Result<Self> {
let keypair = Keypair::from_json_file(filepath.to_str().unwrap())?;
Ok(Self { filepath, keypair })
}
}