miden_node_proto/generated/
primitives.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3pub struct Asset {
4    /// Asset represented as a word.
5    #[prost(message, optional, tag = "1")]
6    pub asset: ::core::option::Option<Digest>,
7}
8/// Represents a single SMT leaf entry.
9#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10pub struct SmtLeafEntry {
11    /// The key of the entry.
12    #[prost(message, optional, tag = "1")]
13    pub key: ::core::option::Option<Digest>,
14    /// The value of the entry.
15    #[prost(message, optional, tag = "2")]
16    pub value: ::core::option::Option<Digest>,
17}
18/// Represents multiple leaf entries in an SMT.
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct SmtLeafEntryList {
21    /// The entries list.
22    #[prost(message, repeated, tag = "1")]
23    pub entries: ::prost::alloc::vec::Vec<SmtLeafEntry>,
24}
25/// A leaf in an SMT, sitting at depth 64. A leaf can contain 0, 1 or multiple leaf entries.
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct SmtLeaf {
28    #[prost(oneof = "smt_leaf::Leaf", tags = "1, 2, 3")]
29    pub leaf: ::core::option::Option<smt_leaf::Leaf>,
30}
31/// Nested message and enum types in `SmtLeaf`.
32pub mod smt_leaf {
33    #[derive(Clone, PartialEq, ::prost::Oneof)]
34    pub enum Leaf {
35        /// An empty leaf index.
36        #[prost(uint64, tag = "1")]
37        EmptyLeafIndex(u64),
38        /// A single leaf entry.
39        #[prost(message, tag = "2")]
40        Single(super::SmtLeafEntry),
41        /// Multiple leaf entries.
42        #[prost(message, tag = "3")]
43        Multiple(super::SmtLeafEntryList),
44    }
45}
46/// The opening of a leaf in an SMT.
47#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct SmtOpening {
49    /// The Merkle path to the leaf.
50    #[prost(message, optional, tag = "1")]
51    pub path: ::core::option::Option<SparseMerklePath>,
52    /// The leaf itself.
53    #[prost(message, optional, tag = "2")]
54    pub leaf: ::core::option::Option<SmtLeaf>,
55}
56/// A different representation of a Merkle path designed for memory efficiency.
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct SparseMerklePath {
59    /// A bitmask representing empty nodes.
60    ///
61    /// The set bit corresponds to the depth of an empty node. The least significant bit (bit 0)
62    /// describes depth 1 node (root's children). The `bit index + 1` is equal to node's depth.
63    #[prost(fixed64, tag = "1")]
64    pub empty_nodes_mask: u64,
65    /// The non-empty nodes, stored in depth-order, but not contiguous across depth.
66    #[prost(message, repeated, tag = "2")]
67    pub siblings: ::prost::alloc::vec::Vec<Digest>,
68}
69/// Represents an MMR delta.
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct MmrDelta {
72    /// The number of leaf nodes in the MMR.
73    #[prost(uint64, tag = "1")]
74    pub forest: u64,
75    /// New and changed MMR peaks.
76    #[prost(message, repeated, tag = "2")]
77    pub data: ::prost::alloc::vec::Vec<Digest>,
78}
79/// Represents a Merkle path.
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct MerklePath {
82    /// List of sibling node hashes, in order from the root to the leaf.
83    #[prost(message, repeated, tag = "1")]
84    pub siblings: ::prost::alloc::vec::Vec<Digest>,
85}
86/// A hash digest, the result of a hash function.
87#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
88#[prost(skip_debug)]
89pub struct Digest {
90    #[prost(fixed64, tag = "1")]
91    pub d0: u64,
92    #[prost(fixed64, tag = "2")]
93    pub d1: u64,
94    #[prost(fixed64, tag = "3")]
95    pub d2: u64,
96    #[prost(fixed64, tag = "4")]
97    pub d3: u64,
98}