miden_node_proto/generated/
note.rs

1// This file is @generated by prost-build.
2/// Represents a note's ID.
3#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct NoteId {
5    /// A unique identifier of the note which is a 32-byte commitment to the underlying note data.
6    #[prost(message, optional, tag = "1")]
7    pub id: ::core::option::Option<super::primitives::Digest>,
8}
9/// List of note IDs.
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct NoteIdList {
12    /// List of note IDs to be queried from the database.
13    #[prost(message, repeated, tag = "1")]
14    pub ids: ::prost::alloc::vec::Vec<NoteId>,
15}
16/// Represents a note's metadata.
17#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
18pub struct NoteMetadata {
19    /// The account which sent the note.
20    #[prost(message, optional, tag = "1")]
21    pub sender: ::core::option::Option<super::account::AccountId>,
22    /// The type of the note (0b01 = public, 0b10 = private, 0b11 = encrypted).
23    #[prost(uint32, tag = "2")]
24    pub note_type: u32,
25    /// A value which can be used by the recipient(s) to identify notes intended for them.
26    ///
27    /// See `miden_protocol::note::note_tag` for more info.
28    #[prost(fixed32, tag = "3")]
29    pub tag: u32,
30    /// Serialized note attachment
31    ///
32    /// See `miden_protocol::note::NoteAttachment` for more info.
33    #[prost(bytes = "vec", tag = "4")]
34    pub attachment: ::prost::alloc::vec::Vec<u8>,
35}
36/// Represents a note.
37///
38/// The note is composed of the note metadata and its serialized details.
39#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
40pub struct Note {
41    /// The note's metadata.
42    #[prost(message, optional, tag = "1")]
43    pub metadata: ::core::option::Option<NoteMetadata>,
44    /// Serialized note details (empty for private notes).
45    #[prost(bytes = "vec", optional, tag = "2")]
46    pub details: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
47}
48/// Represents a network note.
49///
50/// Network notes are a subtype of public notes, and as such, their details are always publicly
51/// known.
52#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
53pub struct NetworkNote {
54    /// The note's metadata.
55    #[prost(message, optional, tag = "1")]
56    pub metadata: ::core::option::Option<NoteMetadata>,
57    /// Serialized note details (i.e., assets and recipient).
58    #[prost(bytes = "vec", tag = "2")]
59    pub details: ::prost::alloc::vec::Vec<u8>,
60}
61/// Represents a committed note.
62///
63/// A committed note is a note that has been included in a block.
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct CommittedNote {
66    /// Either private, public, or network note.
67    #[prost(message, optional, tag = "1")]
68    pub note: ::core::option::Option<Note>,
69    /// The data needed to prove that the note is present in the chain.
70    #[prost(message, optional, tag = "2")]
71    pub inclusion_proof: ::core::option::Option<NoteInclusionInBlockProof>,
72}
73/// Represents the result of getting committed notes.
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct CommittedNoteList {
76    /// List of committed notes.
77    #[prost(message, repeated, tag = "1")]
78    pub notes: ::prost::alloc::vec::Vec<CommittedNote>,
79}
80/// Represents a proof of note's inclusion in a block.
81///
82/// Does not include proof of the block's inclusion in the chain.
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct NoteInclusionInBlockProof {
85    /// A unique identifier of the note which is a 32-byte commitment to the underlying note data.
86    #[prost(message, optional, tag = "1")]
87    pub note_id: ::core::option::Option<NoteId>,
88    /// The block number in which the note was created.
89    #[prost(fixed32, tag = "2")]
90    pub block_num: u32,
91    /// The index of the note in the block.
92    #[prost(uint32, tag = "3")]
93    pub note_index_in_block: u32,
94    /// The note's inclusion proof in the block.
95    #[prost(message, optional, tag = "4")]
96    pub inclusion_path: ::core::option::Option<super::primitives::SparseMerklePath>,
97}
98/// Represents proof of a note inclusion in the block.
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct NoteSyncRecord {
101    /// A unique identifier of the note which is a 32-byte commitment to the underlying note data.
102    #[prost(message, optional, tag = "1")]
103    pub note_id: ::core::option::Option<NoteId>,
104    /// The index of the note in the block.
105    #[prost(uint32, tag = "2")]
106    pub note_index_in_block: u32,
107    /// The note's metadata.
108    #[prost(message, optional, tag = "3")]
109    pub metadata: ::core::option::Option<NoteMetadata>,
110    /// The note's inclusion proof in the block.
111    #[prost(message, optional, tag = "4")]
112    pub inclusion_path: ::core::option::Option<super::primitives::SparseMerklePath>,
113}
114/// Represents a note root.
115#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
116pub struct NoteRoot {
117    /// The root of the note.
118    #[prost(message, optional, tag = "1")]
119    pub root: ::core::option::Option<super::primitives::Digest>,
120}
121/// Represents a note script.
122#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
123pub struct NoteScript {
124    /// Entrypoint of the script.
125    #[prost(uint32, tag = "1")]
126    pub entrypoint: u32,
127    /// Mast of the script.
128    #[prost(bytes = "vec", tag = "2")]
129    pub mast: ::prost::alloc::vec::Vec<u8>,
130}