Trait ibc_relayer::chain::handle::ChainHandle[][src]

pub trait ChainHandle: DynClone + Send + Sync + Debug {
Show methods fn id(&self) -> ChainId;
fn subscribe(&self) -> Result<Subscription, Error>;
fn send_msgs(&self, proto_msgs: Vec<Any>) -> Result<Vec<IbcEvent>, Error>;
fn get_signer(&self) -> Result<Signer, Error>;
fn get_key(&self) -> Result<KeyEntry, Error>;
fn module_version(&self, port_id: &PortId) -> Result<String, Error>;
fn query_latest_height(&self) -> Result<Height, Error>;
fn query_clients(
        &self,
        request: QueryClientStatesRequest
    ) -> Result<Vec<IdentifiedAnyClientState>, Error>;
fn query_client_state(
        &self,
        client_id: &ClientId,
        height: Height
    ) -> Result<AnyClientState, Error>;
fn query_client_connections(
        &self,
        request: QueryClientConnectionsRequest
    ) -> Result<Vec<ConnectionId>, Error>;
fn query_consensus_states(
        &self,
        request: QueryConsensusStatesRequest
    ) -> Result<Vec<AnyConsensusStateWithHeight>, Error>;
fn query_consensus_state(
        &self,
        client_id: ClientId,
        consensus_height: Height,
        query_height: Height
    ) -> Result<AnyConsensusState, Error>;
fn query_upgraded_client_state(
        &self,
        height: Height
    ) -> Result<(AnyClientState, MerkleProof), Error>;
fn query_upgraded_consensus_state(
        &self,
        height: Height
    ) -> Result<(AnyConsensusState, MerkleProof), Error>;
fn query_commitment_prefix(&self) -> Result<CommitmentPrefix, Error>;
fn query_compatible_versions(&self) -> Result<Vec<Version>, Error>;
fn query_connection(
        &self,
        connection_id: &ConnectionId,
        height: Height
    ) -> Result<ConnectionEnd, Error>;
fn query_connection_channels(
        &self,
        request: QueryConnectionChannelsRequest
    ) -> Result<Vec<IdentifiedChannelEnd>, Error>;
fn query_next_sequence_receive(
        &self,
        request: QueryNextSequenceReceiveRequest
    ) -> Result<Sequence, Error>;
fn query_channels(
        &self,
        request: QueryChannelsRequest
    ) -> Result<Vec<IdentifiedChannelEnd>, Error>;
fn query_channel(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId,
        height: Height
    ) -> Result<ChannelEnd, Error>;
fn query_channel_client_state(
        &self,
        request: QueryChannelClientStateRequest
    ) -> Result<Option<IdentifiedAnyClientState>, Error>;
fn proven_client_state(
        &self,
        client_id: &ClientId,
        height: Height
    ) -> Result<(AnyClientState, MerkleProof), Error>;
fn proven_connection(
        &self,
        connection_id: &ConnectionId,
        height: Height
    ) -> Result<(ConnectionEnd, MerkleProof), Error>;
fn proven_client_consensus(
        &self,
        client_id: &ClientId,
        consensus_height: Height,
        height: Height
    ) -> Result<(AnyConsensusState, MerkleProof), Error>;
fn build_header(
        &self,
        trusted_height: Height,
        target_height: Height,
        client_state: AnyClientState
    ) -> Result<AnyHeader, Error>;
fn build_client_state(
        &self,
        height: Height
    ) -> Result<AnyClientState, Error>;
fn build_consensus_state(
        &self,
        trusted: Height,
        target: Height,
        client_state: AnyClientState
    ) -> Result<AnyConsensusState, Error>;
fn check_misbehaviour(
        &self,
        update: UpdateClient,
        client_state: AnyClientState
    ) -> Result<Option<AnyMisbehaviour>, Error>;
fn build_connection_proofs_and_client_state(
        &self,
        message_type: ConnectionMsgType,
        connection_id: &ConnectionId,
        client_id: &ClientId,
        height: Height
    ) -> Result<(Option<AnyClientState>, Proofs), Error>;
fn build_channel_proofs(
        &self,
        port_id: &PortId,
        channel_id: &ChannelId,
        height: Height
    ) -> Result<Proofs, Error>;
fn build_packet_proofs(
        &self,
        packet_type: PacketMsgType,
        port_id: &PortId,
        channel_id: &ChannelId,
        sequence: Sequence,
        height: Height
    ) -> Result<(Vec<u8>, Proofs), Error>;
fn query_packet_commitments(
        &self,
        request: QueryPacketCommitmentsRequest
    ) -> Result<(Vec<PacketState>, Height), Error>;
fn query_unreceived_packets(
        &self,
        request: QueryUnreceivedPacketsRequest
    ) -> Result<Vec<u64>, Error>;
fn query_packet_acknowledgements(
        &self,
        request: QueryPacketAcknowledgementsRequest
    ) -> Result<(Vec<PacketState>, Height), Error>;
fn query_unreceived_acknowledgement(
        &self,
        request: QueryUnreceivedAcksRequest
    ) -> Result<Vec<u64>, Error>;
fn query_txs(&self, request: QueryTxRequest) -> Result<Vec<IbcEvent>, Error>;
}

Required methods

fn id(&self) -> ChainId[src]

fn subscribe(&self) -> Result<Subscription, Error>[src]

fn send_msgs(&self, proto_msgs: Vec<Any>) -> Result<Vec<IbcEvent>, Error>[src]

Send a transaction with msgs to chain.

fn get_signer(&self) -> Result<Signer, Error>[src]

fn get_key(&self) -> Result<KeyEntry, Error>[src]

fn module_version(&self, port_id: &PortId) -> Result<String, Error>[src]

fn query_latest_height(&self) -> Result<Height, Error>[src]

fn query_clients(
    &self,
    request: QueryClientStatesRequest
) -> Result<Vec<IdentifiedAnyClientState>, Error>
[src]

fn query_client_state(
    &self,
    client_id: &ClientId,
    height: Height
) -> Result<AnyClientState, Error>
[src]

fn query_client_connections(
    &self,
    request: QueryClientConnectionsRequest
) -> Result<Vec<ConnectionId>, Error>
[src]

fn query_consensus_states(
    &self,
    request: QueryConsensusStatesRequest
) -> Result<Vec<AnyConsensusStateWithHeight>, Error>
[src]

fn query_consensus_state(
    &self,
    client_id: ClientId,
    consensus_height: Height,
    query_height: Height
) -> Result<AnyConsensusState, Error>
[src]

fn query_upgraded_client_state(
    &self,
    height: Height
) -> Result<(AnyClientState, MerkleProof), Error>
[src]

fn query_upgraded_consensus_state(
    &self,
    height: Height
) -> Result<(AnyConsensusState, MerkleProof), Error>
[src]

fn query_commitment_prefix(&self) -> Result<CommitmentPrefix, Error>[src]

fn query_compatible_versions(&self) -> Result<Vec<Version>, Error>[src]

fn query_connection(
    &self,
    connection_id: &ConnectionId,
    height: Height
) -> Result<ConnectionEnd, Error>
[src]

fn query_connection_channels(
    &self,
    request: QueryConnectionChannelsRequest
) -> Result<Vec<IdentifiedChannelEnd>, Error>
[src]

fn query_next_sequence_receive(
    &self,
    request: QueryNextSequenceReceiveRequest
) -> Result<Sequence, Error>
[src]

fn query_channels(
    &self,
    request: QueryChannelsRequest
) -> Result<Vec<IdentifiedChannelEnd>, Error>
[src]

fn query_channel(
    &self,
    port_id: &PortId,
    channel_id: &ChannelId,
    height: Height
) -> Result<ChannelEnd, Error>
[src]

fn query_channel_client_state(
    &self,
    request: QueryChannelClientStateRequest
) -> Result<Option<IdentifiedAnyClientState>, Error>
[src]

fn proven_client_state(
    &self,
    client_id: &ClientId,
    height: Height
) -> Result<(AnyClientState, MerkleProof), Error>
[src]

fn proven_connection(
    &self,
    connection_id: &ConnectionId,
    height: Height
) -> Result<(ConnectionEnd, MerkleProof), Error>
[src]

fn proven_client_consensus(
    &self,
    client_id: &ClientId,
    consensus_height: Height,
    height: Height
) -> Result<(AnyConsensusState, MerkleProof), Error>
[src]

fn build_header(
    &self,
    trusted_height: Height,
    target_height: Height,
    client_state: AnyClientState
) -> Result<AnyHeader, Error>
[src]

fn build_client_state(&self, height: Height) -> Result<AnyClientState, Error>[src]

Constructs a client state at the given height

fn build_consensus_state(
    &self,
    trusted: Height,
    target: Height,
    client_state: AnyClientState
) -> Result<AnyConsensusState, Error>
[src]

Constructs a consensus state at the given height

fn check_misbehaviour(
    &self,
    update: UpdateClient,
    client_state: AnyClientState
) -> Result<Option<AnyMisbehaviour>, Error>
[src]

fn build_connection_proofs_and_client_state(
    &self,
    message_type: ConnectionMsgType,
    connection_id: &ConnectionId,
    client_id: &ClientId,
    height: Height
) -> Result<(Option<AnyClientState>, Proofs), Error>
[src]

fn build_channel_proofs(
    &self,
    port_id: &PortId,
    channel_id: &ChannelId,
    height: Height
) -> Result<Proofs, Error>
[src]

fn build_packet_proofs(
    &self,
    packet_type: PacketMsgType,
    port_id: &PortId,
    channel_id: &ChannelId,
    sequence: Sequence,
    height: Height
) -> Result<(Vec<u8>, Proofs), Error>
[src]

fn query_packet_commitments(
    &self,
    request: QueryPacketCommitmentsRequest
) -> Result<(Vec<PacketState>, Height), Error>
[src]

fn query_unreceived_packets(
    &self,
    request: QueryUnreceivedPacketsRequest
) -> Result<Vec<u64>, Error>
[src]

fn query_packet_acknowledgements(
    &self,
    request: QueryPacketAcknowledgementsRequest
) -> Result<(Vec<PacketState>, Height), Error>
[src]

fn query_unreceived_acknowledgement(
    &self,
    request: QueryUnreceivedAcksRequest
) -> Result<Vec<u64>, Error>
[src]

fn query_txs(&self, request: QueryTxRequest) -> Result<Vec<IbcEvent>, Error>[src]

Trait Implementations

impl Serialize for dyn ChainHandle[src]

fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

Implementors

impl ChainHandle for ProdChainHandle[src]

fn id(&self) -> ChainId[src]

fn subscribe(&self) -> Result<Subscription, Error>[src]

fn send_msgs(&self, proto_msgs: Vec<Any>) -> Result<Vec<IbcEvent>, Error>[src]

fn get_signer(&self) -> Result<Signer, Error>[src]

fn get_key(&self) -> Result<KeyEntry, Error>[src]

fn module_version(&self, port_id: &PortId) -> Result<String, Error>[src]

fn query_latest_height(&self) -> Result<Height, Error>[src]

fn query_clients(
    &self,
    request: QueryClientStatesRequest
) -> Result<Vec<IdentifiedAnyClientState>, Error>
[src]

fn query_client_state(
    &self,
    client_id: &ClientId,
    height: Height
) -> Result<AnyClientState, Error>
[src]

fn query_client_connections(
    &self,
    request: QueryClientConnectionsRequest
) -> Result<Vec<ConnectionId>, Error>
[src]

fn query_consensus_states(
    &self,
    request: QueryConsensusStatesRequest
) -> Result<Vec<AnyConsensusStateWithHeight>, Error>
[src]

fn query_consensus_state(
    &self,
    client_id: ClientId,
    consensus_height: Height,
    query_height: Height
) -> Result<AnyConsensusState, Error>
[src]

fn query_upgraded_client_state(
    &self,
    height: Height
) -> Result<(AnyClientState, MerkleProof), Error>
[src]

fn query_upgraded_consensus_state(
    &self,
    height: Height
) -> Result<(AnyConsensusState, MerkleProof), Error>
[src]

fn query_commitment_prefix(&self) -> Result<CommitmentPrefix, Error>[src]

fn query_compatible_versions(&self) -> Result<Vec<Version>, Error>[src]

fn query_connection(
    &self,
    connection_id: &ConnectionId,
    height: Height
) -> Result<ConnectionEnd, Error>
[src]

fn query_connection_channels(
    &self,
    request: QueryConnectionChannelsRequest
) -> Result<Vec<IdentifiedChannelEnd>, Error>
[src]

fn query_next_sequence_receive(
    &self,
    request: QueryNextSequenceReceiveRequest
) -> Result<Sequence, Error>
[src]

fn query_channels(
    &self,
    request: QueryChannelsRequest
) -> Result<Vec<IdentifiedChannelEnd>, Error>
[src]

fn query_channel(
    &self,
    port_id: &PortId,
    channel_id: &ChannelId,
    height: Height
) -> Result<ChannelEnd, Error>
[src]

fn query_channel_client_state(
    &self,
    request: QueryChannelClientStateRequest
) -> Result<Option<IdentifiedAnyClientState>, Error>
[src]

fn proven_client_state(
    &self,
    client_id: &ClientId,
    height: Height
) -> Result<(AnyClientState, MerkleProof), Error>
[src]

fn proven_connection(
    &self,
    connection_id: &ConnectionId,
    height: Height
) -> Result<(ConnectionEnd, MerkleProof), Error>
[src]

fn proven_client_consensus(
    &self,
    client_id: &ClientId,
    consensus_height: Height,
    height: Height
) -> Result<(AnyConsensusState, MerkleProof), Error>
[src]

fn build_header(
    &self,
    trusted_height: Height,
    target_height: Height,
    client_state: AnyClientState
) -> Result<AnyHeader, Error>
[src]

fn build_client_state(&self, height: Height) -> Result<AnyClientState, Error>[src]

fn build_consensus_state(
    &self,
    trusted: Height,
    target: Height,
    client_state: AnyClientState
) -> Result<AnyConsensusState, Error>
[src]

fn check_misbehaviour(
    &self,
    update_event: UpdateClient,
    client_state: AnyClientState
) -> Result<Option<AnyMisbehaviour>, Error>
[src]

fn build_connection_proofs_and_client_state(
    &self,
    message_type: ConnectionMsgType,
    connection_id: &ConnectionId,
    client_id: &ClientId,
    height: Height
) -> Result<(Option<AnyClientState>, Proofs), Error>
[src]

fn build_channel_proofs(
    &self,
    port_id: &PortId,
    channel_id: &ChannelId,
    height: Height
) -> Result<Proofs, Error>
[src]

fn build_packet_proofs(
    &self,
    packet_type: PacketMsgType,
    port_id: &PortId,
    channel_id: &ChannelId,
    sequence: Sequence,
    height: Height
) -> Result<(Vec<u8>, Proofs), Error>
[src]

fn query_packet_commitments(
    &self,
    request: QueryPacketCommitmentsRequest
) -> Result<(Vec<PacketState>, Height), Error>
[src]

fn query_unreceived_packets(
    &self,
    request: QueryUnreceivedPacketsRequest
) -> Result<Vec<u64>, Error>
[src]

fn query_packet_acknowledgements(
    &self,
    request: QueryPacketAcknowledgementsRequest
) -> Result<(Vec<PacketState>, Height), Error>
[src]

fn query_unreceived_acknowledgement(
    &self,
    request: QueryUnreceivedAcksRequest
) -> Result<Vec<u64>, Error>
[src]

fn query_txs(&self, request: QueryTxRequest) -> Result<Vec<IbcEvent>, Error>[src]