juno_rust_proto/prost/cosmos-sdk/
osmosis.tokenfactory.v1beta1.rs

1/// MsgCreateDenom defines the message structure for the CreateDenom gRPC service
2/// method. It allows an account to create a new denom. It requires a sender
3/// address and a sub denomination. The (sender_address, sub_denomination) tuple
4/// must be unique and cannot be re-used.
5///
6/// The resulting denom created is defined as
7/// <factory/{creatorAddress}/{subdenom}>. The resulting denom's admin is
8/// originally set to be the creator, but this can be changed later. The token
9/// denom does not indicate the current admin.
10#[allow(clippy::derive_partial_eq_without_eq)]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct MsgCreateDenom {
13    #[prost(string, tag = "1")]
14    pub sender: ::prost::alloc::string::String,
15    /// subdenom can be up to 44 "alphanumeric" characters long.
16    #[prost(string, tag = "2")]
17    pub subdenom: ::prost::alloc::string::String,
18}
19/// MsgCreateDenomResponse is the return value of MsgCreateDenom
20/// It returns the full string of the newly created denom
21#[allow(clippy::derive_partial_eq_without_eq)]
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct MsgCreateDenomResponse {
24    #[prost(string, tag = "1")]
25    pub new_token_denom: ::prost::alloc::string::String,
26}
27/// MsgMint is the sdk.Msg type for allowing an admin account to mint
28/// more of a token.  For now, we only support minting to the sender account
29#[allow(clippy::derive_partial_eq_without_eq)]
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct MsgMint {
32    #[prost(string, tag = "1")]
33    pub sender: ::prost::alloc::string::String,
34    #[prost(message, optional, tag = "2")]
35    pub amount: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
36}
37#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct MsgMintResponse {}
40/// MsgBurn is the sdk.Msg type for allowing an admin account to burn
41/// a token.  For now, we only support burning from the sender account.
42#[allow(clippy::derive_partial_eq_without_eq)]
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct MsgBurn {
45    #[prost(string, tag = "1")]
46    pub sender: ::prost::alloc::string::String,
47    #[prost(message, optional, tag = "2")]
48    pub amount: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
49}
50#[allow(clippy::derive_partial_eq_without_eq)]
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct MsgBurnResponse {}
53/// MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign
54/// adminship of a denom to a new account
55#[allow(clippy::derive_partial_eq_without_eq)]
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct MsgChangeAdmin {
58    #[prost(string, tag = "1")]
59    pub sender: ::prost::alloc::string::String,
60    #[prost(string, tag = "2")]
61    pub denom: ::prost::alloc::string::String,
62    #[prost(string, tag = "3")]
63    pub new_admin: ::prost::alloc::string::String,
64}
65/// MsgChangeAdminResponse defines the response structure for an executed
66/// MsgChangeAdmin message.
67#[allow(clippy::derive_partial_eq_without_eq)]
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct MsgChangeAdminResponse {}
70/// MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set
71/// the denom's bank metadata
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct MsgSetDenomMetadata {
75    #[prost(string, tag = "1")]
76    pub sender: ::prost::alloc::string::String,
77    #[prost(message, optional, tag = "2")]
78    pub metadata: ::core::option::Option<super::super::super::cosmos::bank::v1beta1::Metadata>,
79}
80/// MsgSetDenomMetadataResponse defines the response structure for an executed
81/// MsgSetDenomMetadata message.
82#[allow(clippy::derive_partial_eq_without_eq)]
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct MsgSetDenomMetadataResponse {}
85/// Generated client implementations.
86#[cfg(feature = "grpc")]
87#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
88pub mod msg_client {
89    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
90    use tonic::codegen::http::Uri;
91    use tonic::codegen::*;
92    /// Msg defines the tokefactory module's gRPC message service.
93    #[derive(Debug, Clone)]
94    pub struct MsgClient<T> {
95        inner: tonic::client::Grpc<T>,
96    }
97    #[cfg(feature = "grpc-transport")]
98    #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
99    impl MsgClient<tonic::transport::Channel> {
100        /// Attempt to create a new client by connecting to a given endpoint.
101        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
102        where
103            D: std::convert::TryInto<tonic::transport::Endpoint>,
104            D::Error: Into<StdError>,
105        {
106            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
107            Ok(Self::new(conn))
108        }
109    }
110    impl<T> MsgClient<T>
111    where
112        T: tonic::client::GrpcService<tonic::body::BoxBody>,
113        T::Error: Into<StdError>,
114        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
115        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
116    {
117        pub fn new(inner: T) -> Self {
118            let inner = tonic::client::Grpc::new(inner);
119            Self { inner }
120        }
121        pub fn with_origin(inner: T, origin: Uri) -> Self {
122            let inner = tonic::client::Grpc::with_origin(inner, origin);
123            Self { inner }
124        }
125        pub fn with_interceptor<F>(inner: T, interceptor: F) -> MsgClient<InterceptedService<T, F>>
126        where
127            F: tonic::service::Interceptor,
128            T::ResponseBody: Default,
129            T: tonic::codegen::Service<
130                http::Request<tonic::body::BoxBody>,
131                Response = http::Response<
132                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
133                >,
134            >,
135            <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
136                Into<StdError> + Send + Sync,
137        {
138            MsgClient::new(InterceptedService::new(inner, interceptor))
139        }
140        /// Compress requests with the given encoding.
141        ///
142        /// This requires the server to support it otherwise it might respond with an
143        /// error.
144        #[must_use]
145        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
146            self.inner = self.inner.send_compressed(encoding);
147            self
148        }
149        /// Enable decompressing responses.
150        #[must_use]
151        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
152            self.inner = self.inner.accept_compressed(encoding);
153            self
154        }
155        pub async fn create_denom(
156            &mut self,
157            request: impl tonic::IntoRequest<super::MsgCreateDenom>,
158        ) -> Result<tonic::Response<super::MsgCreateDenomResponse>, tonic::Status> {
159            self.inner.ready().await.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                "/osmosis.tokenfactory.v1beta1.Msg/CreateDenom",
168            );
169            self.inner.unary(request.into_request(), path, codec).await
170        }
171        pub async fn mint(
172            &mut self,
173            request: impl tonic::IntoRequest<super::MsgMint>,
174        ) -> Result<tonic::Response<super::MsgMintResponse>, tonic::Status> {
175            self.inner.ready().await.map_err(|e| {
176                tonic::Status::new(
177                    tonic::Code::Unknown,
178                    format!("Service was not ready: {}", e.into()),
179                )
180            })?;
181            let codec = tonic::codec::ProstCodec::default();
182            let path =
183                http::uri::PathAndQuery::from_static("/osmosis.tokenfactory.v1beta1.Msg/Mint");
184            self.inner.unary(request.into_request(), path, codec).await
185        }
186        pub async fn burn(
187            &mut self,
188            request: impl tonic::IntoRequest<super::MsgBurn>,
189        ) -> Result<tonic::Response<super::MsgBurnResponse>, tonic::Status> {
190            self.inner.ready().await.map_err(|e| {
191                tonic::Status::new(
192                    tonic::Code::Unknown,
193                    format!("Service was not ready: {}", e.into()),
194                )
195            })?;
196            let codec = tonic::codec::ProstCodec::default();
197            let path =
198                http::uri::PathAndQuery::from_static("/osmosis.tokenfactory.v1beta1.Msg/Burn");
199            self.inner.unary(request.into_request(), path, codec).await
200        }
201        pub async fn change_admin(
202            &mut self,
203            request: impl tonic::IntoRequest<super::MsgChangeAdmin>,
204        ) -> Result<tonic::Response<super::MsgChangeAdminResponse>, tonic::Status> {
205            self.inner.ready().await.map_err(|e| {
206                tonic::Status::new(
207                    tonic::Code::Unknown,
208                    format!("Service was not ready: {}", e.into()),
209                )
210            })?;
211            let codec = tonic::codec::ProstCodec::default();
212            let path = http::uri::PathAndQuery::from_static(
213                "/osmosis.tokenfactory.v1beta1.Msg/ChangeAdmin",
214            );
215            self.inner.unary(request.into_request(), path, codec).await
216        }
217        pub async fn set_denom_metadata(
218            &mut self,
219            request: impl tonic::IntoRequest<super::MsgSetDenomMetadata>,
220        ) -> Result<tonic::Response<super::MsgSetDenomMetadataResponse>, tonic::Status> {
221            self.inner.ready().await.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                "/osmosis.tokenfactory.v1beta1.Msg/SetDenomMetadata",
230            );
231            self.inner.unary(request.into_request(), path, codec).await
232        }
233    }
234}
235/// Generated server implementations.
236#[cfg(feature = "grpc")]
237#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
238pub mod msg_server {
239    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
240    use tonic::codegen::*;
241    /// Generated trait containing gRPC methods that should be implemented for use with MsgServer.
242    #[async_trait]
243    pub trait Msg: Send + Sync + 'static {
244        async fn create_denom(
245            &self,
246            request: tonic::Request<super::MsgCreateDenom>,
247        ) -> Result<tonic::Response<super::MsgCreateDenomResponse>, tonic::Status>;
248        async fn mint(
249            &self,
250            request: tonic::Request<super::MsgMint>,
251        ) -> Result<tonic::Response<super::MsgMintResponse>, tonic::Status>;
252        async fn burn(
253            &self,
254            request: tonic::Request<super::MsgBurn>,
255        ) -> Result<tonic::Response<super::MsgBurnResponse>, tonic::Status>;
256        async fn change_admin(
257            &self,
258            request: tonic::Request<super::MsgChangeAdmin>,
259        ) -> Result<tonic::Response<super::MsgChangeAdminResponse>, tonic::Status>;
260        async fn set_denom_metadata(
261            &self,
262            request: tonic::Request<super::MsgSetDenomMetadata>,
263        ) -> Result<tonic::Response<super::MsgSetDenomMetadataResponse>, tonic::Status>;
264    }
265    /// Msg defines the tokefactory module's gRPC message service.
266    #[derive(Debug)]
267    pub struct MsgServer<T: Msg> {
268        inner: _Inner<T>,
269        accept_compression_encodings: EnabledCompressionEncodings,
270        send_compression_encodings: EnabledCompressionEncodings,
271    }
272    struct _Inner<T>(Arc<T>);
273    impl<T: Msg> MsgServer<T> {
274        pub fn new(inner: T) -> Self {
275            Self::from_arc(Arc::new(inner))
276        }
277        pub fn from_arc(inner: Arc<T>) -> Self {
278            let inner = _Inner(inner);
279            Self {
280                inner,
281                accept_compression_encodings: Default::default(),
282                send_compression_encodings: Default::default(),
283            }
284        }
285        pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
286        where
287            F: tonic::service::Interceptor,
288        {
289            InterceptedService::new(Self::new(inner), interceptor)
290        }
291        /// Enable decompressing requests with the given encoding.
292        #[must_use]
293        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
294            self.accept_compression_encodings.enable(encoding);
295            self
296        }
297        /// Compress responses with the given encoding, if the client supports it.
298        #[must_use]
299        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
300            self.send_compression_encodings.enable(encoding);
301            self
302        }
303    }
304    impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
305    where
306        T: Msg,
307        B: Body + Send + 'static,
308        B::Error: Into<StdError> + Send + 'static,
309    {
310        type Response = http::Response<tonic::body::BoxBody>;
311        type Error = std::convert::Infallible;
312        type Future = BoxFuture<Self::Response, Self::Error>;
313        fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
314            Poll::Ready(Ok(()))
315        }
316        fn call(&mut self, req: http::Request<B>) -> Self::Future {
317            let inner = self.inner.clone();
318            match req.uri().path() {
319                "/osmosis.tokenfactory.v1beta1.Msg/CreateDenom" => {
320                    #[allow(non_camel_case_types)]
321                    struct CreateDenomSvc<T: Msg>(pub Arc<T>);
322                    impl<T: Msg> tonic::server::UnaryService<super::MsgCreateDenom> for CreateDenomSvc<T> {
323                        type Response = super::MsgCreateDenomResponse;
324                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
325                        fn call(
326                            &mut self,
327                            request: tonic::Request<super::MsgCreateDenom>,
328                        ) -> Self::Future {
329                            let inner = self.0.clone();
330                            let fut = async move { (*inner).create_denom(request).await };
331                            Box::pin(fut)
332                        }
333                    }
334                    let accept_compression_encodings = self.accept_compression_encodings;
335                    let send_compression_encodings = self.send_compression_encodings;
336                    let inner = self.inner.clone();
337                    let fut = async move {
338                        let inner = inner.0;
339                        let method = CreateDenomSvc(inner);
340                        let codec = tonic::codec::ProstCodec::default();
341                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
342                            accept_compression_encodings,
343                            send_compression_encodings,
344                        );
345                        let res = grpc.unary(method, req).await;
346                        Ok(res)
347                    };
348                    Box::pin(fut)
349                }
350                "/osmosis.tokenfactory.v1beta1.Msg/Mint" => {
351                    #[allow(non_camel_case_types)]
352                    struct MintSvc<T: Msg>(pub Arc<T>);
353                    impl<T: Msg> tonic::server::UnaryService<super::MsgMint> for MintSvc<T> {
354                        type Response = super::MsgMintResponse;
355                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
356                        fn call(
357                            &mut self,
358                            request: tonic::Request<super::MsgMint>,
359                        ) -> Self::Future {
360                            let inner = self.0.clone();
361                            let fut = async move { (*inner).mint(request).await };
362                            Box::pin(fut)
363                        }
364                    }
365                    let accept_compression_encodings = self.accept_compression_encodings;
366                    let send_compression_encodings = self.send_compression_encodings;
367                    let inner = self.inner.clone();
368                    let fut = async move {
369                        let inner = inner.0;
370                        let method = MintSvc(inner);
371                        let codec = tonic::codec::ProstCodec::default();
372                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
373                            accept_compression_encodings,
374                            send_compression_encodings,
375                        );
376                        let res = grpc.unary(method, req).await;
377                        Ok(res)
378                    };
379                    Box::pin(fut)
380                }
381                "/osmosis.tokenfactory.v1beta1.Msg/Burn" => {
382                    #[allow(non_camel_case_types)]
383                    struct BurnSvc<T: Msg>(pub Arc<T>);
384                    impl<T: Msg> tonic::server::UnaryService<super::MsgBurn> for BurnSvc<T> {
385                        type Response = super::MsgBurnResponse;
386                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
387                        fn call(
388                            &mut self,
389                            request: tonic::Request<super::MsgBurn>,
390                        ) -> Self::Future {
391                            let inner = self.0.clone();
392                            let fut = async move { (*inner).burn(request).await };
393                            Box::pin(fut)
394                        }
395                    }
396                    let accept_compression_encodings = self.accept_compression_encodings;
397                    let send_compression_encodings = self.send_compression_encodings;
398                    let inner = self.inner.clone();
399                    let fut = async move {
400                        let inner = inner.0;
401                        let method = BurnSvc(inner);
402                        let codec = tonic::codec::ProstCodec::default();
403                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
404                            accept_compression_encodings,
405                            send_compression_encodings,
406                        );
407                        let res = grpc.unary(method, req).await;
408                        Ok(res)
409                    };
410                    Box::pin(fut)
411                }
412                "/osmosis.tokenfactory.v1beta1.Msg/ChangeAdmin" => {
413                    #[allow(non_camel_case_types)]
414                    struct ChangeAdminSvc<T: Msg>(pub Arc<T>);
415                    impl<T: Msg> tonic::server::UnaryService<super::MsgChangeAdmin> for ChangeAdminSvc<T> {
416                        type Response = super::MsgChangeAdminResponse;
417                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
418                        fn call(
419                            &mut self,
420                            request: tonic::Request<super::MsgChangeAdmin>,
421                        ) -> Self::Future {
422                            let inner = self.0.clone();
423                            let fut = async move { (*inner).change_admin(request).await };
424                            Box::pin(fut)
425                        }
426                    }
427                    let accept_compression_encodings = self.accept_compression_encodings;
428                    let send_compression_encodings = self.send_compression_encodings;
429                    let inner = self.inner.clone();
430                    let fut = async move {
431                        let inner = inner.0;
432                        let method = ChangeAdminSvc(inner);
433                        let codec = tonic::codec::ProstCodec::default();
434                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
435                            accept_compression_encodings,
436                            send_compression_encodings,
437                        );
438                        let res = grpc.unary(method, req).await;
439                        Ok(res)
440                    };
441                    Box::pin(fut)
442                }
443                "/osmosis.tokenfactory.v1beta1.Msg/SetDenomMetadata" => {
444                    #[allow(non_camel_case_types)]
445                    struct SetDenomMetadataSvc<T: Msg>(pub Arc<T>);
446                    impl<T: Msg> tonic::server::UnaryService<super::MsgSetDenomMetadata> for SetDenomMetadataSvc<T> {
447                        type Response = super::MsgSetDenomMetadataResponse;
448                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
449                        fn call(
450                            &mut self,
451                            request: tonic::Request<super::MsgSetDenomMetadata>,
452                        ) -> Self::Future {
453                            let inner = self.0.clone();
454                            let fut = async move { (*inner).set_denom_metadata(request).await };
455                            Box::pin(fut)
456                        }
457                    }
458                    let accept_compression_encodings = self.accept_compression_encodings;
459                    let send_compression_encodings = self.send_compression_encodings;
460                    let inner = self.inner.clone();
461                    let fut = async move {
462                        let inner = inner.0;
463                        let method = SetDenomMetadataSvc(inner);
464                        let codec = tonic::codec::ProstCodec::default();
465                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
466                            accept_compression_encodings,
467                            send_compression_encodings,
468                        );
469                        let res = grpc.unary(method, req).await;
470                        Ok(res)
471                    };
472                    Box::pin(fut)
473                }
474                _ => Box::pin(async move {
475                    Ok(http::Response::builder()
476                        .status(200)
477                        .header("grpc-status", "12")
478                        .header("content-type", "application/grpc")
479                        .body(empty_body())
480                        .unwrap())
481                }),
482            }
483        }
484    }
485    impl<T: Msg> Clone for MsgServer<T> {
486        fn clone(&self) -> Self {
487            let inner = self.inner.clone();
488            Self {
489                inner,
490                accept_compression_encodings: self.accept_compression_encodings,
491                send_compression_encodings: self.send_compression_encodings,
492            }
493        }
494    }
495    impl<T: Msg> Clone for _Inner<T> {
496        fn clone(&self) -> Self {
497            Self(self.0.clone())
498        }
499    }
500    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
501        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
502            write!(f, "{:?}", self.0)
503        }
504    }
505    impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
506        const NAME: &'static str = "osmosis.tokenfactory.v1beta1.Msg";
507    }
508}
509/// DenomAuthorityMetadata specifies metadata for addresses that have specific
510/// capabilities over a token factory denom. Right now there is only one Admin
511/// permission, but is planned to be extended to the future.
512#[allow(clippy::derive_partial_eq_without_eq)]
513#[derive(Clone, PartialEq, ::prost::Message)]
514pub struct DenomAuthorityMetadata {
515    /// Can be empty for no admin, or a valid osmosis address
516    #[prost(string, tag = "1")]
517    pub admin: ::prost::alloc::string::String,
518}
519/// Params defines the parameters for the tokenfactory module.
520#[allow(clippy::derive_partial_eq_without_eq)]
521#[derive(Clone, PartialEq, ::prost::Message)]
522pub struct Params {
523    #[prost(message, repeated, tag = "1")]
524    pub denom_creation_fee:
525        ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
526}
527/// QueryParamsRequest is the request type for the Query/Params RPC method.
528#[allow(clippy::derive_partial_eq_without_eq)]
529#[derive(Clone, PartialEq, ::prost::Message)]
530pub struct QueryParamsRequest {}
531/// QueryParamsResponse is the response type for the Query/Params RPC method.
532#[allow(clippy::derive_partial_eq_without_eq)]
533#[derive(Clone, PartialEq, ::prost::Message)]
534pub struct QueryParamsResponse {
535    /// params defines the parameters of the module.
536    #[prost(message, optional, tag = "1")]
537    pub params: ::core::option::Option<Params>,
538}
539/// QueryDenomAuthorityMetadataRequest defines the request structure for the
540/// DenomAuthorityMetadata gRPC query.
541#[allow(clippy::derive_partial_eq_without_eq)]
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct QueryDenomAuthorityMetadataRequest {
544    #[prost(string, tag = "1")]
545    pub denom: ::prost::alloc::string::String,
546}
547/// QueryDenomAuthorityMetadataResponse defines the response structure for the
548/// DenomAuthorityMetadata gRPC query.
549#[allow(clippy::derive_partial_eq_without_eq)]
550#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct QueryDenomAuthorityMetadataResponse {
552    #[prost(message, optional, tag = "1")]
553    pub authority_metadata: ::core::option::Option<DenomAuthorityMetadata>,
554}
555/// QueryDenomsFromCreatorRequest defines the request structure for the
556/// DenomsFromCreator gRPC query.
557#[allow(clippy::derive_partial_eq_without_eq)]
558#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct QueryDenomsFromCreatorRequest {
560    #[prost(string, tag = "1")]
561    pub creator: ::prost::alloc::string::String,
562}
563/// QueryDenomsFromCreatorRequest defines the response structure for the
564/// DenomsFromCreator gRPC query.
565#[allow(clippy::derive_partial_eq_without_eq)]
566#[derive(Clone, PartialEq, ::prost::Message)]
567pub struct QueryDenomsFromCreatorResponse {
568    #[prost(string, repeated, tag = "1")]
569    pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
570}
571/// Generated client implementations.
572#[cfg(feature = "grpc")]
573#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
574pub mod query_client {
575    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
576    use tonic::codegen::http::Uri;
577    use tonic::codegen::*;
578    /// Query defines the gRPC querier service.
579    #[derive(Debug, Clone)]
580    pub struct QueryClient<T> {
581        inner: tonic::client::Grpc<T>,
582    }
583    #[cfg(feature = "grpc-transport")]
584    #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
585    impl QueryClient<tonic::transport::Channel> {
586        /// Attempt to create a new client by connecting to a given endpoint.
587        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
588        where
589            D: std::convert::TryInto<tonic::transport::Endpoint>,
590            D::Error: Into<StdError>,
591        {
592            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
593            Ok(Self::new(conn))
594        }
595    }
596    impl<T> QueryClient<T>
597    where
598        T: tonic::client::GrpcService<tonic::body::BoxBody>,
599        T::Error: Into<StdError>,
600        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
601        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
602    {
603        pub fn new(inner: T) -> Self {
604            let inner = tonic::client::Grpc::new(inner);
605            Self { inner }
606        }
607        pub fn with_origin(inner: T, origin: Uri) -> Self {
608            let inner = tonic::client::Grpc::with_origin(inner, origin);
609            Self { inner }
610        }
611        pub fn with_interceptor<F>(
612            inner: T,
613            interceptor: F,
614        ) -> QueryClient<InterceptedService<T, F>>
615        where
616            F: tonic::service::Interceptor,
617            T::ResponseBody: Default,
618            T: tonic::codegen::Service<
619                http::Request<tonic::body::BoxBody>,
620                Response = http::Response<
621                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
622                >,
623            >,
624            <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
625                Into<StdError> + Send + Sync,
626        {
627            QueryClient::new(InterceptedService::new(inner, interceptor))
628        }
629        /// Compress requests with the given encoding.
630        ///
631        /// This requires the server to support it otherwise it might respond with an
632        /// error.
633        #[must_use]
634        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
635            self.inner = self.inner.send_compressed(encoding);
636            self
637        }
638        /// Enable decompressing responses.
639        #[must_use]
640        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
641            self.inner = self.inner.accept_compressed(encoding);
642            self
643        }
644        /// Params defines a gRPC query method that returns the tokenfactory module's
645        /// parameters.
646        pub async fn params(
647            &mut self,
648            request: impl tonic::IntoRequest<super::QueryParamsRequest>,
649        ) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status> {
650            self.inner.ready().await.map_err(|e| {
651                tonic::Status::new(
652                    tonic::Code::Unknown,
653                    format!("Service was not ready: {}", e.into()),
654                )
655            })?;
656            let codec = tonic::codec::ProstCodec::default();
657            let path =
658                http::uri::PathAndQuery::from_static("/osmosis.tokenfactory.v1beta1.Query/Params");
659            self.inner.unary(request.into_request(), path, codec).await
660        }
661        /// DenomAuthorityMetadata defines a gRPC query method for fetching
662        /// DenomAuthorityMetadata for a particular denom.
663        pub async fn denom_authority_metadata(
664            &mut self,
665            request: impl tonic::IntoRequest<super::QueryDenomAuthorityMetadataRequest>,
666        ) -> Result<tonic::Response<super::QueryDenomAuthorityMetadataResponse>, tonic::Status>
667        {
668            self.inner.ready().await.map_err(|e| {
669                tonic::Status::new(
670                    tonic::Code::Unknown,
671                    format!("Service was not ready: {}", e.into()),
672                )
673            })?;
674            let codec = tonic::codec::ProstCodec::default();
675            let path = http::uri::PathAndQuery::from_static(
676                "/osmosis.tokenfactory.v1beta1.Query/DenomAuthorityMetadata",
677            );
678            self.inner.unary(request.into_request(), path, codec).await
679        }
680        /// DenomsFromCreator defines a gRPC query method for fetching all
681        /// denominations created by a specific admin/creator.
682        pub async fn denoms_from_creator(
683            &mut self,
684            request: impl tonic::IntoRequest<super::QueryDenomsFromCreatorRequest>,
685        ) -> Result<tonic::Response<super::QueryDenomsFromCreatorResponse>, tonic::Status> {
686            self.inner.ready().await.map_err(|e| {
687                tonic::Status::new(
688                    tonic::Code::Unknown,
689                    format!("Service was not ready: {}", e.into()),
690                )
691            })?;
692            let codec = tonic::codec::ProstCodec::default();
693            let path = http::uri::PathAndQuery::from_static(
694                "/osmosis.tokenfactory.v1beta1.Query/DenomsFromCreator",
695            );
696            self.inner.unary(request.into_request(), path, codec).await
697        }
698    }
699}
700/// Generated server implementations.
701#[cfg(feature = "grpc")]
702#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
703pub mod query_server {
704    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
705    use tonic::codegen::*;
706    /// Generated trait containing gRPC methods that should be implemented for use with QueryServer.
707    #[async_trait]
708    pub trait Query: Send + Sync + 'static {
709        /// Params defines a gRPC query method that returns the tokenfactory module's
710        /// parameters.
711        async fn params(
712            &self,
713            request: tonic::Request<super::QueryParamsRequest>,
714        ) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status>;
715        /// DenomAuthorityMetadata defines a gRPC query method for fetching
716        /// DenomAuthorityMetadata for a particular denom.
717        async fn denom_authority_metadata(
718            &self,
719            request: tonic::Request<super::QueryDenomAuthorityMetadataRequest>,
720        ) -> Result<tonic::Response<super::QueryDenomAuthorityMetadataResponse>, tonic::Status>;
721        /// DenomsFromCreator defines a gRPC query method for fetching all
722        /// denominations created by a specific admin/creator.
723        async fn denoms_from_creator(
724            &self,
725            request: tonic::Request<super::QueryDenomsFromCreatorRequest>,
726        ) -> Result<tonic::Response<super::QueryDenomsFromCreatorResponse>, tonic::Status>;
727    }
728    /// Query defines the gRPC querier service.
729    #[derive(Debug)]
730    pub struct QueryServer<T: Query> {
731        inner: _Inner<T>,
732        accept_compression_encodings: EnabledCompressionEncodings,
733        send_compression_encodings: EnabledCompressionEncodings,
734    }
735    struct _Inner<T>(Arc<T>);
736    impl<T: Query> QueryServer<T> {
737        pub fn new(inner: T) -> Self {
738            Self::from_arc(Arc::new(inner))
739        }
740        pub fn from_arc(inner: Arc<T>) -> Self {
741            let inner = _Inner(inner);
742            Self {
743                inner,
744                accept_compression_encodings: Default::default(),
745                send_compression_encodings: Default::default(),
746            }
747        }
748        pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
749        where
750            F: tonic::service::Interceptor,
751        {
752            InterceptedService::new(Self::new(inner), interceptor)
753        }
754        /// Enable decompressing requests with the given encoding.
755        #[must_use]
756        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
757            self.accept_compression_encodings.enable(encoding);
758            self
759        }
760        /// Compress responses with the given encoding, if the client supports it.
761        #[must_use]
762        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
763            self.send_compression_encodings.enable(encoding);
764            self
765        }
766    }
767    impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
768    where
769        T: Query,
770        B: Body + Send + 'static,
771        B::Error: Into<StdError> + Send + 'static,
772    {
773        type Response = http::Response<tonic::body::BoxBody>;
774        type Error = std::convert::Infallible;
775        type Future = BoxFuture<Self::Response, Self::Error>;
776        fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
777            Poll::Ready(Ok(()))
778        }
779        fn call(&mut self, req: http::Request<B>) -> Self::Future {
780            let inner = self.inner.clone();
781            match req.uri().path() {
782                "/osmosis.tokenfactory.v1beta1.Query/Params" => {
783                    #[allow(non_camel_case_types)]
784                    struct ParamsSvc<T: Query>(pub Arc<T>);
785                    impl<T: Query> tonic::server::UnaryService<super::QueryParamsRequest> for ParamsSvc<T> {
786                        type Response = super::QueryParamsResponse;
787                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
788                        fn call(
789                            &mut self,
790                            request: tonic::Request<super::QueryParamsRequest>,
791                        ) -> Self::Future {
792                            let inner = self.0.clone();
793                            let fut = async move { (*inner).params(request).await };
794                            Box::pin(fut)
795                        }
796                    }
797                    let accept_compression_encodings = self.accept_compression_encodings;
798                    let send_compression_encodings = self.send_compression_encodings;
799                    let inner = self.inner.clone();
800                    let fut = async move {
801                        let inner = inner.0;
802                        let method = ParamsSvc(inner);
803                        let codec = tonic::codec::ProstCodec::default();
804                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
805                            accept_compression_encodings,
806                            send_compression_encodings,
807                        );
808                        let res = grpc.unary(method, req).await;
809                        Ok(res)
810                    };
811                    Box::pin(fut)
812                }
813                "/osmosis.tokenfactory.v1beta1.Query/DenomAuthorityMetadata" => {
814                    #[allow(non_camel_case_types)]
815                    struct DenomAuthorityMetadataSvc<T: Query>(pub Arc<T>);
816                    impl<T: Query>
817                        tonic::server::UnaryService<super::QueryDenomAuthorityMetadataRequest>
818                        for DenomAuthorityMetadataSvc<T>
819                    {
820                        type Response = super::QueryDenomAuthorityMetadataResponse;
821                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
822                        fn call(
823                            &mut self,
824                            request: tonic::Request<super::QueryDenomAuthorityMetadataRequest>,
825                        ) -> Self::Future {
826                            let inner = self.0.clone();
827                            let fut =
828                                async move { (*inner).denom_authority_metadata(request).await };
829                            Box::pin(fut)
830                        }
831                    }
832                    let accept_compression_encodings = self.accept_compression_encodings;
833                    let send_compression_encodings = self.send_compression_encodings;
834                    let inner = self.inner.clone();
835                    let fut = async move {
836                        let inner = inner.0;
837                        let method = DenomAuthorityMetadataSvc(inner);
838                        let codec = tonic::codec::ProstCodec::default();
839                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
840                            accept_compression_encodings,
841                            send_compression_encodings,
842                        );
843                        let res = grpc.unary(method, req).await;
844                        Ok(res)
845                    };
846                    Box::pin(fut)
847                }
848                "/osmosis.tokenfactory.v1beta1.Query/DenomsFromCreator" => {
849                    #[allow(non_camel_case_types)]
850                    struct DenomsFromCreatorSvc<T: Query>(pub Arc<T>);
851                    impl<T: Query> tonic::server::UnaryService<super::QueryDenomsFromCreatorRequest>
852                        for DenomsFromCreatorSvc<T>
853                    {
854                        type Response = super::QueryDenomsFromCreatorResponse;
855                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
856                        fn call(
857                            &mut self,
858                            request: tonic::Request<super::QueryDenomsFromCreatorRequest>,
859                        ) -> Self::Future {
860                            let inner = self.0.clone();
861                            let fut = async move { (*inner).denoms_from_creator(request).await };
862                            Box::pin(fut)
863                        }
864                    }
865                    let accept_compression_encodings = self.accept_compression_encodings;
866                    let send_compression_encodings = self.send_compression_encodings;
867                    let inner = self.inner.clone();
868                    let fut = async move {
869                        let inner = inner.0;
870                        let method = DenomsFromCreatorSvc(inner);
871                        let codec = tonic::codec::ProstCodec::default();
872                        let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
873                            accept_compression_encodings,
874                            send_compression_encodings,
875                        );
876                        let res = grpc.unary(method, req).await;
877                        Ok(res)
878                    };
879                    Box::pin(fut)
880                }
881                _ => Box::pin(async move {
882                    Ok(http::Response::builder()
883                        .status(200)
884                        .header("grpc-status", "12")
885                        .header("content-type", "application/grpc")
886                        .body(empty_body())
887                        .unwrap())
888                }),
889            }
890        }
891    }
892    impl<T: Query> Clone for QueryServer<T> {
893        fn clone(&self) -> Self {
894            let inner = self.inner.clone();
895            Self {
896                inner,
897                accept_compression_encodings: self.accept_compression_encodings,
898                send_compression_encodings: self.send_compression_encodings,
899            }
900        }
901    }
902    impl<T: Query> Clone for _Inner<T> {
903        fn clone(&self) -> Self {
904            Self(self.0.clone())
905        }
906    }
907    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
908        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
909            write!(f, "{:?}", self.0)
910        }
911    }
912    impl<T: Query> tonic::server::NamedService for QueryServer<T> {
913        const NAME: &'static str = "osmosis.tokenfactory.v1beta1.Query";
914    }
915}
916/// GenesisState defines the tokenfactory module's genesis state.
917#[allow(clippy::derive_partial_eq_without_eq)]
918#[derive(Clone, PartialEq, ::prost::Message)]
919pub struct GenesisState {
920    /// params defines the paramaters of the module.
921    #[prost(message, optional, tag = "1")]
922    pub params: ::core::option::Option<Params>,
923    #[prost(message, repeated, tag = "2")]
924    pub factory_denoms: ::prost::alloc::vec::Vec<GenesisDenom>,
925}
926/// GenesisDenom defines a tokenfactory denom that is defined within genesis
927/// state. The structure contains DenomAuthorityMetadata which defines the
928/// denom's admin.
929#[allow(clippy::derive_partial_eq_without_eq)]
930#[derive(Clone, PartialEq, ::prost::Message)]
931pub struct GenesisDenom {
932    #[prost(string, tag = "1")]
933    pub denom: ::prost::alloc::string::String,
934    #[prost(message, optional, tag = "2")]
935    pub authority_metadata: ::core::option::Option<DenomAuthorityMetadata>,
936}