1#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct ValidatorSigningInfo {
6 #[prost(string, tag = "1")]
7 pub address: ::prost::alloc::string::String,
8 #[prost(int64, tag = "2")]
10 pub start_height: i64,
11 #[prost(int64, tag = "3")]
15 pub index_offset: i64,
16 #[prost(message, optional, tag = "4")]
18 pub jailed_until: ::core::option::Option<::prost_types::Timestamp>,
19 #[prost(bool, tag = "5")]
23 pub tombstoned: bool,
24 #[prost(int64, tag = "6")]
27 pub missed_blocks_counter: i64,
28}
29#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct Params {
32 #[prost(int64, tag = "1")]
33 pub signed_blocks_window: i64,
34 #[prost(bytes = "vec", tag = "2")]
35 pub min_signed_per_window: ::prost::alloc::vec::Vec<u8>,
36 #[prost(message, optional, tag = "3")]
37 pub downtime_jail_duration: ::core::option::Option<::prost_types::Duration>,
38 #[prost(bytes = "vec", tag = "4")]
39 pub slash_fraction_double_sign: ::prost::alloc::vec::Vec<u8>,
40 #[prost(bytes = "vec", tag = "5")]
41 pub slash_fraction_downtime: ::prost::alloc::vec::Vec<u8>,
42}
43#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct GenesisState {
46 #[prost(message, optional, tag = "1")]
48 pub params: ::core::option::Option<Params>,
49 #[prost(message, repeated, tag = "2")]
52 pub signing_infos: ::prost::alloc::vec::Vec<SigningInfo>,
53 #[prost(message, repeated, tag = "3")]
56 pub missed_blocks: ::prost::alloc::vec::Vec<ValidatorMissedBlocks>,
57}
58#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct SigningInfo {
61 #[prost(string, tag = "1")]
63 pub address: ::prost::alloc::string::String,
64 #[prost(message, optional, tag = "2")]
66 pub validator_signing_info: ::core::option::Option<ValidatorSigningInfo>,
67}
68#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct ValidatorMissedBlocks {
72 #[prost(string, tag = "1")]
74 pub address: ::prost::alloc::string::String,
75 #[prost(message, repeated, tag = "2")]
77 pub missed_blocks: ::prost::alloc::vec::Vec<MissedBlock>,
78}
79#[derive(Clone, Copy, PartialEq, ::prost::Message)]
81pub struct MissedBlock {
82 #[prost(int64, tag = "1")]
84 pub index: i64,
85 #[prost(bool, tag = "2")]
87 pub missed: bool,
88}
89#[derive(Clone, Copy, PartialEq, ::prost::Message)]
91pub struct QueryParamsRequest {}
92#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct QueryParamsResponse {
95 #[prost(message, optional, tag = "1")]
96 pub params: ::core::option::Option<Params>,
97}
98#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct QuerySigningInfoRequest {
102 #[prost(string, tag = "1")]
104 pub cons_address: ::prost::alloc::string::String,
105}
106#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct QuerySigningInfoResponse {
110 #[prost(message, optional, tag = "1")]
112 pub val_signing_info: ::core::option::Option<ValidatorSigningInfo>,
113}
114#[derive(Clone, PartialEq, ::prost::Message)]
117pub struct QuerySigningInfosRequest {
118 #[prost(message, optional, tag = "1")]
119 pub pagination: ::core::option::Option<
120 super::super::base::query::v1beta1::PageRequest,
121 >,
122}
123#[derive(Clone, PartialEq, ::prost::Message)]
126pub struct QuerySigningInfosResponse {
127 #[prost(message, repeated, tag = "1")]
129 pub info: ::prost::alloc::vec::Vec<ValidatorSigningInfo>,
130 #[prost(message, optional, tag = "2")]
131 pub pagination: ::core::option::Option<
132 super::super::base::query::v1beta1::PageResponse,
133 >,
134}
135pub mod query_client {
137 #![allow(
138 unused_variables,
139 dead_code,
140 missing_docs,
141 clippy::wildcard_imports,
142 clippy::let_unit_value,
143 )]
144 use tonic::codegen::*;
145 use tonic::codegen::http::Uri;
146 #[derive(Debug, Clone)]
148 pub struct QueryClient<T> {
149 inner: tonic::client::Grpc<T>,
150 }
151 impl QueryClient<tonic::transport::Channel> {
152 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
154 where
155 D: TryInto<tonic::transport::Endpoint>,
156 D::Error: Into<StdError>,
157 {
158 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
159 Ok(Self::new(conn))
160 }
161 }
162 impl<T> QueryClient<T>
163 where
164 T: tonic::client::GrpcService<tonic::body::BoxBody>,
165 T::Error: Into<StdError>,
166 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
167 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
168 {
169 pub fn new(inner: T) -> Self {
170 let inner = tonic::client::Grpc::new(inner);
171 Self { inner }
172 }
173 pub fn with_origin(inner: T, origin: Uri) -> Self {
174 let inner = tonic::client::Grpc::with_origin(inner, origin);
175 Self { inner }
176 }
177 pub fn with_interceptor<F>(
178 inner: T,
179 interceptor: F,
180 ) -> QueryClient<InterceptedService<T, F>>
181 where
182 F: tonic::service::Interceptor,
183 T::ResponseBody: Default,
184 T: tonic::codegen::Service<
185 http::Request<tonic::body::BoxBody>,
186 Response = http::Response<
187 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
188 >,
189 >,
190 <T as tonic::codegen::Service<
191 http::Request<tonic::body::BoxBody>,
192 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
193 {
194 QueryClient::new(InterceptedService::new(inner, interceptor))
195 }
196 #[must_use]
201 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
202 self.inner = self.inner.send_compressed(encoding);
203 self
204 }
205 #[must_use]
207 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
208 self.inner = self.inner.accept_compressed(encoding);
209 self
210 }
211 #[must_use]
215 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
216 self.inner = self.inner.max_decoding_message_size(limit);
217 self
218 }
219 #[must_use]
223 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
224 self.inner = self.inner.max_encoding_message_size(limit);
225 self
226 }
227 pub async fn params(
229 &mut self,
230 request: impl tonic::IntoRequest<super::QueryParamsRequest>,
231 ) -> std::result::Result<
232 tonic::Response<super::QueryParamsResponse>,
233 tonic::Status,
234 > {
235 self.inner
236 .ready()
237 .await
238 .map_err(|e| {
239 tonic::Status::unknown(
240 format!("Service was not ready: {}", e.into()),
241 )
242 })?;
243 let codec = tonic::codec::ProstCodec::default();
244 let path = http::uri::PathAndQuery::from_static(
245 "/cosmos.slashing.v1beta1.Query/Params",
246 );
247 let mut req = request.into_request();
248 req.extensions_mut()
249 .insert(GrpcMethod::new("cosmos.slashing.v1beta1.Query", "Params"));
250 self.inner.unary(req, path, codec).await
251 }
252 pub async fn signing_info(
254 &mut self,
255 request: impl tonic::IntoRequest<super::QuerySigningInfoRequest>,
256 ) -> std::result::Result<
257 tonic::Response<super::QuerySigningInfoResponse>,
258 tonic::Status,
259 > {
260 self.inner
261 .ready()
262 .await
263 .map_err(|e| {
264 tonic::Status::unknown(
265 format!("Service was not ready: {}", e.into()),
266 )
267 })?;
268 let codec = tonic::codec::ProstCodec::default();
269 let path = http::uri::PathAndQuery::from_static(
270 "/cosmos.slashing.v1beta1.Query/SigningInfo",
271 );
272 let mut req = request.into_request();
273 req.extensions_mut()
274 .insert(GrpcMethod::new("cosmos.slashing.v1beta1.Query", "SigningInfo"));
275 self.inner.unary(req, path, codec).await
276 }
277 pub async fn signing_infos(
279 &mut self,
280 request: impl tonic::IntoRequest<super::QuerySigningInfosRequest>,
281 ) -> std::result::Result<
282 tonic::Response<super::QuerySigningInfosResponse>,
283 tonic::Status,
284 > {
285 self.inner
286 .ready()
287 .await
288 .map_err(|e| {
289 tonic::Status::unknown(
290 format!("Service was not ready: {}", e.into()),
291 )
292 })?;
293 let codec = tonic::codec::ProstCodec::default();
294 let path = http::uri::PathAndQuery::from_static(
295 "/cosmos.slashing.v1beta1.Query/SigningInfos",
296 );
297 let mut req = request.into_request();
298 req.extensions_mut()
299 .insert(
300 GrpcMethod::new("cosmos.slashing.v1beta1.Query", "SigningInfos"),
301 );
302 self.inner.unary(req, path, codec).await
303 }
304 }
305}
306#[derive(Clone, PartialEq, ::prost::Message)]
308pub struct MsgUnjail {
309 #[prost(string, tag = "1")]
310 pub validator_addr: ::prost::alloc::string::String,
311}
312#[derive(Clone, Copy, PartialEq, ::prost::Message)]
314pub struct MsgUnjailResponse {}
315#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct MsgUpdateParams {
320 #[prost(string, tag = "1")]
322 pub authority: ::prost::alloc::string::String,
323 #[prost(message, optional, tag = "2")]
327 pub params: ::core::option::Option<Params>,
328}
329#[derive(Clone, Copy, PartialEq, ::prost::Message)]
334pub struct MsgUpdateParamsResponse {}
335pub mod msg_client {
337 #![allow(
338 unused_variables,
339 dead_code,
340 missing_docs,
341 clippy::wildcard_imports,
342 clippy::let_unit_value,
343 )]
344 use tonic::codegen::*;
345 use tonic::codegen::http::Uri;
346 #[derive(Debug, Clone)]
348 pub struct MsgClient<T> {
349 inner: tonic::client::Grpc<T>,
350 }
351 impl MsgClient<tonic::transport::Channel> {
352 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
354 where
355 D: TryInto<tonic::transport::Endpoint>,
356 D::Error: Into<StdError>,
357 {
358 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
359 Ok(Self::new(conn))
360 }
361 }
362 impl<T> MsgClient<T>
363 where
364 T: tonic::client::GrpcService<tonic::body::BoxBody>,
365 T::Error: Into<StdError>,
366 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
367 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
368 {
369 pub fn new(inner: T) -> Self {
370 let inner = tonic::client::Grpc::new(inner);
371 Self { inner }
372 }
373 pub fn with_origin(inner: T, origin: Uri) -> Self {
374 let inner = tonic::client::Grpc::with_origin(inner, origin);
375 Self { inner }
376 }
377 pub fn with_interceptor<F>(
378 inner: T,
379 interceptor: F,
380 ) -> MsgClient<InterceptedService<T, F>>
381 where
382 F: tonic::service::Interceptor,
383 T::ResponseBody: Default,
384 T: tonic::codegen::Service<
385 http::Request<tonic::body::BoxBody>,
386 Response = http::Response<
387 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
388 >,
389 >,
390 <T as tonic::codegen::Service<
391 http::Request<tonic::body::BoxBody>,
392 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
393 {
394 MsgClient::new(InterceptedService::new(inner, interceptor))
395 }
396 #[must_use]
401 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
402 self.inner = self.inner.send_compressed(encoding);
403 self
404 }
405 #[must_use]
407 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
408 self.inner = self.inner.accept_compressed(encoding);
409 self
410 }
411 #[must_use]
415 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
416 self.inner = self.inner.max_decoding_message_size(limit);
417 self
418 }
419 #[must_use]
423 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
424 self.inner = self.inner.max_encoding_message_size(limit);
425 self
426 }
427 pub async fn unjail(
431 &mut self,
432 request: impl tonic::IntoRequest<super::MsgUnjail>,
433 ) -> std::result::Result<
434 tonic::Response<super::MsgUnjailResponse>,
435 tonic::Status,
436 > {
437 self.inner
438 .ready()
439 .await
440 .map_err(|e| {
441 tonic::Status::unknown(
442 format!("Service was not ready: {}", e.into()),
443 )
444 })?;
445 let codec = tonic::codec::ProstCodec::default();
446 let path = http::uri::PathAndQuery::from_static(
447 "/cosmos.slashing.v1beta1.Msg/Unjail",
448 );
449 let mut req = request.into_request();
450 req.extensions_mut()
451 .insert(GrpcMethod::new("cosmos.slashing.v1beta1.Msg", "Unjail"));
452 self.inner.unary(req, path, codec).await
453 }
454 pub async fn update_params(
459 &mut self,
460 request: impl tonic::IntoRequest<super::MsgUpdateParams>,
461 ) -> std::result::Result<
462 tonic::Response<super::MsgUpdateParamsResponse>,
463 tonic::Status,
464 > {
465 self.inner
466 .ready()
467 .await
468 .map_err(|e| {
469 tonic::Status::unknown(
470 format!("Service was not ready: {}", e.into()),
471 )
472 })?;
473 let codec = tonic::codec::ProstCodec::default();
474 let path = http::uri::PathAndQuery::from_static(
475 "/cosmos.slashing.v1beta1.Msg/UpdateParams",
476 );
477 let mut req = request.into_request();
478 req.extensions_mut()
479 .insert(GrpcMethod::new("cosmos.slashing.v1beta1.Msg", "UpdateParams"));
480 self.inner.unary(req, path, codec).await
481 }
482 }
483}