miden_node_proto/generated/
responses.rs

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