miden_node_proto/generated/
note.rs

1// This file is @generated by prost-build.
2/// Represents a note's metadata.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct NoteMetadata {
5    /// The account which sent the note.
6    #[prost(message, optional, tag = "1")]
7    pub sender: ::core::option::Option<super::account::AccountId>,
8    /// The type of the note (0b01 = public, 0b10 = private, 0b11 = encrypted).
9    #[prost(uint32, tag = "2")]
10    pub note_type: u32,
11    /// A value which can be used by the recipient(s) to identify notes intended for them.
12    ///
13    /// See `miden_objects::note::note_tag` for more info.
14    #[prost(fixed32, tag = "3")]
15    pub tag: u32,
16    /// Specifies when a note is ready to be consumed.
17    ///
18    /// See `miden_objects::note::execution_hint` for more info.
19    #[prost(fixed64, tag = "4")]
20    pub execution_hint: u64,
21    /// An arbitrary user-defined value.
22    #[prost(fixed64, tag = "5")]
23    pub aux: u64,
24}
25/// Represents a note.
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct Note {
28    /// The block number in which the note was created.
29    #[prost(fixed32, tag = "1")]
30    pub block_num: u32,
31    /// The index of the note in the block.
32    #[prost(uint32, tag = "2")]
33    pub note_index: u32,
34    /// The ID of the note.
35    #[prost(message, optional, tag = "3")]
36    pub note_id: ::core::option::Option<super::digest::Digest>,
37    /// The note's metadata.
38    #[prost(message, optional, tag = "4")]
39    pub metadata: ::core::option::Option<NoteMetadata>,
40    /// The note's inclusion proof in the block.
41    #[prost(message, optional, tag = "5")]
42    pub merkle_path: ::core::option::Option<super::merkle::MerklePath>,
43    /// Serialized details of the public note (empty for private notes).
44    #[prost(bytes = "vec", optional, tag = "6")]
45    pub details: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
46}
47/// Represents a proof of note's inclusion in a block.
48///
49/// Does not include proof of the block's inclusion in the chain.
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct NoteInclusionInBlockProof {
52    /// A unique identifier of the note which is a 32-byte commitment to the underlying note data.
53    #[prost(message, optional, tag = "1")]
54    pub note_id: ::core::option::Option<super::digest::Digest>,
55    /// The block number in which the note was created.
56    #[prost(fixed32, tag = "2")]
57    pub block_num: u32,
58    /// The index of the note in the block.
59    #[prost(uint32, tag = "3")]
60    pub note_index_in_block: u32,
61    /// The note's inclusion proof in the block.
62    #[prost(message, optional, tag = "4")]
63    pub merkle_path: ::core::option::Option<super::merkle::MerklePath>,
64}
65/// Represents proof of a note inclusion in the block.
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct NoteSyncRecord {
68    /// The index of the note.
69    #[prost(uint32, tag = "1")]
70    pub note_index: u32,
71    /// A unique identifier of the note which is a 32-byte commitment to the underlying note data.
72    #[prost(message, optional, tag = "2")]
73    pub note_id: ::core::option::Option<super::digest::Digest>,
74    /// The note's metadata.
75    #[prost(message, optional, tag = "3")]
76    pub metadata: ::core::option::Option<NoteMetadata>,
77    /// The note's inclusion proof in the block.
78    #[prost(message, optional, tag = "4")]
79    pub merkle_path: ::core::option::Option<super::merkle::MerklePath>,
80}
81/// Represents proof of notes inclusion in the block(s) and block(s) inclusion in the chain.
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct NoteAuthenticationInfo {
84    /// Proof of each note's inclusion in a block.
85    #[prost(message, repeated, tag = "1")]
86    pub note_proofs: ::prost::alloc::vec::Vec<NoteInclusionInBlockProof>,
87    /// Proof of each block's inclusion in the chain.
88    #[prost(message, repeated, tag = "2")]
89    pub block_proofs: ::prost::alloc::vec::Vec<super::block::BlockInclusionProof>,
90}