#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenericAuthorization {
#[prost(string, tag = "1")]
pub msg: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Grant {
#[prost(message, optional, tag = "1")]
pub authorization: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag = "2")]
pub expiration: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrantAuthorization {
#[prost(string, tag = "1")]
pub granter: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub grantee: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub authorization: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag = "4")]
pub expiration: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrantQueueItem {
#[prost(string, repeated, tag = "1")]
pub msg_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, repeated, tag = "1")]
pub authorization: ::prost::alloc::vec::Vec<GrantAuthorization>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventGrant {
#[prost(string, tag = "2")]
pub msg_type_url: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub granter: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub grantee: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventRevoke {
#[prost(string, tag = "2")]
pub msg_type_url: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub granter: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub grantee: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryGrantsRequest {
#[prost(string, tag = "1")]
pub granter: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub grantee: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub msg_type_url: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryGrantsResponse {
#[prost(message, repeated, tag = "1")]
pub grants: ::prost::alloc::vec::Vec<Grant>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageResponse,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryGranterGrantsRequest {
#[prost(string, tag = "1")]
pub granter: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryGranterGrantsResponse {
#[prost(message, repeated, tag = "1")]
pub grants: ::prost::alloc::vec::Vec<GrantAuthorization>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageResponse,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryGranteeGrantsRequest {
#[prost(string, tag = "1")]
pub grantee: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageRequest,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryGranteeGrantsResponse {
#[prost(message, repeated, tag = "1")]
pub grants: ::prost::alloc::vec::Vec<GrantAuthorization>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::base::query::v1beta1::PageResponse,
>,
}
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
impl QueryClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> QueryClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> QueryClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn grants(
&mut self,
request: impl tonic::IntoRequest<super::QueryGrantsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryGrantsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cosmos.authz.v1beta1.Query/Grants",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.authz.v1beta1.Query", "Grants"));
self.inner.unary(req, path, codec).await
}
pub async fn granter_grants(
&mut self,
request: impl tonic::IntoRequest<super::QueryGranterGrantsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryGranterGrantsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cosmos.authz.v1beta1.Query/GranterGrants",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.authz.v1beta1.Query", "GranterGrants"));
self.inner.unary(req, path, codec).await
}
pub async fn grantee_grants(
&mut self,
request: impl tonic::IntoRequest<super::QueryGranteeGrantsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryGranteeGrantsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cosmos.authz.v1beta1.Query/GranteeGrants",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.authz.v1beta1.Query", "GranteeGrants"));
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgGrant {
#[prost(string, tag = "1")]
pub granter: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub grantee: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub grant: ::core::option::Option<Grant>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgExecResponse {
#[prost(bytes = "vec", repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgExec {
#[prost(string, tag = "1")]
pub grantee: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub msgs: ::prost::alloc::vec::Vec<::prost_types::Any>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgGrantResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRevoke {
#[prost(string, tag = "1")]
pub granter: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub grantee: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub msg_type_url: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRevokeResponse {}
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
impl MsgClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MsgClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MsgClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
MsgClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn grant(
&mut self,
request: impl tonic::IntoRequest<super::MsgGrant>,
) -> std::result::Result<
tonic::Response<super::MsgGrantResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cosmos.authz.v1beta1.Msg/Grant",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Grant"));
self.inner.unary(req, path, codec).await
}
pub async fn exec(
&mut self,
request: impl tonic::IntoRequest<super::MsgExec>,
) -> std::result::Result<
tonic::Response<super::MsgExecResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cosmos.authz.v1beta1.Msg/Exec",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Exec"));
self.inner.unary(req, path, codec).await
}
pub async fn revoke(
&mut self,
request: impl tonic::IntoRequest<super::MsgRevoke>,
) -> std::result::Result<
tonic::Response<super::MsgRevokeResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cosmos.authz.v1beta1.Msg/Revoke",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cosmos.authz.v1beta1.Msg", "Revoke"));
self.inner.unary(req, path, codec).await
}
}
}