miden-standards 0.14.5

Standards of the Miden protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use miden_protocol::note::NoteAttachmentScheme;

/// The [`NoteAttachmentScheme`]s of standard note attachments.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum StandardNoteAttachment {
    /// See [`NetworkAccountTarget`](crate::note::NetworkAccountTarget) for details.
    NetworkAccountTarget,
}

impl StandardNoteAttachment {
    /// Returns the [`NoteAttachmentScheme`] of the standard attachment.
    pub const fn attachment_scheme(&self) -> NoteAttachmentScheme {
        match self {
            StandardNoteAttachment::NetworkAccountTarget => NoteAttachmentScheme::new(1u32),
        }
    }
}