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_objects::note::note_tag` for more info.
28    #[prost(fixed32, tag = "3")]
29    pub tag: u32,
30    /// Specifies when a note is ready to be consumed.
31    ///
32    /// See `miden_objects::note::execution_hint` for more info.
33    #[prost(fixed64, tag = "4")]
34    pub execution_hint: u64,
35    /// An arbitrary user-defined value.
36    #[prost(fixed64, tag = "5")]
37    pub aux: u64,
38}
39/// Represents a note.
40///
41/// The note is composed of the note metadata and its serialized details.
42#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
43pub struct Note {
44    /// The note's metadata.
45    #[prost(message, optional, tag = "1")]
46    pub metadata: ::core::option::Option<NoteMetadata>,
47    /// Serialized note details (empty for private notes).
48    #[prost(bytes = "vec", optional, tag = "2")]
49    pub details: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
50}
51/// Represents a network note.
52///
53/// Network notes are a subtype of public notes, and as such, their details are always publicly
54/// known.
55#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
56pub struct NetworkNote {
57    /// The note's metadata.
58    #[prost(message, optional, tag = "1")]
59    pub metadata: ::core::option::Option<NoteMetadata>,
60    /// Serialized note details (i.e., assets and recipient).
61    #[prost(bytes = "vec", tag = "2")]
62    pub details: ::prost::alloc::vec::Vec<u8>,
63}
64/// Represents a committed note.
65///
66/// A committed note is a note that has been included in a block.
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct CommittedNote {
69    /// Either private, public, or network note.
70    #[prost(message, optional, tag = "1")]
71    pub note: ::core::option::Option<Note>,
72    /// The data needed to prove that the note is present in the chain.
73    #[prost(message, optional, tag = "2")]
74    pub inclusion_proof: ::core::option::Option<NoteInclusionInBlockProof>,
75}
76/// Represents the result of getting committed notes.
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct CommittedNoteList {
79    /// List of committed notes.
80    #[prost(message, repeated, tag = "1")]
81    pub notes: ::prost::alloc::vec::Vec<CommittedNote>,
82}
83/// Represents a proof of note's inclusion in a block.
84///
85/// Does not include proof of the block's inclusion in the chain.
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct NoteInclusionInBlockProof {
88    /// A unique identifier of the note which is a 32-byte commitment to the underlying note data.
89    #[prost(message, optional, tag = "1")]
90    pub note_id: ::core::option::Option<NoteId>,
91    /// The block number in which the note was created.
92    #[prost(fixed32, tag = "2")]
93    pub block_num: u32,
94    /// The index of the note in the block.
95    #[prost(uint32, tag = "3")]
96    pub note_index_in_block: u32,
97    /// The note's inclusion proof in the block.
98    #[prost(message, optional, tag = "4")]
99    pub inclusion_path: ::core::option::Option<super::primitives::SparseMerklePath>,
100}
101/// Represents proof of a note inclusion in the block.
102#[derive(Clone, PartialEq, ::prost::Message)]
103pub struct NoteSyncRecord {
104    /// A unique identifier of the note which is a 32-byte commitment to the underlying note data.
105    #[prost(message, optional, tag = "1")]
106    pub note_id: ::core::option::Option<NoteId>,
107    /// The index of the note in the block.
108    #[prost(uint32, tag = "2")]
109    pub note_index_in_block: u32,
110    /// The note's metadata.
111    #[prost(message, optional, tag = "3")]
112    pub metadata: ::core::option::Option<NoteMetadata>,
113    /// The note's inclusion proof in the block.
114    #[prost(message, optional, tag = "4")]
115    pub inclusion_path: ::core::option::Option<super::primitives::SparseMerklePath>,
116}
117/// Represents a note root.
118#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
119pub struct NoteRoot {
120    /// The root of the note.
121    #[prost(message, optional, tag = "1")]
122    pub root: ::core::option::Option<super::primitives::Digest>,
123}
124/// Represents a note script.
125#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
126pub struct NoteScript {
127    /// Entrypoint of the script.
128    #[prost(uint32, tag = "1")]
129    pub entrypoint: u32,
130    /// Mast of the script.
131    #[prost(bytes = "vec", tag = "2")]
132    pub mast: ::prost::alloc::vec::Vec<u8>,
133}