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_objects::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 commitments.
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, Copy, PartialEq, Eq, Hash, ::prost::Message)]
38    pub struct StorageSlot {
39        /// The type of the storage slot.
40        #[prost(uint32, tag = "1")]
41        pub slot_type: u32,
42        /// The commitment (Word) for this storage slot.
43        #[prost(message, optional, tag = "2")]
44        pub commitment: ::core::option::Option<super::super::primitives::Digest>,
45    }
46}
47/// An account details.
48#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
49pub struct AccountDetails {
50    /// Account summary.
51    #[prost(message, optional, tag = "1")]
52    pub summary: ::core::option::Option<AccountSummary>,
53    /// Account details encoded using \[winter_utils::Serializable\] implementation for
54    /// \[miden_objects::account::Account\].
55    #[prost(bytes = "vec", optional, tag = "2")]
56    pub details: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
57}
58/// An account header.
59#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
60pub struct AccountHeader {
61    /// The account ID.
62    #[prost(message, optional, tag = "1")]
63    pub account_id: ::core::option::Option<AccountId>,
64    /// Vault root hash.
65    #[prost(message, optional, tag = "2")]
66    pub vault_root: ::core::option::Option<super::primitives::Digest>,
67    /// Storage root hash.
68    #[prost(message, optional, tag = "3")]
69    pub storage_commitment: ::core::option::Option<super::primitives::Digest>,
70    /// Code root hash.
71    #[prost(message, optional, tag = "4")]
72    pub code_commitment: ::core::option::Option<super::primitives::Digest>,
73    /// Account nonce.
74    #[prost(uint64, tag = "5")]
75    pub nonce: u64,
76}
77/// An account witness.
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct AccountWitness {
80    /// Account ID for which this proof is requested.
81    #[prost(message, optional, tag = "1")]
82    pub account_id: ::core::option::Option<AccountId>,
83    /// The account ID within the proof, which may be different from the above account ID.
84    /// This can happen when the requested account ID's prefix matches the prefix of an existing
85    /// account ID in the tree. Then the witness will prove inclusion of this witness ID in the tree.
86    #[prost(message, optional, tag = "2")]
87    pub witness_id: ::core::option::Option<AccountId>,
88    /// The state commitment whose inclusion the witness proves.
89    #[prost(message, optional, tag = "3")]
90    pub commitment: ::core::option::Option<super::primitives::Digest>,
91    /// The merkle path of the state commitment in the account tree.
92    #[prost(message, optional, tag = "4")]
93    pub path: ::core::option::Option<super::primitives::SparseMerklePath>,
94}