1use osmosis_std_derive::CosmwasmExt;
2#[allow(clippy::derive_partial_eq_without_eq)]
23#[derive(
24 Clone,
25 PartialEq,
26 Eq,
27 ::prost::Message,
28 ::serde::Serialize,
29 ::serde::Deserialize,
30 ::schemars::JsonSchema,
31 CosmwasmExt,
32)]
33#[proto_message(type_url = "/cosmos.ics23.v1.ExistenceProof")]
34pub struct ExistenceProof {
35 #[prost(bytes = "vec", tag = "1")]
36 #[serde(
37 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
38 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
39 )]
40 pub key: ::prost::alloc::vec::Vec<u8>,
41 #[prost(bytes = "vec", tag = "2")]
42 #[serde(
43 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
44 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
45 )]
46 pub value: ::prost::alloc::vec::Vec<u8>,
47 #[prost(message, optional, tag = "3")]
48 pub leaf: ::core::option::Option<LeafOp>,
49 #[prost(message, repeated, tag = "4")]
50 pub path: ::prost::alloc::vec::Vec<InnerOp>,
51}
52#[allow(clippy::derive_partial_eq_without_eq)]
57#[derive(
58 Clone,
59 PartialEq,
60 Eq,
61 ::prost::Message,
62 ::serde::Serialize,
63 ::serde::Deserialize,
64 ::schemars::JsonSchema,
65 CosmwasmExt,
66)]
67#[proto_message(type_url = "/cosmos.ics23.v1.NonExistenceProof")]
68pub struct NonExistenceProof {
69 #[prost(bytes = "vec", tag = "1")]
71 #[serde(
72 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
73 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
74 )]
75 pub key: ::prost::alloc::vec::Vec<u8>,
76 #[prost(message, optional, tag = "2")]
77 pub left: ::core::option::Option<ExistenceProof>,
78 #[prost(message, optional, tag = "3")]
79 pub right: ::core::option::Option<ExistenceProof>,
80}
81#[allow(clippy::derive_partial_eq_without_eq)]
84#[derive(
85 Clone,
86 PartialEq,
87 Eq,
88 ::prost::Message,
89 ::serde::Serialize,
90 ::serde::Deserialize,
91 ::schemars::JsonSchema,
92 CosmwasmExt,
93)]
94#[proto_message(type_url = "/cosmos.ics23.v1.CommitmentProof")]
95pub struct CommitmentProof {
96 #[prost(oneof = "commitment_proof::Proof", tags = "1, 2, 3, 4")]
97 pub proof: ::core::option::Option<commitment_proof::Proof>,
98}
99pub mod commitment_proof {
101 use osmosis_std_derive::CosmwasmExt;
102 #[allow(clippy::derive_partial_eq_without_eq)]
103 #[derive(
104 Clone,
105 PartialEq,
106 Eq,
107 ::prost::Oneof,
108 ::serde::Serialize,
109 ::serde::Deserialize,
110 ::schemars::JsonSchema,
111 )]
112 pub enum Proof {
113 #[prost(message, tag = "1")]
114 Exist(super::ExistenceProof),
115 #[prost(message, tag = "2")]
116 Nonexist(super::NonExistenceProof),
117 #[prost(message, tag = "3")]
118 Batch(super::BatchProof),
119 #[prost(message, tag = "4")]
120 Compressed(super::CompressedBatchProof),
121 }
122}
123#[allow(clippy::derive_partial_eq_without_eq)]
139#[derive(
140 Clone,
141 PartialEq,
142 Eq,
143 ::prost::Message,
144 ::serde::Serialize,
145 ::serde::Deserialize,
146 ::schemars::JsonSchema,
147 CosmwasmExt,
148)]
149#[proto_message(type_url = "/cosmos.ics23.v1.LeafOp")]
150pub struct LeafOp {
151 #[prost(enumeration = "HashOp", tag = "1")]
152 #[serde(
153 serialize_with = "crate::serde::as_str::serialize",
154 deserialize_with = "crate::serde::as_str::deserialize"
155 )]
156 pub hash: i32,
157 #[prost(enumeration = "HashOp", tag = "2")]
158 #[serde(
159 serialize_with = "crate::serde::as_str::serialize",
160 deserialize_with = "crate::serde::as_str::deserialize"
161 )]
162 pub prehash_key: i32,
163 #[prost(enumeration = "HashOp", tag = "3")]
164 #[serde(
165 serialize_with = "crate::serde::as_str::serialize",
166 deserialize_with = "crate::serde::as_str::deserialize"
167 )]
168 pub prehash_value: i32,
169 #[prost(enumeration = "LengthOp", tag = "4")]
170 #[serde(
171 serialize_with = "crate::serde::as_str::serialize",
172 deserialize_with = "crate::serde::as_str::deserialize"
173 )]
174 pub length: i32,
175 #[prost(bytes = "vec", tag = "5")]
178 #[serde(
179 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
180 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
181 )]
182 pub prefix: ::prost::alloc::vec::Vec<u8>,
183}
184#[allow(clippy::derive_partial_eq_without_eq)]
201#[derive(
202 Clone,
203 PartialEq,
204 Eq,
205 ::prost::Message,
206 ::serde::Serialize,
207 ::serde::Deserialize,
208 ::schemars::JsonSchema,
209 CosmwasmExt,
210)]
211#[proto_message(type_url = "/cosmos.ics23.v1.InnerOp")]
212pub struct InnerOp {
213 #[prost(enumeration = "HashOp", tag = "1")]
214 #[serde(
215 serialize_with = "crate::serde::as_str::serialize",
216 deserialize_with = "crate::serde::as_str::deserialize"
217 )]
218 pub hash: i32,
219 #[prost(bytes = "vec", tag = "2")]
220 #[serde(
221 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
222 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
223 )]
224 pub prefix: ::prost::alloc::vec::Vec<u8>,
225 #[prost(bytes = "vec", tag = "3")]
226 #[serde(
227 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
228 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
229 )]
230 pub suffix: ::prost::alloc::vec::Vec<u8>,
231}
232#[allow(clippy::derive_partial_eq_without_eq)]
244#[derive(
245 Clone,
246 PartialEq,
247 Eq,
248 ::prost::Message,
249 ::serde::Serialize,
250 ::serde::Deserialize,
251 ::schemars::JsonSchema,
252 CosmwasmExt,
253)]
254#[proto_message(type_url = "/cosmos.ics23.v1.ProofSpec")]
255pub struct ProofSpec {
256 #[prost(message, optional, tag = "1")]
259 pub leaf_spec: ::core::option::Option<LeafOp>,
260 #[prost(message, optional, tag = "2")]
261 pub inner_spec: ::core::option::Option<InnerSpec>,
262 #[prost(int32, tag = "3")]
264 #[serde(
265 serialize_with = "crate::serde::as_str::serialize",
266 deserialize_with = "crate::serde::as_str::deserialize"
267 )]
268 pub max_depth: i32,
269 #[prost(int32, tag = "4")]
271 #[serde(
272 serialize_with = "crate::serde::as_str::serialize",
273 deserialize_with = "crate::serde::as_str::deserialize"
274 )]
275 pub min_depth: i32,
276 #[prost(bool, tag = "5")]
280 pub prehash_key_before_comparison: bool,
281}
282#[allow(clippy::derive_partial_eq_without_eq)]
292#[derive(
293 Clone,
294 PartialEq,
295 Eq,
296 ::prost::Message,
297 ::serde::Serialize,
298 ::serde::Deserialize,
299 ::schemars::JsonSchema,
300 CosmwasmExt,
301)]
302#[proto_message(type_url = "/cosmos.ics23.v1.InnerSpec")]
303pub struct InnerSpec {
304 #[prost(int32, repeated, tag = "1")]
308 #[serde(
309 serialize_with = "crate::serde::as_str_vec::serialize",
310 deserialize_with = "crate::serde::as_str_vec::deserialize"
311 )]
312 pub child_order: ::prost::alloc::vec::Vec<i32>,
313 #[prost(int32, tag = "2")]
314 #[serde(
315 serialize_with = "crate::serde::as_str::serialize",
316 deserialize_with = "crate::serde::as_str::deserialize"
317 )]
318 pub child_size: i32,
319 #[prost(int32, tag = "3")]
320 #[serde(
321 serialize_with = "crate::serde::as_str::serialize",
322 deserialize_with = "crate::serde::as_str::deserialize"
323 )]
324 pub min_prefix_length: i32,
325 #[prost(int32, tag = "4")]
326 #[serde(
327 serialize_with = "crate::serde::as_str::serialize",
328 deserialize_with = "crate::serde::as_str::deserialize"
329 )]
330 pub max_prefix_length: i32,
331 #[prost(bytes = "vec", tag = "5")]
333 #[serde(
334 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
335 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
336 )]
337 pub empty_child: ::prost::alloc::vec::Vec<u8>,
338 #[prost(enumeration = "HashOp", tag = "6")]
340 #[serde(
341 serialize_with = "crate::serde::as_str::serialize",
342 deserialize_with = "crate::serde::as_str::deserialize"
343 )]
344 pub hash: i32,
345}
346#[allow(clippy::derive_partial_eq_without_eq)]
349#[derive(
350 Clone,
351 PartialEq,
352 Eq,
353 ::prost::Message,
354 ::serde::Serialize,
355 ::serde::Deserialize,
356 ::schemars::JsonSchema,
357 CosmwasmExt,
358)]
359#[proto_message(type_url = "/cosmos.ics23.v1.BatchProof")]
360pub struct BatchProof {
361 #[prost(message, repeated, tag = "1")]
362 pub entries: ::prost::alloc::vec::Vec<BatchEntry>,
363}
364#[allow(clippy::derive_partial_eq_without_eq)]
366#[derive(
367 Clone,
368 PartialEq,
369 Eq,
370 ::prost::Message,
371 ::serde::Serialize,
372 ::serde::Deserialize,
373 ::schemars::JsonSchema,
374 CosmwasmExt,
375)]
376#[proto_message(type_url = "/cosmos.ics23.v1.BatchEntry")]
377pub struct BatchEntry {
378 #[prost(oneof = "batch_entry::Proof", tags = "1, 2")]
379 pub proof: ::core::option::Option<batch_entry::Proof>,
380}
381pub mod batch_entry {
383 use osmosis_std_derive::CosmwasmExt;
384 #[allow(clippy::derive_partial_eq_without_eq)]
385 #[derive(
386 Clone,
387 PartialEq,
388 Eq,
389 ::prost::Oneof,
390 ::serde::Serialize,
391 ::serde::Deserialize,
392 ::schemars::JsonSchema,
393 )]
394 pub enum Proof {
395 #[prost(message, tag = "1")]
396 Exist(super::ExistenceProof),
397 #[prost(message, tag = "2")]
398 Nonexist(super::NonExistenceProof),
399 }
400}
401#[allow(clippy::derive_partial_eq_without_eq)]
402#[derive(
403 Clone,
404 PartialEq,
405 Eq,
406 ::prost::Message,
407 ::serde::Serialize,
408 ::serde::Deserialize,
409 ::schemars::JsonSchema,
410 CosmwasmExt,
411)]
412#[proto_message(type_url = "/cosmos.ics23.v1.CompressedBatchProof")]
413pub struct CompressedBatchProof {
414 #[prost(message, repeated, tag = "1")]
415 pub entries: ::prost::alloc::vec::Vec<CompressedBatchEntry>,
416 #[prost(message, repeated, tag = "2")]
417 pub lookup_inners: ::prost::alloc::vec::Vec<InnerOp>,
418}
419#[allow(clippy::derive_partial_eq_without_eq)]
421#[derive(
422 Clone,
423 PartialEq,
424 Eq,
425 ::prost::Message,
426 ::serde::Serialize,
427 ::serde::Deserialize,
428 ::schemars::JsonSchema,
429 CosmwasmExt,
430)]
431#[proto_message(type_url = "/cosmos.ics23.v1.CompressedBatchEntry")]
432pub struct CompressedBatchEntry {
433 #[prost(oneof = "compressed_batch_entry::Proof", tags = "1, 2")]
434 pub proof: ::core::option::Option<compressed_batch_entry::Proof>,
435}
436pub mod compressed_batch_entry {
438 use osmosis_std_derive::CosmwasmExt;
439 #[allow(clippy::derive_partial_eq_without_eq)]
440 #[derive(
441 Clone,
442 PartialEq,
443 Eq,
444 ::prost::Oneof,
445 ::serde::Serialize,
446 ::serde::Deserialize,
447 ::schemars::JsonSchema,
448 )]
449 pub enum Proof {
450 #[prost(message, tag = "1")]
451 Exist(super::CompressedExistenceProof),
452 #[prost(message, tag = "2")]
453 Nonexist(super::CompressedNonExistenceProof),
454 }
455}
456#[allow(clippy::derive_partial_eq_without_eq)]
457#[derive(
458 Clone,
459 PartialEq,
460 Eq,
461 ::prost::Message,
462 ::serde::Serialize,
463 ::serde::Deserialize,
464 ::schemars::JsonSchema,
465 CosmwasmExt,
466)]
467#[proto_message(type_url = "/cosmos.ics23.v1.CompressedExistenceProof")]
468pub struct CompressedExistenceProof {
469 #[prost(bytes = "vec", tag = "1")]
470 #[serde(
471 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
472 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
473 )]
474 pub key: ::prost::alloc::vec::Vec<u8>,
475 #[prost(bytes = "vec", tag = "2")]
476 #[serde(
477 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
478 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
479 )]
480 pub value: ::prost::alloc::vec::Vec<u8>,
481 #[prost(message, optional, tag = "3")]
482 pub leaf: ::core::option::Option<LeafOp>,
483 #[prost(int32, repeated, tag = "4")]
485 #[serde(
486 serialize_with = "crate::serde::as_str_vec::serialize",
487 deserialize_with = "crate::serde::as_str_vec::deserialize"
488 )]
489 pub path: ::prost::alloc::vec::Vec<i32>,
490}
491#[allow(clippy::derive_partial_eq_without_eq)]
492#[derive(
493 Clone,
494 PartialEq,
495 Eq,
496 ::prost::Message,
497 ::serde::Serialize,
498 ::serde::Deserialize,
499 ::schemars::JsonSchema,
500 CosmwasmExt,
501)]
502#[proto_message(type_url = "/cosmos.ics23.v1.CompressedNonExistenceProof")]
503pub struct CompressedNonExistenceProof {
504 #[prost(bytes = "vec", tag = "1")]
506 #[serde(
507 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
508 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
509 )]
510 pub key: ::prost::alloc::vec::Vec<u8>,
511 #[prost(message, optional, tag = "2")]
512 pub left: ::core::option::Option<CompressedExistenceProof>,
513 #[prost(message, optional, tag = "3")]
514 pub right: ::core::option::Option<CompressedExistenceProof>,
515}
516#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
517#[repr(i32)]
518#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
519pub enum HashOp {
520 NoHash = 0,
522 Sha256 = 1,
523 Sha512 = 2,
524 Keccak = 3,
525 Ripemd160 = 4,
526 Bitcoin = 5,
528 Sha512256 = 6,
529}
530impl HashOp {
531 pub fn as_str_name(&self) -> &'static str {
536 match self {
537 HashOp::NoHash => "NO_HASH",
538 HashOp::Sha256 => "SHA256",
539 HashOp::Sha512 => "SHA512",
540 HashOp::Keccak => "KECCAK",
541 HashOp::Ripemd160 => "RIPEMD160",
542 HashOp::Bitcoin => "BITCOIN",
543 HashOp::Sha512256 => "SHA512_256",
544 }
545 }
546 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
548 match value {
549 "NO_HASH" => Some(Self::NoHash),
550 "SHA256" => Some(Self::Sha256),
551 "SHA512" => Some(Self::Sha512),
552 "KECCAK" => Some(Self::Keccak),
553 "RIPEMD160" => Some(Self::Ripemd160),
554 "BITCOIN" => Some(Self::Bitcoin),
555 "SHA512_256" => Some(Self::Sha512256),
556 _ => None,
557 }
558 }
559}
560#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
566#[repr(i32)]
567#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
568pub enum LengthOp {
569 NoPrefix = 0,
571 VarProto = 1,
573 VarRlp = 2,
575 Fixed32Big = 3,
577 Fixed32Little = 4,
579 Fixed64Big = 5,
581 Fixed64Little = 6,
583 Require32Bytes = 7,
585 Require64Bytes = 8,
587}
588impl LengthOp {
589 pub fn as_str_name(&self) -> &'static str {
594 match self {
595 LengthOp::NoPrefix => "NO_PREFIX",
596 LengthOp::VarProto => "VAR_PROTO",
597 LengthOp::VarRlp => "VAR_RLP",
598 LengthOp::Fixed32Big => "FIXED32_BIG",
599 LengthOp::Fixed32Little => "FIXED32_LITTLE",
600 LengthOp::Fixed64Big => "FIXED64_BIG",
601 LengthOp::Fixed64Little => "FIXED64_LITTLE",
602 LengthOp::Require32Bytes => "REQUIRE_32_BYTES",
603 LengthOp::Require64Bytes => "REQUIRE_64_BYTES",
604 }
605 }
606 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
608 match value {
609 "NO_PREFIX" => Some(Self::NoPrefix),
610 "VAR_PROTO" => Some(Self::VarProto),
611 "VAR_RLP" => Some(Self::VarRlp),
612 "FIXED32_BIG" => Some(Self::Fixed32Big),
613 "FIXED32_LITTLE" => Some(Self::Fixed32Little),
614 "FIXED64_BIG" => Some(Self::Fixed64Big),
615 "FIXED64_LITTLE" => Some(Self::Fixed64Little),
616 "REQUIRE_32_BYTES" => Some(Self::Require32Bytes),
617 "REQUIRE_64_BYTES" => Some(Self::Require64Bytes),
618 _ => None,
619 }
620 }
621}