Skip to main content

protochain_api/
protochain.solana.program.token.v1.tonic.rs

1// @generated
2/// Generated client implementations.
3pub mod service_client {
4    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
5    use tonic::codegen::*;
6    use tonic::codegen::http::Uri;
7    #[derive(Debug, Clone)]
8    pub struct ServiceClient<T> {
9        inner: tonic::client::Grpc<T>,
10    }
11    impl ServiceClient<tonic::transport::Channel> {
12        /// Attempt to create a new client by connecting to a given endpoint.
13        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
14        where
15            D: TryInto<tonic::transport::Endpoint>,
16            D::Error: Into<StdError>,
17        {
18            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
19            Ok(Self::new(conn))
20        }
21    }
22    impl<T> ServiceClient<T>
23    where
24        T: tonic::client::GrpcService<tonic::body::BoxBody>,
25        T::Error: Into<StdError>,
26        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
27        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
28    {
29        pub fn new(inner: T) -> Self {
30            let inner = tonic::client::Grpc::new(inner);
31            Self { inner }
32        }
33        pub fn with_origin(inner: T, origin: Uri) -> Self {
34            let inner = tonic::client::Grpc::with_origin(inner, origin);
35            Self { inner }
36        }
37        pub fn with_interceptor<F>(
38            inner: T,
39            interceptor: F,
40        ) -> ServiceClient<InterceptedService<T, F>>
41        where
42            F: tonic::service::Interceptor,
43            T::ResponseBody: Default,
44            T: tonic::codegen::Service<
45                http::Request<tonic::body::BoxBody>,
46                Response = http::Response<
47                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
48                >,
49            >,
50            <T as tonic::codegen::Service<
51                http::Request<tonic::body::BoxBody>,
52            >>::Error: Into<StdError> + Send + Sync,
53        {
54            ServiceClient::new(InterceptedService::new(inner, interceptor))
55        }
56        /// Compress requests with the given encoding.
57        ///
58        /// This requires the server to support it otherwise it might respond with an
59        /// error.
60        #[must_use]
61        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
62            self.inner = self.inner.send_compressed(encoding);
63            self
64        }
65        /// Enable decompressing responses.
66        #[must_use]
67        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
68            self.inner = self.inner.accept_compressed(encoding);
69            self
70        }
71        /// Limits the maximum size of a decoded message.
72        ///
73        /// Default: `4MB`
74        #[must_use]
75        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
76            self.inner = self.inner.max_decoding_message_size(limit);
77            self
78        }
79        /// Limits the maximum size of an encoded message.
80        ///
81        /// Default: `usize::MAX`
82        #[must_use]
83        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
84            self.inner = self.inner.max_encoding_message_size(limit);
85            self
86        }
87        pub async fn initialise_mint(
88            &mut self,
89            request: impl tonic::IntoRequest<super::InitialiseMintRequest>,
90        ) -> std::result::Result<
91            tonic::Response<super::InitialiseMintResponse>,
92            tonic::Status,
93        > {
94            self.inner
95                .ready()
96                .await
97                .map_err(|e| {
98                    tonic::Status::new(
99                        tonic::Code::Unknown,
100                        format!("Service was not ready: {}", e.into()),
101                    )
102                })?;
103            let codec = tonic::codec::ProstCodec::default();
104            let path = http::uri::PathAndQuery::from_static(
105                "/protochain.solana.program.token.v1.Service/InitialiseMint",
106            );
107            let mut req = request.into_request();
108            req.extensions_mut()
109                .insert(
110                    GrpcMethod::new(
111                        "protochain.solana.program.token.v1.Service",
112                        "InitialiseMint",
113                    ),
114                );
115            self.inner.unary(req, path, codec).await
116        }
117        pub async fn get_current_min_rent_for_token_account(
118            &mut self,
119            request: impl tonic::IntoRequest<
120                super::GetCurrentMinRentForTokenAccountRequest,
121            >,
122        ) -> std::result::Result<
123            tonic::Response<super::GetCurrentMinRentForTokenAccountResponse>,
124            tonic::Status,
125        > {
126            self.inner
127                .ready()
128                .await
129                .map_err(|e| {
130                    tonic::Status::new(
131                        tonic::Code::Unknown,
132                        format!("Service was not ready: {}", e.into()),
133                    )
134                })?;
135            let codec = tonic::codec::ProstCodec::default();
136            let path = http::uri::PathAndQuery::from_static(
137                "/protochain.solana.program.token.v1.Service/GetCurrentMinRentForTokenAccount",
138            );
139            let mut req = request.into_request();
140            req.extensions_mut()
141                .insert(
142                    GrpcMethod::new(
143                        "protochain.solana.program.token.v1.Service",
144                        "GetCurrentMinRentForTokenAccount",
145                    ),
146                );
147            self.inner.unary(req, path, codec).await
148        }
149        pub async fn parse_mint(
150            &mut self,
151            request: impl tonic::IntoRequest<super::ParseMintRequest>,
152        ) -> std::result::Result<
153            tonic::Response<super::ParseMintResponse>,
154            tonic::Status,
155        > {
156            self.inner
157                .ready()
158                .await
159                .map_err(|e| {
160                    tonic::Status::new(
161                        tonic::Code::Unknown,
162                        format!("Service was not ready: {}", e.into()),
163                    )
164                })?;
165            let codec = tonic::codec::ProstCodec::default();
166            let path = http::uri::PathAndQuery::from_static(
167                "/protochain.solana.program.token.v1.Service/ParseMint",
168            );
169            let mut req = request.into_request();
170            req.extensions_mut()
171                .insert(
172                    GrpcMethod::new(
173                        "protochain.solana.program.token.v1.Service",
174                        "ParseMint",
175                    ),
176                );
177            self.inner.unary(req, path, codec).await
178        }
179        pub async fn get_current_min_rent_for_holding_account(
180            &mut self,
181            request: impl tonic::IntoRequest<
182                super::GetCurrentMinRentForHoldingAccountRequest,
183            >,
184        ) -> std::result::Result<
185            tonic::Response<super::GetCurrentMinRentForHoldingAccountResponse>,
186            tonic::Status,
187        > {
188            self.inner
189                .ready()
190                .await
191                .map_err(|e| {
192                    tonic::Status::new(
193                        tonic::Code::Unknown,
194                        format!("Service was not ready: {}", e.into()),
195                    )
196                })?;
197            let codec = tonic::codec::ProstCodec::default();
198            let path = http::uri::PathAndQuery::from_static(
199                "/protochain.solana.program.token.v1.Service/GetCurrentMinRentForHoldingAccount",
200            );
201            let mut req = request.into_request();
202            req.extensions_mut()
203                .insert(
204                    GrpcMethod::new(
205                        "protochain.solana.program.token.v1.Service",
206                        "GetCurrentMinRentForHoldingAccount",
207                    ),
208                );
209            self.inner.unary(req, path, codec).await
210        }
211        pub async fn create_mint(
212            &mut self,
213            request: impl tonic::IntoRequest<super::CreateMintRequest>,
214        ) -> std::result::Result<
215            tonic::Response<super::CreateMintResponse>,
216            tonic::Status,
217        > {
218            self.inner
219                .ready()
220                .await
221                .map_err(|e| {
222                    tonic::Status::new(
223                        tonic::Code::Unknown,
224                        format!("Service was not ready: {}", e.into()),
225                    )
226                })?;
227            let codec = tonic::codec::ProstCodec::default();
228            let path = http::uri::PathAndQuery::from_static(
229                "/protochain.solana.program.token.v1.Service/CreateMint",
230            );
231            let mut req = request.into_request();
232            req.extensions_mut()
233                .insert(
234                    GrpcMethod::new(
235                        "protochain.solana.program.token.v1.Service",
236                        "CreateMint",
237                    ),
238                );
239            self.inner.unary(req, path, codec).await
240        }
241        pub async fn create_holding_account(
242            &mut self,
243            request: impl tonic::IntoRequest<super::CreateHoldingAccountRequest>,
244        ) -> std::result::Result<
245            tonic::Response<super::CreateHoldingAccountResponse>,
246            tonic::Status,
247        > {
248            self.inner
249                .ready()
250                .await
251                .map_err(|e| {
252                    tonic::Status::new(
253                        tonic::Code::Unknown,
254                        format!("Service was not ready: {}", e.into()),
255                    )
256                })?;
257            let codec = tonic::codec::ProstCodec::default();
258            let path = http::uri::PathAndQuery::from_static(
259                "/protochain.solana.program.token.v1.Service/CreateHoldingAccount",
260            );
261            let mut req = request.into_request();
262            req.extensions_mut()
263                .insert(
264                    GrpcMethod::new(
265                        "protochain.solana.program.token.v1.Service",
266                        "CreateHoldingAccount",
267                    ),
268                );
269            self.inner.unary(req, path, codec).await
270        }
271        pub async fn mint(
272            &mut self,
273            request: impl tonic::IntoRequest<super::MintRequest>,
274        ) -> std::result::Result<tonic::Response<super::MintResponse>, tonic::Status> {
275            self.inner
276                .ready()
277                .await
278                .map_err(|e| {
279                    tonic::Status::new(
280                        tonic::Code::Unknown,
281                        format!("Service was not ready: {}", e.into()),
282                    )
283                })?;
284            let codec = tonic::codec::ProstCodec::default();
285            let path = http::uri::PathAndQuery::from_static(
286                "/protochain.solana.program.token.v1.Service/Mint",
287            );
288            let mut req = request.into_request();
289            req.extensions_mut()
290                .insert(
291                    GrpcMethod::new("protochain.solana.program.token.v1.Service", "Mint"),
292                );
293            self.inner.unary(req, path, codec).await
294        }
295    }
296}
297/// Generated server implementations.
298pub mod service_server {
299    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
300    use tonic::codegen::*;
301    /// Generated trait containing gRPC methods that should be implemented for use with ServiceServer.
302    #[async_trait]
303    pub trait Service: Send + Sync + 'static {
304        async fn initialise_mint(
305            &self,
306            request: tonic::Request<super::InitialiseMintRequest>,
307        ) -> std::result::Result<
308            tonic::Response<super::InitialiseMintResponse>,
309            tonic::Status,
310        >;
311        async fn get_current_min_rent_for_token_account(
312            &self,
313            request: tonic::Request<super::GetCurrentMinRentForTokenAccountRequest>,
314        ) -> std::result::Result<
315            tonic::Response<super::GetCurrentMinRentForTokenAccountResponse>,
316            tonic::Status,
317        >;
318        async fn parse_mint(
319            &self,
320            request: tonic::Request<super::ParseMintRequest>,
321        ) -> std::result::Result<
322            tonic::Response<super::ParseMintResponse>,
323            tonic::Status,
324        >;
325        async fn get_current_min_rent_for_holding_account(
326            &self,
327            request: tonic::Request<super::GetCurrentMinRentForHoldingAccountRequest>,
328        ) -> std::result::Result<
329            tonic::Response<super::GetCurrentMinRentForHoldingAccountResponse>,
330            tonic::Status,
331        >;
332        async fn create_mint(
333            &self,
334            request: tonic::Request<super::CreateMintRequest>,
335        ) -> std::result::Result<
336            tonic::Response<super::CreateMintResponse>,
337            tonic::Status,
338        >;
339        async fn create_holding_account(
340            &self,
341            request: tonic::Request<super::CreateHoldingAccountRequest>,
342        ) -> std::result::Result<
343            tonic::Response<super::CreateHoldingAccountResponse>,
344            tonic::Status,
345        >;
346        async fn mint(
347            &self,
348            request: tonic::Request<super::MintRequest>,
349        ) -> std::result::Result<tonic::Response<super::MintResponse>, tonic::Status>;
350    }
351    #[derive(Debug)]
352    pub struct ServiceServer<T: Service> {
353        inner: Arc<T>,
354        accept_compression_encodings: EnabledCompressionEncodings,
355        send_compression_encodings: EnabledCompressionEncodings,
356        max_decoding_message_size: Option<usize>,
357        max_encoding_message_size: Option<usize>,
358    }
359    impl<T: Service> ServiceServer<T> {
360        pub fn new(inner: T) -> Self {
361            Self::from_arc(Arc::new(inner))
362        }
363        pub fn from_arc(inner: Arc<T>) -> Self {
364            Self {
365                inner,
366                accept_compression_encodings: Default::default(),
367                send_compression_encodings: Default::default(),
368                max_decoding_message_size: None,
369                max_encoding_message_size: None,
370            }
371        }
372        pub fn with_interceptor<F>(
373            inner: T,
374            interceptor: F,
375        ) -> InterceptedService<Self, F>
376        where
377            F: tonic::service::Interceptor,
378        {
379            InterceptedService::new(Self::new(inner), interceptor)
380        }
381        /// Enable decompressing requests with the given encoding.
382        #[must_use]
383        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
384            self.accept_compression_encodings.enable(encoding);
385            self
386        }
387        /// Compress responses with the given encoding, if the client supports it.
388        #[must_use]
389        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
390            self.send_compression_encodings.enable(encoding);
391            self
392        }
393        /// Limits the maximum size of a decoded message.
394        ///
395        /// Default: `4MB`
396        #[must_use]
397        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
398            self.max_decoding_message_size = Some(limit);
399            self
400        }
401        /// Limits the maximum size of an encoded message.
402        ///
403        /// Default: `usize::MAX`
404        #[must_use]
405        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
406            self.max_encoding_message_size = Some(limit);
407            self
408        }
409    }
410    impl<T, B> tonic::codegen::Service<http::Request<B>> for ServiceServer<T>
411    where
412        T: Service,
413        B: Body + Send + 'static,
414        B::Error: Into<StdError> + Send + 'static,
415    {
416        type Response = http::Response<tonic::body::BoxBody>;
417        type Error = std::convert::Infallible;
418        type Future = BoxFuture<Self::Response, Self::Error>;
419        fn poll_ready(
420            &mut self,
421            _cx: &mut Context<'_>,
422        ) -> Poll<std::result::Result<(), Self::Error>> {
423            Poll::Ready(Ok(()))
424        }
425        fn call(&mut self, req: http::Request<B>) -> Self::Future {
426            match req.uri().path() {
427                "/protochain.solana.program.token.v1.Service/InitialiseMint" => {
428                    #[allow(non_camel_case_types)]
429                    struct InitialiseMintSvc<T: Service>(pub Arc<T>);
430                    impl<
431                        T: Service,
432                    > tonic::server::UnaryService<super::InitialiseMintRequest>
433                    for InitialiseMintSvc<T> {
434                        type Response = super::InitialiseMintResponse;
435                        type Future = BoxFuture<
436                            tonic::Response<Self::Response>,
437                            tonic::Status,
438                        >;
439                        fn call(
440                            &mut self,
441                            request: tonic::Request<super::InitialiseMintRequest>,
442                        ) -> Self::Future {
443                            let inner = Arc::clone(&self.0);
444                            let fut = async move {
445                                <T as Service>::initialise_mint(&inner, request).await
446                            };
447                            Box::pin(fut)
448                        }
449                    }
450                    let accept_compression_encodings = self.accept_compression_encodings;
451                    let send_compression_encodings = self.send_compression_encodings;
452                    let max_decoding_message_size = self.max_decoding_message_size;
453                    let max_encoding_message_size = self.max_encoding_message_size;
454                    let inner = self.inner.clone();
455                    let fut = async move {
456                        let method = InitialiseMintSvc(inner);
457                        let codec = tonic::codec::ProstCodec::default();
458                        let mut grpc = tonic::server::Grpc::new(codec)
459                            .apply_compression_config(
460                                accept_compression_encodings,
461                                send_compression_encodings,
462                            )
463                            .apply_max_message_size_config(
464                                max_decoding_message_size,
465                                max_encoding_message_size,
466                            );
467                        let res = grpc.unary(method, req).await;
468                        Ok(res)
469                    };
470                    Box::pin(fut)
471                }
472                "/protochain.solana.program.token.v1.Service/GetCurrentMinRentForTokenAccount" => {
473                    #[allow(non_camel_case_types)]
474                    struct GetCurrentMinRentForTokenAccountSvc<T: Service>(pub Arc<T>);
475                    impl<
476                        T: Service,
477                    > tonic::server::UnaryService<
478                        super::GetCurrentMinRentForTokenAccountRequest,
479                    > for GetCurrentMinRentForTokenAccountSvc<T> {
480                        type Response = super::GetCurrentMinRentForTokenAccountResponse;
481                        type Future = BoxFuture<
482                            tonic::Response<Self::Response>,
483                            tonic::Status,
484                        >;
485                        fn call(
486                            &mut self,
487                            request: tonic::Request<
488                                super::GetCurrentMinRentForTokenAccountRequest,
489                            >,
490                        ) -> Self::Future {
491                            let inner = Arc::clone(&self.0);
492                            let fut = async move {
493                                <T as Service>::get_current_min_rent_for_token_account(
494                                        &inner,
495                                        request,
496                                    )
497                                    .await
498                            };
499                            Box::pin(fut)
500                        }
501                    }
502                    let accept_compression_encodings = self.accept_compression_encodings;
503                    let send_compression_encodings = self.send_compression_encodings;
504                    let max_decoding_message_size = self.max_decoding_message_size;
505                    let max_encoding_message_size = self.max_encoding_message_size;
506                    let inner = self.inner.clone();
507                    let fut = async move {
508                        let method = GetCurrentMinRentForTokenAccountSvc(inner);
509                        let codec = tonic::codec::ProstCodec::default();
510                        let mut grpc = tonic::server::Grpc::new(codec)
511                            .apply_compression_config(
512                                accept_compression_encodings,
513                                send_compression_encodings,
514                            )
515                            .apply_max_message_size_config(
516                                max_decoding_message_size,
517                                max_encoding_message_size,
518                            );
519                        let res = grpc.unary(method, req).await;
520                        Ok(res)
521                    };
522                    Box::pin(fut)
523                }
524                "/protochain.solana.program.token.v1.Service/ParseMint" => {
525                    #[allow(non_camel_case_types)]
526                    struct ParseMintSvc<T: Service>(pub Arc<T>);
527                    impl<T: Service> tonic::server::UnaryService<super::ParseMintRequest>
528                    for ParseMintSvc<T> {
529                        type Response = super::ParseMintResponse;
530                        type Future = BoxFuture<
531                            tonic::Response<Self::Response>,
532                            tonic::Status,
533                        >;
534                        fn call(
535                            &mut self,
536                            request: tonic::Request<super::ParseMintRequest>,
537                        ) -> Self::Future {
538                            let inner = Arc::clone(&self.0);
539                            let fut = async move {
540                                <T as Service>::parse_mint(&inner, request).await
541                            };
542                            Box::pin(fut)
543                        }
544                    }
545                    let accept_compression_encodings = self.accept_compression_encodings;
546                    let send_compression_encodings = self.send_compression_encodings;
547                    let max_decoding_message_size = self.max_decoding_message_size;
548                    let max_encoding_message_size = self.max_encoding_message_size;
549                    let inner = self.inner.clone();
550                    let fut = async move {
551                        let method = ParseMintSvc(inner);
552                        let codec = tonic::codec::ProstCodec::default();
553                        let mut grpc = tonic::server::Grpc::new(codec)
554                            .apply_compression_config(
555                                accept_compression_encodings,
556                                send_compression_encodings,
557                            )
558                            .apply_max_message_size_config(
559                                max_decoding_message_size,
560                                max_encoding_message_size,
561                            );
562                        let res = grpc.unary(method, req).await;
563                        Ok(res)
564                    };
565                    Box::pin(fut)
566                }
567                "/protochain.solana.program.token.v1.Service/GetCurrentMinRentForHoldingAccount" => {
568                    #[allow(non_camel_case_types)]
569                    struct GetCurrentMinRentForHoldingAccountSvc<T: Service>(pub Arc<T>);
570                    impl<
571                        T: Service,
572                    > tonic::server::UnaryService<
573                        super::GetCurrentMinRentForHoldingAccountRequest,
574                    > for GetCurrentMinRentForHoldingAccountSvc<T> {
575                        type Response = super::GetCurrentMinRentForHoldingAccountResponse;
576                        type Future = BoxFuture<
577                            tonic::Response<Self::Response>,
578                            tonic::Status,
579                        >;
580                        fn call(
581                            &mut self,
582                            request: tonic::Request<
583                                super::GetCurrentMinRentForHoldingAccountRequest,
584                            >,
585                        ) -> Self::Future {
586                            let inner = Arc::clone(&self.0);
587                            let fut = async move {
588                                <T as Service>::get_current_min_rent_for_holding_account(
589                                        &inner,
590                                        request,
591                                    )
592                                    .await
593                            };
594                            Box::pin(fut)
595                        }
596                    }
597                    let accept_compression_encodings = self.accept_compression_encodings;
598                    let send_compression_encodings = self.send_compression_encodings;
599                    let max_decoding_message_size = self.max_decoding_message_size;
600                    let max_encoding_message_size = self.max_encoding_message_size;
601                    let inner = self.inner.clone();
602                    let fut = async move {
603                        let method = GetCurrentMinRentForHoldingAccountSvc(inner);
604                        let codec = tonic::codec::ProstCodec::default();
605                        let mut grpc = tonic::server::Grpc::new(codec)
606                            .apply_compression_config(
607                                accept_compression_encodings,
608                                send_compression_encodings,
609                            )
610                            .apply_max_message_size_config(
611                                max_decoding_message_size,
612                                max_encoding_message_size,
613                            );
614                        let res = grpc.unary(method, req).await;
615                        Ok(res)
616                    };
617                    Box::pin(fut)
618                }
619                "/protochain.solana.program.token.v1.Service/CreateMint" => {
620                    #[allow(non_camel_case_types)]
621                    struct CreateMintSvc<T: Service>(pub Arc<T>);
622                    impl<
623                        T: Service,
624                    > tonic::server::UnaryService<super::CreateMintRequest>
625                    for CreateMintSvc<T> {
626                        type Response = super::CreateMintResponse;
627                        type Future = BoxFuture<
628                            tonic::Response<Self::Response>,
629                            tonic::Status,
630                        >;
631                        fn call(
632                            &mut self,
633                            request: tonic::Request<super::CreateMintRequest>,
634                        ) -> Self::Future {
635                            let inner = Arc::clone(&self.0);
636                            let fut = async move {
637                                <T as Service>::create_mint(&inner, request).await
638                            };
639                            Box::pin(fut)
640                        }
641                    }
642                    let accept_compression_encodings = self.accept_compression_encodings;
643                    let send_compression_encodings = self.send_compression_encodings;
644                    let max_decoding_message_size = self.max_decoding_message_size;
645                    let max_encoding_message_size = self.max_encoding_message_size;
646                    let inner = self.inner.clone();
647                    let fut = async move {
648                        let method = CreateMintSvc(inner);
649                        let codec = tonic::codec::ProstCodec::default();
650                        let mut grpc = tonic::server::Grpc::new(codec)
651                            .apply_compression_config(
652                                accept_compression_encodings,
653                                send_compression_encodings,
654                            )
655                            .apply_max_message_size_config(
656                                max_decoding_message_size,
657                                max_encoding_message_size,
658                            );
659                        let res = grpc.unary(method, req).await;
660                        Ok(res)
661                    };
662                    Box::pin(fut)
663                }
664                "/protochain.solana.program.token.v1.Service/CreateHoldingAccount" => {
665                    #[allow(non_camel_case_types)]
666                    struct CreateHoldingAccountSvc<T: Service>(pub Arc<T>);
667                    impl<
668                        T: Service,
669                    > tonic::server::UnaryService<super::CreateHoldingAccountRequest>
670                    for CreateHoldingAccountSvc<T> {
671                        type Response = super::CreateHoldingAccountResponse;
672                        type Future = BoxFuture<
673                            tonic::Response<Self::Response>,
674                            tonic::Status,
675                        >;
676                        fn call(
677                            &mut self,
678                            request: tonic::Request<super::CreateHoldingAccountRequest>,
679                        ) -> Self::Future {
680                            let inner = Arc::clone(&self.0);
681                            let fut = async move {
682                                <T as Service>::create_holding_account(&inner, request)
683                                    .await
684                            };
685                            Box::pin(fut)
686                        }
687                    }
688                    let accept_compression_encodings = self.accept_compression_encodings;
689                    let send_compression_encodings = self.send_compression_encodings;
690                    let max_decoding_message_size = self.max_decoding_message_size;
691                    let max_encoding_message_size = self.max_encoding_message_size;
692                    let inner = self.inner.clone();
693                    let fut = async move {
694                        let method = CreateHoldingAccountSvc(inner);
695                        let codec = tonic::codec::ProstCodec::default();
696                        let mut grpc = tonic::server::Grpc::new(codec)
697                            .apply_compression_config(
698                                accept_compression_encodings,
699                                send_compression_encodings,
700                            )
701                            .apply_max_message_size_config(
702                                max_decoding_message_size,
703                                max_encoding_message_size,
704                            );
705                        let res = grpc.unary(method, req).await;
706                        Ok(res)
707                    };
708                    Box::pin(fut)
709                }
710                "/protochain.solana.program.token.v1.Service/Mint" => {
711                    #[allow(non_camel_case_types)]
712                    struct MintSvc<T: Service>(pub Arc<T>);
713                    impl<T: Service> tonic::server::UnaryService<super::MintRequest>
714                    for MintSvc<T> {
715                        type Response = super::MintResponse;
716                        type Future = BoxFuture<
717                            tonic::Response<Self::Response>,
718                            tonic::Status,
719                        >;
720                        fn call(
721                            &mut self,
722                            request: tonic::Request<super::MintRequest>,
723                        ) -> Self::Future {
724                            let inner = Arc::clone(&self.0);
725                            let fut = async move {
726                                <T as Service>::mint(&inner, request).await
727                            };
728                            Box::pin(fut)
729                        }
730                    }
731                    let accept_compression_encodings = self.accept_compression_encodings;
732                    let send_compression_encodings = self.send_compression_encodings;
733                    let max_decoding_message_size = self.max_decoding_message_size;
734                    let max_encoding_message_size = self.max_encoding_message_size;
735                    let inner = self.inner.clone();
736                    let fut = async move {
737                        let method = MintSvc(inner);
738                        let codec = tonic::codec::ProstCodec::default();
739                        let mut grpc = tonic::server::Grpc::new(codec)
740                            .apply_compression_config(
741                                accept_compression_encodings,
742                                send_compression_encodings,
743                            )
744                            .apply_max_message_size_config(
745                                max_decoding_message_size,
746                                max_encoding_message_size,
747                            );
748                        let res = grpc.unary(method, req).await;
749                        Ok(res)
750                    };
751                    Box::pin(fut)
752                }
753                _ => {
754                    Box::pin(async move {
755                        Ok(
756                            http::Response::builder()
757                                .status(200)
758                                .header("grpc-status", tonic::Code::Unimplemented as i32)
759                                .header(
760                                    http::header::CONTENT_TYPE,
761                                    tonic::metadata::GRPC_CONTENT_TYPE,
762                                )
763                                .body(empty_body())
764                                .unwrap(),
765                        )
766                    })
767                }
768            }
769        }
770    }
771    impl<T: Service> Clone for ServiceServer<T> {
772        fn clone(&self) -> Self {
773            let inner = self.inner.clone();
774            Self {
775                inner,
776                accept_compression_encodings: self.accept_compression_encodings,
777                send_compression_encodings: self.send_compression_encodings,
778                max_decoding_message_size: self.max_decoding_message_size,
779                max_encoding_message_size: self.max_encoding_message_size,
780            }
781        }
782    }
783    impl<T: Service> tonic::server::NamedService for ServiceServer<T> {
784        const NAME: &'static str = "protochain.solana.program.token.v1.Service";
785    }
786}