#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalInfo {
#[prost(message, optional, tag="1")]
pub header: ::core::option::Option<::tendermint_proto::types::Header>,
#[prost(message, repeated, tag="2")]
pub valset: ::prost::alloc::vec::Vec<Validator>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommissionRates {
#[prost(string, tag="1")]
pub rate: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub max_rate: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub max_change_rate: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Commission {
#[prost(message, optional, tag="1")]
pub commission_rates: ::core::option::Option<CommissionRates>,
#[prost(message, optional, tag="2")]
pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Description {
#[prost(string, tag="1")]
pub moniker: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub identity: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub website: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub security_contact: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub details: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Validator {
#[prost(string, tag="1")]
pub operator_address: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub consensus_pubkey: ::core::option::Option<super::super::super::google::protobuf::Any>,
#[prost(bool, tag="3")]
pub jailed: bool,
#[prost(enumeration="BondStatus", tag="4")]
pub status: i32,
#[prost(string, tag="5")]
pub tokens: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub delegator_shares: ::prost::alloc::string::String,
#[prost(message, optional, tag="7")]
pub description: ::core::option::Option<Description>,
#[prost(int64, tag="8")]
pub unbonding_height: i64,
#[prost(message, optional, tag="9")]
pub unbonding_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag="10")]
pub commission: ::core::option::Option<Commission>,
#[prost(string, tag="11")]
pub min_self_delegation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValAddresses {
#[prost(string, repeated, tag="1")]
pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DvPair {
#[prost(string, tag="1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_address: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DvPairs {
#[prost(message, repeated, tag="1")]
pub pairs: ::prost::alloc::vec::Vec<DvPair>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DvvTriplet {
#[prost(string, tag="1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_src_address: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub validator_dst_address: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DvvTriplets {
#[prost(message, repeated, tag="1")]
pub triplets: ::prost::alloc::vec::Vec<DvvTriplet>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delegation {
#[prost(string, tag="1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_address: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub shares: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnbondingDelegation {
#[prost(string, tag="1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_address: ::prost::alloc::string::String,
#[prost(message, repeated, tag="3")]
pub entries: ::prost::alloc::vec::Vec<UnbondingDelegationEntry>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnbondingDelegationEntry {
#[prost(int64, tag="1")]
pub creation_height: i64,
#[prost(message, optional, tag="2")]
pub completion_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(string, tag="3")]
pub initial_balance: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub balance: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RedelegationEntry {
#[prost(int64, tag="1")]
pub creation_height: i64,
#[prost(message, optional, tag="2")]
pub completion_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(string, tag="3")]
pub initial_balance: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub shares_dst: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Redelegation {
#[prost(string, tag="1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_src_address: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub validator_dst_address: ::prost::alloc::string::String,
#[prost(message, repeated, tag="4")]
pub entries: ::prost::alloc::vec::Vec<RedelegationEntry>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(message, optional, tag="1")]
pub unbonding_time: ::core::option::Option<super::super::super::google::protobuf::Duration>,
#[prost(uint32, tag="2")]
pub max_validators: u32,
#[prost(uint32, tag="3")]
pub max_entries: u32,
#[prost(uint32, tag="4")]
pub historical_entries: u32,
#[prost(string, tag="5")]
pub bond_denom: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub min_commission_rate: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegationResponse {
#[prost(message, optional, tag="1")]
pub delegation: ::core::option::Option<Delegation>,
#[prost(message, optional, tag="2")]
pub balance: ::core::option::Option<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RedelegationEntryResponse {
#[prost(message, optional, tag="1")]
pub redelegation_entry: ::core::option::Option<RedelegationEntry>,
#[prost(string, tag="4")]
pub balance: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RedelegationResponse {
#[prost(message, optional, tag="1")]
pub redelegation: ::core::option::Option<Redelegation>,
#[prost(message, repeated, tag="2")]
pub entries: ::prost::alloc::vec::Vec<RedelegationEntryResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pool {
#[prost(string, tag="1")]
pub not_bonded_tokens: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub bonded_tokens: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BondStatus {
Unspecified = 0,
Unbonded = 1,
Unbonding = 2,
Bonded = 3,
}
impl BondStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
BondStatus::Unspecified => "BOND_STATUS_UNSPECIFIED",
BondStatus::Unbonded => "BOND_STATUS_UNBONDED",
BondStatus::Unbonding => "BOND_STATUS_UNBONDING",
BondStatus::Bonded => "BOND_STATUS_BONDED",
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCreateValidator {
#[prost(message, optional, tag="1")]
pub description: ::core::option::Option<Description>,
#[prost(message, optional, tag="2")]
pub commission: ::core::option::Option<CommissionRates>,
#[prost(string, tag="3")]
pub min_self_delegation: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub validator_address: ::prost::alloc::string::String,
#[prost(message, optional, tag="6")]
pub pubkey: ::core::option::Option<super::super::super::google::protobuf::Any>,
#[prost(message, optional, tag="7")]
pub value: ::core::option::Option<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCreateValidatorResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgEditValidator {
#[prost(message, optional, tag="1")]
pub description: ::core::option::Option<Description>,
#[prost(string, tag="2")]
pub validator_address: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub commission_rate: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub min_self_delegation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgEditValidatorResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgDelegate {
#[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 amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgDelegateResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgBeginRedelegate {
#[prost(string, tag="1")]
pub delegator_address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_src_address: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub validator_dst_address: ::prost::alloc::string::String,
#[prost(message, optional, tag="4")]
pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgBeginRedelegateResponse {
#[prost(message, optional, tag="1")]
pub completion_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUndelegate {
#[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 amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUndelegateResponse {
#[prost(message, optional, tag="1")]
pub completion_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCancelUnbondingDelegation {
#[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 amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
#[prost(int64, tag="4")]
pub creation_height: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCancelUnbondingDelegationResponse {
}
#[cfg(feature = "client")]
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: 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 create_validator(
&mut self,
request: impl tonic::IntoRequest<super::MsgCreateValidator>,
) -> Result<tonic::Response<super::MsgCreateValidatorResponse>, 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.staking.v1beta1.Msg/CreateValidator",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn edit_validator(
&mut self,
request: impl tonic::IntoRequest<super::MsgEditValidator>,
) -> Result<tonic::Response<super::MsgEditValidatorResponse>, 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.staking.v1beta1.Msg/EditValidator",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegate(
&mut self,
request: impl tonic::IntoRequest<super::MsgDelegate>,
) -> Result<tonic::Response<super::MsgDelegateResponse>, 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.staking.v1beta1.Msg/Delegate",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn begin_redelegate(
&mut self,
request: impl tonic::IntoRequest<super::MsgBeginRedelegate>,
) -> Result<tonic::Response<super::MsgBeginRedelegateResponse>, 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.staking.v1beta1.Msg/BeginRedelegate",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn undelegate(
&mut self,
request: impl tonic::IntoRequest<super::MsgUndelegate>,
) -> Result<tonic::Response<super::MsgUndelegateResponse>, 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.staking.v1beta1.Msg/Undelegate",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn cancel_unbonding_delegation(
&mut self,
request: impl tonic::IntoRequest<super::MsgCancelUnbondingDelegation>,
) -> Result<
tonic::Response<super::MsgCancelUnbondingDelegationResponse>,
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.staking.v1beta1.Msg/CancelUnbondingDelegation",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[cfg(feature = "server")]
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 create_validator(
&self,
request: tonic::Request<super::MsgCreateValidator>,
) -> Result<tonic::Response<super::MsgCreateValidatorResponse>, tonic::Status>;
async fn edit_validator(
&self,
request: tonic::Request<super::MsgEditValidator>,
) -> Result<tonic::Response<super::MsgEditValidatorResponse>, tonic::Status>;
async fn delegate(
&self,
request: tonic::Request<super::MsgDelegate>,
) -> Result<tonic::Response<super::MsgDelegateResponse>, tonic::Status>;
async fn begin_redelegate(
&self,
request: tonic::Request<super::MsgBeginRedelegate>,
) -> Result<tonic::Response<super::MsgBeginRedelegateResponse>, tonic::Status>;
async fn undelegate(
&self,
request: tonic::Request<super::MsgUndelegate>,
) -> Result<tonic::Response<super::MsgUndelegateResponse>, tonic::Status>;
async fn cancel_unbonding_delegation(
&self,
request: tonic::Request<super::MsgCancelUnbondingDelegation>,
) -> Result<
tonic::Response<super::MsgCancelUnbondingDelegationResponse>,
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.staking.v1beta1.Msg/CreateValidator" => {
#[allow(non_camel_case_types)]
struct CreateValidatorSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgCreateValidator>
for CreateValidatorSvc<T> {
type Response = super::MsgCreateValidatorResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgCreateValidator>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).create_validator(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 = CreateValidatorSvc(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.staking.v1beta1.Msg/EditValidator" => {
#[allow(non_camel_case_types)]
struct EditValidatorSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgEditValidator>
for EditValidatorSvc<T> {
type Response = super::MsgEditValidatorResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgEditValidator>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).edit_validator(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 = EditValidatorSvc(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.staking.v1beta1.Msg/Delegate" => {
#[allow(non_camel_case_types)]
struct DelegateSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgDelegate>
for DelegateSvc<T> {
type Response = super::MsgDelegateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgDelegate>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).delegate(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 = DelegateSvc(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.staking.v1beta1.Msg/BeginRedelegate" => {
#[allow(non_camel_case_types)]
struct BeginRedelegateSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgBeginRedelegate>
for BeginRedelegateSvc<T> {
type Response = super::MsgBeginRedelegateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgBeginRedelegate>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).begin_redelegate(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 = BeginRedelegateSvc(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.staking.v1beta1.Msg/Undelegate" => {
#[allow(non_camel_case_types)]
struct UndelegateSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgUndelegate>
for UndelegateSvc<T> {
type Response = super::MsgUndelegateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgUndelegate>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).undelegate(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 = UndelegateSvc(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.staking.v1beta1.Msg/CancelUnbondingDelegation" => {
#[allow(non_camel_case_types)]
struct CancelUnbondingDelegationSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgCancelUnbondingDelegation>
for CancelUnbondingDelegationSvc<T> {
type Response = super::MsgCancelUnbondingDelegationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgCancelUnbondingDelegation>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).cancel_unbonding_delegation(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 = CancelUnbondingDelegationSvc(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.staking.v1beta1.Msg";
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorsRequest {
#[prost(string, tag="1")]
pub status: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorsResponse {
#[prost(message, repeated, tag="1")]
pub validators: ::prost::alloc::vec::Vec<Validator>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorRequest {
#[prost(string, tag="1")]
pub validator_addr: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorResponse {
#[prost(message, optional, tag="1")]
pub validator: ::core::option::Option<Validator>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorDelegationsRequest {
#[prost(string, tag="1")]
pub validator_addr: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorDelegationsResponse {
#[prost(message, repeated, tag="1")]
pub delegation_responses: ::prost::alloc::vec::Vec<DelegationResponse>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorUnbondingDelegationsRequest {
#[prost(string, tag="1")]
pub validator_addr: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorUnbondingDelegationsResponse {
#[prost(message, repeated, tag="1")]
pub unbonding_responses: ::prost::alloc::vec::Vec<UnbondingDelegation>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegationRequest {
#[prost(string, tag="1")]
pub delegator_addr: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_addr: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegationResponse {
#[prost(message, optional, tag="1")]
pub delegation_response: ::core::option::Option<DelegationResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUnbondingDelegationRequest {
#[prost(string, tag="1")]
pub delegator_addr: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_addr: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryUnbondingDelegationResponse {
#[prost(message, optional, tag="1")]
pub unbond: ::core::option::Option<UnbondingDelegation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorDelegationsRequest {
#[prost(string, tag="1")]
pub delegator_addr: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorDelegationsResponse {
#[prost(message, repeated, tag="1")]
pub delegation_responses: ::prost::alloc::vec::Vec<DelegationResponse>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorUnbondingDelegationsRequest {
#[prost(string, tag="1")]
pub delegator_addr: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorUnbondingDelegationsResponse {
#[prost(message, repeated, tag="1")]
pub unbonding_responses: ::prost::alloc::vec::Vec<UnbondingDelegation>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRedelegationsRequest {
#[prost(string, tag="1")]
pub delegator_addr: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub src_validator_addr: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub dst_validator_addr: ::prost::alloc::string::String,
#[prost(message, optional, tag="4")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRedelegationsResponse {
#[prost(message, repeated, tag="1")]
pub redelegation_responses: ::prost::alloc::vec::Vec<RedelegationResponse>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorValidatorsRequest {
#[prost(string, tag="1")]
pub delegator_addr: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorValidatorsResponse {
#[prost(message, repeated, tag="1")]
pub validators: ::prost::alloc::vec::Vec<Validator>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorValidatorRequest {
#[prost(string, tag="1")]
pub delegator_addr: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub validator_addr: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDelegatorValidatorResponse {
#[prost(message, optional, tag="1")]
pub validator: ::core::option::Option<Validator>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryHistoricalInfoRequest {
#[prost(int64, tag="1")]
pub height: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryHistoricalInfoResponse {
#[prost(message, optional, tag="1")]
pub hist: ::core::option::Option<HistoricalInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPoolRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPoolResponse {
#[prost(message, optional, tag="1")]
pub pool: ::core::option::Option<Pool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
#[prost(message, optional, tag="1")]
pub params: ::core::option::Option<Params>,
}
#[cfg(feature = "client")]
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: 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 validators(
&mut self,
request: impl tonic::IntoRequest<super::QueryValidatorsRequest>,
) -> Result<tonic::Response<super::QueryValidatorsResponse>, 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.staking.v1beta1.Query/Validators",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn validator(
&mut self,
request: impl tonic::IntoRequest<super::QueryValidatorRequest>,
) -> Result<tonic::Response<super::QueryValidatorResponse>, 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.staking.v1beta1.Query/Validator",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn validator_delegations(
&mut self,
request: impl tonic::IntoRequest<super::QueryValidatorDelegationsRequest>,
) -> Result<
tonic::Response<super::QueryValidatorDelegationsResponse>,
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.staking.v1beta1.Query/ValidatorDelegations",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn validator_unbonding_delegations(
&mut self,
request: impl tonic::IntoRequest<
super::QueryValidatorUnbondingDelegationsRequest,
>,
) -> Result<
tonic::Response<super::QueryValidatorUnbondingDelegationsResponse>,
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.staking.v1beta1.Query/ValidatorUnbondingDelegations",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegation(
&mut self,
request: impl tonic::IntoRequest<super::QueryDelegationRequest>,
) -> Result<tonic::Response<super::QueryDelegationResponse>, 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.staking.v1beta1.Query/Delegation",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn unbonding_delegation(
&mut self,
request: impl tonic::IntoRequest<super::QueryUnbondingDelegationRequest>,
) -> Result<
tonic::Response<super::QueryUnbondingDelegationResponse>,
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.staking.v1beta1.Query/UnbondingDelegation",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegator_delegations(
&mut self,
request: impl tonic::IntoRequest<super::QueryDelegatorDelegationsRequest>,
) -> Result<
tonic::Response<super::QueryDelegatorDelegationsResponse>,
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.staking.v1beta1.Query/DelegatorDelegations",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegator_unbonding_delegations(
&mut self,
request: impl tonic::IntoRequest<
super::QueryDelegatorUnbondingDelegationsRequest,
>,
) -> Result<
tonic::Response<super::QueryDelegatorUnbondingDelegationsResponse>,
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.staking.v1beta1.Query/DelegatorUnbondingDelegations",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn redelegations(
&mut self,
request: impl tonic::IntoRequest<super::QueryRedelegationsRequest>,
) -> Result<tonic::Response<super::QueryRedelegationsResponse>, 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.staking.v1beta1.Query/Redelegations",
);
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.staking.v1beta1.Query/DelegatorValidators",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delegator_validator(
&mut self,
request: impl tonic::IntoRequest<super::QueryDelegatorValidatorRequest>,
) -> Result<
tonic::Response<super::QueryDelegatorValidatorResponse>,
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.staking.v1beta1.Query/DelegatorValidator",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn historical_info(
&mut self,
request: impl tonic::IntoRequest<super::QueryHistoricalInfoRequest>,
) -> Result<tonic::Response<super::QueryHistoricalInfoResponse>, 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.staking.v1beta1.Query/HistoricalInfo",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn pool(
&mut self,
request: impl tonic::IntoRequest<super::QueryPoolRequest>,
) -> Result<tonic::Response<super::QueryPoolResponse>, 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.staking.v1beta1.Query/Pool",
);
self.inner.unary(request.into_request(), path, codec).await
}
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.staking.v1beta1.Query/Params",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[cfg(feature = "server")]
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 validators(
&self,
request: tonic::Request<super::QueryValidatorsRequest>,
) -> Result<tonic::Response<super::QueryValidatorsResponse>, tonic::Status>;
async fn validator(
&self,
request: tonic::Request<super::QueryValidatorRequest>,
) -> Result<tonic::Response<super::QueryValidatorResponse>, tonic::Status>;
async fn validator_delegations(
&self,
request: tonic::Request<super::QueryValidatorDelegationsRequest>,
) -> Result<
tonic::Response<super::QueryValidatorDelegationsResponse>,
tonic::Status,
>;
async fn validator_unbonding_delegations(
&self,
request: tonic::Request<super::QueryValidatorUnbondingDelegationsRequest>,
) -> Result<
tonic::Response<super::QueryValidatorUnbondingDelegationsResponse>,
tonic::Status,
>;
async fn delegation(
&self,
request: tonic::Request<super::QueryDelegationRequest>,
) -> Result<tonic::Response<super::QueryDelegationResponse>, tonic::Status>;
async fn unbonding_delegation(
&self,
request: tonic::Request<super::QueryUnbondingDelegationRequest>,
) -> Result<
tonic::Response<super::QueryUnbondingDelegationResponse>,
tonic::Status,
>;
async fn delegator_delegations(
&self,
request: tonic::Request<super::QueryDelegatorDelegationsRequest>,
) -> Result<
tonic::Response<super::QueryDelegatorDelegationsResponse>,
tonic::Status,
>;
async fn delegator_unbonding_delegations(
&self,
request: tonic::Request<super::QueryDelegatorUnbondingDelegationsRequest>,
) -> Result<
tonic::Response<super::QueryDelegatorUnbondingDelegationsResponse>,
tonic::Status,
>;
async fn redelegations(
&self,
request: tonic::Request<super::QueryRedelegationsRequest>,
) -> Result<tonic::Response<super::QueryRedelegationsResponse>, tonic::Status>;
async fn delegator_validators(
&self,
request: tonic::Request<super::QueryDelegatorValidatorsRequest>,
) -> Result<
tonic::Response<super::QueryDelegatorValidatorsResponse>,
tonic::Status,
>;
async fn delegator_validator(
&self,
request: tonic::Request<super::QueryDelegatorValidatorRequest>,
) -> Result<
tonic::Response<super::QueryDelegatorValidatorResponse>,
tonic::Status,
>;
async fn historical_info(
&self,
request: tonic::Request<super::QueryHistoricalInfoRequest>,
) -> Result<tonic::Response<super::QueryHistoricalInfoResponse>, tonic::Status>;
async fn pool(
&self,
request: tonic::Request<super::QueryPoolRequest>,
) -> Result<tonic::Response<super::QueryPoolResponse>, tonic::Status>;
async fn params(
&self,
request: tonic::Request<super::QueryParamsRequest>,
) -> Result<tonic::Response<super::QueryParamsResponse>, 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.staking.v1beta1.Query/Validators" => {
#[allow(non_camel_case_types)]
struct ValidatorsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryValidatorsRequest>
for ValidatorsSvc<T> {
type Response = super::QueryValidatorsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryValidatorsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).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 = ValidatorsSvc(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.staking.v1beta1.Query/Validator" => {
#[allow(non_camel_case_types)]
struct ValidatorSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryValidatorRequest>
for ValidatorSvc<T> {
type Response = super::QueryValidatorResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryValidatorRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).validator(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 = ValidatorSvc(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.staking.v1beta1.Query/ValidatorDelegations" => {
#[allow(non_camel_case_types)]
struct ValidatorDelegationsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryValidatorDelegationsRequest,
> for ValidatorDelegationsSvc<T> {
type Response = super::QueryValidatorDelegationsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryValidatorDelegationsRequest,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).validator_delegations(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 = ValidatorDelegationsSvc(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.staking.v1beta1.Query/ValidatorUnbondingDelegations" => {
#[allow(non_camel_case_types)]
struct ValidatorUnbondingDelegationsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryValidatorUnbondingDelegationsRequest,
> for ValidatorUnbondingDelegationsSvc<T> {
type Response = super::QueryValidatorUnbondingDelegationsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryValidatorUnbondingDelegationsRequest,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).validator_unbonding_delegations(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 = ValidatorUnbondingDelegationsSvc(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.staking.v1beta1.Query/Delegation" => {
#[allow(non_camel_case_types)]
struct DelegationSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryDelegationRequest>
for DelegationSvc<T> {
type Response = super::QueryDelegationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryDelegationRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).delegation(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 = DelegationSvc(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.staking.v1beta1.Query/UnbondingDelegation" => {
#[allow(non_camel_case_types)]
struct UnbondingDelegationSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryUnbondingDelegationRequest>
for UnbondingDelegationSvc<T> {
type Response = super::QueryUnbondingDelegationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryUnbondingDelegationRequest,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).unbonding_delegation(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 = UnbondingDelegationSvc(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.staking.v1beta1.Query/DelegatorDelegations" => {
#[allow(non_camel_case_types)]
struct DelegatorDelegationsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryDelegatorDelegationsRequest,
> for DelegatorDelegationsSvc<T> {
type Response = super::QueryDelegatorDelegationsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryDelegatorDelegationsRequest,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).delegator_delegations(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 = DelegatorDelegationsSvc(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.staking.v1beta1.Query/DelegatorUnbondingDelegations" => {
#[allow(non_camel_case_types)]
struct DelegatorUnbondingDelegationsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryDelegatorUnbondingDelegationsRequest,
> for DelegatorUnbondingDelegationsSvc<T> {
type Response = super::QueryDelegatorUnbondingDelegationsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryDelegatorUnbondingDelegationsRequest,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).delegator_unbonding_delegations(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 = DelegatorUnbondingDelegationsSvc(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.staking.v1beta1.Query/Redelegations" => {
#[allow(non_camel_case_types)]
struct RedelegationsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryRedelegationsRequest>
for RedelegationsSvc<T> {
type Response = super::QueryRedelegationsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryRedelegationsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).redelegations(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 = RedelegationsSvc(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.staking.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.staking.v1beta1.Query/DelegatorValidator" => {
#[allow(non_camel_case_types)]
struct DelegatorValidatorSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryDelegatorValidatorRequest>
for DelegatorValidatorSvc<T> {
type Response = super::QueryDelegatorValidatorResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryDelegatorValidatorRequest,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).delegator_validator(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 = DelegatorValidatorSvc(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.staking.v1beta1.Query/HistoricalInfo" => {
#[allow(non_camel_case_types)]
struct HistoricalInfoSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryHistoricalInfoRequest>
for HistoricalInfoSvc<T> {
type Response = super::QueryHistoricalInfoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryHistoricalInfoRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).historical_info(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 = HistoricalInfoSvc(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.staking.v1beta1.Query/Pool" => {
#[allow(non_camel_case_types)]
struct PoolSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryPoolRequest>
for PoolSvc<T> {
type Response = super::QueryPoolResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryPoolRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).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 = PoolSvc(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.staking.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)
}
_ => {
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.staking.v1beta1.Query";
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StakeAuthorization {
#[prost(message, optional, tag="1")]
pub max_tokens: ::core::option::Option<super::super::base::v1beta1::Coin>,
#[prost(enumeration="AuthorizationType", tag="4")]
pub authorization_type: i32,
#[prost(oneof="stake_authorization::Validators", tags="2, 3")]
pub validators: ::core::option::Option<stake_authorization::Validators>,
}
pub mod stake_authorization {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorsVec {
#[prost(string, repeated, tag="1")]
pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Validators {
#[prost(message, tag="2")]
AllowList(ValidatorsVec),
#[prost(message, tag="3")]
DenyList(ValidatorsVec),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AuthorizationType {
Unspecified = 0,
Delegate = 1,
Undelegate = 2,
Redelegate = 3,
}
impl AuthorizationType {
pub fn as_str_name(&self) -> &'static str {
match self {
AuthorizationType::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED",
AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE",
AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE",
AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE",
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, optional, tag="1")]
pub params: ::core::option::Option<Params>,
#[prost(bytes="vec", tag="2")]
pub last_total_power: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag="3")]
pub last_validator_powers: ::prost::alloc::vec::Vec<LastValidatorPower>,
#[prost(message, repeated, tag="4")]
pub validators: ::prost::alloc::vec::Vec<Validator>,
#[prost(message, repeated, tag="5")]
pub delegations: ::prost::alloc::vec::Vec<Delegation>,
#[prost(message, repeated, tag="6")]
pub unbonding_delegations: ::prost::alloc::vec::Vec<UnbondingDelegation>,
#[prost(message, repeated, tag="7")]
pub redelegations: ::prost::alloc::vec::Vec<Redelegation>,
#[prost(bool, tag="8")]
pub exported: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LastValidatorPower {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub power: i64,
}