use autonomi::client::data::DataAddress;
use bytes::Bytes;
use color_eyre::Result;
use autonomi::client::GetError;
use crate::client::DwebClient;
pub async fn autonomi_get_file_public(
client: &DwebClient,
file_address: &DataAddress,
) -> Result<Bytes, GetError> {
println!("DEBUG autonomi_get_file_public()");
println!("DEBUG calling client.data_get_public()");
match client.client.data_get_public(file_address).await {
Ok(content) => {
println!("DEBUG Ok() return");
Ok(content)
}
Err(e) => {
println!("DEBUG Err() return");
Err(e)
}
}
}