pub trait LightClient<T>where
T: Config,{
Show 19 methods
// Required methods
fn get_latest_finalized_header(&self) -> HeaderResult;
fn get_fast_height(
&self
) -> HeightResult<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>;
fn get_rational_height(
&self
) -> HeightResult<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>;
fn get_finalized_height(
&self
) -> HeightResult<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>;
fn get_latest_finalized_header_precompile(&self) -> Vec<u8, Global> ⓘ;
fn get_fast_height_precompile(
&self
) -> <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number;
fn get_rational_height_precompile(
&self
) -> <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number;
fn get_finalized_height_precompile(
&self
) -> <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number;
fn get_latest_heartbeat(
&self
) -> Result<LightClientHeartbeat<T>, DispatchError>;
fn initialize(
&self,
origin: <T as Config>::RuntimeOrigin,
gateway_id: [u8; 4],
encoded_registration_data: Vec<u8, Global>
) -> Result<(), DispatchError>;
fn turn_on(
&self,
origin: <T as Config>::RuntimeOrigin
) -> Result<bool, DispatchError>;
fn turn_off(
&self,
origin: <T as Config>::RuntimeOrigin
) -> Result<bool, DispatchError>;
fn submit_encoded_headers(
&self,
encoded_headers_data: Vec<u8, Global>
) -> Result<bool, DispatchError>;
fn verify_event_inclusion(
&self,
gateway_id: [u8; 4],
speed_mode: SpeedMode,
source: Option<[u8; 32]>,
message: Vec<u8, Global>
) -> Result<InclusionReceipt<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, DispatchError>;
fn verify_state_inclusion(
&self,
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Vec<u8, Global>
) -> Result<InclusionReceipt<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, DispatchError>;
fn verify_tx_inclusion(
&self,
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Vec<u8, Global>
) -> Result<InclusionReceipt<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, DispatchError>;
fn verify_event_inclusion_precompile(
&self,
gateway_id: [u8; 4],
speed_mode: SpeedMode,
source: [u8; 32],
message: Vec<u8, Global>
) -> Result<Vec<u8, Global>, DispatchError>;
fn verify_state_inclusion_precompile(
&self,
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Vec<u8, Global>
) -> Result<Vec<u8, Global>, DispatchError>;
fn verify_tx_inclusion_precompile(
&self,
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Vec<u8, Global>
) -> Result<Vec<u8, Global>, DispatchError>;
}