use crate::convert;
use crate::error::JacsError;
use crate::simple::types::VerificationResult;
use super::core::SimpleAgent;
impl SimpleAgent {
pub fn to_yaml(&self, json_str: &str) -> Result<String, JacsError> {
convert::jacs_to_yaml(json_str)
}
pub fn from_yaml(&self, yaml_str: &str) -> Result<String, JacsError> {
convert::yaml_to_jacs(yaml_str)
}
pub fn verify_yaml(&self, yaml_str: &str) -> Result<VerificationResult, JacsError> {
let json_str = convert::yaml_to_jacs(yaml_str)?;
self.verify(&json_str)
}
pub fn to_html(&self, json_str: &str) -> Result<String, JacsError> {
convert::jacs_to_html(json_str)
}
pub fn from_html(&self, html_str: &str) -> Result<String, JacsError> {
convert::html_to_jacs(html_str)
}
}