// This file is @generated by prost-build.
/// Represents the status of the store.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StoreStatus {
    /// The store's running version.
    #[prost(string, tag = "1")]
    pub version: ::prost::alloc::string::String,
    /// The store's status.
    #[prost(string, tag = "2")]
    pub status: ::prost::alloc::string::String,
    /// Number of the latest block in the chain.
    #[prost(fixed32, tag = "3")]
    pub chain_tip: u32,
}
/// Returns the latest state proof of the specified account.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountProofRequest {
    /// ID of the account for which we want to get data
    #[prost(message, optional, tag = "1")]
    pub account_id: ::core::option::Option<super::account::AccountId>,
    /// Block at which we'd like to get this data. If present, must be close to the chain tip.
    /// If not present, data from the latest block will be returned.
    #[prost(message, optional, tag = "2")]
    pub block_num: ::core::option::Option<super::blockchain::BlockNumber>,
    /// Request for additional account details; valid only for public accounts.
    #[prost(message, optional, tag = "3")]
    pub details: ::core::option::Option<account_proof_request::AccountDetailRequest>,
}
/// Nested message and enum types in `AccountProofRequest`.
pub mod account_proof_request {
    /// Request the details for a public account.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AccountDetailRequest {
        /// Last known code commitment to the requester. The response will include account code
        /// only if its commitment is different from this value.
        ///
        /// If the field is ommiteed, the response will not include the account code.
        #[prost(message, optional, tag = "1")]
        pub code_commitment: ::core::option::Option<super::super::primitives::Digest>,
        /// Last known asset vault commitment to the requester. The response will include asset vault data
        /// only if its commitment is different from this value. If the value is not present in the
        /// request, the response will not contain one either.
        /// If the number of to-be-returned asset entries exceed a threshold, they have to be requested
        /// separately, which is signaled in the response message with dedicated flag.
        #[prost(message, optional, tag = "2")]
        pub asset_vault_commitment: ::core::option::Option<
            super::super::primitives::Digest,
        >,
        /// Additional request per storage map.
        #[prost(message, repeated, tag = "3")]
        pub storage_maps: ::prost::alloc::vec::Vec<
            account_detail_request::StorageMapDetailRequest,
        >,
    }
    /// Nested message and enum types in `AccountDetailRequest`.
    pub mod account_detail_request {
        /// Represents a storage slot index and the associated map keys.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct StorageMapDetailRequest {
            /// Storage slot index (`\[0..255\]`).
            #[prost(uint32, tag = "1")]
            pub slot_index: u32,
            #[prost(oneof = "storage_map_detail_request::SlotData", tags = "2, 3")]
            pub slot_data: ::core::option::Option<storage_map_detail_request::SlotData>,
        }
        /// Nested message and enum types in `StorageMapDetailRequest`.
        pub mod storage_map_detail_request {
            /// Indirection required for use in `oneof {..}` block.
            #[derive(Clone, PartialEq, ::prost::Message)]
            pub struct MapKeys {
                /// A list of map keys associated with this storage slot.
                #[prost(message, repeated, tag = "1")]
                pub map_keys: ::prost::alloc::vec::Vec<
                    super::super::super::super::primitives::Digest,
                >,
            }
            #[derive(Clone, PartialEq, ::prost::Oneof)]
            pub enum SlotData {
                /// Request to return all storage map data. If the number exceeds a threshold of 1000 entries,
                /// the response will not contain them but must be requested separately.
                #[prost(bool, tag = "2")]
                AllEntries(bool),
                /// A list of map keys associated with the given storage slot identified by `slot_index`.
                #[prost(message, tag = "3")]
                MapKeys(MapKeys),
            }
        }
    }
}
/// Represents the result of getting account proof.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountProofResponse {
    /// The block number at which the account witness was created and the account details were observed.
    #[prost(message, optional, tag = "1")]
    pub block_num: ::core::option::Option<super::blockchain::BlockNumber>,
    /// Account ID, current state commitment, and SMT path.
    #[prost(message, optional, tag = "2")]
    pub witness: ::core::option::Option<super::account::AccountWitness>,
    /// Additional details for public accounts.
    #[prost(message, optional, tag = "3")]
    pub details: ::core::option::Option<account_proof_response::AccountDetails>,
}
/// Nested message and enum types in `AccountProofResponse`.
pub mod account_proof_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AccountDetails {
        /// Account header.
        #[prost(message, optional, tag = "1")]
        pub header: ::core::option::Option<super::super::account::AccountHeader>,
        /// Account storage data
        #[prost(message, optional, tag = "2")]
        pub storage_details: ::core::option::Option<super::AccountStorageDetails>,
        /// Account code; empty if code commitments matched or none was requested.
        #[prost(bytes = "vec", optional, tag = "3")]
        pub code: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
        /// Account asset vault data; empty if vault commitments matched or the requester
        /// omitted it in the request.
        #[prost(message, optional, tag = "4")]
        pub vault_details: ::core::option::Option<super::AccountVaultDetails>,
    }
}
/// Account vault details for AccountProofResponse
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountVaultDetails {
    /// A flag that is set to true if the account contains too many assets. This indicates
    /// to the user that `SyncAccountVault` endpoint should be used to retrieve the
    /// account's assets
    #[prost(bool, tag = "1")]
    pub too_many_assets: bool,
    /// When too_many_assets == false, this will contain the list of assets in the
    /// account's vault
    #[prost(message, repeated, tag = "2")]
    pub assets: ::prost::alloc::vec::Vec<super::primitives::Asset>,
}
/// Account storage details for AccountProofResponse
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountStorageDetails {
    /// Account storage header (storage slot info for up to 256 slots)
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<super::account::AccountStorageHeader>,
    /// Additional data for the requested storage maps
    #[prost(message, repeated, tag = "2")]
    pub map_details: ::prost::alloc::vec::Vec<
        account_storage_details::AccountStorageMapDetails,
    >,
}
/// Nested message and enum types in `AccountStorageDetails`.
pub mod account_storage_details {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AccountStorageMapDetails {
        /// slot index of the storage map
        #[prost(uint32, tag = "1")]
        pub slot_index: u32,
        /// A flag that is set to `true` if the number of to-be-returned entries in the
        /// storage map would exceed a threshold. This indicates to the user that `SyncStorageMaps`
        /// endpoint should be used to get all storage map data.
        #[prost(bool, tag = "2")]
        pub too_many_entries: bool,
        /// By default we provide all storage entries.
        #[prost(message, optional, tag = "3")]
        pub entries: ::core::option::Option<account_storage_map_details::MapEntries>,
    }
    /// Nested message and enum types in `AccountStorageMapDetails`.
    pub mod account_storage_map_details {
        /// Wrapper for repeated storage map entries
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct MapEntries {
            #[prost(message, repeated, tag = "1")]
            pub entries: ::prost::alloc::vec::Vec<map_entries::StorageMapEntry>,
        }
        /// Nested message and enum types in `MapEntries`.
        pub mod map_entries {
            /// Definition of individual storage entries.
            #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
            pub struct StorageMapEntry {
                #[prost(message, optional, tag = "1")]
                pub key: ::core::option::Option<
                    super::super::super::super::primitives::Digest,
                >,
                #[prost(message, optional, tag = "2")]
                pub value: ::core::option::Option<
                    super::super::super::super::primitives::Digest,
                >,
            }
        }
    }
}
/// List of nullifiers to return proofs for.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NullifierList {
    /// List of nullifiers to return proofs for.
    #[prost(message, repeated, tag = "1")]
    pub nullifiers: ::prost::alloc::vec::Vec<super::primitives::Digest>,
}
/// Represents the result of checking nullifiers.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckNullifiersResponse {
    /// Each requested nullifier has its corresponding nullifier proof at the same position.
    #[prost(message, repeated, tag = "1")]
    pub proofs: ::prost::alloc::vec::Vec<super::primitives::SmtOpening>,
}
/// Returns a list of nullifiers that match the specified prefixes and are recorded in the node.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SyncNullifiersRequest {
    /// Block number from which the nullifiers are requested (inclusive).
    #[prost(message, optional, tag = "1")]
    pub block_range: ::core::option::Option<BlockRange>,
    /// Number of bits used for nullifier prefix. Currently the only supported value is 16.
    #[prost(uint32, tag = "2")]
    pub prefix_len: u32,
    /// List of nullifiers to check. Each nullifier is specified by its prefix with length equal
    /// to `prefix_len`.
    #[prost(uint32, repeated, tag = "3")]
    pub nullifiers: ::prost::alloc::vec::Vec<u32>,
}
/// Represents the result of syncing nullifiers.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncNullifiersResponse {
    /// Pagination information.
    #[prost(message, optional, tag = "1")]
    pub pagination_info: ::core::option::Option<PaginationInfo>,
    /// List of nullifiers matching the prefixes specified in the request.
    #[prost(message, repeated, tag = "2")]
    pub nullifiers: ::prost::alloc::vec::Vec<sync_nullifiers_response::NullifierUpdate>,
}
/// Nested message and enum types in `SyncNullifiersResponse`.
pub mod sync_nullifiers_response {
    /// Represents a single nullifier update.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct NullifierUpdate {
        /// Nullifier ID.
        #[prost(message, optional, tag = "1")]
        pub nullifier: ::core::option::Option<super::super::primitives::Digest>,
        /// Block number.
        #[prost(fixed32, tag = "2")]
        pub block_num: u32,
    }
}
/// State synchronization request.
///
/// Specifies state updates the requester is interested in. The server will return the first block which
/// contains a note matching `note_tags` or the chain tip. And the corresponding updates to
/// `account_ids` for that block range.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncStateRequest {
    /// Last block known by the requester. The response will contain data starting from the next block,
    /// until the first block which contains a note of matching the requested tag, or the chain tip
    /// if there are no notes.
    #[prost(fixed32, tag = "1")]
    pub block_num: u32,
    /// Accounts' commitment to include in the response.
    ///
    /// An account commitment will be included if-and-only-if it is the latest update. Meaning it is
    /// possible there was an update to the account for the given range, but if it is not the latest,
    /// it won't be included in the response.
    #[prost(message, repeated, tag = "2")]
    pub account_ids: ::prost::alloc::vec::Vec<super::account::AccountId>,
    /// Specifies the tags which the requester is interested in.
    #[prost(fixed32, repeated, tag = "3")]
    pub note_tags: ::prost::alloc::vec::Vec<u32>,
}
/// Represents the result of syncing state request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncStateResponse {
    /// Number of the latest block in the chain.
    #[prost(fixed32, tag = "1")]
    pub chain_tip: u32,
    /// Block header of the block with the first note matching the specified criteria.
    #[prost(message, optional, tag = "2")]
    pub block_header: ::core::option::Option<super::blockchain::BlockHeader>,
    /// Data needed to update the partial MMR from `request.block_num + 1` to `response.block_header.block_num`.
    #[prost(message, optional, tag = "3")]
    pub mmr_delta: ::core::option::Option<super::primitives::MmrDelta>,
    /// List of account commitments updated after `request.block_num + 1` but not after `response.block_header.block_num`.
    #[prost(message, repeated, tag = "5")]
    pub accounts: ::prost::alloc::vec::Vec<super::account::AccountSummary>,
    /// List of transactions executed against requested accounts between `request.block_num + 1` and
    /// `response.block_header.block_num`.
    #[prost(message, repeated, tag = "6")]
    pub transactions: ::prost::alloc::vec::Vec<super::transaction::TransactionSummary>,
    /// List of all notes together with the Merkle paths from `response.block_header.note_root`.
    #[prost(message, repeated, tag = "7")]
    pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
}
/// Account vault synchronization request.
///
/// Allows requesters to sync asset values for specific public accounts within a block range.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SyncAccountVaultRequest {
    /// Block range from which to start synchronizing.
    ///
    /// If the `block_to` is specified, this block must be close to the chain tip (i.e., within 30 blocks),
    /// otherwise an error will be returned.
    #[prost(message, optional, tag = "1")]
    pub block_range: ::core::option::Option<BlockRange>,
    /// Account for which we want to sync asset vault.
    #[prost(message, optional, tag = "2")]
    pub account_id: ::core::option::Option<super::account::AccountId>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncAccountVaultResponse {
    /// Pagination information.
    #[prost(message, optional, tag = "1")]
    pub pagination_info: ::core::option::Option<PaginationInfo>,
    /// List of asset updates for the account.
    ///
    /// Multiple updates can be returned for a single asset, and the one with a higher `block_num`
    /// is expected to be retained by the caller.
    #[prost(message, repeated, tag = "2")]
    pub updates: ::prost::alloc::vec::Vec<AccountVaultUpdate>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountVaultUpdate {
    /// Vault key associated with the asset.
    #[prost(message, optional, tag = "1")]
    pub vault_key: ::core::option::Option<super::primitives::Digest>,
    /// Asset value related to the vault key.
    /// If not present, the asset was removed from the vault.
    #[prost(message, optional, tag = "2")]
    pub asset: ::core::option::Option<super::primitives::Asset>,
    /// Block number at which the above asset was updated in the account vault.
    #[prost(fixed32, tag = "3")]
    pub block_num: u32,
}
/// Note synchronization request.
///
/// Specifies note tags that requester is interested in. The server will return the first block which
/// contains a note matching `note_tags` or the chain tip.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SyncNotesRequest {
    /// Block range from which to start synchronizing.
    #[prost(message, optional, tag = "1")]
    pub block_range: ::core::option::Option<BlockRange>,
    /// Specifies the tags which the requester is interested in.
    #[prost(fixed32, repeated, tag = "2")]
    pub note_tags: ::prost::alloc::vec::Vec<u32>,
}
/// Represents the result of syncing notes request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncNotesResponse {
    /// Pagination information.
    #[prost(message, optional, tag = "1")]
    pub pagination_info: ::core::option::Option<PaginationInfo>,
    /// Block header of the block with the first note matching the specified criteria.
    #[prost(message, optional, tag = "2")]
    pub block_header: ::core::option::Option<super::blockchain::BlockHeader>,
    /// Merkle path to verify the block's inclusion in the MMR at the returned `chain_tip`.
    ///
    /// An MMR proof can be constructed for the leaf of index `block_header.block_num` of
    /// an MMR of forest `chain_tip` with this path.
    #[prost(message, optional, tag = "3")]
    pub mmr_path: ::core::option::Option<super::primitives::MerklePath>,
    /// List of all notes together with the Merkle paths from `response.block_header.note_root`.
    #[prost(message, repeated, tag = "4")]
    pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
}
/// Storage map synchronization request.
///
/// Allows requesters to sync storage map values for specific public accounts within a block range,
/// with support for cursor-based pagination to handle large storage maps.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SyncStorageMapsRequest {
    /// Block range from which to start synchronizing.
    ///
    /// If the `block_to` is specified, this block must be close to the chain tip (i.e., within 30 blocks),
    /// otherwise an error will be returned.
    #[prost(message, optional, tag = "1")]
    pub block_range: ::core::option::Option<BlockRange>,
    /// Account for which we want to sync storage maps.
    #[prost(message, optional, tag = "3")]
    pub account_id: ::core::option::Option<super::account::AccountId>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncStorageMapsResponse {
    /// Pagination information.
    #[prost(message, optional, tag = "1")]
    pub pagination_info: ::core::option::Option<PaginationInfo>,
    /// The list of storage map updates.
    ///
    /// Multiple updates can be returned for a single slot index and key combination, and the one
    /// with a higher `block_num` is expected to be retained by the caller.
    #[prost(message, repeated, tag = "2")]
    pub updates: ::prost::alloc::vec::Vec<StorageMapUpdate>,
}
/// Represents a single storage map update.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StorageMapUpdate {
    /// Block number in which the slot was updated.
    #[prost(fixed32, tag = "1")]
    pub block_num: u32,
    /// Slot index (\[0..255\]).
    #[prost(uint32, tag = "2")]
    pub slot_index: u32,
    /// The storage map key.
    #[prost(message, optional, tag = "3")]
    pub key: ::core::option::Option<super::primitives::Digest>,
    /// The storage map value.
    #[prost(message, optional, tag = "4")]
    pub value: ::core::option::Option<super::primitives::Digest>,
}
/// Represents a block range.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BlockRange {
    /// Block number from which to start (inclusive).
    #[prost(fixed32, tag = "1")]
    pub block_from: u32,
    /// Block number up to which to check (inclusive). If not specified, checks up to the latest block.
    #[prost(fixed32, optional, tag = "2")]
    pub block_to: ::core::option::Option<u32>,
}
/// Represents pagination information for chunked responses.
///
/// Pagination is done using block numbers as the axis, allowing requesters to request
/// data in chunks by specifying block ranges and continuing from where the previous
/// response left off.
///
/// To request the next chunk, the requester should use `block_num + 1` from the previous response
/// as the `block_from` for the next request.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaginationInfo {
    /// Current chain tip
    #[prost(fixed32, tag = "1")]
    pub chain_tip: u32,
    /// The block number of the last check included in this response.
    ///
    /// For chunked responses, this may be less than `request.block_range.block_to`.
    /// If it is less than request.block_range.block_to, the user is expected to make a subsequent request
    /// starting from the next block to this one (ie, request.block_range.block_from = block_num + 1).
    #[prost(fixed32, tag = "2")]
    pub block_num: u32,
}
/// Transactions synchronization request.
///
/// Allows requesters to sync transactions for specific accounts within a block range.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncTransactionsRequest {
    /// Block range from which to start synchronizing.
    #[prost(message, optional, tag = "1")]
    pub block_range: ::core::option::Option<BlockRange>,
    /// Accounts to sync transactions for.
    #[prost(message, repeated, tag = "2")]
    pub account_ids: ::prost::alloc::vec::Vec<super::account::AccountId>,
}
/// Represents the result of syncing transactions request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncTransactionsResponse {
    /// Pagination information.
    #[prost(message, optional, tag = "1")]
    pub pagination_info: ::core::option::Option<PaginationInfo>,
    /// List of transaction records.
    #[prost(message, repeated, tag = "2")]
    pub transaction_records: ::prost::alloc::vec::Vec<TransactionRecord>,
}
/// Represents a transaction record.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionRecord {
    /// Block number in which the transaction was included.
    #[prost(fixed32, tag = "1")]
    pub block_num: u32,
    /// A transaction header.
    #[prost(message, optional, tag = "2")]
    pub transaction_header: ::core::option::Option<
        super::transaction::TransactionHeader,
    >,
}
/// Generated client implementations.
pub mod rpc_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Store API for the RPC component
    #[derive(Debug, Clone)]
    pub struct RpcClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl RpcClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> RpcClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> RpcClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            RpcClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Returns the status info.
        pub async fn status(
            &mut self,
            request: impl tonic::IntoRequest<()>,
        ) -> std::result::Result<tonic::Response<super::StoreStatus>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/rpc_store.Rpc/Status");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc_store.Rpc", "Status"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns a nullifier proof for each of the requested nullifiers.
        pub async fn check_nullifiers(
            &mut self,
            request: impl tonic::IntoRequest<super::NullifierList>,
        ) -> std::result::Result<
            tonic::Response<super::CheckNullifiersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/CheckNullifiers",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "CheckNullifiers"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns the latest state of an account with the specified ID.
        pub async fn get_account_details(
            &mut self,
            request: impl tonic::IntoRequest<super::super::account::AccountId>,
        ) -> std::result::Result<
            tonic::Response<super::super::account::AccountDetails>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/GetAccountDetails",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "GetAccountDetails"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns the latest state proof of the specified account.
        pub async fn get_account_proof(
            &mut self,
            request: impl tonic::IntoRequest<super::AccountProofRequest>,
        ) -> std::result::Result<
            tonic::Response<super::AccountProofResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/GetAccountProof",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "GetAccountProof"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns raw block data for the specified block number.
        pub async fn get_block_by_number(
            &mut self,
            request: impl tonic::IntoRequest<super::super::blockchain::BlockNumber>,
        ) -> std::result::Result<
            tonic::Response<super::super::blockchain::MaybeBlock>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/GetBlockByNumber",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "GetBlockByNumber"));
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves block header by given block number. Optionally, it also returns the MMR path
        /// and current chain length to authenticate the block's inclusion.
        pub async fn get_block_header_by_number(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::shared::BlockHeaderByNumberRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::shared::BlockHeaderByNumberResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/GetBlockHeaderByNumber",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "GetBlockHeaderByNumber"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns a list of committed notes matching the provided note IDs.
        pub async fn get_notes_by_id(
            &mut self,
            request: impl tonic::IntoRequest<super::super::note::NoteIdList>,
        ) -> std::result::Result<
            tonic::Response<super::super::note::CommittedNoteList>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/GetNotesById",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "GetNotesById"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns the script for a note by its root.
        pub async fn get_note_script_by_root(
            &mut self,
            request: impl tonic::IntoRequest<super::super::note::NoteRoot>,
        ) -> std::result::Result<
            tonic::Response<super::super::shared::MaybeNoteScript>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/GetNoteScriptByRoot",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "GetNoteScriptByRoot"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns a list of nullifiers that match the specified prefixes and are recorded in the node.
        ///
        /// Note that only 16-bit prefixes are supported at this time.
        pub async fn sync_nullifiers(
            &mut self,
            request: impl tonic::IntoRequest<super::SyncNullifiersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncNullifiersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/SyncNullifiers",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "SyncNullifiers"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns info which can be used by the requester to sync up to the tip of chain for the notes they are interested in.
        ///
        /// requester specifies the `note_tags` they are interested in, and the block height from which to search for new for
        /// matching notes for. The request will then return the next block containing any note matching the provided tags.
        ///
        /// The response includes each note's metadata and inclusion proof.
        ///
        /// A basic note sync can be implemented by repeatedly requesting the previous response's block until reaching the
        /// tip of the chain.
        pub async fn sync_notes(
            &mut self,
            request: impl tonic::IntoRequest<super::SyncNotesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncNotesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/rpc_store.Rpc/SyncNotes");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc_store.Rpc", "SyncNotes"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns info which can be used by the requester to sync up to the latest state of the chain
        /// for the objects (accounts, notes, nullifiers) the requester is interested in.
        ///
        /// This request returns the next block containing requested data. It also returns `chain_tip`
        /// which is the latest block number in the chain. requester is expected to repeat these requests
        /// in a loop until `response.block_header.block_num == response.chain_tip`, at which point
        /// the requester is fully synchronized with the chain.
        ///
        /// Each request also returns info about new notes, nullifiers etc. created. It also returns
        /// Chain MMR delta that can be used to update the state of Chain MMR. This includes both chain
        /// MMR peaks and chain MMR nodes.
        ///
        /// For preserving some degree of privacy, note tags and nullifiers filters contain only high
        /// part of hashes. Thus, returned data contains excessive notes and nullifiers, requester can make
        /// additional filtering of that data on its side.
        pub async fn sync_state(
            &mut self,
            request: impl tonic::IntoRequest<super::SyncStateRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncStateResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/rpc_store.Rpc/SyncState");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc_store.Rpc", "SyncState"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns account vault updates for specified account within a block range.
        pub async fn sync_account_vault(
            &mut self,
            request: impl tonic::IntoRequest<super::SyncAccountVaultRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncAccountVaultResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/SyncAccountVault",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "SyncAccountVault"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns storage map updates for specified account and storage slots within a block range.
        pub async fn sync_storage_maps(
            &mut self,
            request: impl tonic::IntoRequest<super::SyncStorageMapsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncStorageMapsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/SyncStorageMaps",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "SyncStorageMaps"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns transactions records for specific accounts within a block range.
        pub async fn sync_transactions(
            &mut self,
            request: impl tonic::IntoRequest<super::SyncTransactionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncTransactionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/rpc_store.Rpc/SyncTransactions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc_store.Rpc", "SyncTransactions"));
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod rpc_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with RpcServer.
    #[async_trait]
    pub trait Rpc: std::marker::Send + std::marker::Sync + 'static {
        /// Returns the status info.
        async fn status(
            &self,
            request: tonic::Request<()>,
        ) -> std::result::Result<tonic::Response<super::StoreStatus>, tonic::Status>;
        /// Returns a nullifier proof for each of the requested nullifiers.
        async fn check_nullifiers(
            &self,
            request: tonic::Request<super::NullifierList>,
        ) -> std::result::Result<
            tonic::Response<super::CheckNullifiersResponse>,
            tonic::Status,
        >;
        /// Returns the latest state of an account with the specified ID.
        async fn get_account_details(
            &self,
            request: tonic::Request<super::super::account::AccountId>,
        ) -> std::result::Result<
            tonic::Response<super::super::account::AccountDetails>,
            tonic::Status,
        >;
        /// Returns the latest state proof of the specified account.
        async fn get_account_proof(
            &self,
            request: tonic::Request<super::AccountProofRequest>,
        ) -> std::result::Result<
            tonic::Response<super::AccountProofResponse>,
            tonic::Status,
        >;
        /// Returns raw block data for the specified block number.
        async fn get_block_by_number(
            &self,
            request: tonic::Request<super::super::blockchain::BlockNumber>,
        ) -> std::result::Result<
            tonic::Response<super::super::blockchain::MaybeBlock>,
            tonic::Status,
        >;
        /// Retrieves block header by given block number. Optionally, it also returns the MMR path
        /// and current chain length to authenticate the block's inclusion.
        async fn get_block_header_by_number(
            &self,
            request: tonic::Request<super::super::shared::BlockHeaderByNumberRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::shared::BlockHeaderByNumberResponse>,
            tonic::Status,
        >;
        /// Returns a list of committed notes matching the provided note IDs.
        async fn get_notes_by_id(
            &self,
            request: tonic::Request<super::super::note::NoteIdList>,
        ) -> std::result::Result<
            tonic::Response<super::super::note::CommittedNoteList>,
            tonic::Status,
        >;
        /// Returns the script for a note by its root.
        async fn get_note_script_by_root(
            &self,
            request: tonic::Request<super::super::note::NoteRoot>,
        ) -> std::result::Result<
            tonic::Response<super::super::shared::MaybeNoteScript>,
            tonic::Status,
        >;
        /// Returns a list of nullifiers that match the specified prefixes and are recorded in the node.
        ///
        /// Note that only 16-bit prefixes are supported at this time.
        async fn sync_nullifiers(
            &self,
            request: tonic::Request<super::SyncNullifiersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncNullifiersResponse>,
            tonic::Status,
        >;
        /// Returns info which can be used by the requester to sync up to the tip of chain for the notes they are interested in.
        ///
        /// requester specifies the `note_tags` they are interested in, and the block height from which to search for new for
        /// matching notes for. The request will then return the next block containing any note matching the provided tags.
        ///
        /// The response includes each note's metadata and inclusion proof.
        ///
        /// A basic note sync can be implemented by repeatedly requesting the previous response's block until reaching the
        /// tip of the chain.
        async fn sync_notes(
            &self,
            request: tonic::Request<super::SyncNotesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncNotesResponse>,
            tonic::Status,
        >;
        /// Returns info which can be used by the requester to sync up to the latest state of the chain
        /// for the objects (accounts, notes, nullifiers) the requester is interested in.
        ///
        /// This request returns the next block containing requested data. It also returns `chain_tip`
        /// which is the latest block number in the chain. requester is expected to repeat these requests
        /// in a loop until `response.block_header.block_num == response.chain_tip`, at which point
        /// the requester is fully synchronized with the chain.
        ///
        /// Each request also returns info about new notes, nullifiers etc. created. It also returns
        /// Chain MMR delta that can be used to update the state of Chain MMR. This includes both chain
        /// MMR peaks and chain MMR nodes.
        ///
        /// For preserving some degree of privacy, note tags and nullifiers filters contain only high
        /// part of hashes. Thus, returned data contains excessive notes and nullifiers, requester can make
        /// additional filtering of that data on its side.
        async fn sync_state(
            &self,
            request: tonic::Request<super::SyncStateRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncStateResponse>,
            tonic::Status,
        >;
        /// Returns account vault updates for specified account within a block range.
        async fn sync_account_vault(
            &self,
            request: tonic::Request<super::SyncAccountVaultRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncAccountVaultResponse>,
            tonic::Status,
        >;
        /// Returns storage map updates for specified account and storage slots within a block range.
        async fn sync_storage_maps(
            &self,
            request: tonic::Request<super::SyncStorageMapsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncStorageMapsResponse>,
            tonic::Status,
        >;
        /// Returns transactions records for specific accounts within a block range.
        async fn sync_transactions(
            &self,
            request: tonic::Request<super::SyncTransactionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SyncTransactionsResponse>,
            tonic::Status,
        >;
    }
    /// Store API for the RPC component
    #[derive(Debug)]
    pub struct RpcServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> RpcServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            Self {
                inner,
                accept_compression_encodings: Default::default(),
                send_compression_encodings: Default::default(),
                max_decoding_message_size: None,
                max_encoding_message_size: None,
            }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> InterceptedService<Self, F>
        where
            F: tonic::service::Interceptor,
        {
            InterceptedService::new(Self::new(inner), interceptor)
        }
        /// Enable decompressing requests with the given encoding.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.accept_compression_encodings.enable(encoding);
            self
        }
        /// Compress responses with the given encoding, if the client supports it.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.send_compression_encodings.enable(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.max_decoding_message_size = Some(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.max_encoding_message_size = Some(limit);
            self
        }
    }
    impl<T, B> tonic::codegen::Service<http::Request<B>> for RpcServer<T>
    where
        T: Rpc,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        type Error = std::convert::Infallible;
        type Future = BoxFuture<Self::Response, Self::Error>;
        fn poll_ready(
            &mut self,
            _cx: &mut Context<'_>,
        ) -> Poll<std::result::Result<(), Self::Error>> {
            Poll::Ready(Ok(()))
        }
        fn call(&mut self, req: http::Request<B>) -> Self::Future {
            match req.uri().path() {
                "/rpc_store.Rpc/Status" => {
                    #[allow(non_camel_case_types)]
                    struct StatusSvc<T: Rpc>(pub Arc<T>);
                    impl<T: Rpc> tonic::server::UnaryService<()> for StatusSvc<T> {
                        type Response = super::StoreStatus;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(&mut self, request: tonic::Request<()>) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::status(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = StatusSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/CheckNullifiers" => {
                    #[allow(non_camel_case_types)]
                    struct CheckNullifiersSvc<T: Rpc>(pub Arc<T>);
                    impl<T: Rpc> tonic::server::UnaryService<super::NullifierList>
                    for CheckNullifiersSvc<T> {
                        type Response = super::CheckNullifiersResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NullifierList>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::check_nullifiers(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = CheckNullifiersSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/GetAccountDetails" => {
                    #[allow(non_camel_case_types)]
                    struct GetAccountDetailsSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<super::super::account::AccountId>
                    for GetAccountDetailsSvc<T> {
                        type Response = super::super::account::AccountDetails;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::super::account::AccountId>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::get_account_details(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetAccountDetailsSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/GetAccountProof" => {
                    #[allow(non_camel_case_types)]
                    struct GetAccountProofSvc<T: Rpc>(pub Arc<T>);
                    impl<T: Rpc> tonic::server::UnaryService<super::AccountProofRequest>
                    for GetAccountProofSvc<T> {
                        type Response = super::AccountProofResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::AccountProofRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::get_account_proof(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetAccountProofSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/GetBlockByNumber" => {
                    #[allow(non_camel_case_types)]
                    struct GetBlockByNumberSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<super::super::blockchain::BlockNumber>
                    for GetBlockByNumberSvc<T> {
                        type Response = super::super::blockchain::MaybeBlock;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::blockchain::BlockNumber,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::get_block_by_number(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetBlockByNumberSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/GetBlockHeaderByNumber" => {
                    #[allow(non_camel_case_types)]
                    struct GetBlockHeaderByNumberSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<
                        super::super::shared::BlockHeaderByNumberRequest,
                    > for GetBlockHeaderByNumberSvc<T> {
                        type Response = super::super::shared::BlockHeaderByNumberResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::shared::BlockHeaderByNumberRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::get_block_header_by_number(&inner, request)
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetBlockHeaderByNumberSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/GetNotesById" => {
                    #[allow(non_camel_case_types)]
                    struct GetNotesByIdSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<super::super::note::NoteIdList>
                    for GetNotesByIdSvc<T> {
                        type Response = super::super::note::CommittedNoteList;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::super::note::NoteIdList>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::get_notes_by_id(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetNotesByIdSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/GetNoteScriptByRoot" => {
                    #[allow(non_camel_case_types)]
                    struct GetNoteScriptByRootSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<super::super::note::NoteRoot>
                    for GetNoteScriptByRootSvc<T> {
                        type Response = super::super::shared::MaybeNoteScript;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::super::note::NoteRoot>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::get_note_script_by_root(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetNoteScriptByRootSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/SyncNullifiers" => {
                    #[allow(non_camel_case_types)]
                    struct SyncNullifiersSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<super::SyncNullifiersRequest>
                    for SyncNullifiersSvc<T> {
                        type Response = super::SyncNullifiersResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SyncNullifiersRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::sync_nullifiers(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = SyncNullifiersSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/SyncNotes" => {
                    #[allow(non_camel_case_types)]
                    struct SyncNotesSvc<T: Rpc>(pub Arc<T>);
                    impl<T: Rpc> tonic::server::UnaryService<super::SyncNotesRequest>
                    for SyncNotesSvc<T> {
                        type Response = super::SyncNotesResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SyncNotesRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::sync_notes(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = SyncNotesSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/SyncState" => {
                    #[allow(non_camel_case_types)]
                    struct SyncStateSvc<T: Rpc>(pub Arc<T>);
                    impl<T: Rpc> tonic::server::UnaryService<super::SyncStateRequest>
                    for SyncStateSvc<T> {
                        type Response = super::SyncStateResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SyncStateRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::sync_state(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = SyncStateSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/SyncAccountVault" => {
                    #[allow(non_camel_case_types)]
                    struct SyncAccountVaultSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<super::SyncAccountVaultRequest>
                    for SyncAccountVaultSvc<T> {
                        type Response = super::SyncAccountVaultResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SyncAccountVaultRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::sync_account_vault(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = SyncAccountVaultSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/SyncStorageMaps" => {
                    #[allow(non_camel_case_types)]
                    struct SyncStorageMapsSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<super::SyncStorageMapsRequest>
                    for SyncStorageMapsSvc<T> {
                        type Response = super::SyncStorageMapsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SyncStorageMapsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::sync_storage_maps(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = SyncStorageMapsSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/rpc_store.Rpc/SyncTransactions" => {
                    #[allow(non_camel_case_types)]
                    struct SyncTransactionsSvc<T: Rpc>(pub Arc<T>);
                    impl<
                        T: Rpc,
                    > tonic::server::UnaryService<super::SyncTransactionsRequest>
                    for SyncTransactionsSvc<T> {
                        type Response = super::SyncTransactionsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SyncTransactionsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Rpc>::sync_transactions(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = SyncTransactionsSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                _ => {
                    Box::pin(async move {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for RpcServer<T> {
        fn clone(&self) -> Self {
            let inner = self.inner.clone();
            Self {
                inner,
                accept_compression_encodings: self.accept_compression_encodings,
                send_compression_encodings: self.send_compression_encodings,
                max_decoding_message_size: self.max_decoding_message_size,
                max_encoding_message_size: self.max_encoding_message_size,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "rpc_store.Rpc";
    impl<T> tonic::server::NamedService for RpcServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
