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 commitments 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}
65/// Represents the result of syncing notes request.
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct SyncNoteResponse {
68    /// Number of the latest block in the chain.
69    #[prost(fixed32, tag = "1")]
70    pub chain_tip: u32,
71    /// Block header of the block with the first note matching the specified criteria.
72    #[prost(message, optional, tag = "2")]
73    pub block_header: ::core::option::Option<super::block::BlockHeader>,
74    /// Merkle path to verify the block's inclusion in the MMR at the returned `chain_tip`.
75    ///
76    /// An MMR proof can be constructed for the leaf of index `block_header.block_num` of
77    /// an MMR of forest `chain_tip` with this path.
78    #[prost(message, optional, tag = "3")]
79    pub mmr_path: ::core::option::Option<super::merkle::MerklePath>,
80    /// List of all notes together with the Merkle paths from `response.block_header.note_root`.
81    #[prost(message, repeated, tag = "4")]
82    pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
83}
84/// An account returned as a response to the `GetBlockInputs`.
85#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct AccountWitness {
87    /// The account ID.
88    #[prost(message, optional, tag = "1")]
89    pub account_id: ::core::option::Option<super::account::AccountId>,
90    /// The latest account state commitment used as the initial state of the requested block.
91    /// This will be the zero digest if the account doesn't exist.
92    #[prost(message, optional, tag = "2")]
93    pub initial_state_commitment: ::core::option::Option<super::digest::Digest>,
94    /// Merkle path to verify the account's inclusion in the account tree.
95    #[prost(message, optional, tag = "3")]
96    pub proof: ::core::option::Option<super::merkle::MerklePath>,
97}
98/// A nullifier returned as a response to the `GetBlockInputs`.
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct NullifierWitness {
101    /// The nullifier.
102    #[prost(message, optional, tag = "1")]
103    pub nullifier: ::core::option::Option<super::digest::Digest>,
104    /// The SMT proof to verify the nullifier's inclusion in the nullifier tree.
105    #[prost(message, optional, tag = "2")]
106    pub opening: ::core::option::Option<super::smt::SmtOpening>,
107}
108/// Represents the result of getting block inputs.
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct GetBlockInputsResponse {
111    /// The latest block header.
112    #[prost(message, optional, tag = "1")]
113    pub latest_block_header: ::core::option::Option<super::block::BlockHeader>,
114    /// Proof of each requested unauthenticated note's inclusion in a block, **if it existed in
115    /// the store**.
116    #[prost(message, repeated, tag = "2")]
117    pub unauthenticated_note_proofs: ::prost::alloc::vec::Vec<
118        super::note::NoteInclusionInBlockProof,
119    >,
120    /// The serialized chain MMR which includes proofs for all blocks referenced by the
121    /// above note inclusion proofs as well as proofs for inclusion of the requested blocks
122    /// referenced by the batches in the block.
123    #[prost(bytes = "vec", tag = "3")]
124    pub chain_mmr: ::prost::alloc::vec::Vec<u8>,
125    /// The state commitments of the requested accounts and their authentication paths.
126    #[prost(message, repeated, tag = "4")]
127    pub account_witnesses: ::prost::alloc::vec::Vec<AccountWitness>,
128    /// The requested nullifiers and their authentication paths.
129    #[prost(message, repeated, tag = "5")]
130    pub nullifier_witnesses: ::prost::alloc::vec::Vec<NullifierWitness>,
131}
132/// Represents the result of getting batch inputs.
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct GetBatchInputsResponse {
135    /// The block header that the transaction batch should reference.
136    #[prost(message, optional, tag = "1")]
137    pub batch_reference_block_header: ::core::option::Option<super::block::BlockHeader>,
138    /// Proof of each _found_ unauthenticated note's inclusion in a block.
139    #[prost(message, repeated, tag = "2")]
140    pub note_proofs: ::prost::alloc::vec::Vec<super::note::NoteInclusionInBlockProof>,
141    /// The serialized chain MMR which includes proofs for all blocks referenced by the
142    /// above note inclusion proofs as well as proofs for inclusion of the blocks referenced
143    /// by the transactions in the batch.
144    #[prost(bytes = "vec", tag = "3")]
145    pub chain_mmr: ::prost::alloc::vec::Vec<u8>,
146}
147/// An account returned as a response to the `GetTransactionInputs`.
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct AccountTransactionInputRecord {
150    /// The account ID.
151    #[prost(message, optional, tag = "1")]
152    pub account_id: ::core::option::Option<super::account::AccountId>,
153    /// The latest account commitment, zero commitment if the account doesn't exist.
154    #[prost(message, optional, tag = "2")]
155    pub account_commitment: ::core::option::Option<super::digest::Digest>,
156}
157/// A nullifier returned as a response to the `GetTransactionInputs`.
158#[derive(Clone, Copy, PartialEq, ::prost::Message)]
159pub struct NullifierTransactionInputRecord {
160    /// The nullifier ID.
161    #[prost(message, optional, tag = "1")]
162    pub nullifier: ::core::option::Option<super::digest::Digest>,
163    /// The block at which the nullifier has been consumed, zero if not consumed.
164    #[prost(fixed32, tag = "2")]
165    pub block_num: u32,
166}
167/// Represents the result of getting transaction inputs.
168#[derive(Clone, PartialEq, ::prost::Message)]
169pub struct GetTransactionInputsResponse {
170    /// Account state proof.
171    #[prost(message, optional, tag = "1")]
172    pub account_state: ::core::option::Option<AccountTransactionInputRecord>,
173    /// List of nullifiers that have been consumed.
174    #[prost(message, repeated, tag = "2")]
175    pub nullifiers: ::prost::alloc::vec::Vec<NullifierTransactionInputRecord>,
176    /// List of unauthenticated notes that were not found in the database.
177    #[prost(message, repeated, tag = "3")]
178    pub found_unauthenticated_notes: ::prost::alloc::vec::Vec<super::digest::Digest>,
179    /// The node's current block height.
180    #[prost(fixed32, tag = "4")]
181    pub block_height: u32,
182}
183/// Represents the result of submitting proven transaction.
184#[derive(Clone, Copy, PartialEq, ::prost::Message)]
185pub struct SubmitProvenTransactionResponse {
186    /// The node's current block height.
187    #[prost(fixed32, tag = "1")]
188    pub block_height: u32,
189}
190/// Represents the result of getting notes by IDs.
191#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct GetNotesByIdResponse {
193    /// Lists Note's returned by the database.
194    #[prost(message, repeated, tag = "1")]
195    pub notes: ::prost::alloc::vec::Vec<super::note::Note>,
196}
197/// Represents the result of getting account details.
198#[derive(Clone, PartialEq, ::prost::Message)]
199pub struct GetAccountDetailsResponse {
200    /// Account info (with details for public accounts).
201    #[prost(message, optional, tag = "1")]
202    pub details: ::core::option::Option<super::account::AccountInfo>,
203}
204/// Represents the result of getting block by number.
205#[derive(Clone, PartialEq, ::prost::Message)]
206pub struct GetBlockByNumberResponse {
207    /// The requested block data encoded using \[winter_utils::Serializable\] implementation for
208    /// \[miden_objects::block::Block\].
209    #[prost(bytes = "vec", optional, tag = "1")]
210    pub block: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
211}
212/// Represents the result of getting account state delta.
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct GetAccountStateDeltaResponse {
215    /// The calculated account delta encoded using \[winter_utils::Serializable\] implementation
216    /// for \[miden_objects::account::delta::AccountDelta\].
217    #[prost(bytes = "vec", optional, tag = "1")]
218    pub delta: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
219}
220/// Represents the result of getting account proofs.
221#[derive(Clone, PartialEq, ::prost::Message)]
222pub struct GetAccountProofsResponse {
223    /// Block number at which the state of the account was returned.
224    #[prost(fixed32, tag = "1")]
225    pub block_num: u32,
226    /// List of account state infos for the requested account keys.
227    #[prost(message, repeated, tag = "2")]
228    pub account_proofs: ::prost::alloc::vec::Vec<AccountProofsResponse>,
229}
230/// A single account proof returned as a response to the `GetAccountProofs`.
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct AccountProofsResponse {
233    /// Account ID.
234    #[prost(message, optional, tag = "1")]
235    pub account_id: ::core::option::Option<super::account::AccountId>,
236    /// Account commitment.
237    #[prost(message, optional, tag = "2")]
238    pub account_commitment: ::core::option::Option<super::digest::Digest>,
239    /// Authentication path from the `account_root` of the block header to the account.
240    #[prost(message, optional, tag = "3")]
241    pub account_proof: ::core::option::Option<super::merkle::MerklePath>,
242    /// State header for public accounts. Filled only if `include_headers` flag is set to `true`.
243    #[prost(message, optional, tag = "4")]
244    pub state_header: ::core::option::Option<AccountStateHeader>,
245}
246/// State header for public accounts.
247#[derive(Clone, PartialEq, ::prost::Message)]
248pub struct AccountStateHeader {
249    /// Account header.
250    #[prost(message, optional, tag = "1")]
251    pub header: ::core::option::Option<super::account::AccountHeader>,
252    /// Values of all account storage slots (max 255).
253    #[prost(bytes = "vec", tag = "2")]
254    pub storage_header: ::prost::alloc::vec::Vec<u8>,
255    /// Account code, returned only when none of the request's code commitments match
256    /// the current one.
257    #[prost(bytes = "vec", optional, tag = "3")]
258    pub account_code: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
259    /// Storage slots information for this account
260    #[prost(message, repeated, tag = "4")]
261    pub storage_maps: ::prost::alloc::vec::Vec<StorageSlotMapProof>,
262}
263/// Represents a single storage slot with the reuqested keys and their respective values.
264#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct StorageSlotMapProof {
266    /// The storage slot index (\[0..255\]).
267    #[prost(uint32, tag = "1")]
268    pub storage_slot: u32,
269    /// Merkle proof of the map value
270    #[prost(bytes = "vec", tag = "2")]
271    pub smt_proof: ::prost::alloc::vec::Vec<u8>,
272}