ics12_proto/
client.rs

1/// A NEAR protocol consensus header.
2/// A NEAR protocol validator stake view.
3
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct CryptoHash {
7    #[prost(bytes = "vec", tag = "1")]
8    pub raw_data: ::prost::alloc::vec::Vec<u8>,
9}
10#[allow(clippy::derive_partial_eq_without_eq)]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct Header {
13    #[prost(bytes = "vec", tag = "1")]
14    pub light_client_block: ::prost::alloc::vec::Vec<u8>,
15    #[prost(message, repeated, tag = "2")]
16    pub prev_state_root_of_chunks: ::prost::alloc::vec::Vec<CryptoHash>,
17}
18/// A NEAR protocol validator stake view.
19#[allow(clippy::derive_partial_eq_without_eq)]
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct ValidatorStakeView {
22    #[prost(bytes = "vec", tag = "1")]
23    pub raw_data: ::prost::alloc::vec::Vec<u8>,
24}
25/// A NEAR protocol consensus state.
26#[allow(clippy::derive_partial_eq_without_eq)]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct ConsensusState {
29    #[prost(message, repeated, tag = "1")]
30    pub current_bps: ::prost::alloc::vec::Vec<ValidatorStakeView>,
31    #[prost(message, optional, tag = "2")]
32    pub header: ::core::option::Option<Header>,
33}
34/// A NEAR protocol client state.
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct ClientState {
38    #[prost(message, optional, tag = "1")]
39    pub trusting_period: ::core::option::Option<ibc_proto::google::protobuf::Duration>,
40    /// Block height when the client was frozen due to a misbehaviour
41    #[prost(message, optional, tag = "2")]
42    pub frozen_height: ::core::option::Option<ibc_proto::ibc::core::client::v1::Height>,
43    /// Latest height the client was updated to
44    #[prost(message, optional, tag = "3")]
45    pub latest_height: ::core::option::Option<ibc_proto::ibc::core::client::v1::Height>,
46    /// Latest timestamp the client was updated to
47    #[prost(uint64, tag = "4")]
48    pub latest_timestamp: u64,
49    ///
50    #[prost(bytes = "vec", tag = "5")]
51    pub upgrade_commitment_prefix: ::prost::alloc::vec::Vec<u8>,
52    ///
53    #[prost(bytes = "vec", tag = "6")]
54    pub upgrade_key: ::prost::alloc::vec::Vec<u8>,
55}
56
57/// Misbehaviour is a wrapper over two conflicting Headers
58/// that implements Misbehaviour interface expected by ICS-02
59#[allow(clippy::derive_partial_eq_without_eq)]
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct Misbehaviour {
62    /// ClientID is deprecated
63    #[deprecated]
64    #[prost(string, tag = "1")]
65    pub client_id: ::prost::alloc::string::String,
66    #[prost(message, optional, tag = "2")]
67    pub header_1: ::core::option::Option<Header>,
68    #[prost(message, optional, tag = "3")]
69    pub header_2: ::core::option::Option<Header>,
70}