xmtp_proto/gen/
xmtp.mls_validation.v1.rs

1// This file is @generated by prost-build.
2/// Contains a batch of serialized Key Packages
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct ValidateInboxIdKeyPackagesRequest {
5    #[prost(message, repeated, tag = "1")]
6    pub key_packages: ::prost::alloc::vec::Vec<
7        validate_inbox_id_key_packages_request::KeyPackage,
8    >,
9}
10/// Nested message and enum types in `ValidateInboxIdKeyPackagesRequest`.
11pub mod validate_inbox_id_key_packages_request {
12    /// Wrapper for each key package
13    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
14    pub struct KeyPackage {
15        #[prost(bytes = "vec", tag = "1")]
16        pub key_package_bytes_tls_serialized: ::prost::alloc::vec::Vec<u8>,
17        #[prost(bool, tag = "2")]
18        pub is_inbox_id_credential: bool,
19    }
20    impl ::prost::Name for KeyPackage {
21        const NAME: &'static str = "KeyPackage";
22        const PACKAGE: &'static str = "xmtp.mls_validation.v1";
23        fn full_name() -> ::prost::alloc::string::String {
24            "xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesRequest.KeyPackage".into()
25        }
26        fn type_url() -> ::prost::alloc::string::String {
27            "/xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesRequest.KeyPackage".into()
28        }
29    }
30}
31impl ::prost::Name for ValidateInboxIdKeyPackagesRequest {
32    const NAME: &'static str = "ValidateInboxIdKeyPackagesRequest";
33    const PACKAGE: &'static str = "xmtp.mls_validation.v1";
34    fn full_name() -> ::prost::alloc::string::String {
35        "xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesRequest".into()
36    }
37    fn type_url() -> ::prost::alloc::string::String {
38        "/xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesRequest".into()
39    }
40}
41/// Validates a Inbox-ID Key Package Type
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct ValidateInboxIdKeyPackagesResponse {
44    #[prost(message, repeated, tag = "1")]
45    pub responses: ::prost::alloc::vec::Vec<
46        validate_inbox_id_key_packages_response::Response,
47    >,
48}
49/// Nested message and enum types in `ValidateInboxIdKeyPackagesResponse`.
50pub mod validate_inbox_id_key_packages_response {
51    /// one response corresponding to information about one key package
52    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
53    pub struct Response {
54        #[prost(bool, tag = "1")]
55        pub is_ok: bool,
56        #[prost(string, tag = "2")]
57        pub error_message: ::prost::alloc::string::String,
58        #[prost(message, optional, tag = "3")]
59        pub credential: ::core::option::Option<
60            super::super::super::identity::MlsCredential,
61        >,
62        #[prost(bytes = "vec", tag = "4")]
63        pub installation_public_key: ::prost::alloc::vec::Vec<u8>,
64        #[prost(uint64, tag = "5")]
65        pub expiration: u64,
66    }
67    impl ::prost::Name for Response {
68        const NAME: &'static str = "Response";
69        const PACKAGE: &'static str = "xmtp.mls_validation.v1";
70        fn full_name() -> ::prost::alloc::string::String {
71            "xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse.Response".into()
72        }
73        fn type_url() -> ::prost::alloc::string::String {
74            "/xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse.Response".into()
75        }
76    }
77}
78impl ::prost::Name for ValidateInboxIdKeyPackagesResponse {
79    const NAME: &'static str = "ValidateInboxIdKeyPackagesResponse";
80    const PACKAGE: &'static str = "xmtp.mls_validation.v1";
81    fn full_name() -> ::prost::alloc::string::String {
82        "xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse".into()
83    }
84    fn type_url() -> ::prost::alloc::string::String {
85        "/xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse".into()
86    }
87}
88/// Contains a batch of serialized Key Packages
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct ValidateKeyPackagesRequest {
91    #[prost(message, repeated, tag = "1")]
92    pub key_packages: ::prost::alloc::vec::Vec<
93        validate_key_packages_request::KeyPackage,
94    >,
95}
96/// Nested message and enum types in `ValidateKeyPackagesRequest`.
97pub mod validate_key_packages_request {
98    /// Wrapper for each key package
99    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
100    pub struct KeyPackage {
101        #[prost(bytes = "vec", tag = "1")]
102        pub key_package_bytes_tls_serialized: ::prost::alloc::vec::Vec<u8>,
103        #[prost(bool, tag = "2")]
104        pub is_inbox_id_credential: bool,
105    }
106    impl ::prost::Name for KeyPackage {
107        const NAME: &'static str = "KeyPackage";
108        const PACKAGE: &'static str = "xmtp.mls_validation.v1";
109        fn full_name() -> ::prost::alloc::string::String {
110            "xmtp.mls_validation.v1.ValidateKeyPackagesRequest.KeyPackage".into()
111        }
112        fn type_url() -> ::prost::alloc::string::String {
113            "/xmtp.mls_validation.v1.ValidateKeyPackagesRequest.KeyPackage".into()
114        }
115    }
116}
117impl ::prost::Name for ValidateKeyPackagesRequest {
118    const NAME: &'static str = "ValidateKeyPackagesRequest";
119    const PACKAGE: &'static str = "xmtp.mls_validation.v1";
120    fn full_name() -> ::prost::alloc::string::String {
121        "xmtp.mls_validation.v1.ValidateKeyPackagesRequest".into()
122    }
123    fn type_url() -> ::prost::alloc::string::String {
124        "/xmtp.mls_validation.v1.ValidateKeyPackagesRequest".into()
125    }
126}
127/// Response to ValidateKeyPackagesRequest
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct ValidateKeyPackagesResponse {
130    #[prost(message, repeated, tag = "1")]
131    pub responses: ::prost::alloc::vec::Vec<
132        validate_key_packages_response::ValidationResponse,
133    >,
134}
135/// Nested message and enum types in `ValidateKeyPackagesResponse`.
136pub mod validate_key_packages_response {
137    /// An individual response to one key package
138    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
139    pub struct ValidationResponse {
140        #[prost(bool, tag = "1")]
141        pub is_ok: bool,
142        #[prost(string, tag = "2")]
143        pub error_message: ::prost::alloc::string::String,
144        #[prost(bytes = "vec", tag = "3")]
145        pub installation_id: ::prost::alloc::vec::Vec<u8>,
146        #[prost(string, tag = "4")]
147        pub account_address: ::prost::alloc::string::String,
148        #[prost(bytes = "vec", tag = "5")]
149        pub credential_identity_bytes: ::prost::alloc::vec::Vec<u8>,
150        #[prost(uint64, tag = "6")]
151        pub expiration: u64,
152    }
153    impl ::prost::Name for ValidationResponse {
154        const NAME: &'static str = "ValidationResponse";
155        const PACKAGE: &'static str = "xmtp.mls_validation.v1";
156        fn full_name() -> ::prost::alloc::string::String {
157            "xmtp.mls_validation.v1.ValidateKeyPackagesResponse.ValidationResponse"
158                .into()
159        }
160        fn type_url() -> ::prost::alloc::string::String {
161            "/xmtp.mls_validation.v1.ValidateKeyPackagesResponse.ValidationResponse"
162                .into()
163        }
164    }
165}
166impl ::prost::Name for ValidateKeyPackagesResponse {
167    const NAME: &'static str = "ValidateKeyPackagesResponse";
168    const PACKAGE: &'static str = "xmtp.mls_validation.v1";
169    fn full_name() -> ::prost::alloc::string::String {
170        "xmtp.mls_validation.v1.ValidateKeyPackagesResponse".into()
171    }
172    fn type_url() -> ::prost::alloc::string::String {
173        "/xmtp.mls_validation.v1.ValidateKeyPackagesResponse".into()
174    }
175}
176/// Contains a batch of serialized Group Messages
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct ValidateGroupMessagesRequest {
179    #[prost(message, repeated, tag = "1")]
180    pub group_messages: ::prost::alloc::vec::Vec<
181        validate_group_messages_request::GroupMessage,
182    >,
183}
184/// Nested message and enum types in `ValidateGroupMessagesRequest`.
185pub mod validate_group_messages_request {
186    /// Wrapper for each message
187    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
188    pub struct GroupMessage {
189        #[prost(bytes = "vec", tag = "1")]
190        pub group_message_bytes_tls_serialized: ::prost::alloc::vec::Vec<u8>,
191    }
192    impl ::prost::Name for GroupMessage {
193        const NAME: &'static str = "GroupMessage";
194        const PACKAGE: &'static str = "xmtp.mls_validation.v1";
195        fn full_name() -> ::prost::alloc::string::String {
196            "xmtp.mls_validation.v1.ValidateGroupMessagesRequest.GroupMessage".into()
197        }
198        fn type_url() -> ::prost::alloc::string::String {
199            "/xmtp.mls_validation.v1.ValidateGroupMessagesRequest.GroupMessage".into()
200        }
201    }
202}
203impl ::prost::Name for ValidateGroupMessagesRequest {
204    const NAME: &'static str = "ValidateGroupMessagesRequest";
205    const PACKAGE: &'static str = "xmtp.mls_validation.v1";
206    fn full_name() -> ::prost::alloc::string::String {
207        "xmtp.mls_validation.v1.ValidateGroupMessagesRequest".into()
208    }
209    fn type_url() -> ::prost::alloc::string::String {
210        "/xmtp.mls_validation.v1.ValidateGroupMessagesRequest".into()
211    }
212}
213/// Response to ValidateGroupMessagesRequest
214#[derive(Clone, PartialEq, ::prost::Message)]
215pub struct ValidateGroupMessagesResponse {
216    #[prost(message, repeated, tag = "1")]
217    pub responses: ::prost::alloc::vec::Vec<
218        validate_group_messages_response::ValidationResponse,
219    >,
220}
221/// Nested message and enum types in `ValidateGroupMessagesResponse`.
222pub mod validate_group_messages_response {
223    /// An individual response to one message
224    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
225    pub struct ValidationResponse {
226        #[prost(bool, tag = "1")]
227        pub is_ok: bool,
228        #[prost(string, tag = "2")]
229        pub error_message: ::prost::alloc::string::String,
230        #[prost(string, tag = "3")]
231        pub group_id: ::prost::alloc::string::String,
232        #[prost(bool, tag = "4")]
233        pub is_commit: bool,
234    }
235    impl ::prost::Name for ValidationResponse {
236        const NAME: &'static str = "ValidationResponse";
237        const PACKAGE: &'static str = "xmtp.mls_validation.v1";
238        fn full_name() -> ::prost::alloc::string::String {
239            "xmtp.mls_validation.v1.ValidateGroupMessagesResponse.ValidationResponse"
240                .into()
241        }
242        fn type_url() -> ::prost::alloc::string::String {
243            "/xmtp.mls_validation.v1.ValidateGroupMessagesResponse.ValidationResponse"
244                .into()
245        }
246    }
247}
248impl ::prost::Name for ValidateGroupMessagesResponse {
249    const NAME: &'static str = "ValidateGroupMessagesResponse";
250    const PACKAGE: &'static str = "xmtp.mls_validation.v1";
251    fn full_name() -> ::prost::alloc::string::String {
252        "xmtp.mls_validation.v1.ValidateGroupMessagesResponse".into()
253    }
254    fn type_url() -> ::prost::alloc::string::String {
255        "/xmtp.mls_validation.v1.ValidateGroupMessagesResponse".into()
256    }
257}
258/// Request to get a final association state for identity updates
259#[derive(Clone, PartialEq, ::prost::Message)]
260pub struct GetAssociationStateRequest {
261    /// List of identity updates
262    #[prost(message, repeated, tag = "1")]
263    pub old_updates: ::prost::alloc::vec::Vec<
264        super::super::identity::associations::IdentityUpdate,
265    >,
266    #[prost(message, repeated, tag = "2")]
267    pub new_updates: ::prost::alloc::vec::Vec<
268        super::super::identity::associations::IdentityUpdate,
269    >,
270}
271impl ::prost::Name for GetAssociationStateRequest {
272    const NAME: &'static str = "GetAssociationStateRequest";
273    const PACKAGE: &'static str = "xmtp.mls_validation.v1";
274    fn full_name() -> ::prost::alloc::string::String {
275        "xmtp.mls_validation.v1.GetAssociationStateRequest".into()
276    }
277    fn type_url() -> ::prost::alloc::string::String {
278        "/xmtp.mls_validation.v1.GetAssociationStateRequest".into()
279    }
280}
281/// Response to GetAssociationStateRequest, containing the final association
282/// state for an InboxID
283#[derive(Clone, PartialEq, ::prost::Message)]
284pub struct GetAssociationStateResponse {
285    #[prost(message, optional, tag = "1")]
286    pub association_state: ::core::option::Option<
287        super::super::identity::associations::AssociationState,
288    >,
289    #[prost(message, optional, tag = "2")]
290    pub state_diff: ::core::option::Option<
291        super::super::identity::associations::AssociationStateDiff,
292    >,
293}
294impl ::prost::Name for GetAssociationStateResponse {
295    const NAME: &'static str = "GetAssociationStateResponse";
296    const PACKAGE: &'static str = "xmtp.mls_validation.v1";
297    fn full_name() -> ::prost::alloc::string::String {
298        "xmtp.mls_validation.v1.GetAssociationStateResponse".into()
299    }
300    fn type_url() -> ::prost::alloc::string::String {
301        "/xmtp.mls_validation.v1.GetAssociationStateResponse".into()
302    }
303}
304/// Generated server implementations.
305#[cfg(any(not(target_arch = "wasm32"), feature = "grpc_server_impls"))]
306pub mod validation_api_server {
307    #![allow(
308        unused_variables,
309        dead_code,
310        missing_docs,
311        clippy::wildcard_imports,
312        clippy::let_unit_value,
313    )]
314    use tonic::codegen::*;
315    /// Generated trait containing gRPC methods that should be implemented for use with ValidationApiServer.
316    #[async_trait]
317    pub trait ValidationApi: std::marker::Send + std::marker::Sync + 'static {
318        /// Validates and parses a group message and returns relevant details
319        async fn validate_group_messages(
320            &self,
321            request: tonic::Request<super::ValidateGroupMessagesRequest>,
322        ) -> std::result::Result<
323            tonic::Response<super::ValidateGroupMessagesResponse>,
324            tonic::Status,
325        >;
326        /// Gets the final association state for a batch of identity updates
327        async fn get_association_state(
328            &self,
329            request: tonic::Request<super::GetAssociationStateRequest>,
330        ) -> std::result::Result<
331            tonic::Response<super::GetAssociationStateResponse>,
332            tonic::Status,
333        >;
334        /// Validates InboxID key packages and returns credential information for them,
335        /// without checking whether an InboxId \<\> InstallationPublicKey pair is really
336        /// valid.
337        async fn validate_inbox_id_key_packages(
338            &self,
339            request: tonic::Request<super::ValidateKeyPackagesRequest>,
340        ) -> std::result::Result<
341            tonic::Response<super::ValidateInboxIdKeyPackagesResponse>,
342            tonic::Status,
343        >;
344        /// Verifies smart contracts
345        /// This request is proxied from the node, so we'll reuse those messages.
346        async fn verify_smart_contract_wallet_signatures(
347            &self,
348            request: tonic::Request<
349                super::super::super::identity::api::v1::VerifySmartContractWalletSignaturesRequest,
350            >,
351        ) -> std::result::Result<
352            tonic::Response<
353                super::super::super::identity::api::v1::VerifySmartContractWalletSignaturesResponse,
354            >,
355            tonic::Status,
356        >;
357    }
358    /// RPCs for the new MLS API
359    #[derive(Debug)]
360    pub struct ValidationApiServer<T> {
361        inner: Arc<T>,
362        accept_compression_encodings: EnabledCompressionEncodings,
363        send_compression_encodings: EnabledCompressionEncodings,
364        max_decoding_message_size: Option<usize>,
365        max_encoding_message_size: Option<usize>,
366    }
367    impl<T> ValidationApiServer<T> {
368        pub fn new(inner: T) -> Self {
369            Self::from_arc(Arc::new(inner))
370        }
371        pub fn from_arc(inner: Arc<T>) -> Self {
372            Self {
373                inner,
374                accept_compression_encodings: Default::default(),
375                send_compression_encodings: Default::default(),
376                max_decoding_message_size: None,
377                max_encoding_message_size: None,
378            }
379        }
380        pub fn with_interceptor<F>(
381            inner: T,
382            interceptor: F,
383        ) -> InterceptedService<Self, F>
384        where
385            F: tonic::service::Interceptor,
386        {
387            InterceptedService::new(Self::new(inner), interceptor)
388        }
389        /// Enable decompressing requests with the given encoding.
390        #[must_use]
391        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
392            self.accept_compression_encodings.enable(encoding);
393            self
394        }
395        /// Compress responses with the given encoding, if the client supports it.
396        #[must_use]
397        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
398            self.send_compression_encodings.enable(encoding);
399            self
400        }
401        /// Limits the maximum size of a decoded message.
402        ///
403        /// Default: `4MB`
404        #[must_use]
405        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
406            self.max_decoding_message_size = Some(limit);
407            self
408        }
409        /// Limits the maximum size of an encoded message.
410        ///
411        /// Default: `usize::MAX`
412        #[must_use]
413        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
414            self.max_encoding_message_size = Some(limit);
415            self
416        }
417    }
418    impl<T, B> tonic::codegen::Service<http::Request<B>> for ValidationApiServer<T>
419    where
420        T: ValidationApi,
421        B: Body + std::marker::Send + 'static,
422        B::Error: Into<StdError> + std::marker::Send + 'static,
423    {
424        type Response = http::Response<tonic::body::Body>;
425        type Error = std::convert::Infallible;
426        type Future = BoxFuture<Self::Response, Self::Error>;
427        fn poll_ready(
428            &mut self,
429            _cx: &mut Context<'_>,
430        ) -> Poll<std::result::Result<(), Self::Error>> {
431            Poll::Ready(Ok(()))
432        }
433        fn call(&mut self, req: http::Request<B>) -> Self::Future {
434            match req.uri().path() {
435                "/xmtp.mls_validation.v1.ValidationApi/ValidateGroupMessages" => {
436                    #[allow(non_camel_case_types)]
437                    struct ValidateGroupMessagesSvc<T: ValidationApi>(pub Arc<T>);
438                    impl<
439                        T: ValidationApi,
440                    > tonic::server::UnaryService<super::ValidateGroupMessagesRequest>
441                    for ValidateGroupMessagesSvc<T> {
442                        type Response = super::ValidateGroupMessagesResponse;
443                        type Future = BoxFuture<
444                            tonic::Response<Self::Response>,
445                            tonic::Status,
446                        >;
447                        fn call(
448                            &mut self,
449                            request: tonic::Request<super::ValidateGroupMessagesRequest>,
450                        ) -> Self::Future {
451                            let inner = Arc::clone(&self.0);
452                            let fut = async move {
453                                <T as ValidationApi>::validate_group_messages(
454                                        &inner,
455                                        request,
456                                    )
457                                    .await
458                            };
459                            Box::pin(fut)
460                        }
461                    }
462                    let accept_compression_encodings = self.accept_compression_encodings;
463                    let send_compression_encodings = self.send_compression_encodings;
464                    let max_decoding_message_size = self.max_decoding_message_size;
465                    let max_encoding_message_size = self.max_encoding_message_size;
466                    let inner = self.inner.clone();
467                    let fut = async move {
468                        let method = ValidateGroupMessagesSvc(inner);
469                        let codec = tonic_prost::ProstCodec::default();
470                        let mut grpc = tonic::server::Grpc::new(codec)
471                            .apply_compression_config(
472                                accept_compression_encodings,
473                                send_compression_encodings,
474                            )
475                            .apply_max_message_size_config(
476                                max_decoding_message_size,
477                                max_encoding_message_size,
478                            );
479                        let res = grpc.unary(method, req).await;
480                        Ok(res)
481                    };
482                    Box::pin(fut)
483                }
484                "/xmtp.mls_validation.v1.ValidationApi/GetAssociationState" => {
485                    #[allow(non_camel_case_types)]
486                    struct GetAssociationStateSvc<T: ValidationApi>(pub Arc<T>);
487                    impl<
488                        T: ValidationApi,
489                    > tonic::server::UnaryService<super::GetAssociationStateRequest>
490                    for GetAssociationStateSvc<T> {
491                        type Response = super::GetAssociationStateResponse;
492                        type Future = BoxFuture<
493                            tonic::Response<Self::Response>,
494                            tonic::Status,
495                        >;
496                        fn call(
497                            &mut self,
498                            request: tonic::Request<super::GetAssociationStateRequest>,
499                        ) -> Self::Future {
500                            let inner = Arc::clone(&self.0);
501                            let fut = async move {
502                                <T as ValidationApi>::get_association_state(&inner, request)
503                                    .await
504                            };
505                            Box::pin(fut)
506                        }
507                    }
508                    let accept_compression_encodings = self.accept_compression_encodings;
509                    let send_compression_encodings = self.send_compression_encodings;
510                    let max_decoding_message_size = self.max_decoding_message_size;
511                    let max_encoding_message_size = self.max_encoding_message_size;
512                    let inner = self.inner.clone();
513                    let fut = async move {
514                        let method = GetAssociationStateSvc(inner);
515                        let codec = tonic_prost::ProstCodec::default();
516                        let mut grpc = tonic::server::Grpc::new(codec)
517                            .apply_compression_config(
518                                accept_compression_encodings,
519                                send_compression_encodings,
520                            )
521                            .apply_max_message_size_config(
522                                max_decoding_message_size,
523                                max_encoding_message_size,
524                            );
525                        let res = grpc.unary(method, req).await;
526                        Ok(res)
527                    };
528                    Box::pin(fut)
529                }
530                "/xmtp.mls_validation.v1.ValidationApi/ValidateInboxIdKeyPackages" => {
531                    #[allow(non_camel_case_types)]
532                    struct ValidateInboxIdKeyPackagesSvc<T: ValidationApi>(pub Arc<T>);
533                    impl<
534                        T: ValidationApi,
535                    > tonic::server::UnaryService<super::ValidateKeyPackagesRequest>
536                    for ValidateInboxIdKeyPackagesSvc<T> {
537                        type Response = super::ValidateInboxIdKeyPackagesResponse;
538                        type Future = BoxFuture<
539                            tonic::Response<Self::Response>,
540                            tonic::Status,
541                        >;
542                        fn call(
543                            &mut self,
544                            request: tonic::Request<super::ValidateKeyPackagesRequest>,
545                        ) -> Self::Future {
546                            let inner = Arc::clone(&self.0);
547                            let fut = async move {
548                                <T as ValidationApi>::validate_inbox_id_key_packages(
549                                        &inner,
550                                        request,
551                                    )
552                                    .await
553                            };
554                            Box::pin(fut)
555                        }
556                    }
557                    let accept_compression_encodings = self.accept_compression_encodings;
558                    let send_compression_encodings = self.send_compression_encodings;
559                    let max_decoding_message_size = self.max_decoding_message_size;
560                    let max_encoding_message_size = self.max_encoding_message_size;
561                    let inner = self.inner.clone();
562                    let fut = async move {
563                        let method = ValidateInboxIdKeyPackagesSvc(inner);
564                        let codec = tonic_prost::ProstCodec::default();
565                        let mut grpc = tonic::server::Grpc::new(codec)
566                            .apply_compression_config(
567                                accept_compression_encodings,
568                                send_compression_encodings,
569                            )
570                            .apply_max_message_size_config(
571                                max_decoding_message_size,
572                                max_encoding_message_size,
573                            );
574                        let res = grpc.unary(method, req).await;
575                        Ok(res)
576                    };
577                    Box::pin(fut)
578                }
579                "/xmtp.mls_validation.v1.ValidationApi/VerifySmartContractWalletSignatures" => {
580                    #[allow(non_camel_case_types)]
581                    struct VerifySmartContractWalletSignaturesSvc<T: ValidationApi>(
582                        pub Arc<T>,
583                    );
584                    impl<
585                        T: ValidationApi,
586                    > tonic::server::UnaryService<
587                        super::super::super::identity::api::v1::VerifySmartContractWalletSignaturesRequest,
588                    > for VerifySmartContractWalletSignaturesSvc<T> {
589                        type Response = super::super::super::identity::api::v1::VerifySmartContractWalletSignaturesResponse;
590                        type Future = BoxFuture<
591                            tonic::Response<Self::Response>,
592                            tonic::Status,
593                        >;
594                        fn call(
595                            &mut self,
596                            request: tonic::Request<
597                                super::super::super::identity::api::v1::VerifySmartContractWalletSignaturesRequest,
598                            >,
599                        ) -> Self::Future {
600                            let inner = Arc::clone(&self.0);
601                            let fut = async move {
602                                <T as ValidationApi>::verify_smart_contract_wallet_signatures(
603                                        &inner,
604                                        request,
605                                    )
606                                    .await
607                            };
608                            Box::pin(fut)
609                        }
610                    }
611                    let accept_compression_encodings = self.accept_compression_encodings;
612                    let send_compression_encodings = self.send_compression_encodings;
613                    let max_decoding_message_size = self.max_decoding_message_size;
614                    let max_encoding_message_size = self.max_encoding_message_size;
615                    let inner = self.inner.clone();
616                    let fut = async move {
617                        let method = VerifySmartContractWalletSignaturesSvc(inner);
618                        let codec = tonic_prost::ProstCodec::default();
619                        let mut grpc = tonic::server::Grpc::new(codec)
620                            .apply_compression_config(
621                                accept_compression_encodings,
622                                send_compression_encodings,
623                            )
624                            .apply_max_message_size_config(
625                                max_decoding_message_size,
626                                max_encoding_message_size,
627                            );
628                        let res = grpc.unary(method, req).await;
629                        Ok(res)
630                    };
631                    Box::pin(fut)
632                }
633                _ => {
634                    Box::pin(async move {
635                        let mut response = http::Response::new(
636                            tonic::body::Body::default(),
637                        );
638                        let headers = response.headers_mut();
639                        headers
640                            .insert(
641                                tonic::Status::GRPC_STATUS,
642                                (tonic::Code::Unimplemented as i32).into(),
643                            );
644                        headers
645                            .insert(
646                                http::header::CONTENT_TYPE,
647                                tonic::metadata::GRPC_CONTENT_TYPE,
648                            );
649                        Ok(response)
650                    })
651                }
652            }
653        }
654    }
655    impl<T> Clone for ValidationApiServer<T> {
656        fn clone(&self) -> Self {
657            let inner = self.inner.clone();
658            Self {
659                inner,
660                accept_compression_encodings: self.accept_compression_encodings,
661                send_compression_encodings: self.send_compression_encodings,
662                max_decoding_message_size: self.max_decoding_message_size,
663                max_encoding_message_size: self.max_encoding_message_size,
664            }
665        }
666    }
667    /// Generated gRPC service name
668    pub const SERVICE_NAME: &str = "xmtp.mls_validation.v1.ValidationApi";
669    impl<T> tonic::server::NamedService for ValidationApiServer<T> {
670        const NAME: &'static str = SERVICE_NAME;
671    }
672}