ibc_client_cw/
api.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use core::fmt::Display;

use ibc_core::client::context::client_state::ClientStateExecution;
use ibc_core::client::context::consensus_state::ConsensusState as ConsensusStateTrait;
use ibc_core::primitives::proto::Any;

use crate::context::Context;

/// Enables users to integrate their implemented light client by introducing
/// their client state and consensus state types into the generic [`Context`]
/// object.
pub trait ClientType<'a>: Sized
where
    <Self::ClientState as TryFrom<Any>>::Error: Display,
    <Self::ConsensusState as TryFrom<Any>>::Error: Display,
{
    type ClientState: ClientStateExecution<Context<'a, Self>>;
    type ConsensusState: ConsensusStateTrait;
}