cosmos_sdk_proto_althea/prost/
cosmos.evidence.v1beta1.rs1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct GenesisState {
5 #[prost(message, repeated, tag = "1")]
7 pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>,
8}
9#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct QueryEvidenceRequest {
12 #[deprecated]
15 #[prost(bytes = "vec", tag = "1")]
16 pub evidence_hash: ::prost::alloc::vec::Vec<u8>,
17 #[prost(string, tag = "2")]
21 pub hash: ::prost::alloc::string::String,
22}
23#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct QueryEvidenceResponse {
26 #[prost(message, optional, tag = "1")]
28 pub evidence: ::core::option::Option<::prost_types::Any>,
29}
30#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct QueryAllEvidenceRequest {
34 #[prost(message, optional, tag = "1")]
36 pub pagination: ::core::option::Option<
37 super::super::base::query::v1beta1::PageRequest,
38 >,
39}
40#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct QueryAllEvidenceResponse {
44 #[prost(message, repeated, tag = "1")]
46 pub evidence: ::prost::alloc::vec::Vec<::prost_types::Any>,
47 #[prost(message, optional, tag = "2")]
49 pub pagination: ::core::option::Option<
50 super::super::base::query::v1beta1::PageResponse,
51 >,
52}
53pub mod query_client {
55 #![allow(
56 unused_variables,
57 dead_code,
58 missing_docs,
59 clippy::wildcard_imports,
60 clippy::let_unit_value,
61 )]
62 use tonic::codegen::*;
63 use tonic::codegen::http::Uri;
64 #[derive(Debug, Clone)]
66 pub struct QueryClient<T> {
67 inner: tonic::client::Grpc<T>,
68 }
69 impl QueryClient<tonic::transport::Channel> {
70 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
72 where
73 D: TryInto<tonic::transport::Endpoint>,
74 D::Error: Into<StdError>,
75 {
76 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
77 Ok(Self::new(conn))
78 }
79 }
80 impl<T> QueryClient<T>
81 where
82 T: tonic::client::GrpcService<tonic::body::BoxBody>,
83 T::Error: Into<StdError>,
84 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
85 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
86 {
87 pub fn new(inner: T) -> Self {
88 let inner = tonic::client::Grpc::new(inner);
89 Self { inner }
90 }
91 pub fn with_origin(inner: T, origin: Uri) -> Self {
92 let inner = tonic::client::Grpc::with_origin(inner, origin);
93 Self { inner }
94 }
95 pub fn with_interceptor<F>(
96 inner: T,
97 interceptor: F,
98 ) -> QueryClient<InterceptedService<T, F>>
99 where
100 F: tonic::service::Interceptor,
101 T::ResponseBody: Default,
102 T: tonic::codegen::Service<
103 http::Request<tonic::body::BoxBody>,
104 Response = http::Response<
105 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
106 >,
107 >,
108 <T as tonic::codegen::Service<
109 http::Request<tonic::body::BoxBody>,
110 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
111 {
112 QueryClient::new(InterceptedService::new(inner, interceptor))
113 }
114 #[must_use]
119 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
120 self.inner = self.inner.send_compressed(encoding);
121 self
122 }
123 #[must_use]
125 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
126 self.inner = self.inner.accept_compressed(encoding);
127 self
128 }
129 #[must_use]
133 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
134 self.inner = self.inner.max_decoding_message_size(limit);
135 self
136 }
137 #[must_use]
141 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
142 self.inner = self.inner.max_encoding_message_size(limit);
143 self
144 }
145 pub async fn evidence(
147 &mut self,
148 request: impl tonic::IntoRequest<super::QueryEvidenceRequest>,
149 ) -> std::result::Result<
150 tonic::Response<super::QueryEvidenceResponse>,
151 tonic::Status,
152 > {
153 self.inner
154 .ready()
155 .await
156 .map_err(|e| {
157 tonic::Status::unknown(
158 format!("Service was not ready: {}", e.into()),
159 )
160 })?;
161 let codec = tonic::codec::ProstCodec::default();
162 let path = http::uri::PathAndQuery::from_static(
163 "/cosmos.evidence.v1beta1.Query/Evidence",
164 );
165 let mut req = request.into_request();
166 req.extensions_mut()
167 .insert(GrpcMethod::new("cosmos.evidence.v1beta1.Query", "Evidence"));
168 self.inner.unary(req, path, codec).await
169 }
170 pub async fn all_evidence(
172 &mut self,
173 request: impl tonic::IntoRequest<super::QueryAllEvidenceRequest>,
174 ) -> std::result::Result<
175 tonic::Response<super::QueryAllEvidenceResponse>,
176 tonic::Status,
177 > {
178 self.inner
179 .ready()
180 .await
181 .map_err(|e| {
182 tonic::Status::unknown(
183 format!("Service was not ready: {}", e.into()),
184 )
185 })?;
186 let codec = tonic::codec::ProstCodec::default();
187 let path = http::uri::PathAndQuery::from_static(
188 "/cosmos.evidence.v1beta1.Query/AllEvidence",
189 );
190 let mut req = request.into_request();
191 req.extensions_mut()
192 .insert(GrpcMethod::new("cosmos.evidence.v1beta1.Query", "AllEvidence"));
193 self.inner.unary(req, path, codec).await
194 }
195 }
196}
197#[derive(Clone, PartialEq, ::prost::Message)]
200pub struct Equivocation {
201 #[prost(int64, tag = "1")]
203 pub height: i64,
204 #[prost(message, optional, tag = "2")]
206 pub time: ::core::option::Option<::prost_types::Timestamp>,
207 #[prost(int64, tag = "3")]
209 pub power: i64,
210 #[prost(string, tag = "4")]
212 pub consensus_address: ::prost::alloc::string::String,
213}
214#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct MsgSubmitEvidence {
218 #[prost(string, tag = "1")]
220 pub submitter: ::prost::alloc::string::String,
221 #[prost(message, optional, tag = "2")]
223 pub evidence: ::core::option::Option<::prost_types::Any>,
224}
225#[derive(Clone, PartialEq, ::prost::Message)]
227pub struct MsgSubmitEvidenceResponse {
228 #[prost(bytes = "vec", tag = "4")]
230 pub hash: ::prost::alloc::vec::Vec<u8>,
231}
232pub mod msg_client {
234 #![allow(
235 unused_variables,
236 dead_code,
237 missing_docs,
238 clippy::wildcard_imports,
239 clippy::let_unit_value,
240 )]
241 use tonic::codegen::*;
242 use tonic::codegen::http::Uri;
243 #[derive(Debug, Clone)]
245 pub struct MsgClient<T> {
246 inner: tonic::client::Grpc<T>,
247 }
248 impl MsgClient<tonic::transport::Channel> {
249 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
251 where
252 D: TryInto<tonic::transport::Endpoint>,
253 D::Error: Into<StdError>,
254 {
255 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
256 Ok(Self::new(conn))
257 }
258 }
259 impl<T> MsgClient<T>
260 where
261 T: tonic::client::GrpcService<tonic::body::BoxBody>,
262 T::Error: Into<StdError>,
263 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
264 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
265 {
266 pub fn new(inner: T) -> Self {
267 let inner = tonic::client::Grpc::new(inner);
268 Self { inner }
269 }
270 pub fn with_origin(inner: T, origin: Uri) -> Self {
271 let inner = tonic::client::Grpc::with_origin(inner, origin);
272 Self { inner }
273 }
274 pub fn with_interceptor<F>(
275 inner: T,
276 interceptor: F,
277 ) -> MsgClient<InterceptedService<T, F>>
278 where
279 F: tonic::service::Interceptor,
280 T::ResponseBody: Default,
281 T: tonic::codegen::Service<
282 http::Request<tonic::body::BoxBody>,
283 Response = http::Response<
284 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
285 >,
286 >,
287 <T as tonic::codegen::Service<
288 http::Request<tonic::body::BoxBody>,
289 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
290 {
291 MsgClient::new(InterceptedService::new(inner, interceptor))
292 }
293 #[must_use]
298 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
299 self.inner = self.inner.send_compressed(encoding);
300 self
301 }
302 #[must_use]
304 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
305 self.inner = self.inner.accept_compressed(encoding);
306 self
307 }
308 #[must_use]
312 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
313 self.inner = self.inner.max_decoding_message_size(limit);
314 self
315 }
316 #[must_use]
320 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
321 self.inner = self.inner.max_encoding_message_size(limit);
322 self
323 }
324 pub async fn submit_evidence(
327 &mut self,
328 request: impl tonic::IntoRequest<super::MsgSubmitEvidence>,
329 ) -> std::result::Result<
330 tonic::Response<super::MsgSubmitEvidenceResponse>,
331 tonic::Status,
332 > {
333 self.inner
334 .ready()
335 .await
336 .map_err(|e| {
337 tonic::Status::unknown(
338 format!("Service was not ready: {}", e.into()),
339 )
340 })?;
341 let codec = tonic::codec::ProstCodec::default();
342 let path = http::uri::PathAndQuery::from_static(
343 "/cosmos.evidence.v1beta1.Msg/SubmitEvidence",
344 );
345 let mut req = request.into_request();
346 req.extensions_mut()
347 .insert(
348 GrpcMethod::new("cosmos.evidence.v1beta1.Msg", "SubmitEvidence"),
349 );
350 self.inner.unary(req, path, codec).await
351 }
352 }
353}