// This file is @generated by prost-build.
/// Represents the status of the node.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RpcStatus {
    /// The rpc component's running version.
    #[prost(string, tag = "1")]
    pub version: ::prost::alloc::string::String,
    /// The genesis commitment.
    #[prost(message, optional, tag = "2")]
    pub genesis_commitment: ::core::option::Option<super::primitives::Digest>,
    /// The store status.
    #[prost(message, optional, tag = "3")]
    pub store: ::core::option::Option<super::rpc_store::StoreStatus>,
    /// The block producer status.
    #[prost(message, optional, tag = "4")]
    pub block_producer: ::core::option::Option<
        super::block_producer::BlockProducerStatus,
    >,
}
/// Generated client implementations.
pub mod api_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// RPC API for the RPC component
    #[derive(Debug, Clone)]
    pub struct ApiClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ApiClient<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> ApiClient<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,
        ) -> ApiClient<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,
        {
            ApiClient::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 of the node.
        pub async fn status(
            &mut self,
            request: impl tonic::IntoRequest<()>,
        ) -> std::result::Result<tonic::Response<super::RpcStatus>, 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.Api/Status");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "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::super::rpc_store::NullifierList>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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.Api/CheckNullifiers");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "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.Api/GetAccountDetails",
            );
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "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::super::rpc_store::AccountProofRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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.Api/GetAccountProof");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "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.Api/GetBlockByNumber");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "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.Api/GetBlockHeaderByNumber",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc.Api", "GetBlockHeaderByNumber"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns a list of 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.Api/GetNotesById");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "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.Api/GetNoteScriptByRoot",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc.Api", "GetNoteScriptByRoot"));
            self.inner.unary(req, path, codec).await
        }
        /// Submits proven transaction to the Miden network.
        pub async fn submit_proven_transaction(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::transaction::ProvenTransaction,
            >,
        ) -> std::result::Result<
            tonic::Response<
                super::super::block_producer::SubmitProvenTransactionResponse,
            >,
            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.Api/SubmitProvenTransaction",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("rpc.Api", "SubmitProvenTransaction"));
            self.inner.unary(req, path, codec).await
        }
        /// Submits a proven batch of transactions to the Miden network.
        ///
        /// The batch may include transactions which were are:
        ///
        /// * already in the mempool i.e. previously successfully submitted
        /// * will be submitted to the mempool in the future
        /// * won't be submitted to the mempool at all
        ///
        /// All transactions in the batch but not in the mempool must build on the current mempool
        /// state following normal transaction submission rules.
        pub async fn submit_proven_batch(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::transaction::ProvenTransactionBatch,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::block_producer::SubmitProvenBatchResponse>,
            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.Api/SubmitProvenBatch",
            );
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SubmitProvenBatch"));
            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::super::rpc_store::SyncNullifiersRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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.Api/SyncNullifiers");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncNullifiers"));
            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::super::rpc_store::SyncAccountVaultRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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.Api/SyncAccountVault");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncAccountVault"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns info which can be used by the client to sync up to the tip of chain for the notes they are interested in.
        ///
        /// Client 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::super::rpc_store::SyncNotesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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.Api/SyncNotes");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncNotes"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns info which can be used by the client to sync up to the latest state of the chain
        /// for the objects (accounts and notes) the client 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. Client is expected to repeat these requests
        /// in a loop until `response.block_header.block_num == response.chain_tip`, at which point
        /// the client is fully synchronized with the chain.
        ///
        /// Each update response also contains info about new notes, accounts 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 contain only high
        /// part of hashes. Thus, returned data contains excessive notes, client can make
        /// additional filtering of that data on its side.
        pub async fn sync_state(
            &mut self,
            request: impl tonic::IntoRequest<super::super::rpc_store::SyncStateRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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.Api/SyncState");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncState"));
            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::super::rpc_store::SyncStorageMapsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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.Api/SyncStorageMaps");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "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::super::rpc_store::SyncTransactionsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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.Api/SyncTransactions");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncTransactions"));
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod api_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 ApiServer.
    #[async_trait]
    pub trait Api: std::marker::Send + std::marker::Sync + 'static {
        /// Returns the status info of the node.
        async fn status(
            &self,
            request: tonic::Request<()>,
        ) -> std::result::Result<tonic::Response<super::RpcStatus>, tonic::Status>;
        /// Returns a nullifier proof for each of the requested nullifiers.
        async fn check_nullifiers(
            &self,
            request: tonic::Request<super::super::rpc_store::NullifierList>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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::super::rpc_store::AccountProofRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::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 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,
        >;
        /// Submits proven transaction to the Miden network.
        async fn submit_proven_transaction(
            &self,
            request: tonic::Request<super::super::transaction::ProvenTransaction>,
        ) -> std::result::Result<
            tonic::Response<
                super::super::block_producer::SubmitProvenTransactionResponse,
            >,
            tonic::Status,
        >;
        /// Submits a proven batch of transactions to the Miden network.
        ///
        /// The batch may include transactions which were are:
        ///
        /// * already in the mempool i.e. previously successfully submitted
        /// * will be submitted to the mempool in the future
        /// * won't be submitted to the mempool at all
        ///
        /// All transactions in the batch but not in the mempool must build on the current mempool
        /// state following normal transaction submission rules.
        async fn submit_proven_batch(
            &self,
            request: tonic::Request<super::super::transaction::ProvenTransactionBatch>,
        ) -> std::result::Result<
            tonic::Response<super::super::block_producer::SubmitProvenBatchResponse>,
            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::super::rpc_store::SyncNullifiersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::SyncNullifiersResponse>,
            tonic::Status,
        >;
        /// Returns account vault updates for specified account within a block range.
        async fn sync_account_vault(
            &self,
            request: tonic::Request<super::super::rpc_store::SyncAccountVaultRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::SyncAccountVaultResponse>,
            tonic::Status,
        >;
        /// Returns info which can be used by the client to sync up to the tip of chain for the notes they are interested in.
        ///
        /// Client 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::super::rpc_store::SyncNotesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::SyncNotesResponse>,
            tonic::Status,
        >;
        /// Returns info which can be used by the client to sync up to the latest state of the chain
        /// for the objects (accounts and notes) the client 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. Client is expected to repeat these requests
        /// in a loop until `response.block_header.block_num == response.chain_tip`, at which point
        /// the client is fully synchronized with the chain.
        ///
        /// Each update response also contains info about new notes, accounts 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 contain only high
        /// part of hashes. Thus, returned data contains excessive notes, client can make
        /// additional filtering of that data on its side.
        async fn sync_state(
            &self,
            request: tonic::Request<super::super::rpc_store::SyncStateRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::SyncStateResponse>,
            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::super::rpc_store::SyncStorageMapsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::SyncStorageMapsResponse>,
            tonic::Status,
        >;
        /// Returns transactions records for specific accounts within a block range.
        async fn sync_transactions(
            &self,
            request: tonic::Request<super::super::rpc_store::SyncTransactionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::rpc_store::SyncTransactionsResponse>,
            tonic::Status,
        >;
    }
    /// RPC API for the RPC component
    #[derive(Debug)]
    pub struct ApiServer<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> ApiServer<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 ApiServer<T>
    where
        T: Api,
        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.Api/Status" => {
                    #[allow(non_camel_case_types)]
                    struct StatusSvc<T: Api>(pub Arc<T>);
                    impl<T: Api> tonic::server::UnaryService<()> for StatusSvc<T> {
                        type Response = super::RpcStatus;
                        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 Api>::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.Api/CheckNullifiers" => {
                    #[allow(non_camel_case_types)]
                    struct CheckNullifiersSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<super::super::rpc_store::NullifierList>
                    for CheckNullifiersSvc<T> {
                        type Response = super::super::rpc_store::CheckNullifiersResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::rpc_store::NullifierList,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::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.Api/GetAccountDetails" => {
                    #[allow(non_camel_case_types)]
                    struct GetAccountDetailsSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > 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 Api>::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.Api/GetAccountProof" => {
                    #[allow(non_camel_case_types)]
                    struct GetAccountProofSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::rpc_store::AccountProofRequest,
                    > for GetAccountProofSvc<T> {
                        type Response = super::super::rpc_store::AccountProofResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::rpc_store::AccountProofRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::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.Api/GetBlockByNumber" => {
                    #[allow(non_camel_case_types)]
                    struct GetBlockByNumberSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > 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 Api>::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.Api/GetBlockHeaderByNumber" => {
                    #[allow(non_camel_case_types)]
                    struct GetBlockHeaderByNumberSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > 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 Api>::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.Api/GetNotesById" => {
                    #[allow(non_camel_case_types)]
                    struct GetNotesByIdSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > 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 Api>::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.Api/GetNoteScriptByRoot" => {
                    #[allow(non_camel_case_types)]
                    struct GetNoteScriptByRootSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > 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 Api>::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.Api/SubmitProvenTransaction" => {
                    #[allow(non_camel_case_types)]
                    struct SubmitProvenTransactionSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::transaction::ProvenTransaction,
                    > for SubmitProvenTransactionSvc<T> {
                        type Response = super::super::block_producer::SubmitProvenTransactionResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::transaction::ProvenTransaction,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::submit_proven_transaction(&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 = SubmitProvenTransactionSvc(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.Api/SubmitProvenBatch" => {
                    #[allow(non_camel_case_types)]
                    struct SubmitProvenBatchSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::transaction::ProvenTransactionBatch,
                    > for SubmitProvenBatchSvc<T> {
                        type Response = super::super::block_producer::SubmitProvenBatchResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::transaction::ProvenTransactionBatch,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::submit_proven_batch(&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 = SubmitProvenBatchSvc(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.Api/SyncNullifiers" => {
                    #[allow(non_camel_case_types)]
                    struct SyncNullifiersSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::rpc_store::SyncNullifiersRequest,
                    > for SyncNullifiersSvc<T> {
                        type Response = super::super::rpc_store::SyncNullifiersResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::rpc_store::SyncNullifiersRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::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.Api/SyncAccountVault" => {
                    #[allow(non_camel_case_types)]
                    struct SyncAccountVaultSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::rpc_store::SyncAccountVaultRequest,
                    > for SyncAccountVaultSvc<T> {
                        type Response = super::super::rpc_store::SyncAccountVaultResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::rpc_store::SyncAccountVaultRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::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.Api/SyncNotes" => {
                    #[allow(non_camel_case_types)]
                    struct SyncNotesSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::rpc_store::SyncNotesRequest,
                    > for SyncNotesSvc<T> {
                        type Response = super::super::rpc_store::SyncNotesResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::rpc_store::SyncNotesRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::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.Api/SyncState" => {
                    #[allow(non_camel_case_types)]
                    struct SyncStateSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::rpc_store::SyncStateRequest,
                    > for SyncStateSvc<T> {
                        type Response = super::super::rpc_store::SyncStateResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::rpc_store::SyncStateRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::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.Api/SyncStorageMaps" => {
                    #[allow(non_camel_case_types)]
                    struct SyncStorageMapsSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::rpc_store::SyncStorageMapsRequest,
                    > for SyncStorageMapsSvc<T> {
                        type Response = super::super::rpc_store::SyncStorageMapsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::rpc_store::SyncStorageMapsRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::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.Api/SyncTransactions" => {
                    #[allow(non_camel_case_types)]
                    struct SyncTransactionsSvc<T: Api>(pub Arc<T>);
                    impl<
                        T: Api,
                    > tonic::server::UnaryService<
                        super::super::rpc_store::SyncTransactionsRequest,
                    > for SyncTransactionsSvc<T> {
                        type Response = super::super::rpc_store::SyncTransactionsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::super::rpc_store::SyncTransactionsRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Api>::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 ApiServer<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.Api";
    impl<T> tonic::server::NamedService for ApiServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
