use crate::ffi::{buf::AscTypedArray, sys};
pub fn hex(bytes: impl AsRef<[u8]>) -> String {
let bytes = AscTypedArray::from_bytes(bytes.as_ref());
let str = unsafe { &*sys::type_conversion__bytes_to_hex(bytes.as_ptr()) };
str.to_string_lossy()
}
pub fn base58(bytes: impl AsRef<[u8]>) -> String {
let bytes = AscTypedArray::from_bytes(bytes.as_ref());
let str = unsafe { &*sys::type_conversion__bytes_to_base58(bytes.as_ptr()) };
str.to_string_lossy()
}
#[deprecated]
pub fn string(bytes: impl AsRef<[u8]>) -> String {
let bytes = AscTypedArray::from_bytes(bytes.as_ref());
let str = unsafe { &*sys::type_conversion__bytes_to_string(bytes.as_ptr()) };
str.to_string_lossy()
}