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

Required Methods§

source

fn get_latest_finalized_header(&self) -> HeaderResult

source

fn get_fast_height(&self) -> HeightResult<BlockNumberFor<T>>

source

fn get_rational_height(&self) -> HeightResult<BlockNumberFor<T>>

source

fn get_finalized_height(&self) -> HeightResult<BlockNumberFor<T>>

source

fn get_latest_finalized_header_precompile(&self) -> Bytes

source

fn get_fast_height_precompile(&self) -> BlockNumberFor<T>

source

fn get_rational_height_precompile(&self) -> BlockNumberFor<T>

source

fn get_finalized_height_precompile(&self) -> BlockNumberFor<T>

source

fn get_latest_heartbeat(&self) -> Result<LightClientHeartbeat<T>, DispatchError>

source

fn initialize( &self, origin: T::RuntimeOrigin, gateway_id: [u8; 4], encoded_registration_data: Bytes ) -> Result<(), DispatchError>

source

fn turn_on(&self, origin: T::RuntimeOrigin) -> Result<bool, DispatchError>

source

fn turn_off(&self, origin: T::RuntimeOrigin) -> Result<bool, DispatchError>

source

fn submit_encoded_headers( &self, encoded_headers_data: Bytes ) -> Result<bool, DispatchError>

source

fn verify_event_inclusion( &self, gateway_id: [u8; 4], speed_mode: SpeedMode, source: Option<ExecutionSource>, message: Bytes ) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>

source

fn verify_state_inclusion( &self, gateway_id: [u8; 4], speed_mode: SpeedMode, message: Bytes ) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>

source

fn verify_tx_inclusion( &self, gateway_id: [u8; 4], speed_mode: SpeedMode, message: Bytes ) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>

source

fn verify_event_inclusion_precompile( &self, gateway_id: [u8; 4], speed_mode: SpeedMode, source: ExecutionSource, message: Bytes ) -> Result<Bytes, DispatchError>

source

fn verify_state_inclusion_precompile( &self, gateway_id: [u8; 4], speed_mode: SpeedMode, message: Bytes ) -> Result<Bytes, DispatchError>

source

fn verify_tx_inclusion_precompile( &self, gateway_id: [u8; 4], speed_mode: SpeedMode, message: Bytes ) -> Result<Bytes, DispatchError>

Implementors§