miden_node_proto/generated/
rpc_store.rs

1// This file is @generated by prost-build.
2/// Represents the status of the store.
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct StoreStatus {
5    /// The store's running version.
6    #[prost(string, tag = "1")]
7    pub version: ::prost::alloc::string::String,
8    /// The store's status.
9    #[prost(string, tag = "2")]
10    pub status: ::prost::alloc::string::String,
11    /// Number of the latest block in the chain.
12    #[prost(fixed32, tag = "3")]
13    pub chain_tip: u32,
14}
15/// Returns the latest state proof of the specified account.
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct AccountProofRequest {
18    /// ID of the account for which we want to get data
19    #[prost(message, optional, tag = "1")]
20    pub account_id: ::core::option::Option<super::account::AccountId>,
21    /// Block at which we'd like to get this data. If present, must be close to the chain tip.
22    /// If not present, data from the latest block will be returned.
23    #[prost(message, optional, tag = "2")]
24    pub block_num: ::core::option::Option<super::blockchain::BlockNumber>,
25    /// Request for additional account details; valid only for public accounts.
26    #[prost(message, optional, tag = "3")]
27    pub details: ::core::option::Option<account_proof_request::AccountDetailRequest>,
28}
29/// Nested message and enum types in `AccountProofRequest`.
30pub mod account_proof_request {
31    /// Request the details for a public account.
32    #[derive(Clone, PartialEq, ::prost::Message)]
33    pub struct AccountDetailRequest {
34        /// Last known code commitment to the requester. The response will include account code
35        /// only if its commitment is different from this value.
36        ///
37        /// If the field is ommiteed, the response will not include the account code.
38        #[prost(message, optional, tag = "1")]
39        pub code_commitment: ::core::option::Option<super::super::primitives::Digest>,
40        /// Last known asset vault commitment to the requester. The response will include asset vault data
41        /// only if its commitment is different from this value. If the value is not present in the
42        /// request, the response will not contain one either.
43        /// If the number of to-be-returned asset entries exceed a threshold, they have to be requested
44        /// separately, which is signaled in the response message with dedicated flag.
45        #[prost(message, optional, tag = "2")]
46        pub asset_vault_commitment: ::core::option::Option<
47            super::super::primitives::Digest,
48        >,
49        /// Additional request per storage map.
50        #[prost(message, repeated, tag = "3")]
51        pub storage_maps: ::prost::alloc::vec::Vec<
52            account_detail_request::StorageMapDetailRequest,
53        >,
54    }
55    /// Nested message and enum types in `AccountDetailRequest`.
56    pub mod account_detail_request {
57        /// Represents a storage slot index and the associated map keys.
58        #[derive(Clone, PartialEq, ::prost::Message)]
59        pub struct StorageMapDetailRequest {
60            /// Storage slot index (`\[0..255\]`).
61            #[prost(uint32, tag = "1")]
62            pub slot_index: u32,
63            #[prost(oneof = "storage_map_detail_request::SlotData", tags = "2, 3")]
64            pub slot_data: ::core::option::Option<storage_map_detail_request::SlotData>,
65        }
66        /// Nested message and enum types in `StorageMapDetailRequest`.
67        pub mod storage_map_detail_request {
68            /// Indirection required for use in `oneof {..}` block.
69            #[derive(Clone, PartialEq, ::prost::Message)]
70            pub struct MapKeys {
71                /// A list of map keys associated with this storage slot.
72                #[prost(message, repeated, tag = "1")]
73                pub map_keys: ::prost::alloc::vec::Vec<
74                    super::super::super::super::primitives::Digest,
75                >,
76            }
77            #[derive(Clone, PartialEq, ::prost::Oneof)]
78            pub enum SlotData {
79                /// Request to return all storage map data. If the number exceeds a threshold of 1000 entries,
80                /// the response will not contain them but must be requested separately.
81                #[prost(bool, tag = "2")]
82                AllEntries(bool),
83                /// A list of map keys associated with the given storage slot identified by `slot_index`.
84                #[prost(message, tag = "3")]
85                MapKeys(MapKeys),
86            }
87        }
88    }
89}
90/// Represents the result of getting account proof.
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct AccountProofResponse {
93    /// The block number at which the account witness was created and the account details were observed.
94    #[prost(message, optional, tag = "1")]
95    pub block_num: ::core::option::Option<super::blockchain::BlockNumber>,
96    /// Account ID, current state commitment, and SMT path.
97    #[prost(message, optional, tag = "2")]
98    pub witness: ::core::option::Option<super::account::AccountWitness>,
99    /// Additional details for public accounts.
100    #[prost(message, optional, tag = "3")]
101    pub details: ::core::option::Option<account_proof_response::AccountDetails>,
102}
103/// Nested message and enum types in `AccountProofResponse`.
104pub mod account_proof_response {
105    #[derive(Clone, PartialEq, ::prost::Message)]
106    pub struct AccountDetails {
107        /// Account header.
108        #[prost(message, optional, tag = "1")]
109        pub header: ::core::option::Option<super::super::account::AccountHeader>,
110        /// Account storage data
111        #[prost(message, optional, tag = "2")]
112        pub storage_details: ::core::option::Option<super::AccountStorageDetails>,
113        /// Account code; empty if code commitments matched or none was requested.
114        #[prost(bytes = "vec", optional, tag = "3")]
115        pub code: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
116        /// Account asset vault data; empty if vault commitments matched or the requester
117        /// omitted it in the request.
118        #[prost(message, optional, tag = "4")]
119        pub vault_details: ::core::option::Option<super::AccountVaultDetails>,
120    }
121}
122/// Account vault details for AccountProofResponse
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct AccountVaultDetails {
125    /// A flag that is set to true if the account contains too many assets. This indicates
126    /// to the user that `SyncAccountVault` endpoint should be used to retrieve the
127    /// account's assets
128    #[prost(bool, tag = "1")]
129    pub too_many_assets: bool,
130    /// When too_many_assets == false, this will contain the list of assets in the
131    /// account's vault
132    #[prost(message, repeated, tag = "2")]
133    pub assets: ::prost::alloc::vec::Vec<super::primitives::Asset>,
134}
135/// Account storage details for AccountProofResponse
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct AccountStorageDetails {
138    /// Account storage header (storage slot info for up to 256 slots)
139    #[prost(message, optional, tag = "1")]
140    pub header: ::core::option::Option<super::account::AccountStorageHeader>,
141    /// Additional data for the requested storage maps
142    #[prost(message, repeated, tag = "2")]
143    pub map_details: ::prost::alloc::vec::Vec<
144        account_storage_details::AccountStorageMapDetails,
145    >,
146}
147/// Nested message and enum types in `AccountStorageDetails`.
148pub mod account_storage_details {
149    #[derive(Clone, PartialEq, ::prost::Message)]
150    pub struct AccountStorageMapDetails {
151        /// slot index of the storage map
152        #[prost(uint32, tag = "1")]
153        pub slot_index: u32,
154        /// A flag that is set to `true` if the number of to-be-returned entries in the
155        /// storage map would exceed a threshold. This indicates to the user that `SyncStorageMaps`
156        /// endpoint should be used to get all storage map data.
157        #[prost(bool, tag = "2")]
158        pub too_many_entries: bool,
159        /// By default we provide all storage entries.
160        #[prost(message, optional, tag = "3")]
161        pub entries: ::core::option::Option<account_storage_map_details::MapEntries>,
162    }
163    /// Nested message and enum types in `AccountStorageMapDetails`.
164    pub mod account_storage_map_details {
165        /// Wrapper for repeated storage map entries
166        #[derive(Clone, PartialEq, ::prost::Message)]
167        pub struct MapEntries {
168            #[prost(message, repeated, tag = "1")]
169            pub entries: ::prost::alloc::vec::Vec<map_entries::StorageMapEntry>,
170        }
171        /// Nested message and enum types in `MapEntries`.
172        pub mod map_entries {
173            /// Definition of individual storage entries.
174            #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
175            pub struct StorageMapEntry {
176                #[prost(message, optional, tag = "1")]
177                pub key: ::core::option::Option<
178                    super::super::super::super::primitives::Digest,
179                >,
180                #[prost(message, optional, tag = "2")]
181                pub value: ::core::option::Option<
182                    super::super::super::super::primitives::Digest,
183                >,
184            }
185        }
186    }
187}
188/// List of nullifiers to return proofs for.
189#[derive(Clone, PartialEq, ::prost::Message)]
190pub struct NullifierList {
191    /// List of nullifiers to return proofs for.
192    #[prost(message, repeated, tag = "1")]
193    pub nullifiers: ::prost::alloc::vec::Vec<super::primitives::Digest>,
194}
195/// Represents the result of checking nullifiers.
196#[derive(Clone, PartialEq, ::prost::Message)]
197pub struct CheckNullifiersResponse {
198    /// Each requested nullifier has its corresponding nullifier proof at the same position.
199    #[prost(message, repeated, tag = "1")]
200    pub proofs: ::prost::alloc::vec::Vec<super::primitives::SmtOpening>,
201}
202/// Returns a list of nullifiers that match the specified prefixes and are recorded in the node.
203#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
204pub struct SyncNullifiersRequest {
205    /// Block number from which the nullifiers are requested (inclusive).
206    #[prost(message, optional, tag = "1")]
207    pub block_range: ::core::option::Option<BlockRange>,
208    /// Number of bits used for nullifier prefix. Currently the only supported value is 16.
209    #[prost(uint32, tag = "2")]
210    pub prefix_len: u32,
211    /// List of nullifiers to check. Each nullifier is specified by its prefix with length equal
212    /// to `prefix_len`.
213    #[prost(uint32, repeated, tag = "3")]
214    pub nullifiers: ::prost::alloc::vec::Vec<u32>,
215}
216/// Represents the result of syncing nullifiers.
217#[derive(Clone, PartialEq, ::prost::Message)]
218pub struct SyncNullifiersResponse {
219    /// Pagination information.
220    #[prost(message, optional, tag = "1")]
221    pub pagination_info: ::core::option::Option<PaginationInfo>,
222    /// List of nullifiers matching the prefixes specified in the request.
223    #[prost(message, repeated, tag = "2")]
224    pub nullifiers: ::prost::alloc::vec::Vec<sync_nullifiers_response::NullifierUpdate>,
225}
226/// Nested message and enum types in `SyncNullifiersResponse`.
227pub mod sync_nullifiers_response {
228    /// Represents a single nullifier update.
229    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
230    pub struct NullifierUpdate {
231        /// Nullifier ID.
232        #[prost(message, optional, tag = "1")]
233        pub nullifier: ::core::option::Option<super::super::primitives::Digest>,
234        /// Block number.
235        #[prost(fixed32, tag = "2")]
236        pub block_num: u32,
237    }
238}
239/// State synchronization request.
240///
241/// Specifies state updates the requester is interested in. The server will return the first block which
242/// contains a note matching `note_tags` or the chain tip. And the corresponding updates to
243/// `account_ids` for that block range.
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct SyncStateRequest {
246    /// Last block known by the requester. The response will contain data starting from the next block,
247    /// until the first block which contains a note of matching the requested tag, or the chain tip
248    /// if there are no notes.
249    #[prost(fixed32, tag = "1")]
250    pub block_num: u32,
251    /// Accounts' commitment to include in the response.
252    ///
253    /// An account commitment will be included if-and-only-if it is the latest update. Meaning it is
254    /// possible there was an update to the account for the given range, but if it is not the latest,
255    /// it won't be included in the response.
256    #[prost(message, repeated, tag = "2")]
257    pub account_ids: ::prost::alloc::vec::Vec<super::account::AccountId>,
258    /// Specifies the tags which the requester is interested in.
259    #[prost(fixed32, repeated, tag = "3")]
260    pub note_tags: ::prost::alloc::vec::Vec<u32>,
261}
262/// Represents the result of syncing state request.
263#[derive(Clone, PartialEq, ::prost::Message)]
264pub struct SyncStateResponse {
265    /// Number of the latest block in the chain.
266    #[prost(fixed32, tag = "1")]
267    pub chain_tip: u32,
268    /// Block header of the block with the first note matching the specified criteria.
269    #[prost(message, optional, tag = "2")]
270    pub block_header: ::core::option::Option<super::blockchain::BlockHeader>,
271    /// Data needed to update the partial MMR from `request.block_num + 1` to `response.block_header.block_num`.
272    #[prost(message, optional, tag = "3")]
273    pub mmr_delta: ::core::option::Option<super::primitives::MmrDelta>,
274    /// List of account commitments updated after `request.block_num + 1` but not after `response.block_header.block_num`.
275    #[prost(message, repeated, tag = "5")]
276    pub accounts: ::prost::alloc::vec::Vec<super::account::AccountSummary>,
277    /// List of transactions executed against requested accounts between `request.block_num + 1` and
278    /// `response.block_header.block_num`.
279    #[prost(message, repeated, tag = "6")]
280    pub transactions: ::prost::alloc::vec::Vec<super::transaction::TransactionSummary>,
281    /// List of all notes together with the Merkle paths from `response.block_header.note_root`.
282    #[prost(message, repeated, tag = "7")]
283    pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
284}
285/// Account vault synchronization request.
286///
287/// Allows requesters to sync asset values for specific public accounts within a block range.
288#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
289pub struct SyncAccountVaultRequest {
290    /// Block range from which to start synchronizing.
291    ///
292    /// If the `block_to` is specified, this block must be close to the chain tip (i.e., within 30 blocks),
293    /// otherwise an error will be returned.
294    #[prost(message, optional, tag = "1")]
295    pub block_range: ::core::option::Option<BlockRange>,
296    /// Account for which we want to sync asset vault.
297    #[prost(message, optional, tag = "2")]
298    pub account_id: ::core::option::Option<super::account::AccountId>,
299}
300#[derive(Clone, PartialEq, ::prost::Message)]
301pub struct SyncAccountVaultResponse {
302    /// Pagination information.
303    #[prost(message, optional, tag = "1")]
304    pub pagination_info: ::core::option::Option<PaginationInfo>,
305    /// List of asset updates for the account.
306    ///
307    /// Multiple updates can be returned for a single asset, and the one with a higher `block_num`
308    /// is expected to be retained by the caller.
309    #[prost(message, repeated, tag = "2")]
310    pub updates: ::prost::alloc::vec::Vec<AccountVaultUpdate>,
311}
312#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
313pub struct AccountVaultUpdate {
314    /// Vault key associated with the asset.
315    #[prost(message, optional, tag = "1")]
316    pub vault_key: ::core::option::Option<super::primitives::Digest>,
317    /// Asset value related to the vault key.
318    /// If not present, the asset was removed from the vault.
319    #[prost(message, optional, tag = "2")]
320    pub asset: ::core::option::Option<super::primitives::Asset>,
321    /// Block number at which the above asset was updated in the account vault.
322    #[prost(fixed32, tag = "3")]
323    pub block_num: u32,
324}
325/// Note synchronization request.
326///
327/// Specifies note tags that requester is interested in. The server will return the first block which
328/// contains a note matching `note_tags` or the chain tip.
329#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
330pub struct SyncNotesRequest {
331    /// Block range from which to start synchronizing.
332    #[prost(message, optional, tag = "1")]
333    pub block_range: ::core::option::Option<BlockRange>,
334    /// Specifies the tags which the requester is interested in.
335    #[prost(fixed32, repeated, tag = "2")]
336    pub note_tags: ::prost::alloc::vec::Vec<u32>,
337}
338/// Represents the result of syncing notes request.
339#[derive(Clone, PartialEq, ::prost::Message)]
340pub struct SyncNotesResponse {
341    /// Pagination information.
342    #[prost(message, optional, tag = "1")]
343    pub pagination_info: ::core::option::Option<PaginationInfo>,
344    /// Block header of the block with the first note matching the specified criteria.
345    #[prost(message, optional, tag = "2")]
346    pub block_header: ::core::option::Option<super::blockchain::BlockHeader>,
347    /// Merkle path to verify the block's inclusion in the MMR at the returned `chain_tip`.
348    ///
349    /// An MMR proof can be constructed for the leaf of index `block_header.block_num` of
350    /// an MMR of forest `chain_tip` with this path.
351    #[prost(message, optional, tag = "3")]
352    pub mmr_path: ::core::option::Option<super::primitives::MerklePath>,
353    /// List of all notes together with the Merkle paths from `response.block_header.note_root`.
354    #[prost(message, repeated, tag = "4")]
355    pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
356}
357/// Storage map synchronization request.
358///
359/// Allows requesters to sync storage map values for specific public accounts within a block range,
360/// with support for cursor-based pagination to handle large storage maps.
361#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
362pub struct SyncStorageMapsRequest {
363    /// Block range from which to start synchronizing.
364    ///
365    /// If the `block_to` is specified, this block must be close to the chain tip (i.e., within 30 blocks),
366    /// otherwise an error will be returned.
367    #[prost(message, optional, tag = "1")]
368    pub block_range: ::core::option::Option<BlockRange>,
369    /// Account for which we want to sync storage maps.
370    #[prost(message, optional, tag = "3")]
371    pub account_id: ::core::option::Option<super::account::AccountId>,
372}
373#[derive(Clone, PartialEq, ::prost::Message)]
374pub struct SyncStorageMapsResponse {
375    /// Pagination information.
376    #[prost(message, optional, tag = "1")]
377    pub pagination_info: ::core::option::Option<PaginationInfo>,
378    /// The list of storage map updates.
379    ///
380    /// Multiple updates can be returned for a single slot index and key combination, and the one
381    /// with a higher `block_num` is expected to be retained by the caller.
382    #[prost(message, repeated, tag = "2")]
383    pub updates: ::prost::alloc::vec::Vec<StorageMapUpdate>,
384}
385/// Represents a single storage map update.
386#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
387pub struct StorageMapUpdate {
388    /// Block number in which the slot was updated.
389    #[prost(fixed32, tag = "1")]
390    pub block_num: u32,
391    /// Slot index (\[0..255\]).
392    #[prost(uint32, tag = "2")]
393    pub slot_index: u32,
394    /// The storage map key.
395    #[prost(message, optional, tag = "3")]
396    pub key: ::core::option::Option<super::primitives::Digest>,
397    /// The storage map value.
398    #[prost(message, optional, tag = "4")]
399    pub value: ::core::option::Option<super::primitives::Digest>,
400}
401/// Represents a block range.
402#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
403pub struct BlockRange {
404    /// Block number from which to start (inclusive).
405    #[prost(fixed32, tag = "1")]
406    pub block_from: u32,
407    /// Block number up to which to check (inclusive). If not specified, checks up to the latest block.
408    #[prost(fixed32, optional, tag = "2")]
409    pub block_to: ::core::option::Option<u32>,
410}
411/// Represents pagination information for chunked responses.
412///
413/// Pagination is done using block numbers as the axis, allowing requesters to request
414/// data in chunks by specifying block ranges and continuing from where the previous
415/// response left off.
416///
417/// To request the next chunk, the requester should use `block_num + 1` from the previous response
418/// as the `block_from` for the next request.
419#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
420pub struct PaginationInfo {
421    /// Current chain tip
422    #[prost(fixed32, tag = "1")]
423    pub chain_tip: u32,
424    /// The block number of the last check included in this response.
425    ///
426    /// For chunked responses, this may be less than `request.block_range.block_to`.
427    /// If it is less than request.block_range.block_to, the user is expected to make a subsequent request
428    /// starting from the next block to this one (ie, request.block_range.block_from = block_num + 1).
429    #[prost(fixed32, tag = "2")]
430    pub block_num: u32,
431}
432/// Transactions synchronization request.
433///
434/// Allows requesters to sync transactions for specific accounts within a block range.
435#[derive(Clone, PartialEq, ::prost::Message)]
436pub struct SyncTransactionsRequest {
437    /// Block range from which to start synchronizing.
438    #[prost(message, optional, tag = "1")]
439    pub block_range: ::core::option::Option<BlockRange>,
440    /// Accounts to sync transactions for.
441    #[prost(message, repeated, tag = "2")]
442    pub account_ids: ::prost::alloc::vec::Vec<super::account::AccountId>,
443}
444/// Represents the result of syncing transactions request.
445#[derive(Clone, PartialEq, ::prost::Message)]
446pub struct SyncTransactionsResponse {
447    /// Pagination information.
448    #[prost(message, optional, tag = "1")]
449    pub pagination_info: ::core::option::Option<PaginationInfo>,
450    /// List of transaction records.
451    #[prost(message, repeated, tag = "2")]
452    pub transaction_records: ::prost::alloc::vec::Vec<TransactionRecord>,
453}
454/// Represents a transaction record.
455#[derive(Clone, PartialEq, ::prost::Message)]
456pub struct TransactionRecord {
457    /// Block number in which the transaction was included.
458    #[prost(fixed32, tag = "1")]
459    pub block_num: u32,
460    /// A transaction header.
461    #[prost(message, optional, tag = "2")]
462    pub transaction_header: ::core::option::Option<
463        super::transaction::TransactionHeader,
464    >,
465}
466/// Generated client implementations.
467pub mod rpc_client {
468    #![allow(
469        unused_variables,
470        dead_code,
471        missing_docs,
472        clippy::wildcard_imports,
473        clippy::let_unit_value,
474    )]
475    use tonic::codegen::*;
476    use tonic::codegen::http::Uri;
477    /// Store API for the RPC component
478    #[derive(Debug, Clone)]
479    pub struct RpcClient<T> {
480        inner: tonic::client::Grpc<T>,
481    }
482    impl RpcClient<tonic::transport::Channel> {
483        /// Attempt to create a new client by connecting to a given endpoint.
484        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
485        where
486            D: TryInto<tonic::transport::Endpoint>,
487            D::Error: Into<StdError>,
488        {
489            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
490            Ok(Self::new(conn))
491        }
492    }
493    impl<T> RpcClient<T>
494    where
495        T: tonic::client::GrpcService<tonic::body::Body>,
496        T::Error: Into<StdError>,
497        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
498        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
499    {
500        pub fn new(inner: T) -> Self {
501            let inner = tonic::client::Grpc::new(inner);
502            Self { inner }
503        }
504        pub fn with_origin(inner: T, origin: Uri) -> Self {
505            let inner = tonic::client::Grpc::with_origin(inner, origin);
506            Self { inner }
507        }
508        pub fn with_interceptor<F>(
509            inner: T,
510            interceptor: F,
511        ) -> RpcClient<InterceptedService<T, F>>
512        where
513            F: tonic::service::Interceptor,
514            T::ResponseBody: Default,
515            T: tonic::codegen::Service<
516                http::Request<tonic::body::Body>,
517                Response = http::Response<
518                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
519                >,
520            >,
521            <T as tonic::codegen::Service<
522                http::Request<tonic::body::Body>,
523            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
524        {
525            RpcClient::new(InterceptedService::new(inner, interceptor))
526        }
527        /// Compress requests with the given encoding.
528        ///
529        /// This requires the server to support it otherwise it might respond with an
530        /// error.
531        #[must_use]
532        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
533            self.inner = self.inner.send_compressed(encoding);
534            self
535        }
536        /// Enable decompressing responses.
537        #[must_use]
538        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
539            self.inner = self.inner.accept_compressed(encoding);
540            self
541        }
542        /// Limits the maximum size of a decoded message.
543        ///
544        /// Default: `4MB`
545        #[must_use]
546        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
547            self.inner = self.inner.max_decoding_message_size(limit);
548            self
549        }
550        /// Limits the maximum size of an encoded message.
551        ///
552        /// Default: `usize::MAX`
553        #[must_use]
554        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
555            self.inner = self.inner.max_encoding_message_size(limit);
556            self
557        }
558        /// Returns the status info.
559        pub async fn status(
560            &mut self,
561            request: impl tonic::IntoRequest<()>,
562        ) -> std::result::Result<tonic::Response<super::StoreStatus>, tonic::Status> {
563            self.inner
564                .ready()
565                .await
566                .map_err(|e| {
567                    tonic::Status::unknown(
568                        format!("Service was not ready: {}", e.into()),
569                    )
570                })?;
571            let codec = tonic_prost::ProstCodec::default();
572            let path = http::uri::PathAndQuery::from_static("/rpc_store.Rpc/Status");
573            let mut req = request.into_request();
574            req.extensions_mut().insert(GrpcMethod::new("rpc_store.Rpc", "Status"));
575            self.inner.unary(req, path, codec).await
576        }
577        /// Returns a nullifier proof for each of the requested nullifiers.
578        pub async fn check_nullifiers(
579            &mut self,
580            request: impl tonic::IntoRequest<super::NullifierList>,
581        ) -> std::result::Result<
582            tonic::Response<super::CheckNullifiersResponse>,
583            tonic::Status,
584        > {
585            self.inner
586                .ready()
587                .await
588                .map_err(|e| {
589                    tonic::Status::unknown(
590                        format!("Service was not ready: {}", e.into()),
591                    )
592                })?;
593            let codec = tonic_prost::ProstCodec::default();
594            let path = http::uri::PathAndQuery::from_static(
595                "/rpc_store.Rpc/CheckNullifiers",
596            );
597            let mut req = request.into_request();
598            req.extensions_mut()
599                .insert(GrpcMethod::new("rpc_store.Rpc", "CheckNullifiers"));
600            self.inner.unary(req, path, codec).await
601        }
602        /// Returns the latest state of an account with the specified ID.
603        pub async fn get_account_details(
604            &mut self,
605            request: impl tonic::IntoRequest<super::super::account::AccountId>,
606        ) -> std::result::Result<
607            tonic::Response<super::super::account::AccountDetails>,
608            tonic::Status,
609        > {
610            self.inner
611                .ready()
612                .await
613                .map_err(|e| {
614                    tonic::Status::unknown(
615                        format!("Service was not ready: {}", e.into()),
616                    )
617                })?;
618            let codec = tonic_prost::ProstCodec::default();
619            let path = http::uri::PathAndQuery::from_static(
620                "/rpc_store.Rpc/GetAccountDetails",
621            );
622            let mut req = request.into_request();
623            req.extensions_mut()
624                .insert(GrpcMethod::new("rpc_store.Rpc", "GetAccountDetails"));
625            self.inner.unary(req, path, codec).await
626        }
627        /// Returns the latest state proof of the specified account.
628        pub async fn get_account_proof(
629            &mut self,
630            request: impl tonic::IntoRequest<super::AccountProofRequest>,
631        ) -> std::result::Result<
632            tonic::Response<super::AccountProofResponse>,
633            tonic::Status,
634        > {
635            self.inner
636                .ready()
637                .await
638                .map_err(|e| {
639                    tonic::Status::unknown(
640                        format!("Service was not ready: {}", e.into()),
641                    )
642                })?;
643            let codec = tonic_prost::ProstCodec::default();
644            let path = http::uri::PathAndQuery::from_static(
645                "/rpc_store.Rpc/GetAccountProof",
646            );
647            let mut req = request.into_request();
648            req.extensions_mut()
649                .insert(GrpcMethod::new("rpc_store.Rpc", "GetAccountProof"));
650            self.inner.unary(req, path, codec).await
651        }
652        /// Returns raw block data for the specified block number.
653        pub async fn get_block_by_number(
654            &mut self,
655            request: impl tonic::IntoRequest<super::super::blockchain::BlockNumber>,
656        ) -> std::result::Result<
657            tonic::Response<super::super::blockchain::MaybeBlock>,
658            tonic::Status,
659        > {
660            self.inner
661                .ready()
662                .await
663                .map_err(|e| {
664                    tonic::Status::unknown(
665                        format!("Service was not ready: {}", e.into()),
666                    )
667                })?;
668            let codec = tonic_prost::ProstCodec::default();
669            let path = http::uri::PathAndQuery::from_static(
670                "/rpc_store.Rpc/GetBlockByNumber",
671            );
672            let mut req = request.into_request();
673            req.extensions_mut()
674                .insert(GrpcMethod::new("rpc_store.Rpc", "GetBlockByNumber"));
675            self.inner.unary(req, path, codec).await
676        }
677        /// Retrieves block header by given block number. Optionally, it also returns the MMR path
678        /// and current chain length to authenticate the block's inclusion.
679        pub async fn get_block_header_by_number(
680            &mut self,
681            request: impl tonic::IntoRequest<
682                super::super::shared::BlockHeaderByNumberRequest,
683            >,
684        ) -> std::result::Result<
685            tonic::Response<super::super::shared::BlockHeaderByNumberResponse>,
686            tonic::Status,
687        > {
688            self.inner
689                .ready()
690                .await
691                .map_err(|e| {
692                    tonic::Status::unknown(
693                        format!("Service was not ready: {}", e.into()),
694                    )
695                })?;
696            let codec = tonic_prost::ProstCodec::default();
697            let path = http::uri::PathAndQuery::from_static(
698                "/rpc_store.Rpc/GetBlockHeaderByNumber",
699            );
700            let mut req = request.into_request();
701            req.extensions_mut()
702                .insert(GrpcMethod::new("rpc_store.Rpc", "GetBlockHeaderByNumber"));
703            self.inner.unary(req, path, codec).await
704        }
705        /// Returns a list of committed notes matching the provided note IDs.
706        pub async fn get_notes_by_id(
707            &mut self,
708            request: impl tonic::IntoRequest<super::super::note::NoteIdList>,
709        ) -> std::result::Result<
710            tonic::Response<super::super::note::CommittedNoteList>,
711            tonic::Status,
712        > {
713            self.inner
714                .ready()
715                .await
716                .map_err(|e| {
717                    tonic::Status::unknown(
718                        format!("Service was not ready: {}", e.into()),
719                    )
720                })?;
721            let codec = tonic_prost::ProstCodec::default();
722            let path = http::uri::PathAndQuery::from_static(
723                "/rpc_store.Rpc/GetNotesById",
724            );
725            let mut req = request.into_request();
726            req.extensions_mut()
727                .insert(GrpcMethod::new("rpc_store.Rpc", "GetNotesById"));
728            self.inner.unary(req, path, codec).await
729        }
730        /// Returns the script for a note by its root.
731        pub async fn get_note_script_by_root(
732            &mut self,
733            request: impl tonic::IntoRequest<super::super::note::NoteRoot>,
734        ) -> std::result::Result<
735            tonic::Response<super::super::shared::MaybeNoteScript>,
736            tonic::Status,
737        > {
738            self.inner
739                .ready()
740                .await
741                .map_err(|e| {
742                    tonic::Status::unknown(
743                        format!("Service was not ready: {}", e.into()),
744                    )
745                })?;
746            let codec = tonic_prost::ProstCodec::default();
747            let path = http::uri::PathAndQuery::from_static(
748                "/rpc_store.Rpc/GetNoteScriptByRoot",
749            );
750            let mut req = request.into_request();
751            req.extensions_mut()
752                .insert(GrpcMethod::new("rpc_store.Rpc", "GetNoteScriptByRoot"));
753            self.inner.unary(req, path, codec).await
754        }
755        /// Returns a list of nullifiers that match the specified prefixes and are recorded in the node.
756        ///
757        /// Note that only 16-bit prefixes are supported at this time.
758        pub async fn sync_nullifiers(
759            &mut self,
760            request: impl tonic::IntoRequest<super::SyncNullifiersRequest>,
761        ) -> std::result::Result<
762            tonic::Response<super::SyncNullifiersResponse>,
763            tonic::Status,
764        > {
765            self.inner
766                .ready()
767                .await
768                .map_err(|e| {
769                    tonic::Status::unknown(
770                        format!("Service was not ready: {}", e.into()),
771                    )
772                })?;
773            let codec = tonic_prost::ProstCodec::default();
774            let path = http::uri::PathAndQuery::from_static(
775                "/rpc_store.Rpc/SyncNullifiers",
776            );
777            let mut req = request.into_request();
778            req.extensions_mut()
779                .insert(GrpcMethod::new("rpc_store.Rpc", "SyncNullifiers"));
780            self.inner.unary(req, path, codec).await
781        }
782        /// Returns info which can be used by the requester to sync up to the tip of chain for the notes they are interested in.
783        ///
784        /// requester specifies the `note_tags` they are interested in, and the block height from which to search for new for
785        /// matching notes for. The request will then return the next block containing any note matching the provided tags.
786        ///
787        /// The response includes each note's metadata and inclusion proof.
788        ///
789        /// A basic note sync can be implemented by repeatedly requesting the previous response's block until reaching the
790        /// tip of the chain.
791        pub async fn sync_notes(
792            &mut self,
793            request: impl tonic::IntoRequest<super::SyncNotesRequest>,
794        ) -> std::result::Result<
795            tonic::Response<super::SyncNotesResponse>,
796            tonic::Status,
797        > {
798            self.inner
799                .ready()
800                .await
801                .map_err(|e| {
802                    tonic::Status::unknown(
803                        format!("Service was not ready: {}", e.into()),
804                    )
805                })?;
806            let codec = tonic_prost::ProstCodec::default();
807            let path = http::uri::PathAndQuery::from_static("/rpc_store.Rpc/SyncNotes");
808            let mut req = request.into_request();
809            req.extensions_mut().insert(GrpcMethod::new("rpc_store.Rpc", "SyncNotes"));
810            self.inner.unary(req, path, codec).await
811        }
812        /// Returns info which can be used by the requester to sync up to the latest state of the chain
813        /// for the objects (accounts, notes, nullifiers) the requester is interested in.
814        ///
815        /// This request returns the next block containing requested data. It also returns `chain_tip`
816        /// which is the latest block number in the chain. requester is expected to repeat these requests
817        /// in a loop until `response.block_header.block_num == response.chain_tip`, at which point
818        /// the requester is fully synchronized with the chain.
819        ///
820        /// Each request also returns info about new notes, nullifiers etc. created. It also returns
821        /// Chain MMR delta that can be used to update the state of Chain MMR. This includes both chain
822        /// MMR peaks and chain MMR nodes.
823        ///
824        /// For preserving some degree of privacy, note tags and nullifiers filters contain only high
825        /// part of hashes. Thus, returned data contains excessive notes and nullifiers, requester can make
826        /// additional filtering of that data on its side.
827        pub async fn sync_state(
828            &mut self,
829            request: impl tonic::IntoRequest<super::SyncStateRequest>,
830        ) -> std::result::Result<
831            tonic::Response<super::SyncStateResponse>,
832            tonic::Status,
833        > {
834            self.inner
835                .ready()
836                .await
837                .map_err(|e| {
838                    tonic::Status::unknown(
839                        format!("Service was not ready: {}", e.into()),
840                    )
841                })?;
842            let codec = tonic_prost::ProstCodec::default();
843            let path = http::uri::PathAndQuery::from_static("/rpc_store.Rpc/SyncState");
844            let mut req = request.into_request();
845            req.extensions_mut().insert(GrpcMethod::new("rpc_store.Rpc", "SyncState"));
846            self.inner.unary(req, path, codec).await
847        }
848        /// Returns account vault updates for specified account within a block range.
849        pub async fn sync_account_vault(
850            &mut self,
851            request: impl tonic::IntoRequest<super::SyncAccountVaultRequest>,
852        ) -> std::result::Result<
853            tonic::Response<super::SyncAccountVaultResponse>,
854            tonic::Status,
855        > {
856            self.inner
857                .ready()
858                .await
859                .map_err(|e| {
860                    tonic::Status::unknown(
861                        format!("Service was not ready: {}", e.into()),
862                    )
863                })?;
864            let codec = tonic_prost::ProstCodec::default();
865            let path = http::uri::PathAndQuery::from_static(
866                "/rpc_store.Rpc/SyncAccountVault",
867            );
868            let mut req = request.into_request();
869            req.extensions_mut()
870                .insert(GrpcMethod::new("rpc_store.Rpc", "SyncAccountVault"));
871            self.inner.unary(req, path, codec).await
872        }
873        /// Returns storage map updates for specified account and storage slots within a block range.
874        pub async fn sync_storage_maps(
875            &mut self,
876            request: impl tonic::IntoRequest<super::SyncStorageMapsRequest>,
877        ) -> std::result::Result<
878            tonic::Response<super::SyncStorageMapsResponse>,
879            tonic::Status,
880        > {
881            self.inner
882                .ready()
883                .await
884                .map_err(|e| {
885                    tonic::Status::unknown(
886                        format!("Service was not ready: {}", e.into()),
887                    )
888                })?;
889            let codec = tonic_prost::ProstCodec::default();
890            let path = http::uri::PathAndQuery::from_static(
891                "/rpc_store.Rpc/SyncStorageMaps",
892            );
893            let mut req = request.into_request();
894            req.extensions_mut()
895                .insert(GrpcMethod::new("rpc_store.Rpc", "SyncStorageMaps"));
896            self.inner.unary(req, path, codec).await
897        }
898        /// Returns transactions records for specific accounts within a block range.
899        pub async fn sync_transactions(
900            &mut self,
901            request: impl tonic::IntoRequest<super::SyncTransactionsRequest>,
902        ) -> std::result::Result<
903            tonic::Response<super::SyncTransactionsResponse>,
904            tonic::Status,
905        > {
906            self.inner
907                .ready()
908                .await
909                .map_err(|e| {
910                    tonic::Status::unknown(
911                        format!("Service was not ready: {}", e.into()),
912                    )
913                })?;
914            let codec = tonic_prost::ProstCodec::default();
915            let path = http::uri::PathAndQuery::from_static(
916                "/rpc_store.Rpc/SyncTransactions",
917            );
918            let mut req = request.into_request();
919            req.extensions_mut()
920                .insert(GrpcMethod::new("rpc_store.Rpc", "SyncTransactions"));
921            self.inner.unary(req, path, codec).await
922        }
923    }
924}
925/// Generated server implementations.
926pub mod rpc_server {
927    #![allow(
928        unused_variables,
929        dead_code,
930        missing_docs,
931        clippy::wildcard_imports,
932        clippy::let_unit_value,
933    )]
934    use tonic::codegen::*;
935    /// Generated trait containing gRPC methods that should be implemented for use with RpcServer.
936    #[async_trait]
937    pub trait Rpc: std::marker::Send + std::marker::Sync + 'static {
938        /// Returns the status info.
939        async fn status(
940            &self,
941            request: tonic::Request<()>,
942        ) -> std::result::Result<tonic::Response<super::StoreStatus>, tonic::Status>;
943        /// Returns a nullifier proof for each of the requested nullifiers.
944        async fn check_nullifiers(
945            &self,
946            request: tonic::Request<super::NullifierList>,
947        ) -> std::result::Result<
948            tonic::Response<super::CheckNullifiersResponse>,
949            tonic::Status,
950        >;
951        /// Returns the latest state of an account with the specified ID.
952        async fn get_account_details(
953            &self,
954            request: tonic::Request<super::super::account::AccountId>,
955        ) -> std::result::Result<
956            tonic::Response<super::super::account::AccountDetails>,
957            tonic::Status,
958        >;
959        /// Returns the latest state proof of the specified account.
960        async fn get_account_proof(
961            &self,
962            request: tonic::Request<super::AccountProofRequest>,
963        ) -> std::result::Result<
964            tonic::Response<super::AccountProofResponse>,
965            tonic::Status,
966        >;
967        /// Returns raw block data for the specified block number.
968        async fn get_block_by_number(
969            &self,
970            request: tonic::Request<super::super::blockchain::BlockNumber>,
971        ) -> std::result::Result<
972            tonic::Response<super::super::blockchain::MaybeBlock>,
973            tonic::Status,
974        >;
975        /// Retrieves block header by given block number. Optionally, it also returns the MMR path
976        /// and current chain length to authenticate the block's inclusion.
977        async fn get_block_header_by_number(
978            &self,
979            request: tonic::Request<super::super::shared::BlockHeaderByNumberRequest>,
980        ) -> std::result::Result<
981            tonic::Response<super::super::shared::BlockHeaderByNumberResponse>,
982            tonic::Status,
983        >;
984        /// Returns a list of committed notes matching the provided note IDs.
985        async fn get_notes_by_id(
986            &self,
987            request: tonic::Request<super::super::note::NoteIdList>,
988        ) -> std::result::Result<
989            tonic::Response<super::super::note::CommittedNoteList>,
990            tonic::Status,
991        >;
992        /// Returns the script for a note by its root.
993        async fn get_note_script_by_root(
994            &self,
995            request: tonic::Request<super::super::note::NoteRoot>,
996        ) -> std::result::Result<
997            tonic::Response<super::super::shared::MaybeNoteScript>,
998            tonic::Status,
999        >;
1000        /// Returns a list of nullifiers that match the specified prefixes and are recorded in the node.
1001        ///
1002        /// Note that only 16-bit prefixes are supported at this time.
1003        async fn sync_nullifiers(
1004            &self,
1005            request: tonic::Request<super::SyncNullifiersRequest>,
1006        ) -> std::result::Result<
1007            tonic::Response<super::SyncNullifiersResponse>,
1008            tonic::Status,
1009        >;
1010        /// Returns info which can be used by the requester to sync up to the tip of chain for the notes they are interested in.
1011        ///
1012        /// requester specifies the `note_tags` they are interested in, and the block height from which to search for new for
1013        /// matching notes for. The request will then return the next block containing any note matching the provided tags.
1014        ///
1015        /// The response includes each note's metadata and inclusion proof.
1016        ///
1017        /// A basic note sync can be implemented by repeatedly requesting the previous response's block until reaching the
1018        /// tip of the chain.
1019        async fn sync_notes(
1020            &self,
1021            request: tonic::Request<super::SyncNotesRequest>,
1022        ) -> std::result::Result<
1023            tonic::Response<super::SyncNotesResponse>,
1024            tonic::Status,
1025        >;
1026        /// Returns info which can be used by the requester to sync up to the latest state of the chain
1027        /// for the objects (accounts, notes, nullifiers) the requester is interested in.
1028        ///
1029        /// This request returns the next block containing requested data. It also returns `chain_tip`
1030        /// which is the latest block number in the chain. requester is expected to repeat these requests
1031        /// in a loop until `response.block_header.block_num == response.chain_tip`, at which point
1032        /// the requester is fully synchronized with the chain.
1033        ///
1034        /// Each request also returns info about new notes, nullifiers etc. created. It also returns
1035        /// Chain MMR delta that can be used to update the state of Chain MMR. This includes both chain
1036        /// MMR peaks and chain MMR nodes.
1037        ///
1038        /// For preserving some degree of privacy, note tags and nullifiers filters contain only high
1039        /// part of hashes. Thus, returned data contains excessive notes and nullifiers, requester can make
1040        /// additional filtering of that data on its side.
1041        async fn sync_state(
1042            &self,
1043            request: tonic::Request<super::SyncStateRequest>,
1044        ) -> std::result::Result<
1045            tonic::Response<super::SyncStateResponse>,
1046            tonic::Status,
1047        >;
1048        /// Returns account vault updates for specified account within a block range.
1049        async fn sync_account_vault(
1050            &self,
1051            request: tonic::Request<super::SyncAccountVaultRequest>,
1052        ) -> std::result::Result<
1053            tonic::Response<super::SyncAccountVaultResponse>,
1054            tonic::Status,
1055        >;
1056        /// Returns storage map updates for specified account and storage slots within a block range.
1057        async fn sync_storage_maps(
1058            &self,
1059            request: tonic::Request<super::SyncStorageMapsRequest>,
1060        ) -> std::result::Result<
1061            tonic::Response<super::SyncStorageMapsResponse>,
1062            tonic::Status,
1063        >;
1064        /// Returns transactions records for specific accounts within a block range.
1065        async fn sync_transactions(
1066            &self,
1067            request: tonic::Request<super::SyncTransactionsRequest>,
1068        ) -> std::result::Result<
1069            tonic::Response<super::SyncTransactionsResponse>,
1070            tonic::Status,
1071        >;
1072    }
1073    /// Store API for the RPC component
1074    #[derive(Debug)]
1075    pub struct RpcServer<T> {
1076        inner: Arc<T>,
1077        accept_compression_encodings: EnabledCompressionEncodings,
1078        send_compression_encodings: EnabledCompressionEncodings,
1079        max_decoding_message_size: Option<usize>,
1080        max_encoding_message_size: Option<usize>,
1081    }
1082    impl<T> RpcServer<T> {
1083        pub fn new(inner: T) -> Self {
1084            Self::from_arc(Arc::new(inner))
1085        }
1086        pub fn from_arc(inner: Arc<T>) -> Self {
1087            Self {
1088                inner,
1089                accept_compression_encodings: Default::default(),
1090                send_compression_encodings: Default::default(),
1091                max_decoding_message_size: None,
1092                max_encoding_message_size: None,
1093            }
1094        }
1095        pub fn with_interceptor<F>(
1096            inner: T,
1097            interceptor: F,
1098        ) -> InterceptedService<Self, F>
1099        where
1100            F: tonic::service::Interceptor,
1101        {
1102            InterceptedService::new(Self::new(inner), interceptor)
1103        }
1104        /// Enable decompressing requests with the given encoding.
1105        #[must_use]
1106        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1107            self.accept_compression_encodings.enable(encoding);
1108            self
1109        }
1110        /// Compress responses with the given encoding, if the client supports it.
1111        #[must_use]
1112        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1113            self.send_compression_encodings.enable(encoding);
1114            self
1115        }
1116        /// Limits the maximum size of a decoded message.
1117        ///
1118        /// Default: `4MB`
1119        #[must_use]
1120        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1121            self.max_decoding_message_size = Some(limit);
1122            self
1123        }
1124        /// Limits the maximum size of an encoded message.
1125        ///
1126        /// Default: `usize::MAX`
1127        #[must_use]
1128        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1129            self.max_encoding_message_size = Some(limit);
1130            self
1131        }
1132    }
1133    impl<T, B> tonic::codegen::Service<http::Request<B>> for RpcServer<T>
1134    where
1135        T: Rpc,
1136        B: Body + std::marker::Send + 'static,
1137        B::Error: Into<StdError> + std::marker::Send + 'static,
1138    {
1139        type Response = http::Response<tonic::body::Body>;
1140        type Error = std::convert::Infallible;
1141        type Future = BoxFuture<Self::Response, Self::Error>;
1142        fn poll_ready(
1143            &mut self,
1144            _cx: &mut Context<'_>,
1145        ) -> Poll<std::result::Result<(), Self::Error>> {
1146            Poll::Ready(Ok(()))
1147        }
1148        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1149            match req.uri().path() {
1150                "/rpc_store.Rpc/Status" => {
1151                    #[allow(non_camel_case_types)]
1152                    struct StatusSvc<T: Rpc>(pub Arc<T>);
1153                    impl<T: Rpc> tonic::server::UnaryService<()> for StatusSvc<T> {
1154                        type Response = super::StoreStatus;
1155                        type Future = BoxFuture<
1156                            tonic::Response<Self::Response>,
1157                            tonic::Status,
1158                        >;
1159                        fn call(&mut self, request: tonic::Request<()>) -> Self::Future {
1160                            let inner = Arc::clone(&self.0);
1161                            let fut = async move {
1162                                <T as Rpc>::status(&inner, request).await
1163                            };
1164                            Box::pin(fut)
1165                        }
1166                    }
1167                    let accept_compression_encodings = self.accept_compression_encodings;
1168                    let send_compression_encodings = self.send_compression_encodings;
1169                    let max_decoding_message_size = self.max_decoding_message_size;
1170                    let max_encoding_message_size = self.max_encoding_message_size;
1171                    let inner = self.inner.clone();
1172                    let fut = async move {
1173                        let method = StatusSvc(inner);
1174                        let codec = tonic_prost::ProstCodec::default();
1175                        let mut grpc = tonic::server::Grpc::new(codec)
1176                            .apply_compression_config(
1177                                accept_compression_encodings,
1178                                send_compression_encodings,
1179                            )
1180                            .apply_max_message_size_config(
1181                                max_decoding_message_size,
1182                                max_encoding_message_size,
1183                            );
1184                        let res = grpc.unary(method, req).await;
1185                        Ok(res)
1186                    };
1187                    Box::pin(fut)
1188                }
1189                "/rpc_store.Rpc/CheckNullifiers" => {
1190                    #[allow(non_camel_case_types)]
1191                    struct CheckNullifiersSvc<T: Rpc>(pub Arc<T>);
1192                    impl<T: Rpc> tonic::server::UnaryService<super::NullifierList>
1193                    for CheckNullifiersSvc<T> {
1194                        type Response = super::CheckNullifiersResponse;
1195                        type Future = BoxFuture<
1196                            tonic::Response<Self::Response>,
1197                            tonic::Status,
1198                        >;
1199                        fn call(
1200                            &mut self,
1201                            request: tonic::Request<super::NullifierList>,
1202                        ) -> Self::Future {
1203                            let inner = Arc::clone(&self.0);
1204                            let fut = async move {
1205                                <T as Rpc>::check_nullifiers(&inner, request).await
1206                            };
1207                            Box::pin(fut)
1208                        }
1209                    }
1210                    let accept_compression_encodings = self.accept_compression_encodings;
1211                    let send_compression_encodings = self.send_compression_encodings;
1212                    let max_decoding_message_size = self.max_decoding_message_size;
1213                    let max_encoding_message_size = self.max_encoding_message_size;
1214                    let inner = self.inner.clone();
1215                    let fut = async move {
1216                        let method = CheckNullifiersSvc(inner);
1217                        let codec = tonic_prost::ProstCodec::default();
1218                        let mut grpc = tonic::server::Grpc::new(codec)
1219                            .apply_compression_config(
1220                                accept_compression_encodings,
1221                                send_compression_encodings,
1222                            )
1223                            .apply_max_message_size_config(
1224                                max_decoding_message_size,
1225                                max_encoding_message_size,
1226                            );
1227                        let res = grpc.unary(method, req).await;
1228                        Ok(res)
1229                    };
1230                    Box::pin(fut)
1231                }
1232                "/rpc_store.Rpc/GetAccountDetails" => {
1233                    #[allow(non_camel_case_types)]
1234                    struct GetAccountDetailsSvc<T: Rpc>(pub Arc<T>);
1235                    impl<
1236                        T: Rpc,
1237                    > tonic::server::UnaryService<super::super::account::AccountId>
1238                    for GetAccountDetailsSvc<T> {
1239                        type Response = super::super::account::AccountDetails;
1240                        type Future = BoxFuture<
1241                            tonic::Response<Self::Response>,
1242                            tonic::Status,
1243                        >;
1244                        fn call(
1245                            &mut self,
1246                            request: tonic::Request<super::super::account::AccountId>,
1247                        ) -> Self::Future {
1248                            let inner = Arc::clone(&self.0);
1249                            let fut = async move {
1250                                <T as Rpc>::get_account_details(&inner, request).await
1251                            };
1252                            Box::pin(fut)
1253                        }
1254                    }
1255                    let accept_compression_encodings = self.accept_compression_encodings;
1256                    let send_compression_encodings = self.send_compression_encodings;
1257                    let max_decoding_message_size = self.max_decoding_message_size;
1258                    let max_encoding_message_size = self.max_encoding_message_size;
1259                    let inner = self.inner.clone();
1260                    let fut = async move {
1261                        let method = GetAccountDetailsSvc(inner);
1262                        let codec = tonic_prost::ProstCodec::default();
1263                        let mut grpc = tonic::server::Grpc::new(codec)
1264                            .apply_compression_config(
1265                                accept_compression_encodings,
1266                                send_compression_encodings,
1267                            )
1268                            .apply_max_message_size_config(
1269                                max_decoding_message_size,
1270                                max_encoding_message_size,
1271                            );
1272                        let res = grpc.unary(method, req).await;
1273                        Ok(res)
1274                    };
1275                    Box::pin(fut)
1276                }
1277                "/rpc_store.Rpc/GetAccountProof" => {
1278                    #[allow(non_camel_case_types)]
1279                    struct GetAccountProofSvc<T: Rpc>(pub Arc<T>);
1280                    impl<T: Rpc> tonic::server::UnaryService<super::AccountProofRequest>
1281                    for GetAccountProofSvc<T> {
1282                        type Response = super::AccountProofResponse;
1283                        type Future = BoxFuture<
1284                            tonic::Response<Self::Response>,
1285                            tonic::Status,
1286                        >;
1287                        fn call(
1288                            &mut self,
1289                            request: tonic::Request<super::AccountProofRequest>,
1290                        ) -> Self::Future {
1291                            let inner = Arc::clone(&self.0);
1292                            let fut = async move {
1293                                <T as Rpc>::get_account_proof(&inner, request).await
1294                            };
1295                            Box::pin(fut)
1296                        }
1297                    }
1298                    let accept_compression_encodings = self.accept_compression_encodings;
1299                    let send_compression_encodings = self.send_compression_encodings;
1300                    let max_decoding_message_size = self.max_decoding_message_size;
1301                    let max_encoding_message_size = self.max_encoding_message_size;
1302                    let inner = self.inner.clone();
1303                    let fut = async move {
1304                        let method = GetAccountProofSvc(inner);
1305                        let codec = tonic_prost::ProstCodec::default();
1306                        let mut grpc = tonic::server::Grpc::new(codec)
1307                            .apply_compression_config(
1308                                accept_compression_encodings,
1309                                send_compression_encodings,
1310                            )
1311                            .apply_max_message_size_config(
1312                                max_decoding_message_size,
1313                                max_encoding_message_size,
1314                            );
1315                        let res = grpc.unary(method, req).await;
1316                        Ok(res)
1317                    };
1318                    Box::pin(fut)
1319                }
1320                "/rpc_store.Rpc/GetBlockByNumber" => {
1321                    #[allow(non_camel_case_types)]
1322                    struct GetBlockByNumberSvc<T: Rpc>(pub Arc<T>);
1323                    impl<
1324                        T: Rpc,
1325                    > tonic::server::UnaryService<super::super::blockchain::BlockNumber>
1326                    for GetBlockByNumberSvc<T> {
1327                        type Response = super::super::blockchain::MaybeBlock;
1328                        type Future = BoxFuture<
1329                            tonic::Response<Self::Response>,
1330                            tonic::Status,
1331                        >;
1332                        fn call(
1333                            &mut self,
1334                            request: tonic::Request<
1335                                super::super::blockchain::BlockNumber,
1336                            >,
1337                        ) -> Self::Future {
1338                            let inner = Arc::clone(&self.0);
1339                            let fut = async move {
1340                                <T as Rpc>::get_block_by_number(&inner, request).await
1341                            };
1342                            Box::pin(fut)
1343                        }
1344                    }
1345                    let accept_compression_encodings = self.accept_compression_encodings;
1346                    let send_compression_encodings = self.send_compression_encodings;
1347                    let max_decoding_message_size = self.max_decoding_message_size;
1348                    let max_encoding_message_size = self.max_encoding_message_size;
1349                    let inner = self.inner.clone();
1350                    let fut = async move {
1351                        let method = GetBlockByNumberSvc(inner);
1352                        let codec = tonic_prost::ProstCodec::default();
1353                        let mut grpc = tonic::server::Grpc::new(codec)
1354                            .apply_compression_config(
1355                                accept_compression_encodings,
1356                                send_compression_encodings,
1357                            )
1358                            .apply_max_message_size_config(
1359                                max_decoding_message_size,
1360                                max_encoding_message_size,
1361                            );
1362                        let res = grpc.unary(method, req).await;
1363                        Ok(res)
1364                    };
1365                    Box::pin(fut)
1366                }
1367                "/rpc_store.Rpc/GetBlockHeaderByNumber" => {
1368                    #[allow(non_camel_case_types)]
1369                    struct GetBlockHeaderByNumberSvc<T: Rpc>(pub Arc<T>);
1370                    impl<
1371                        T: Rpc,
1372                    > tonic::server::UnaryService<
1373                        super::super::shared::BlockHeaderByNumberRequest,
1374                    > for GetBlockHeaderByNumberSvc<T> {
1375                        type Response = super::super::shared::BlockHeaderByNumberResponse;
1376                        type Future = BoxFuture<
1377                            tonic::Response<Self::Response>,
1378                            tonic::Status,
1379                        >;
1380                        fn call(
1381                            &mut self,
1382                            request: tonic::Request<
1383                                super::super::shared::BlockHeaderByNumberRequest,
1384                            >,
1385                        ) -> Self::Future {
1386                            let inner = Arc::clone(&self.0);
1387                            let fut = async move {
1388                                <T as Rpc>::get_block_header_by_number(&inner, request)
1389                                    .await
1390                            };
1391                            Box::pin(fut)
1392                        }
1393                    }
1394                    let accept_compression_encodings = self.accept_compression_encodings;
1395                    let send_compression_encodings = self.send_compression_encodings;
1396                    let max_decoding_message_size = self.max_decoding_message_size;
1397                    let max_encoding_message_size = self.max_encoding_message_size;
1398                    let inner = self.inner.clone();
1399                    let fut = async move {
1400                        let method = GetBlockHeaderByNumberSvc(inner);
1401                        let codec = tonic_prost::ProstCodec::default();
1402                        let mut grpc = tonic::server::Grpc::new(codec)
1403                            .apply_compression_config(
1404                                accept_compression_encodings,
1405                                send_compression_encodings,
1406                            )
1407                            .apply_max_message_size_config(
1408                                max_decoding_message_size,
1409                                max_encoding_message_size,
1410                            );
1411                        let res = grpc.unary(method, req).await;
1412                        Ok(res)
1413                    };
1414                    Box::pin(fut)
1415                }
1416                "/rpc_store.Rpc/GetNotesById" => {
1417                    #[allow(non_camel_case_types)]
1418                    struct GetNotesByIdSvc<T: Rpc>(pub Arc<T>);
1419                    impl<
1420                        T: Rpc,
1421                    > tonic::server::UnaryService<super::super::note::NoteIdList>
1422                    for GetNotesByIdSvc<T> {
1423                        type Response = super::super::note::CommittedNoteList;
1424                        type Future = BoxFuture<
1425                            tonic::Response<Self::Response>,
1426                            tonic::Status,
1427                        >;
1428                        fn call(
1429                            &mut self,
1430                            request: tonic::Request<super::super::note::NoteIdList>,
1431                        ) -> Self::Future {
1432                            let inner = Arc::clone(&self.0);
1433                            let fut = async move {
1434                                <T as Rpc>::get_notes_by_id(&inner, request).await
1435                            };
1436                            Box::pin(fut)
1437                        }
1438                    }
1439                    let accept_compression_encodings = self.accept_compression_encodings;
1440                    let send_compression_encodings = self.send_compression_encodings;
1441                    let max_decoding_message_size = self.max_decoding_message_size;
1442                    let max_encoding_message_size = self.max_encoding_message_size;
1443                    let inner = self.inner.clone();
1444                    let fut = async move {
1445                        let method = GetNotesByIdSvc(inner);
1446                        let codec = tonic_prost::ProstCodec::default();
1447                        let mut grpc = tonic::server::Grpc::new(codec)
1448                            .apply_compression_config(
1449                                accept_compression_encodings,
1450                                send_compression_encodings,
1451                            )
1452                            .apply_max_message_size_config(
1453                                max_decoding_message_size,
1454                                max_encoding_message_size,
1455                            );
1456                        let res = grpc.unary(method, req).await;
1457                        Ok(res)
1458                    };
1459                    Box::pin(fut)
1460                }
1461                "/rpc_store.Rpc/GetNoteScriptByRoot" => {
1462                    #[allow(non_camel_case_types)]
1463                    struct GetNoteScriptByRootSvc<T: Rpc>(pub Arc<T>);
1464                    impl<
1465                        T: Rpc,
1466                    > tonic::server::UnaryService<super::super::note::NoteRoot>
1467                    for GetNoteScriptByRootSvc<T> {
1468                        type Response = super::super::shared::MaybeNoteScript;
1469                        type Future = BoxFuture<
1470                            tonic::Response<Self::Response>,
1471                            tonic::Status,
1472                        >;
1473                        fn call(
1474                            &mut self,
1475                            request: tonic::Request<super::super::note::NoteRoot>,
1476                        ) -> Self::Future {
1477                            let inner = Arc::clone(&self.0);
1478                            let fut = async move {
1479                                <T as Rpc>::get_note_script_by_root(&inner, request).await
1480                            };
1481                            Box::pin(fut)
1482                        }
1483                    }
1484                    let accept_compression_encodings = self.accept_compression_encodings;
1485                    let send_compression_encodings = self.send_compression_encodings;
1486                    let max_decoding_message_size = self.max_decoding_message_size;
1487                    let max_encoding_message_size = self.max_encoding_message_size;
1488                    let inner = self.inner.clone();
1489                    let fut = async move {
1490                        let method = GetNoteScriptByRootSvc(inner);
1491                        let codec = tonic_prost::ProstCodec::default();
1492                        let mut grpc = tonic::server::Grpc::new(codec)
1493                            .apply_compression_config(
1494                                accept_compression_encodings,
1495                                send_compression_encodings,
1496                            )
1497                            .apply_max_message_size_config(
1498                                max_decoding_message_size,
1499                                max_encoding_message_size,
1500                            );
1501                        let res = grpc.unary(method, req).await;
1502                        Ok(res)
1503                    };
1504                    Box::pin(fut)
1505                }
1506                "/rpc_store.Rpc/SyncNullifiers" => {
1507                    #[allow(non_camel_case_types)]
1508                    struct SyncNullifiersSvc<T: Rpc>(pub Arc<T>);
1509                    impl<
1510                        T: Rpc,
1511                    > tonic::server::UnaryService<super::SyncNullifiersRequest>
1512                    for SyncNullifiersSvc<T> {
1513                        type Response = super::SyncNullifiersResponse;
1514                        type Future = BoxFuture<
1515                            tonic::Response<Self::Response>,
1516                            tonic::Status,
1517                        >;
1518                        fn call(
1519                            &mut self,
1520                            request: tonic::Request<super::SyncNullifiersRequest>,
1521                        ) -> Self::Future {
1522                            let inner = Arc::clone(&self.0);
1523                            let fut = async move {
1524                                <T as Rpc>::sync_nullifiers(&inner, request).await
1525                            };
1526                            Box::pin(fut)
1527                        }
1528                    }
1529                    let accept_compression_encodings = self.accept_compression_encodings;
1530                    let send_compression_encodings = self.send_compression_encodings;
1531                    let max_decoding_message_size = self.max_decoding_message_size;
1532                    let max_encoding_message_size = self.max_encoding_message_size;
1533                    let inner = self.inner.clone();
1534                    let fut = async move {
1535                        let method = SyncNullifiersSvc(inner);
1536                        let codec = tonic_prost::ProstCodec::default();
1537                        let mut grpc = tonic::server::Grpc::new(codec)
1538                            .apply_compression_config(
1539                                accept_compression_encodings,
1540                                send_compression_encodings,
1541                            )
1542                            .apply_max_message_size_config(
1543                                max_decoding_message_size,
1544                                max_encoding_message_size,
1545                            );
1546                        let res = grpc.unary(method, req).await;
1547                        Ok(res)
1548                    };
1549                    Box::pin(fut)
1550                }
1551                "/rpc_store.Rpc/SyncNotes" => {
1552                    #[allow(non_camel_case_types)]
1553                    struct SyncNotesSvc<T: Rpc>(pub Arc<T>);
1554                    impl<T: Rpc> tonic::server::UnaryService<super::SyncNotesRequest>
1555                    for SyncNotesSvc<T> {
1556                        type Response = super::SyncNotesResponse;
1557                        type Future = BoxFuture<
1558                            tonic::Response<Self::Response>,
1559                            tonic::Status,
1560                        >;
1561                        fn call(
1562                            &mut self,
1563                            request: tonic::Request<super::SyncNotesRequest>,
1564                        ) -> Self::Future {
1565                            let inner = Arc::clone(&self.0);
1566                            let fut = async move {
1567                                <T as Rpc>::sync_notes(&inner, request).await
1568                            };
1569                            Box::pin(fut)
1570                        }
1571                    }
1572                    let accept_compression_encodings = self.accept_compression_encodings;
1573                    let send_compression_encodings = self.send_compression_encodings;
1574                    let max_decoding_message_size = self.max_decoding_message_size;
1575                    let max_encoding_message_size = self.max_encoding_message_size;
1576                    let inner = self.inner.clone();
1577                    let fut = async move {
1578                        let method = SyncNotesSvc(inner);
1579                        let codec = tonic_prost::ProstCodec::default();
1580                        let mut grpc = tonic::server::Grpc::new(codec)
1581                            .apply_compression_config(
1582                                accept_compression_encodings,
1583                                send_compression_encodings,
1584                            )
1585                            .apply_max_message_size_config(
1586                                max_decoding_message_size,
1587                                max_encoding_message_size,
1588                            );
1589                        let res = grpc.unary(method, req).await;
1590                        Ok(res)
1591                    };
1592                    Box::pin(fut)
1593                }
1594                "/rpc_store.Rpc/SyncState" => {
1595                    #[allow(non_camel_case_types)]
1596                    struct SyncStateSvc<T: Rpc>(pub Arc<T>);
1597                    impl<T: Rpc> tonic::server::UnaryService<super::SyncStateRequest>
1598                    for SyncStateSvc<T> {
1599                        type Response = super::SyncStateResponse;
1600                        type Future = BoxFuture<
1601                            tonic::Response<Self::Response>,
1602                            tonic::Status,
1603                        >;
1604                        fn call(
1605                            &mut self,
1606                            request: tonic::Request<super::SyncStateRequest>,
1607                        ) -> Self::Future {
1608                            let inner = Arc::clone(&self.0);
1609                            let fut = async move {
1610                                <T as Rpc>::sync_state(&inner, request).await
1611                            };
1612                            Box::pin(fut)
1613                        }
1614                    }
1615                    let accept_compression_encodings = self.accept_compression_encodings;
1616                    let send_compression_encodings = self.send_compression_encodings;
1617                    let max_decoding_message_size = self.max_decoding_message_size;
1618                    let max_encoding_message_size = self.max_encoding_message_size;
1619                    let inner = self.inner.clone();
1620                    let fut = async move {
1621                        let method = SyncStateSvc(inner);
1622                        let codec = tonic_prost::ProstCodec::default();
1623                        let mut grpc = tonic::server::Grpc::new(codec)
1624                            .apply_compression_config(
1625                                accept_compression_encodings,
1626                                send_compression_encodings,
1627                            )
1628                            .apply_max_message_size_config(
1629                                max_decoding_message_size,
1630                                max_encoding_message_size,
1631                            );
1632                        let res = grpc.unary(method, req).await;
1633                        Ok(res)
1634                    };
1635                    Box::pin(fut)
1636                }
1637                "/rpc_store.Rpc/SyncAccountVault" => {
1638                    #[allow(non_camel_case_types)]
1639                    struct SyncAccountVaultSvc<T: Rpc>(pub Arc<T>);
1640                    impl<
1641                        T: Rpc,
1642                    > tonic::server::UnaryService<super::SyncAccountVaultRequest>
1643                    for SyncAccountVaultSvc<T> {
1644                        type Response = super::SyncAccountVaultResponse;
1645                        type Future = BoxFuture<
1646                            tonic::Response<Self::Response>,
1647                            tonic::Status,
1648                        >;
1649                        fn call(
1650                            &mut self,
1651                            request: tonic::Request<super::SyncAccountVaultRequest>,
1652                        ) -> Self::Future {
1653                            let inner = Arc::clone(&self.0);
1654                            let fut = async move {
1655                                <T as Rpc>::sync_account_vault(&inner, request).await
1656                            };
1657                            Box::pin(fut)
1658                        }
1659                    }
1660                    let accept_compression_encodings = self.accept_compression_encodings;
1661                    let send_compression_encodings = self.send_compression_encodings;
1662                    let max_decoding_message_size = self.max_decoding_message_size;
1663                    let max_encoding_message_size = self.max_encoding_message_size;
1664                    let inner = self.inner.clone();
1665                    let fut = async move {
1666                        let method = SyncAccountVaultSvc(inner);
1667                        let codec = tonic_prost::ProstCodec::default();
1668                        let mut grpc = tonic::server::Grpc::new(codec)
1669                            .apply_compression_config(
1670                                accept_compression_encodings,
1671                                send_compression_encodings,
1672                            )
1673                            .apply_max_message_size_config(
1674                                max_decoding_message_size,
1675                                max_encoding_message_size,
1676                            );
1677                        let res = grpc.unary(method, req).await;
1678                        Ok(res)
1679                    };
1680                    Box::pin(fut)
1681                }
1682                "/rpc_store.Rpc/SyncStorageMaps" => {
1683                    #[allow(non_camel_case_types)]
1684                    struct SyncStorageMapsSvc<T: Rpc>(pub Arc<T>);
1685                    impl<
1686                        T: Rpc,
1687                    > tonic::server::UnaryService<super::SyncStorageMapsRequest>
1688                    for SyncStorageMapsSvc<T> {
1689                        type Response = super::SyncStorageMapsResponse;
1690                        type Future = BoxFuture<
1691                            tonic::Response<Self::Response>,
1692                            tonic::Status,
1693                        >;
1694                        fn call(
1695                            &mut self,
1696                            request: tonic::Request<super::SyncStorageMapsRequest>,
1697                        ) -> Self::Future {
1698                            let inner = Arc::clone(&self.0);
1699                            let fut = async move {
1700                                <T as Rpc>::sync_storage_maps(&inner, request).await
1701                            };
1702                            Box::pin(fut)
1703                        }
1704                    }
1705                    let accept_compression_encodings = self.accept_compression_encodings;
1706                    let send_compression_encodings = self.send_compression_encodings;
1707                    let max_decoding_message_size = self.max_decoding_message_size;
1708                    let max_encoding_message_size = self.max_encoding_message_size;
1709                    let inner = self.inner.clone();
1710                    let fut = async move {
1711                        let method = SyncStorageMapsSvc(inner);
1712                        let codec = tonic_prost::ProstCodec::default();
1713                        let mut grpc = tonic::server::Grpc::new(codec)
1714                            .apply_compression_config(
1715                                accept_compression_encodings,
1716                                send_compression_encodings,
1717                            )
1718                            .apply_max_message_size_config(
1719                                max_decoding_message_size,
1720                                max_encoding_message_size,
1721                            );
1722                        let res = grpc.unary(method, req).await;
1723                        Ok(res)
1724                    };
1725                    Box::pin(fut)
1726                }
1727                "/rpc_store.Rpc/SyncTransactions" => {
1728                    #[allow(non_camel_case_types)]
1729                    struct SyncTransactionsSvc<T: Rpc>(pub Arc<T>);
1730                    impl<
1731                        T: Rpc,
1732                    > tonic::server::UnaryService<super::SyncTransactionsRequest>
1733                    for SyncTransactionsSvc<T> {
1734                        type Response = super::SyncTransactionsResponse;
1735                        type Future = BoxFuture<
1736                            tonic::Response<Self::Response>,
1737                            tonic::Status,
1738                        >;
1739                        fn call(
1740                            &mut self,
1741                            request: tonic::Request<super::SyncTransactionsRequest>,
1742                        ) -> Self::Future {
1743                            let inner = Arc::clone(&self.0);
1744                            let fut = async move {
1745                                <T as Rpc>::sync_transactions(&inner, request).await
1746                            };
1747                            Box::pin(fut)
1748                        }
1749                    }
1750                    let accept_compression_encodings = self.accept_compression_encodings;
1751                    let send_compression_encodings = self.send_compression_encodings;
1752                    let max_decoding_message_size = self.max_decoding_message_size;
1753                    let max_encoding_message_size = self.max_encoding_message_size;
1754                    let inner = self.inner.clone();
1755                    let fut = async move {
1756                        let method = SyncTransactionsSvc(inner);
1757                        let codec = tonic_prost::ProstCodec::default();
1758                        let mut grpc = tonic::server::Grpc::new(codec)
1759                            .apply_compression_config(
1760                                accept_compression_encodings,
1761                                send_compression_encodings,
1762                            )
1763                            .apply_max_message_size_config(
1764                                max_decoding_message_size,
1765                                max_encoding_message_size,
1766                            );
1767                        let res = grpc.unary(method, req).await;
1768                        Ok(res)
1769                    };
1770                    Box::pin(fut)
1771                }
1772                _ => {
1773                    Box::pin(async move {
1774                        let mut response = http::Response::new(
1775                            tonic::body::Body::default(),
1776                        );
1777                        let headers = response.headers_mut();
1778                        headers
1779                            .insert(
1780                                tonic::Status::GRPC_STATUS,
1781                                (tonic::Code::Unimplemented as i32).into(),
1782                            );
1783                        headers
1784                            .insert(
1785                                http::header::CONTENT_TYPE,
1786                                tonic::metadata::GRPC_CONTENT_TYPE,
1787                            );
1788                        Ok(response)
1789                    })
1790                }
1791            }
1792        }
1793    }
1794    impl<T> Clone for RpcServer<T> {
1795        fn clone(&self) -> Self {
1796            let inner = self.inner.clone();
1797            Self {
1798                inner,
1799                accept_compression_encodings: self.accept_compression_encodings,
1800                send_compression_encodings: self.send_compression_encodings,
1801                max_decoding_message_size: self.max_decoding_message_size,
1802                max_encoding_message_size: self.max_encoding_message_size,
1803            }
1804        }
1805    }
1806    /// Generated gRPC service name
1807    pub const SERVICE_NAME: &str = "rpc_store.Rpc";
1808    impl<T> tonic::server::NamedService for RpcServer<T> {
1809        const NAME: &'static str = SERVICE_NAME;
1810    }
1811}