ibc_proto/prost/
ibc.core.commitment.v1.rs

1// This file is @generated by prost-build.
2/// MerkleRoot defines a merkle root hash.
3/// In the Cosmos SDK, the AppHash of a block header becomes the root.
4#[cfg_attr(
5    all(feature = "json-schema", feature = "serde"),
6    derive(::schemars::JsonSchema)
7)]
8#[derive(Clone, PartialEq, ::prost::Message)]
9pub struct MerkleRoot {
10    #[prost(bytes = "vec", tag = "1")]
11    #[cfg_attr(
12        all(feature = "json-schema", feature = "serde"),
13        schemars(with = "String")
14    )]
15    pub hash: ::prost::alloc::vec::Vec<u8>,
16}
17impl ::prost::Name for MerkleRoot {
18    const NAME: &'static str = "MerkleRoot";
19    const PACKAGE: &'static str = "ibc.core.commitment.v1";
20    fn full_name() -> ::prost::alloc::string::String {
21        "ibc.core.commitment.v1.MerkleRoot".into()
22    }
23    fn type_url() -> ::prost::alloc::string::String {
24        "/ibc.core.commitment.v1.MerkleRoot".into()
25    }
26}
27/// MerklePrefix is merkle path prefixed to the key.
28/// The constructed key from the Path and the key will be append(Path.KeyPath,
29/// append(Path.KeyPrefix, key...))
30#[cfg_attr(
31    all(feature = "json-schema", feature = "serde"),
32    derive(::schemars::JsonSchema)
33)]
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct MerklePrefix {
36    #[prost(bytes = "vec", tag = "1")]
37    #[cfg_attr(
38        all(feature = "json-schema", feature = "serde"),
39        schemars(with = "String")
40    )]
41    pub key_prefix: ::prost::alloc::vec::Vec<u8>,
42}
43impl ::prost::Name for MerklePrefix {
44    const NAME: &'static str = "MerklePrefix";
45    const PACKAGE: &'static str = "ibc.core.commitment.v1";
46    fn full_name() -> ::prost::alloc::string::String {
47        "ibc.core.commitment.v1.MerklePrefix".into()
48    }
49    fn type_url() -> ::prost::alloc::string::String {
50        "/ibc.core.commitment.v1.MerklePrefix".into()
51    }
52}
53/// MerklePath is the path used to verify commitment proofs, which can be an
54/// arbitrary structured object (defined by a commitment type).
55/// MerklePath is represented from root-to-leaf
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct MerklePath {
58    #[prost(string, repeated, tag = "1")]
59    pub key_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
60}
61impl ::prost::Name for MerklePath {
62    const NAME: &'static str = "MerklePath";
63    const PACKAGE: &'static str = "ibc.core.commitment.v1";
64    fn full_name() -> ::prost::alloc::string::String {
65        "ibc.core.commitment.v1.MerklePath".into()
66    }
67    fn type_url() -> ::prost::alloc::string::String {
68        "/ibc.core.commitment.v1.MerklePath".into()
69    }
70}
71/// MerkleProof is a wrapper type over a chain of CommitmentProofs.
72/// It demonstrates membership or non-membership for an element or set of
73/// elements, verifiable in conjunction with a known commitment root. Proofs
74/// should be succinct.
75/// MerkleProofs are ordered from leaf-to-root
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct MerkleProof {
78    #[prost(message, repeated, tag = "1")]
79    pub proofs: ::prost::alloc::vec::Vec<::ics23::CommitmentProof>,
80}
81impl ::prost::Name for MerkleProof {
82    const NAME: &'static str = "MerkleProof";
83    const PACKAGE: &'static str = "ibc.core.commitment.v1";
84    fn full_name() -> ::prost::alloc::string::String {
85        "ibc.core.commitment.v1.MerkleProof".into()
86    }
87    fn type_url() -> ::prost::alloc::string::String {
88        "/ibc.core.commitment.v1.MerkleProof".into()
89    }
90}