#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSetWithdrawAddress {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub withdraw_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSetWithdrawAddressResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgWithdrawDelegatorReward {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub validator_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgWithdrawDelegatorRewardResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgWithdrawValidatorCommission {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgWithdrawValidatorCommissionResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFundCommunityPool {
#[prost(message, repeated, tag = "1")]
pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub depositor: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFundCommunityPoolResponse {}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl MsgClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::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
}
pub async fn set_withdraw_address(
&mut self,
request: impl tonic::IntoRequest<super::MsgSetWithdrawAddress>,
) -> Result<tonic::Response<super::MsgSetWithdrawAddressResponse>, 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.distribution.v1beta1.Msg/SetWithdrawAddress",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn withdraw_delegator_reward(
&mut self,
request: impl tonic::IntoRequest<super::MsgWithdrawDelegatorReward>,
) -> Result<tonic::Response<super::MsgWithdrawDelegatorRewardResponse>, 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.distribution.v1beta1.Msg/WithdrawDelegatorReward",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn withdraw_validator_commission(
&mut self,
request: impl tonic::IntoRequest<super::MsgWithdrawValidatorCommission>,
) -> Result<tonic::Response<super::MsgWithdrawValidatorCommissionResponse>, 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.distribution.v1beta1.Msg/WithdrawValidatorCommission",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn fund_community_pool(
&mut self,
request: impl tonic::IntoRequest<super::MsgFundCommunityPool>,
) -> Result<tonic::Response<super::MsgFundCommunityPoolResponse>, 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.distribution.v1beta1.Msg/FundCommunityPool",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod msg_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Msg: Send + Sync + 'static {
async fn set_withdraw_address(
&self,
request: tonic::Request<super::MsgSetWithdrawAddress>,
) -> Result<tonic::Response<super::MsgSetWithdrawAddressResponse>, tonic::Status>;
async fn withdraw_delegator_reward(
&self,
request: tonic::Request<super::MsgWithdrawDelegatorReward>,
) -> Result<tonic::Response<super::MsgWithdrawDelegatorRewardResponse>, tonic::Status>;
async fn withdraw_validator_commission(
&self,
request: tonic::Request<super::MsgWithdrawValidatorCommission>,
) -> Result<tonic::Response<super::MsgWithdrawValidatorCommissionResponse>, tonic::Status>;
async fn fund_community_pool(
&self,
request: tonic::Request<super::MsgFundCommunityPool>,
) -> Result<tonic::Response<super::MsgFundCommunityPoolResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct MsgServer<T: Msg> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: Msg> MsgServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
where
T: Msg,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress" => {
#[allow(non_camel_case_types)]
struct SetWithdrawAddressSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgSetWithdrawAddress>
for SetWithdrawAddressSvc<T>
{
type Response = super::MsgSetWithdrawAddressResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgSetWithdrawAddress>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).set_withdraw_address(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SetWithdrawAddressSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward" => {
#[allow(non_camel_case_types)]
struct WithdrawDelegatorRewardSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgWithdrawDelegatorReward>
for WithdrawDelegatorRewardSvc<T>
{
type Response = super::MsgWithdrawDelegatorRewardResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgWithdrawDelegatorReward>,
) -> Self::Future {
let inner = self.0.clone();
let fut =
async move { (*inner).withdraw_delegator_reward(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = WithdrawDelegatorRewardSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission" => {
#[allow(non_camel_case_types)]
struct WithdrawValidatorCommissionSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgWithdrawValidatorCommission>
for WithdrawValidatorCommissionSvc<T>
{
type Response = super::MsgWithdrawValidatorCommissionResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgWithdrawValidatorCommission>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).withdraw_validator_commission(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = WithdrawValidatorCommissionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Msg/FundCommunityPool" => {
#[allow(non_camel_case_types)]
struct FundCommunityPoolSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgFundCommunityPool> for FundCommunityPoolSvc<T> {
type Response = super::MsgFundCommunityPoolResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgFundCommunityPool>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).fund_community_pool(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = FundCommunityPoolSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => Box::pin(async move {
Ok(http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap())
}),
}
}
}
impl<T: Msg> Clone for MsgServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
}
}
}
impl<T: Msg> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
const NAME: &'static str = "cosmos.distribution.v1beta1.Msg";
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(string, tag = "1")]
pub community_tax: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub base_proposer_reward: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub bonus_proposer_reward: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub withdraw_addr_enabled: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorHistoricalRewards {
#[prost(message, repeated, tag = "1")]
pub cumulative_reward_ratio: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
#[prost(uint32, tag = "2")]
pub reference_count: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorCurrentRewards {
#[prost(message, repeated, tag = "1")]
pub rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
#[prost(uint64, tag = "2")]
pub period: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorAccumulatedCommission {
#[prost(message, repeated, tag = "1")]
pub commission: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorOutstandingRewards {
#[prost(message, repeated, tag = "1")]
pub rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorSlashEvent {
#[prost(uint64, tag = "1")]
pub validator_period: u64,
#[prost(string, tag = "2")]
pub fraction: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorSlashEvents {
#[prost(message, repeated, tag = "1")]
pub validator_slash_events: ::prost::alloc::vec::Vec<ValidatorSlashEvent>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeePool {
#[prost(message, repeated, tag = "1")]
pub community_pool: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommunityPoolSpendProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub recipient: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegatorStartingInfo {
#[prost(uint64, tag = "1")]
pub previous_period: u64,
#[prost(string, tag = "2")]
pub stake: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub height: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegationDelegatorReward {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub reward: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommunityPoolSpendProposalWithDeposit {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub recipient: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub amount: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub deposit: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorOutstandingRewardsRequest {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorOutstandingRewardsResponse {
#[prost(message, optional, tag = "1")]
pub rewards: ::core::option::Option<ValidatorOutstandingRewards>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorCommissionRequest {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorCommissionResponse {
#[prost(message, optional, tag = "1")]
pub commission: ::core::option::Option<ValidatorAccumulatedCommission>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorSlashesRequest {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub starting_height: u64,
#[prost(uint64, tag = "3")]
pub ending_height: u64,
#[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 QueryValidatorSlashesResponse {
#[prost(message, repeated, tag = "1")]
pub slashes: ::prost::alloc::vec::Vec<ValidatorSlashEvent>,
#[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 QueryDelegationRewardsRequest {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub validator_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegationRewardsResponse {
#[prost(message, repeated, tag = "1")]
pub rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegationTotalRewardsRequest {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegationTotalRewardsResponse {
#[prost(message, repeated, tag = "1")]
pub rewards: ::prost::alloc::vec::Vec<DelegationDelegatorReward>,
#[prost(message, repeated, tag = "2")]
pub total: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorValidatorsRequest {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorValidatorsResponse {
#[prost(string, repeated, tag = "1")]
pub validators: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorWithdrawAddressRequest {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorWithdrawAddressResponse {
#[prost(string, tag = "1")]
pub withdraw_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCommunityPoolRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCommunityPoolResponse {
#[prost(message, repeated, tag = "1")]
pub pool: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl QueryClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::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
}
pub async fn params(
&mut self,
request: impl tonic::IntoRequest<super::QueryParamsRequest>,
) -> Result<tonic::Response<super::QueryParamsResponse>, 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.distribution.v1beta1.Query/Params");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn validator_outstanding_rewards(
&mut self,
request: impl tonic::IntoRequest<super::QueryValidatorOutstandingRewardsRequest>,
) -> Result<tonic::Response<super::QueryValidatorOutstandingRewardsResponse>, 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.distribution.v1beta1.Query/ValidatorOutstandingRewards",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn validator_commission(
&mut self,
request: impl tonic::IntoRequest<super::QueryValidatorCommissionRequest>,
) -> Result<tonic::Response<super::QueryValidatorCommissionResponse>, 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.distribution.v1beta1.Query/ValidatorCommission",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn validator_slashes(
&mut self,
request: impl tonic::IntoRequest<super::QueryValidatorSlashesRequest>,
) -> Result<tonic::Response<super::QueryValidatorSlashesResponse>, 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.distribution.v1beta1.Query/ValidatorSlashes",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegation_rewards(
&mut self,
request: impl tonic::IntoRequest<super::QueryDelegationRewardsRequest>,
) -> Result<tonic::Response<super::QueryDelegationRewardsResponse>, 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.distribution.v1beta1.Query/DelegationRewards",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegation_total_rewards(
&mut self,
request: impl tonic::IntoRequest<super::QueryDelegationTotalRewardsRequest>,
) -> Result<tonic::Response<super::QueryDelegationTotalRewardsResponse>, 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.distribution.v1beta1.Query/DelegationTotalRewards",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegator_validators(
&mut self,
request: impl tonic::IntoRequest<super::QueryDelegatorValidatorsRequest>,
) -> Result<tonic::Response<super::QueryDelegatorValidatorsResponse>, 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.distribution.v1beta1.Query/DelegatorValidators",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegator_withdraw_address(
&mut self,
request: impl tonic::IntoRequest<super::QueryDelegatorWithdrawAddressRequest>,
) -> Result<tonic::Response<super::QueryDelegatorWithdrawAddressResponse>, 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.distribution.v1beta1.Query/DelegatorWithdrawAddress",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn community_pool(
&mut self,
request: impl tonic::IntoRequest<super::QueryCommunityPoolRequest>,
) -> Result<tonic::Response<super::QueryCommunityPoolResponse>, 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.distribution.v1beta1.Query/CommunityPool",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod query_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Query: Send + Sync + 'static {
async fn params(
&self,
request: tonic::Request<super::QueryParamsRequest>,
) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status>;
async fn validator_outstanding_rewards(
&self,
request: tonic::Request<super::QueryValidatorOutstandingRewardsRequest>,
) -> Result<tonic::Response<super::QueryValidatorOutstandingRewardsResponse>, tonic::Status>;
async fn validator_commission(
&self,
request: tonic::Request<super::QueryValidatorCommissionRequest>,
) -> Result<tonic::Response<super::QueryValidatorCommissionResponse>, tonic::Status>;
async fn validator_slashes(
&self,
request: tonic::Request<super::QueryValidatorSlashesRequest>,
) -> Result<tonic::Response<super::QueryValidatorSlashesResponse>, tonic::Status>;
async fn delegation_rewards(
&self,
request: tonic::Request<super::QueryDelegationRewardsRequest>,
) -> Result<tonic::Response<super::QueryDelegationRewardsResponse>, tonic::Status>;
async fn delegation_total_rewards(
&self,
request: tonic::Request<super::QueryDelegationTotalRewardsRequest>,
) -> Result<tonic::Response<super::QueryDelegationTotalRewardsResponse>, tonic::Status>;
async fn delegator_validators(
&self,
request: tonic::Request<super::QueryDelegatorValidatorsRequest>,
) -> Result<tonic::Response<super::QueryDelegatorValidatorsResponse>, tonic::Status>;
async fn delegator_withdraw_address(
&self,
request: tonic::Request<super::QueryDelegatorWithdrawAddressRequest>,
) -> Result<tonic::Response<super::QueryDelegatorWithdrawAddressResponse>, tonic::Status>;
async fn community_pool(
&self,
request: tonic::Request<super::QueryCommunityPoolRequest>,
) -> Result<tonic::Response<super::QueryCommunityPoolResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct QueryServer<T: Query> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: Query> QueryServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
where
T: Query,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/cosmos.distribution.v1beta1.Query/Params" => {
#[allow(non_camel_case_types)]
struct ParamsSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryParamsRequest> for ParamsSvc<T> {
type Response = super::QueryParamsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryParamsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).params(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ParamsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards" => {
#[allow(non_camel_case_types)]
struct ValidatorOutstandingRewardsSvc<T: Query>(pub Arc<T>);
impl<T: Query>
tonic::server::UnaryService<super::QueryValidatorOutstandingRewardsRequest>
for ValidatorOutstandingRewardsSvc<T>
{
type Response = super::QueryValidatorOutstandingRewardsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryValidatorOutstandingRewardsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).validator_outstanding_rewards(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ValidatorOutstandingRewardsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Query/ValidatorCommission" => {
#[allow(non_camel_case_types)]
struct ValidatorCommissionSvc<T: Query>(pub Arc<T>);
impl<T: Query>
tonic::server::UnaryService<super::QueryValidatorCommissionRequest>
for ValidatorCommissionSvc<T>
{
type Response = super::QueryValidatorCommissionResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryValidatorCommissionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).validator_commission(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ValidatorCommissionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Query/ValidatorSlashes" => {
#[allow(non_camel_case_types)]
struct ValidatorSlashesSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryValidatorSlashesRequest>
for ValidatorSlashesSvc<T>
{
type Response = super::QueryValidatorSlashesResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryValidatorSlashesRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).validator_slashes(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ValidatorSlashesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Query/DelegationRewards" => {
#[allow(non_camel_case_types)]
struct DelegationRewardsSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryDelegationRewardsRequest>
for DelegationRewardsSvc<T>
{
type Response = super::QueryDelegationRewardsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryDelegationRewardsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).delegation_rewards(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DelegationRewardsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Query/DelegationTotalRewards" => {
#[allow(non_camel_case_types)]
struct DelegationTotalRewardsSvc<T: Query>(pub Arc<T>);
impl<T: Query>
tonic::server::UnaryService<super::QueryDelegationTotalRewardsRequest>
for DelegationTotalRewardsSvc<T>
{
type Response = super::QueryDelegationTotalRewardsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryDelegationTotalRewardsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut =
async move { (*inner).delegation_total_rewards(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DelegationTotalRewardsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Query/DelegatorValidators" => {
#[allow(non_camel_case_types)]
struct DelegatorValidatorsSvc<T: Query>(pub Arc<T>);
impl<T: Query>
tonic::server::UnaryService<super::QueryDelegatorValidatorsRequest>
for DelegatorValidatorsSvc<T>
{
type Response = super::QueryDelegatorValidatorsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryDelegatorValidatorsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).delegator_validators(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DelegatorValidatorsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress" => {
#[allow(non_camel_case_types)]
struct DelegatorWithdrawAddressSvc<T: Query>(pub Arc<T>);
impl<T: Query>
tonic::server::UnaryService<super::QueryDelegatorWithdrawAddressRequest>
for DelegatorWithdrawAddressSvc<T>
{
type Response = super::QueryDelegatorWithdrawAddressResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryDelegatorWithdrawAddressRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut =
async move { (*inner).delegator_withdraw_address(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DelegatorWithdrawAddressSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.distribution.v1beta1.Query/CommunityPool" => {
#[allow(non_camel_case_types)]
struct CommunityPoolSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryCommunityPoolRequest>
for CommunityPoolSvc<T>
{
type Response = super::QueryCommunityPoolResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryCommunityPoolRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).community_pool(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CommunityPoolSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => Box::pin(async move {
Ok(http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap())
}),
}
}
}
impl<T: Query> Clone for QueryServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
}
}
}
impl<T: Query> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Query> tonic::server::NamedService for QueryServer<T> {
const NAME: &'static str = "cosmos.distribution.v1beta1.Query";
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegatorWithdrawInfo {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub withdraw_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorOutstandingRewardsRecord {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub outstanding_rewards: ::prost::alloc::vec::Vec<super::super::base::v1beta1::DecCoin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorAccumulatedCommissionRecord {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub accumulated: ::core::option::Option<ValidatorAccumulatedCommission>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorHistoricalRewardsRecord {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub period: u64,
#[prost(message, optional, tag = "3")]
pub rewards: ::core::option::Option<ValidatorHistoricalRewards>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorCurrentRewardsRecord {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub rewards: ::core::option::Option<ValidatorCurrentRewards>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegatorStartingInfoRecord {
#[prost(string, tag = "1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub validator_address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub starting_info: ::core::option::Option<DelegatorStartingInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorSlashEventRecord {
#[prost(string, tag = "1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub height: u64,
#[prost(uint64, tag = "3")]
pub period: u64,
#[prost(message, optional, tag = "4")]
pub validator_slash_event: ::core::option::Option<ValidatorSlashEvent>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
#[prost(message, optional, tag = "2")]
pub fee_pool: ::core::option::Option<FeePool>,
#[prost(message, repeated, tag = "3")]
pub delegator_withdraw_infos: ::prost::alloc::vec::Vec<DelegatorWithdrawInfo>,
#[prost(string, tag = "4")]
pub previous_proposer: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub outstanding_rewards: ::prost::alloc::vec::Vec<ValidatorOutstandingRewardsRecord>,
#[prost(message, repeated, tag = "6")]
pub validator_accumulated_commissions:
::prost::alloc::vec::Vec<ValidatorAccumulatedCommissionRecord>,
#[prost(message, repeated, tag = "7")]
pub validator_historical_rewards: ::prost::alloc::vec::Vec<ValidatorHistoricalRewardsRecord>,
#[prost(message, repeated, tag = "8")]
pub validator_current_rewards: ::prost::alloc::vec::Vec<ValidatorCurrentRewardsRecord>,
#[prost(message, repeated, tag = "9")]
pub delegator_starting_infos: ::prost::alloc::vec::Vec<DelegatorStartingInfoRecord>,
#[prost(message, repeated, tag = "10")]
pub validator_slash_events: ::prost::alloc::vec::Vec<ValidatorSlashEventRecord>,
}