sui_rpc_api/proto/generated/
sui.rpc.alpha.rs

1// This file is @generated by prost-build.
2/// Request authenticated events for a stream starting from a checkpoint.
3#[non_exhaustive]
4#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5pub struct ListAuthenticatedEventsRequest {
6    /// Required. Stream identifier (Sui address) of the event stream.
7    #[prost(string, optional, tag = "1")]
8    pub stream_id: ::core::option::Option<::prost::alloc::string::String>,
9    /// Inclusive start checkpoint. Must not yet be pruned. (default: 0)
10    #[prost(uint64, optional, tag = "2")]
11    pub start_checkpoint: ::core::option::Option<u64>,
12    /// Number of events to return per page (default: 1000, max: 1000)
13    #[prost(uint32, optional, tag = "3")]
14    pub page_size: ::core::option::Option<u32>,
15    /// Page token for pagination. Use the next_page_token from previous response.
16    #[prost(bytes = "vec", optional, tag = "4")]
17    pub page_token: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
18}
19/// Response containing events and metadata.
20#[non_exhaustive]
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct ListAuthenticatedEventsResponse {
23    #[prost(message, repeated, tag = "1")]
24    pub events: ::prost::alloc::vec::Vec<AuthenticatedEvent>,
25    /// The highest indexed checkpoint.
26    #[prost(uint64, optional, tag = "2")]
27    pub highest_indexed_checkpoint: ::core::option::Option<u64>,
28    /// Token for fetching the next page of results. Contains event key index range. Empty if no more pages.
29    #[prost(bytes = "vec", optional, tag = "3")]
30    pub next_page_token: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
31}
32/// Single authenticated Move event entry.
33#[non_exhaustive]
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct AuthenticatedEvent {
36    /// The checkpoint sequence number where this event was recorded.
37    #[prost(uint64, optional, tag = "1")]
38    pub checkpoint: ::core::option::Option<u64>,
39    /// Index of the transaction within the checkpoint where the event was emitted.
40    #[prost(uint32, optional, tag = "2")]
41    pub transaction_idx: ::core::option::Option<u32>,
42    /// Index of the event within the transaction's event list.
43    #[prost(uint32, optional, tag = "3")]
44    pub event_idx: ::core::option::Option<u32>,
45    /// The event payload.
46    #[prost(message, optional, tag = "4")]
47    pub event: ::core::option::Option<::sui_rpc::proto::sui::rpc::v2::Event>,
48    /// The stream identifier (owner address) for which this event is authenticated.
49    #[prost(string, optional, tag = "5")]
50    pub stream_id: ::core::option::Option<::prost::alloc::string::String>,
51}
52/// Generated client implementations.
53pub mod event_service_client {
54    #![allow(
55        unused_variables,
56        dead_code,
57        missing_docs,
58        clippy::wildcard_imports,
59        clippy::let_unit_value,
60    )]
61    use tonic::codegen::*;
62    use tonic::codegen::http::Uri;
63    /// EventService provides paginated access to authenticated events per stream.
64    #[derive(Debug, Clone)]
65    pub struct EventServiceClient<T> {
66        inner: tonic::client::Grpc<T>,
67    }
68    impl EventServiceClient<tonic::transport::Channel> {
69        /// Attempt to create a new client by connecting to a given endpoint.
70        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
71        where
72            D: TryInto<tonic::transport::Endpoint>,
73            D::Error: Into<StdError>,
74        {
75            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
76            Ok(Self::new(conn))
77        }
78    }
79    impl<T> EventServiceClient<T>
80    where
81        T: tonic::client::GrpcService<tonic::body::Body>,
82        T::Error: Into<StdError>,
83        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
84        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
85    {
86        pub fn new(inner: T) -> Self {
87            let inner = tonic::client::Grpc::new(inner);
88            Self { inner }
89        }
90        pub fn with_origin(inner: T, origin: Uri) -> Self {
91            let inner = tonic::client::Grpc::with_origin(inner, origin);
92            Self { inner }
93        }
94        pub fn with_interceptor<F>(
95            inner: T,
96            interceptor: F,
97        ) -> EventServiceClient<InterceptedService<T, F>>
98        where
99            F: tonic::service::Interceptor,
100            T::ResponseBody: Default,
101            T: tonic::codegen::Service<
102                http::Request<tonic::body::Body>,
103                Response = http::Response<
104                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
105                >,
106            >,
107            <T as tonic::codegen::Service<
108                http::Request<tonic::body::Body>,
109            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
110        {
111            EventServiceClient::new(InterceptedService::new(inner, interceptor))
112        }
113        /// Compress requests with the given encoding.
114        ///
115        /// This requires the server to support it otherwise it might respond with an
116        /// error.
117        #[must_use]
118        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
119            self.inner = self.inner.send_compressed(encoding);
120            self
121        }
122        /// Enable decompressing responses.
123        #[must_use]
124        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
125            self.inner = self.inner.accept_compressed(encoding);
126            self
127        }
128        /// Limits the maximum size of a decoded message.
129        ///
130        /// Default: `4MB`
131        #[must_use]
132        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
133            self.inner = self.inner.max_decoding_message_size(limit);
134            self
135        }
136        /// Limits the maximum size of an encoded message.
137        ///
138        /// Default: `usize::MAX`
139        #[must_use]
140        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
141            self.inner = self.inner.max_encoding_message_size(limit);
142            self
143        }
144        /// Returns authenticated events for a given event stream ID.
145        pub async fn list_authenticated_events(
146            &mut self,
147            request: impl tonic::IntoRequest<super::ListAuthenticatedEventsRequest>,
148        ) -> std::result::Result<
149            tonic::Response<super::ListAuthenticatedEventsResponse>,
150            tonic::Status,
151        > {
152            self.inner
153                .ready()
154                .await
155                .map_err(|e| {
156                    tonic::Status::unknown(
157                        format!("Service was not ready: {}", e.into()),
158                    )
159                })?;
160            let codec = tonic_prost::ProstCodec::default();
161            let path = http::uri::PathAndQuery::from_static(
162                "/sui.rpc.alpha.EventService/ListAuthenticatedEvents",
163            );
164            let mut req = request.into_request();
165            req.extensions_mut()
166                .insert(
167                    GrpcMethod::new(
168                        "sui.rpc.alpha.EventService",
169                        "ListAuthenticatedEvents",
170                    ),
171                );
172            self.inner.unary(req, path, codec).await
173        }
174    }
175}
176/// Generated server implementations.
177pub mod event_service_server {
178    #![allow(
179        unused_variables,
180        dead_code,
181        missing_docs,
182        clippy::wildcard_imports,
183        clippy::let_unit_value,
184    )]
185    use tonic::codegen::*;
186    /// Generated trait containing gRPC methods that should be implemented for use with EventServiceServer.
187    #[async_trait]
188    pub trait EventService: std::marker::Send + std::marker::Sync + 'static {
189        /// Returns authenticated events for a given event stream ID.
190        async fn list_authenticated_events(
191            &self,
192            request: tonic::Request<super::ListAuthenticatedEventsRequest>,
193        ) -> std::result::Result<
194            tonic::Response<super::ListAuthenticatedEventsResponse>,
195            tonic::Status,
196        >;
197    }
198    /// EventService provides paginated access to authenticated events per stream.
199    #[derive(Debug)]
200    pub struct EventServiceServer<T> {
201        inner: Arc<T>,
202        accept_compression_encodings: EnabledCompressionEncodings,
203        send_compression_encodings: EnabledCompressionEncodings,
204        max_decoding_message_size: Option<usize>,
205        max_encoding_message_size: Option<usize>,
206    }
207    impl<T> EventServiceServer<T> {
208        pub fn new(inner: T) -> Self {
209            Self::from_arc(Arc::new(inner))
210        }
211        pub fn from_arc(inner: Arc<T>) -> Self {
212            Self {
213                inner,
214                accept_compression_encodings: Default::default(),
215                send_compression_encodings: Default::default(),
216                max_decoding_message_size: None,
217                max_encoding_message_size: None,
218            }
219        }
220        pub fn with_interceptor<F>(
221            inner: T,
222            interceptor: F,
223        ) -> InterceptedService<Self, F>
224        where
225            F: tonic::service::Interceptor,
226        {
227            InterceptedService::new(Self::new(inner), interceptor)
228        }
229        /// Enable decompressing requests with the given encoding.
230        #[must_use]
231        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
232            self.accept_compression_encodings.enable(encoding);
233            self
234        }
235        /// Compress responses with the given encoding, if the client supports it.
236        #[must_use]
237        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
238            self.send_compression_encodings.enable(encoding);
239            self
240        }
241        /// Limits the maximum size of a decoded message.
242        ///
243        /// Default: `4MB`
244        #[must_use]
245        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
246            self.max_decoding_message_size = Some(limit);
247            self
248        }
249        /// Limits the maximum size of an encoded message.
250        ///
251        /// Default: `usize::MAX`
252        #[must_use]
253        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
254            self.max_encoding_message_size = Some(limit);
255            self
256        }
257    }
258    impl<T, B> tonic::codegen::Service<http::Request<B>> for EventServiceServer<T>
259    where
260        T: EventService,
261        B: Body + std::marker::Send + 'static,
262        B::Error: Into<StdError> + std::marker::Send + 'static,
263    {
264        type Response = http::Response<tonic::body::Body>;
265        type Error = std::convert::Infallible;
266        type Future = BoxFuture<Self::Response, Self::Error>;
267        fn poll_ready(
268            &mut self,
269            _cx: &mut Context<'_>,
270        ) -> Poll<std::result::Result<(), Self::Error>> {
271            Poll::Ready(Ok(()))
272        }
273        fn call(&mut self, req: http::Request<B>) -> Self::Future {
274            match req.uri().path() {
275                "/sui.rpc.alpha.EventService/ListAuthenticatedEvents" => {
276                    #[allow(non_camel_case_types)]
277                    struct ListAuthenticatedEventsSvc<T: EventService>(pub Arc<T>);
278                    impl<
279                        T: EventService,
280                    > tonic::server::UnaryService<super::ListAuthenticatedEventsRequest>
281                    for ListAuthenticatedEventsSvc<T> {
282                        type Response = super::ListAuthenticatedEventsResponse;
283                        type Future = BoxFuture<
284                            tonic::Response<Self::Response>,
285                            tonic::Status,
286                        >;
287                        fn call(
288                            &mut self,
289                            request: tonic::Request<
290                                super::ListAuthenticatedEventsRequest,
291                            >,
292                        ) -> Self::Future {
293                            let inner = Arc::clone(&self.0);
294                            let fut = async move {
295                                <T as EventService>::list_authenticated_events(
296                                        &inner,
297                                        request,
298                                    )
299                                    .await
300                            };
301                            Box::pin(fut)
302                        }
303                    }
304                    let accept_compression_encodings = self.accept_compression_encodings;
305                    let send_compression_encodings = self.send_compression_encodings;
306                    let max_decoding_message_size = self.max_decoding_message_size;
307                    let max_encoding_message_size = self.max_encoding_message_size;
308                    let inner = self.inner.clone();
309                    let fut = async move {
310                        let method = ListAuthenticatedEventsSvc(inner);
311                        let codec = tonic_prost::ProstCodec::default();
312                        let mut grpc = tonic::server::Grpc::new(codec)
313                            .apply_compression_config(
314                                accept_compression_encodings,
315                                send_compression_encodings,
316                            )
317                            .apply_max_message_size_config(
318                                max_decoding_message_size,
319                                max_encoding_message_size,
320                            );
321                        let res = grpc.unary(method, req).await;
322                        Ok(res)
323                    };
324                    Box::pin(fut)
325                }
326                _ => {
327                    Box::pin(async move {
328                        let mut response = http::Response::new(
329                            tonic::body::Body::default(),
330                        );
331                        let headers = response.headers_mut();
332                        headers
333                            .insert(
334                                tonic::Status::GRPC_STATUS,
335                                (tonic::Code::Unimplemented as i32).into(),
336                            );
337                        headers
338                            .insert(
339                                http::header::CONTENT_TYPE,
340                                tonic::metadata::GRPC_CONTENT_TYPE,
341                            );
342                        Ok(response)
343                    })
344                }
345            }
346        }
347    }
348    impl<T> Clone for EventServiceServer<T> {
349        fn clone(&self) -> Self {
350            let inner = self.inner.clone();
351            Self {
352                inner,
353                accept_compression_encodings: self.accept_compression_encodings,
354                send_compression_encodings: self.send_compression_encodings,
355                max_decoding_message_size: self.max_decoding_message_size,
356                max_encoding_message_size: self.max_encoding_message_size,
357            }
358        }
359    }
360    /// Generated gRPC service name
361    pub const SERVICE_NAME: &str = "sui.rpc.alpha.EventService";
362    impl<T> tonic::server::NamedService for EventServiceServer<T> {
363        const NAME: &'static str = SERVICE_NAME;
364    }
365}
366/// Object Checkpoint State inclusion proof.
367#[non_exhaustive]
368#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
369pub struct OcsInclusionProof {
370    /// BCS-encoded merkle proof nodes.
371    #[prost(bytes = "vec", optional, tag = "1")]
372    pub merkle_proof: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
373    /// Leaf index in the merkle tree.
374    #[prost(uint64, optional, tag = "2")]
375    pub leaf_index: ::core::option::Option<u64>,
376    /// Tree root digest (32 bytes).
377    #[prost(bytes = "vec", optional, tag = "3")]
378    pub tree_root: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
379}
380/// Request for object inclusion proof at a checkpoint.
381#[non_exhaustive]
382#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
383pub struct GetObjectInclusionProofRequest {
384    /// Required. Object ID to get inclusion proof for.
385    #[prost(string, optional, tag = "1")]
386    pub object_id: ::core::option::Option<::prost::alloc::string::String>,
387    /// Required. Checkpoint sequence number.
388    #[prost(uint64, optional, tag = "2")]
389    pub checkpoint: ::core::option::Option<u64>,
390}
391/// Response containing object inclusion proof and object data.
392#[non_exhaustive]
393#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
394pub struct GetObjectInclusionProofResponse {
395    /// Object reference being proven (object_id, version, digest).
396    #[prost(message, optional, tag = "1")]
397    pub object_ref: ::core::option::Option<
398        ::sui_rpc::proto::sui::rpc::v2::ObjectReference,
399    >,
400    /// Object inclusion proof.
401    #[prost(message, optional, tag = "2")]
402    pub inclusion_proof: ::core::option::Option<OcsInclusionProof>,
403    /// BCS-encoded object data.
404    #[prost(bytes = "vec", optional, tag = "3")]
405    pub object_data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
406}
407/// Generated client implementations.
408pub mod proof_service_client {
409    #![allow(
410        unused_variables,
411        dead_code,
412        missing_docs,
413        clippy::wildcard_imports,
414        clippy::let_unit_value,
415    )]
416    use tonic::codegen::*;
417    use tonic::codegen::http::Uri;
418    /// ProofService provides cryptographic proofs for blockchain objects.
419    #[derive(Debug, Clone)]
420    pub struct ProofServiceClient<T> {
421        inner: tonic::client::Grpc<T>,
422    }
423    impl ProofServiceClient<tonic::transport::Channel> {
424        /// Attempt to create a new client by connecting to a given endpoint.
425        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
426        where
427            D: TryInto<tonic::transport::Endpoint>,
428            D::Error: Into<StdError>,
429        {
430            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
431            Ok(Self::new(conn))
432        }
433    }
434    impl<T> ProofServiceClient<T>
435    where
436        T: tonic::client::GrpcService<tonic::body::Body>,
437        T::Error: Into<StdError>,
438        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
439        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
440    {
441        pub fn new(inner: T) -> Self {
442            let inner = tonic::client::Grpc::new(inner);
443            Self { inner }
444        }
445        pub fn with_origin(inner: T, origin: Uri) -> Self {
446            let inner = tonic::client::Grpc::with_origin(inner, origin);
447            Self { inner }
448        }
449        pub fn with_interceptor<F>(
450            inner: T,
451            interceptor: F,
452        ) -> ProofServiceClient<InterceptedService<T, F>>
453        where
454            F: tonic::service::Interceptor,
455            T::ResponseBody: Default,
456            T: tonic::codegen::Service<
457                http::Request<tonic::body::Body>,
458                Response = http::Response<
459                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
460                >,
461            >,
462            <T as tonic::codegen::Service<
463                http::Request<tonic::body::Body>,
464            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
465        {
466            ProofServiceClient::new(InterceptedService::new(inner, interceptor))
467        }
468        /// Compress requests with the given encoding.
469        ///
470        /// This requires the server to support it otherwise it might respond with an
471        /// error.
472        #[must_use]
473        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
474            self.inner = self.inner.send_compressed(encoding);
475            self
476        }
477        /// Enable decompressing responses.
478        #[must_use]
479        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
480            self.inner = self.inner.accept_compressed(encoding);
481            self
482        }
483        /// Limits the maximum size of a decoded message.
484        ///
485        /// Default: `4MB`
486        #[must_use]
487        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
488            self.inner = self.inner.max_decoding_message_size(limit);
489            self
490        }
491        /// Limits the maximum size of an encoded message.
492        ///
493        /// Default: `usize::MAX`
494        #[must_use]
495        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
496            self.inner = self.inner.max_encoding_message_size(limit);
497            self
498        }
499        /// Returns an inclusion proof if a specified object id was written in a specified checkpoint.
500        pub async fn get_object_inclusion_proof(
501            &mut self,
502            request: impl tonic::IntoRequest<super::GetObjectInclusionProofRequest>,
503        ) -> std::result::Result<
504            tonic::Response<super::GetObjectInclusionProofResponse>,
505            tonic::Status,
506        > {
507            self.inner
508                .ready()
509                .await
510                .map_err(|e| {
511                    tonic::Status::unknown(
512                        format!("Service was not ready: {}", e.into()),
513                    )
514                })?;
515            let codec = tonic_prost::ProstCodec::default();
516            let path = http::uri::PathAndQuery::from_static(
517                "/sui.rpc.alpha.ProofService/GetObjectInclusionProof",
518            );
519            let mut req = request.into_request();
520            req.extensions_mut()
521                .insert(
522                    GrpcMethod::new(
523                        "sui.rpc.alpha.ProofService",
524                        "GetObjectInclusionProof",
525                    ),
526                );
527            self.inner.unary(req, path, codec).await
528        }
529    }
530}
531/// Generated server implementations.
532pub mod proof_service_server {
533    #![allow(
534        unused_variables,
535        dead_code,
536        missing_docs,
537        clippy::wildcard_imports,
538        clippy::let_unit_value,
539    )]
540    use tonic::codegen::*;
541    /// Generated trait containing gRPC methods that should be implemented for use with ProofServiceServer.
542    #[async_trait]
543    pub trait ProofService: std::marker::Send + std::marker::Sync + 'static {
544        /// Returns an inclusion proof if a specified object id was written in a specified checkpoint.
545        async fn get_object_inclusion_proof(
546            &self,
547            request: tonic::Request<super::GetObjectInclusionProofRequest>,
548        ) -> std::result::Result<
549            tonic::Response<super::GetObjectInclusionProofResponse>,
550            tonic::Status,
551        >;
552    }
553    /// ProofService provides cryptographic proofs for blockchain objects.
554    #[derive(Debug)]
555    pub struct ProofServiceServer<T> {
556        inner: Arc<T>,
557        accept_compression_encodings: EnabledCompressionEncodings,
558        send_compression_encodings: EnabledCompressionEncodings,
559        max_decoding_message_size: Option<usize>,
560        max_encoding_message_size: Option<usize>,
561    }
562    impl<T> ProofServiceServer<T> {
563        pub fn new(inner: T) -> Self {
564            Self::from_arc(Arc::new(inner))
565        }
566        pub fn from_arc(inner: Arc<T>) -> Self {
567            Self {
568                inner,
569                accept_compression_encodings: Default::default(),
570                send_compression_encodings: Default::default(),
571                max_decoding_message_size: None,
572                max_encoding_message_size: None,
573            }
574        }
575        pub fn with_interceptor<F>(
576            inner: T,
577            interceptor: F,
578        ) -> InterceptedService<Self, F>
579        where
580            F: tonic::service::Interceptor,
581        {
582            InterceptedService::new(Self::new(inner), interceptor)
583        }
584        /// Enable decompressing requests with the given encoding.
585        #[must_use]
586        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
587            self.accept_compression_encodings.enable(encoding);
588            self
589        }
590        /// Compress responses with the given encoding, if the client supports it.
591        #[must_use]
592        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
593            self.send_compression_encodings.enable(encoding);
594            self
595        }
596        /// Limits the maximum size of a decoded message.
597        ///
598        /// Default: `4MB`
599        #[must_use]
600        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
601            self.max_decoding_message_size = Some(limit);
602            self
603        }
604        /// Limits the maximum size of an encoded message.
605        ///
606        /// Default: `usize::MAX`
607        #[must_use]
608        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
609            self.max_encoding_message_size = Some(limit);
610            self
611        }
612    }
613    impl<T, B> tonic::codegen::Service<http::Request<B>> for ProofServiceServer<T>
614    where
615        T: ProofService,
616        B: Body + std::marker::Send + 'static,
617        B::Error: Into<StdError> + std::marker::Send + 'static,
618    {
619        type Response = http::Response<tonic::body::Body>;
620        type Error = std::convert::Infallible;
621        type Future = BoxFuture<Self::Response, Self::Error>;
622        fn poll_ready(
623            &mut self,
624            _cx: &mut Context<'_>,
625        ) -> Poll<std::result::Result<(), Self::Error>> {
626            Poll::Ready(Ok(()))
627        }
628        fn call(&mut self, req: http::Request<B>) -> Self::Future {
629            match req.uri().path() {
630                "/sui.rpc.alpha.ProofService/GetObjectInclusionProof" => {
631                    #[allow(non_camel_case_types)]
632                    struct GetObjectInclusionProofSvc<T: ProofService>(pub Arc<T>);
633                    impl<
634                        T: ProofService,
635                    > tonic::server::UnaryService<super::GetObjectInclusionProofRequest>
636                    for GetObjectInclusionProofSvc<T> {
637                        type Response = super::GetObjectInclusionProofResponse;
638                        type Future = BoxFuture<
639                            tonic::Response<Self::Response>,
640                            tonic::Status,
641                        >;
642                        fn call(
643                            &mut self,
644                            request: tonic::Request<
645                                super::GetObjectInclusionProofRequest,
646                            >,
647                        ) -> Self::Future {
648                            let inner = Arc::clone(&self.0);
649                            let fut = async move {
650                                <T as ProofService>::get_object_inclusion_proof(
651                                        &inner,
652                                        request,
653                                    )
654                                    .await
655                            };
656                            Box::pin(fut)
657                        }
658                    }
659                    let accept_compression_encodings = self.accept_compression_encodings;
660                    let send_compression_encodings = self.send_compression_encodings;
661                    let max_decoding_message_size = self.max_decoding_message_size;
662                    let max_encoding_message_size = self.max_encoding_message_size;
663                    let inner = self.inner.clone();
664                    let fut = async move {
665                        let method = GetObjectInclusionProofSvc(inner);
666                        let codec = tonic_prost::ProstCodec::default();
667                        let mut grpc = tonic::server::Grpc::new(codec)
668                            .apply_compression_config(
669                                accept_compression_encodings,
670                                send_compression_encodings,
671                            )
672                            .apply_max_message_size_config(
673                                max_decoding_message_size,
674                                max_encoding_message_size,
675                            );
676                        let res = grpc.unary(method, req).await;
677                        Ok(res)
678                    };
679                    Box::pin(fut)
680                }
681                _ => {
682                    Box::pin(async move {
683                        let mut response = http::Response::new(
684                            tonic::body::Body::default(),
685                        );
686                        let headers = response.headers_mut();
687                        headers
688                            .insert(
689                                tonic::Status::GRPC_STATUS,
690                                (tonic::Code::Unimplemented as i32).into(),
691                            );
692                        headers
693                            .insert(
694                                http::header::CONTENT_TYPE,
695                                tonic::metadata::GRPC_CONTENT_TYPE,
696                            );
697                        Ok(response)
698                    })
699                }
700            }
701        }
702    }
703    impl<T> Clone for ProofServiceServer<T> {
704        fn clone(&self) -> Self {
705            let inner = self.inner.clone();
706            Self {
707                inner,
708                accept_compression_encodings: self.accept_compression_encodings,
709                send_compression_encodings: self.send_compression_encodings,
710                max_decoding_message_size: self.max_decoding_message_size,
711                max_encoding_message_size: self.max_encoding_message_size,
712            }
713        }
714    }
715    /// Generated gRPC service name
716    pub const SERVICE_NAME: &str = "sui.rpc.alpha.ProofService";
717    impl<T> tonic::server::NamedService for ProofServiceServer<T> {
718        const NAME: &'static str = SERVICE_NAME;
719    }
720}