pub trait ChannelReader {
Show 23 methods fn channel_end(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId
    ) -> Result<ChannelEnd, Error>; fn connection_end(
        &self,
        connection_id: &ConnectionId
    ) -> Result<ConnectionEnd, Error>; fn connection_channels(
        &self,
        cid: &ConnectionId
    ) -> Result<Vec<(PortId, ChannelId)>, Error>; fn client_state(
        &self,
        client_id: &ClientId
    ) -> Result<Box<dyn ClientState>, Error>; fn client_consensus_state(
        &self,
        client_id: &ClientId,
        height: Height
    ) -> Result<Box<dyn ConsensusState>, Error>; fn get_next_sequence_send(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId
    ) -> Result<Sequence, Error>; fn get_next_sequence_recv(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId
    ) -> Result<Sequence, Error>; fn get_next_sequence_ack(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId
    ) -> Result<Sequence, Error>; fn get_packet_commitment(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId,
        sequence: Sequence
    ) -> Result<PacketCommitment, Error>; fn get_packet_receipt(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId,
        sequence: Sequence
    ) -> Result<Receipt, Error>; fn get_packet_acknowledgement(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId,
        sequence: Sequence
    ) -> Result<AcknowledgementCommitment, Error>; fn hash(&self, value: Vec<u8>) -> Vec<u8> ; fn host_height(&self) -> Height; fn host_consensus_state(
        &self,
        height: Height
    ) -> Result<Box<dyn ConsensusState>, Error>; fn pending_host_consensus_state(
        &self
    ) -> Result<Box<dyn ConsensusState>, Error>; fn client_update_time(
        &self,
        client_id: &ClientId,
        height: Height
    ) -> Result<Timestamp, Error>; fn client_update_height(
        &self,
        client_id: &ClientId,
        height: Height
    ) -> Result<Height, Error>; fn channel_counter(&self) -> Result<u64, Error>; fn max_expected_time_per_block(&self) -> Duration; fn packet_commitment(
        &self,
        packet_data: Vec<u8>,
        timeout_height: TimeoutHeight,
        timeout_timestamp: Timestamp
    ) -> PacketCommitment { ... } fn ack_commitment(&self, ack: Acknowledgement) -> AcknowledgementCommitment { ... } fn host_timestamp(&self) -> Timestamp { ... } fn block_delay(&self, delay_period_time: Duration) -> u64 { ... }
}
Expand description

A context supplying all the necessary read-only dependencies for processing any ChannelMsg.

Required Methods

Returns the ChannelEnd for the given port_id and chan_id.

Returns the ConnectionState for the given identifier connection_id.

Returns the ClientState for the given identifier client_id. Necessary dependency towards proof verification.

A hashing function for packet commitments

Returns the current height of the local chain.

Returns the ConsensusState of the host (local) chain at a specific height.

Returns the pending ConsensusState of the host (local) chain.

Returns the time when the client state for the given ClientId was updated with a header for the given Height

Returns the height when the client state for the given ClientId was updated with a header for the given Height

Returns a counter on the number of channel ids have been created thus far. The value of this counter should increase only via method ChannelKeeper::increase_channel_counter.

Returns the maximum expected time per block

Provided Methods

Compute the commitment for a packet. Note that the absence of timeout_height is treated as {revision_number: 0, revision_height: 0} to be consistent with ibc-go, where this value is used to mean “no timeout height”: https://github.com/cosmos/ibc-go/blob/04791984b3d6c83f704c4f058e6ca0038d155d91/modules/core/04-channel/keeper/packet.go#L206

Returns the current timestamp of the local chain.

Calculates the block delay period using the connection’s delay period and the maximum expected time per block.

Implementors