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