miden-client-web 0.15.0

Web Client library that facilitates interaction with the Miden network
use js_export_macro::js_export;
use miden_client::store::NoteExportType;

#[js_export]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum NoteExportFormat {
    Id,
    Full,
    Details,
}

// CONVERSIONS
// ================================================================================================

impl From<NoteExportFormat> for NoteExportType {
    fn from(value: NoteExportFormat) -> Self {
        match value {
            NoteExportFormat::Id => NoteExportType::NoteId,
            NoteExportFormat::Full => NoteExportType::NoteWithProof,
            NoteExportFormat::Details => NoteExportType::NoteDetails,
        }
    }
}