ibc_client_cw/
api.rs

1use core::fmt::Display;
2
3use ibc_core::client::context::client_state::ClientStateExecution;
4use ibc_core::client::context::consensus_state::ConsensusState as ConsensusStateTrait;
5use ibc_core::primitives::proto::Any;
6
7use crate::context::Context;
8
9/// Enables users to integrate their implemented light client by introducing
10/// their client state and consensus state types into the generic [`Context`]
11/// object.
12pub trait ClientType<'a>: Sized
13where
14    <Self::ClientState as TryFrom<Any>>::Error: Display,
15    <Self::ConsensusState as TryFrom<Any>>::Error: Display,
16{
17    type ClientState: ClientStateExecution<Context<'a, Self>>;
18    type ConsensusState: ConsensusStateTrait;
19}