miden_node_proto/generated/requests.rs
1// This file is @generated by prost-build.
2/// Applies changes of a new block to the DB and in-memory data structures.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct ApplyBlockRequest {
5 /// Block data encoded using \[winter_utils::Serializable\] implementation for
6 /// \[miden_objects::block::Block\].
7 #[prost(bytes = "vec", tag = "1")]
8 pub block: ::prost::alloc::vec::Vec<u8>,
9}
10/// Returns a list of nullifiers that match the specified prefixes and are recorded in the node.
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct CheckNullifiersByPrefixRequest {
13 /// Number of bits used for nullifier prefix. Currently the only supported value is 16.
14 #[prost(uint32, tag = "1")]
15 pub prefix_len: u32,
16 /// List of nullifiers to check. Each nullifier is specified by its prefix with length equal
17 /// to `prefix_len`.
18 #[prost(uint32, repeated, tag = "2")]
19 pub nullifiers: ::prost::alloc::vec::Vec<u32>,
20}
21/// Returns a nullifier proof for each of the requested nullifiers.
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct CheckNullifiersRequest {
24 /// List of nullifiers to return proofs for.
25 #[prost(message, repeated, tag = "1")]
26 pub nullifiers: ::prost::alloc::vec::Vec<super::digest::Digest>,
27}
28/// Returns the block header corresponding to the requested block number, as well as the merkle
29/// path and current forest which validate the block's inclusion in the chain.
30///
31/// The Merkle path is an MMR proof for the block's leaf, based on the current chain length.
32#[derive(Clone, Copy, PartialEq, ::prost::Message)]
33pub struct GetBlockHeaderByNumberRequest {
34 /// The target block height, defaults to latest if not provided.
35 #[prost(uint32, optional, tag = "1")]
36 pub block_num: ::core::option::Option<u32>,
37 /// Whether or not to return authentication data for the block header.
38 #[prost(bool, optional, tag = "2")]
39 pub include_mmr_proof: ::core::option::Option<bool>,
40}
41/// State synchronization request.
42///
43/// Specifies state updates the client is interested in. The server will return the first block which
44/// contains a note matching `note_tags` or the chain tip. And the corresponding updates to
45/// `nullifiers` and `account_ids` for that block range.
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct SyncStateRequest {
48 /// Last block known by the client. The response will contain data starting from the next block,
49 /// until the first block which contains a note of matching the requested tag, or the chain tip
50 /// if there are no notes.
51 #[prost(fixed32, tag = "1")]
52 pub block_num: u32,
53 /// Accounts' hash to include in the response.
54 ///
55 /// An account hash will be included if-and-only-if it is the latest update. Meaning it is
56 /// possible there was an update to the account for the given range, but if it is not the latest,
57 /// it won't be included in the response.
58 #[prost(message, repeated, tag = "2")]
59 pub account_ids: ::prost::alloc::vec::Vec<super::account::AccountId>,
60 /// Specifies the tags which the client is interested in.
61 #[prost(fixed32, repeated, tag = "3")]
62 pub note_tags: ::prost::alloc::vec::Vec<u32>,
63 /// Determines the nullifiers the client is interested in by specifying the 16high bits of the
64 /// target nullifier.
65 #[prost(uint32, repeated, tag = "4")]
66 pub nullifiers: ::prost::alloc::vec::Vec<u32>,
67}
68/// Note synchronization request.
69///
70/// Specifies note tags that client is interested in. The server will return the first block which
71/// contains a note matching `note_tags` or the chain tip.
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct SyncNoteRequest {
74 /// Last block known by the client. The response will contain data starting from the next block,
75 /// until the first block which contains a note of matching the requested tag.
76 #[prost(fixed32, tag = "1")]
77 pub block_num: u32,
78 /// Specifies the tags which the client is interested in.
79 #[prost(fixed32, repeated, tag = "2")]
80 pub note_tags: ::prost::alloc::vec::Vec<u32>,
81}
82/// Returns data required to prove the next block.
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct GetBlockInputsRequest {
85 /// ID of the account against which a transaction is executed.
86 #[prost(message, repeated, tag = "1")]
87 pub account_ids: ::prost::alloc::vec::Vec<super::account::AccountId>,
88 /// Set of nullifiers consumed by this transaction.
89 #[prost(message, repeated, tag = "2")]
90 pub nullifiers: ::prost::alloc::vec::Vec<super::digest::Digest>,
91 /// Array of note IDs to be checked for existence in the database.
92 #[prost(message, repeated, tag = "3")]
93 pub unauthenticated_notes: ::prost::alloc::vec::Vec<super::digest::Digest>,
94}
95/// Returns data required to validate a new transaction.
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct GetTransactionInputsRequest {
98 /// ID of the account against which a transaction is executed.
99 #[prost(message, optional, tag = "1")]
100 pub account_id: ::core::option::Option<super::account::AccountId>,
101 /// Set of nullifiers consumed by this transaction.
102 #[prost(message, repeated, tag = "2")]
103 pub nullifiers: ::prost::alloc::vec::Vec<super::digest::Digest>,
104 /// Set of unauthenticated notes to check for existence on-chain.
105 ///
106 /// These are notes which were not on-chain at the state the transaction was proven,
107 /// but could by now be present.
108 #[prost(message, repeated, tag = "3")]
109 pub unauthenticated_notes: ::prost::alloc::vec::Vec<super::digest::Digest>,
110}
111/// Submits proven transaction to the Miden network.
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct SubmitProvenTransactionRequest {
114 /// Transaction encoded using \[winter_utils::Serializable\] implementation for
115 /// \[miden_objects::transaction::proven_tx::ProvenTransaction\].
116 #[prost(bytes = "vec", tag = "1")]
117 pub transaction: ::prost::alloc::vec::Vec<u8>,
118}
119/// Returns a list of notes matching the provided note IDs.
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct GetNotesByIdRequest {
122 /// List of notes to be queried from the database.
123 #[prost(message, repeated, tag = "1")]
124 pub note_ids: ::prost::alloc::vec::Vec<super::digest::Digest>,
125}
126/// Returns a list of Note inclusion proofs for the specified Note IDs.
127#[derive(Clone, PartialEq, ::prost::Message)]
128pub struct GetNoteAuthenticationInfoRequest {
129 /// List of notes to be queried from the database.
130 #[prost(message, repeated, tag = "1")]
131 pub note_ids: ::prost::alloc::vec::Vec<super::digest::Digest>,
132}
133/// Returns the latest state of an account with the specified ID.
134#[derive(Clone, PartialEq, ::prost::Message)]
135pub struct GetAccountDetailsRequest {
136 /// Account ID to get details.
137 #[prost(message, optional, tag = "1")]
138 pub account_id: ::core::option::Option<super::account::AccountId>,
139}
140/// Retrieves block data by given block number.
141#[derive(Clone, Copy, PartialEq, ::prost::Message)]
142pub struct GetBlockByNumberRequest {
143 /// The block number of the target block.
144 #[prost(fixed32, tag = "1")]
145 pub block_num: u32,
146}
147/// Returns delta of the account states in the range from `from_block_num` (exclusive) to
148/// `to_block_num` (inclusive).
149#[derive(Clone, PartialEq, ::prost::Message)]
150pub struct GetAccountStateDeltaRequest {
151 /// ID of the account for which the delta is requested.
152 #[prost(message, optional, tag = "1")]
153 pub account_id: ::core::option::Option<super::account::AccountId>,
154 /// Block number from which the delta is requested (exclusive).
155 #[prost(fixed32, tag = "2")]
156 pub from_block_num: u32,
157 /// Block number up to which the delta is requested (inclusive).
158 #[prost(fixed32, tag = "3")]
159 pub to_block_num: u32,
160}
161/// Returns the latest state proofs of the specified accounts.
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct GetAccountProofsRequest {
164 /// A list of account requests, including map keys + values.
165 #[prost(message, repeated, tag = "1")]
166 pub account_requests: ::prost::alloc::vec::Vec<
167 get_account_proofs_request::AccountRequest,
168 >,
169 /// Optional flag to include account headers and account code in the response. If false, storage
170 /// requests are also ignored. False by default.
171 #[prost(bool, optional, tag = "2")]
172 pub include_headers: ::core::option::Option<bool>,
173 /// Account code commitments corresponding to the last-known `AccountCode` for requested
174 /// accounts. Responses will include only the ones that are not known to the caller.
175 /// These are not associated with a specific account but rather, they will be matched against
176 /// all requested accounts.
177 #[prost(message, repeated, tag = "3")]
178 pub code_commitments: ::prost::alloc::vec::Vec<super::digest::Digest>,
179}
180/// Nested message and enum types in `GetAccountProofsRequest`.
181pub mod get_account_proofs_request {
182 /// Represents per-account requests where each account ID has its own list of
183 /// (storage_slot_index, map_keys) pairs.
184 #[derive(Clone, PartialEq, ::prost::Message)]
185 pub struct AccountRequest {
186 /// The account ID for this request.
187 #[prost(message, optional, tag = "1")]
188 pub account_id: ::core::option::Option<super::super::account::AccountId>,
189 /// List of storage requests for this account.
190 #[prost(message, repeated, tag = "2")]
191 pub storage_requests: ::prost::alloc::vec::Vec<StorageRequest>,
192 }
193 /// Represents a storage slot index and the associated map keys.
194 #[derive(Clone, PartialEq, ::prost::Message)]
195 pub struct StorageRequest {
196 /// Storage slot index (\[0..255\])
197 #[prost(uint32, tag = "1")]
198 pub storage_slot_index: u32,
199 /// A list of map keys (Digests) associated with this storage slot.
200 #[prost(message, repeated, tag = "2")]
201 pub map_keys: ::prost::alloc::vec::Vec<super::super::digest::Digest>,
202 }
203}