Skip to main content

miden_node_proto/generated/
account.rs

1// This file is @generated by prost-build.
2/// Uniquely identifies a specific account.
3///
4/// A Miden account ID is a 120-bit value derived from the commitments to account code and storage,
5/// and a random user-provided seed.
6#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7#[prost(skip_debug)]
8pub struct AccountId {
9    /// 15 bytes (120 bits) encoded using \[winter_utils::Serializable\] implementation for
10    /// \[miden_protocol::account::account_id::AccountId\].
11    #[prost(bytes = "vec", tag = "1")]
12    pub id: ::prost::alloc::vec::Vec<u8>,
13}
14/// The state of an account at a specific block height.
15#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
16pub struct AccountSummary {
17    /// The account ID.
18    #[prost(message, optional, tag = "1")]
19    pub account_id: ::core::option::Option<AccountId>,
20    /// The current account commitment or zero if the account does not exist.
21    #[prost(message, optional, tag = "2")]
22    pub account_commitment: ::core::option::Option<super::primitives::Digest>,
23    /// Block number at which the summary was made.
24    #[prost(uint32, tag = "3")]
25    pub block_num: u32,
26}
27/// Represents the storage header of an account.
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct AccountStorageHeader {
30    /// Storage slots with their types and data.
31    #[prost(message, repeated, tag = "1")]
32    pub slots: ::prost::alloc::vec::Vec<account_storage_header::StorageSlot>,
33}
34/// Nested message and enum types in `AccountStorageHeader`.
35pub mod account_storage_header {
36    /// A single storage slot in the account storage header.
37    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
38    pub struct StorageSlot {
39        /// The name of the storage slot.
40        #[prost(string, tag = "1")]
41        pub slot_name: ::prost::alloc::string::String,
42        /// The type of the storage slot.
43        #[prost(uint32, tag = "2")]
44        pub slot_type: u32,
45        /// The data (Word) for this storage slot.
46        /// For value slots (slot_type=0), this is the actual value stored in the slot.
47        /// For map slots (slot_type=1), this is the root of the storage map.
48        #[prost(message, optional, tag = "3")]
49        pub commitment: ::core::option::Option<super::super::primitives::Digest>,
50    }
51}
52/// An account details.
53#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
54pub struct AccountDetails {
55    /// Account summary.
56    #[prost(message, optional, tag = "1")]
57    pub summary: ::core::option::Option<AccountSummary>,
58    /// Account details encoded using \[winter_utils::Serializable\] implementation for
59    /// \[miden_protocol::account::Account\].
60    #[prost(bytes = "vec", optional, tag = "2")]
61    pub details: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
62}
63/// An account header.
64#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
65pub struct AccountHeader {
66    /// The account ID.
67    #[prost(message, optional, tag = "1")]
68    pub account_id: ::core::option::Option<AccountId>,
69    /// Vault root hash.
70    #[prost(message, optional, tag = "2")]
71    pub vault_root: ::core::option::Option<super::primitives::Digest>,
72    /// Storage root hash.
73    #[prost(message, optional, tag = "3")]
74    pub storage_commitment: ::core::option::Option<super::primitives::Digest>,
75    /// Code root hash.
76    #[prost(message, optional, tag = "4")]
77    pub code_commitment: ::core::option::Option<super::primitives::Digest>,
78    /// Account nonce.
79    #[prost(uint64, tag = "5")]
80    pub nonce: u64,
81}
82/// An account witness.
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct AccountWitness {
85    /// Account ID for which this proof is requested.
86    #[prost(message, optional, tag = "1")]
87    pub account_id: ::core::option::Option<AccountId>,
88    /// The account ID within the proof, which may be different from the above account ID.
89    /// This can happen when the requested account ID's prefix matches the prefix of an existing
90    /// account ID in the tree. Then the witness will prove inclusion of this witness ID in the tree.
91    #[prost(message, optional, tag = "2")]
92    pub witness_id: ::core::option::Option<AccountId>,
93    /// The state commitment whose inclusion the witness proves.
94    #[prost(message, optional, tag = "3")]
95    pub commitment: ::core::option::Option<super::primitives::Digest>,
96    /// The merkle path of the state commitment in the account tree.
97    #[prost(message, optional, tag = "4")]
98    pub path: ::core::option::Option<super::primitives::SparseMerklePath>,
99}