miden_node_proto/generated/
responses.rs

1// This file is @generated by prost-build.
2/// Represents the result of applying a block.
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct ApplyBlockResponse {}
5/// Represents the result of checking nullifiers.
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct CheckNullifiersResponse {
8    /// Each requested nullifier has its corresponding nullifier proof at the same position.
9    #[prost(message, repeated, tag = "1")]
10    pub proofs: ::prost::alloc::vec::Vec<super::smt::SmtOpening>,
11}
12/// Represents the result of checking nullifiers by prefix.
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct CheckNullifiersByPrefixResponse {
15    /// List of nullifiers matching the prefixes specified in the request.
16    #[prost(message, repeated, tag = "1")]
17    pub nullifiers: ::prost::alloc::vec::Vec<NullifierUpdate>,
18}
19/// Represents the result of getting a block header by block number.
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct GetBlockHeaderByNumberResponse {
22    /// The requested block header.
23    #[prost(message, optional, tag = "1")]
24    pub block_header: ::core::option::Option<super::block::BlockHeader>,
25    /// Merkle path to verify the block's inclusion in the MMR at the returned `chain_length`.
26    #[prost(message, optional, tag = "2")]
27    pub mmr_path: ::core::option::Option<super::merkle::MerklePath>,
28    /// Current chain length.
29    #[prost(fixed32, optional, tag = "3")]
30    pub chain_length: ::core::option::Option<u32>,
31}
32/// Represents a single nullifier update.
33#[derive(Clone, Copy, PartialEq, ::prost::Message)]
34pub struct NullifierUpdate {
35    /// Nullifier ID.
36    #[prost(message, optional, tag = "1")]
37    pub nullifier: ::core::option::Option<super::digest::Digest>,
38    /// Block number.
39    #[prost(fixed32, tag = "2")]
40    pub block_num: u32,
41}
42/// Represents the result of syncing state request.
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct SyncStateResponse {
45    /// Number of the latest block in the chain.
46    #[prost(fixed32, tag = "1")]
47    pub chain_tip: u32,
48    /// Block header of the block with the first note matching the specified criteria.
49    #[prost(message, optional, tag = "2")]
50    pub block_header: ::core::option::Option<super::block::BlockHeader>,
51    /// Data needed to update the partial MMR from `request.block_num + 1` to `response.block_header.block_num`.
52    #[prost(message, optional, tag = "3")]
53    pub mmr_delta: ::core::option::Option<super::mmr::MmrDelta>,
54    /// List of account hashes updated after `request.block_num + 1` but not after `response.block_header.block_num`.
55    #[prost(message, repeated, tag = "5")]
56    pub accounts: ::prost::alloc::vec::Vec<super::account::AccountSummary>,
57    /// List of transactions executed against requested accounts between `request.block_num + 1` and
58    /// `response.block_header.block_num`.
59    #[prost(message, repeated, tag = "6")]
60    pub transactions: ::prost::alloc::vec::Vec<super::transaction::TransactionSummary>,
61    /// List of all notes together with the Merkle paths from `response.block_header.note_root`.
62    #[prost(message, repeated, tag = "7")]
63    pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
64    /// List of nullifiers created between `request.block_num + 1` and `response.block_header.block_num`.
65    #[prost(message, repeated, tag = "8")]
66    pub nullifiers: ::prost::alloc::vec::Vec<NullifierUpdate>,
67}
68/// Represents the result of syncing notes request.
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct SyncNoteResponse {
71    /// Number of the latest block in the chain.
72    #[prost(fixed32, tag = "1")]
73    pub chain_tip: u32,
74    /// Block header of the block with the first note matching the specified criteria.
75    #[prost(message, optional, tag = "2")]
76    pub block_header: ::core::option::Option<super::block::BlockHeader>,
77    /// Merkle path to verify the block's inclusion in the MMR at the returned `chain_tip`.
78    ///
79    /// An MMR proof can be constructed for the leaf of index `block_header.block_num` of
80    /// an MMR of forest `chain_tip` with this path.
81    #[prost(message, optional, tag = "3")]
82    pub mmr_path: ::core::option::Option<super::merkle::MerklePath>,
83    /// List of all notes together with the Merkle paths from `response.block_header.note_root`.
84    #[prost(message, repeated, tag = "4")]
85    pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
86}
87/// An account returned as a response to the `GetBlockInputs`.
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct AccountBlockInputRecord {
90    /// The account ID.
91    #[prost(message, optional, tag = "1")]
92    pub account_id: ::core::option::Option<super::account::AccountId>,
93    /// The latest account hash, zero hash if the account doesn't exist.
94    #[prost(message, optional, tag = "2")]
95    pub account_hash: ::core::option::Option<super::digest::Digest>,
96    /// Merkle path to verify the account's inclusion in the MMR.
97    #[prost(message, optional, tag = "3")]
98    pub proof: ::core::option::Option<super::merkle::MerklePath>,
99}
100/// A nullifier returned as a response to the `GetBlockInputs`.
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct NullifierBlockInputRecord {
103    /// The nullifier ID.
104    #[prost(message, optional, tag = "1")]
105    pub nullifier: ::core::option::Option<super::digest::Digest>,
106    /// Merkle path to verify the nullifier's inclusion in the MMR.
107    #[prost(message, optional, tag = "2")]
108    pub opening: ::core::option::Option<super::smt::SmtOpening>,
109}
110/// Represents the result of getting block inputs.
111#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct GetBlockInputsResponse {
113    /// The latest block header.
114    #[prost(message, optional, tag = "1")]
115    pub block_header: ::core::option::Option<super::block::BlockHeader>,
116    /// Peaks of the above block's mmr, The `forest` value is equal to the block number.
117    #[prost(message, repeated, tag = "2")]
118    pub mmr_peaks: ::prost::alloc::vec::Vec<super::digest::Digest>,
119    /// The hashes of the requested accounts and their authentication paths.
120    #[prost(message, repeated, tag = "3")]
121    pub account_states: ::prost::alloc::vec::Vec<AccountBlockInputRecord>,
122    /// The requested nullifiers and their authentication paths.
123    #[prost(message, repeated, tag = "4")]
124    pub nullifiers: ::prost::alloc::vec::Vec<NullifierBlockInputRecord>,
125    /// The list of requested notes which were found in the database.
126    #[prost(message, optional, tag = "5")]
127    pub found_unauthenticated_notes: ::core::option::Option<
128        super::note::NoteAuthenticationInfo,
129    >,
130}
131/// An account returned as a response to the `GetTransactionInputs`.
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct AccountTransactionInputRecord {
134    /// The account ID.
135    #[prost(message, optional, tag = "1")]
136    pub account_id: ::core::option::Option<super::account::AccountId>,
137    /// The latest account hash, zero hash if the account doesn't exist.
138    #[prost(message, optional, tag = "2")]
139    pub account_hash: ::core::option::Option<super::digest::Digest>,
140}
141/// A nullifier returned as a response to the `GetTransactionInputs`.
142#[derive(Clone, Copy, PartialEq, ::prost::Message)]
143pub struct NullifierTransactionInputRecord {
144    /// The nullifier ID.
145    #[prost(message, optional, tag = "1")]
146    pub nullifier: ::core::option::Option<super::digest::Digest>,
147    /// The block at which the nullifier has been consumed, zero if not consumed.
148    #[prost(fixed32, tag = "2")]
149    pub block_num: u32,
150}
151/// Represents the result of getting transaction inputs.
152#[derive(Clone, PartialEq, ::prost::Message)]
153pub struct GetTransactionInputsResponse {
154    /// Account state proof.
155    #[prost(message, optional, tag = "1")]
156    pub account_state: ::core::option::Option<AccountTransactionInputRecord>,
157    /// List of nullifiers that have been consumed.
158    #[prost(message, repeated, tag = "2")]
159    pub nullifiers: ::prost::alloc::vec::Vec<NullifierTransactionInputRecord>,
160    /// List of unauthenticated notes that were not found in the database.
161    #[prost(message, repeated, tag = "3")]
162    pub found_unauthenticated_notes: ::prost::alloc::vec::Vec<super::digest::Digest>,
163    /// The node's current block height.
164    #[prost(fixed32, tag = "4")]
165    pub block_height: u32,
166}
167/// Represents the result of submitting proven transaction.
168#[derive(Clone, Copy, PartialEq, ::prost::Message)]
169pub struct SubmitProvenTransactionResponse {
170    /// The node's current block height.
171    #[prost(fixed32, tag = "1")]
172    pub block_height: u32,
173}
174/// Represents the result of getting notes by IDs.
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct GetNotesByIdResponse {
177    /// Lists Note's returned by the database.
178    #[prost(message, repeated, tag = "1")]
179    pub notes: ::prost::alloc::vec::Vec<super::note::Note>,
180}
181/// Represents the result of getting note authentication info.
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct GetNoteAuthenticationInfoResponse {
184    /// Proofs of note inclusions in blocks and block inclusions in chain.
185    #[prost(message, optional, tag = "1")]
186    pub proofs: ::core::option::Option<super::note::NoteAuthenticationInfo>,
187}
188/// Represents the result of getting account details.
189#[derive(Clone, PartialEq, ::prost::Message)]
190pub struct GetAccountDetailsResponse {
191    /// Account info (with details for public accounts).
192    #[prost(message, optional, tag = "1")]
193    pub details: ::core::option::Option<super::account::AccountInfo>,
194}
195/// Represents the result of getting block by number.
196#[derive(Clone, PartialEq, ::prost::Message)]
197pub struct GetBlockByNumberResponse {
198    /// The requested block data encoded using \[winter_utils::Serializable\] implementation for
199    /// \[miden_objects::block::Block\].
200    #[prost(bytes = "vec", optional, tag = "1")]
201    pub block: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
202}
203/// Represents the result of getting account state delta.
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct GetAccountStateDeltaResponse {
206    /// The calculated account delta encoded using \[winter_utils::Serializable\] implementation
207    /// for \[miden_objects::account::delta::AccountDelta\].
208    #[prost(bytes = "vec", optional, tag = "1")]
209    pub delta: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
210}
211/// Represents the result of getting account proofs.
212#[derive(Clone, PartialEq, ::prost::Message)]
213pub struct GetAccountProofsResponse {
214    /// Block number at which the state of the account was returned.
215    #[prost(fixed32, tag = "1")]
216    pub block_num: u32,
217    /// List of account state infos for the requested account keys.
218    #[prost(message, repeated, tag = "2")]
219    pub account_proofs: ::prost::alloc::vec::Vec<AccountProofsResponse>,
220}
221/// A single account proof returned as a response to the `GetAccountProofs`.
222#[derive(Clone, PartialEq, ::prost::Message)]
223pub struct AccountProofsResponse {
224    /// Account ID.
225    #[prost(message, optional, tag = "1")]
226    pub account_id: ::core::option::Option<super::account::AccountId>,
227    /// Account hash.
228    #[prost(message, optional, tag = "2")]
229    pub account_hash: ::core::option::Option<super::digest::Digest>,
230    /// Authentication path from the `account_root` of the block header to the account.
231    #[prost(message, optional, tag = "3")]
232    pub account_proof: ::core::option::Option<super::merkle::MerklePath>,
233    /// State header for public accounts. Filled only if `include_headers` flag is set to `true`.
234    #[prost(message, optional, tag = "4")]
235    pub state_header: ::core::option::Option<AccountStateHeader>,
236}
237/// State header for public accounts.
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct AccountStateHeader {
240    /// Account header.
241    #[prost(message, optional, tag = "1")]
242    pub header: ::core::option::Option<super::account::AccountHeader>,
243    /// Values of all account storage slots (max 255).
244    #[prost(bytes = "vec", tag = "2")]
245    pub storage_header: ::prost::alloc::vec::Vec<u8>,
246    /// Account code, returned only when none of the request's code commitments match
247    /// the current one.
248    #[prost(bytes = "vec", optional, tag = "3")]
249    pub account_code: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
250    /// Storage slots information for this account
251    #[prost(message, repeated, tag = "4")]
252    pub storage_maps: ::prost::alloc::vec::Vec<StorageSlotMapProof>,
253}
254/// Represents a single storage slot with the reuqested keys and their respective values.
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct StorageSlotMapProof {
257    /// The storage slot index (\[0..255\]).
258    #[prost(uint32, tag = "1")]
259    pub storage_slot: u32,
260    /// Merkle proof of the map value
261    #[prost(bytes = "vec", tag = "2")]
262    pub smt_proof: ::prost::alloc::vec::Vec<u8>,
263}