pub fn build_create_client(&self) -> Result<MsgCreateAnyClient, ForeignClientError> {
        // Get signer
        let signer = self.dst_chain.get_signer().map_err(|e| {
            ForeignClientError::ClientCreate(format!(
                "failed while fetching the destination chain ({}) signer: {}",
                self.dst_chain.id(),
                e
            ))
        })?;

        // Build client create message with the data from source chain at latest height.
        let latest_height = self.src_chain.query_latest_height().map_err(|e| {
            ForeignClientError::ClientCreate(format!(
                "failed while querying src chain ({}) for latest height: {}",
                self.src_chain.id(),
                e
            ))
        })?;

        let client_state = self
            .src_chain
            .build_client_state(latest_height)
            .map_err(|e| {
                ForeignClientError::ClientCreate(format!(
                    "failed while building client state from src chain ({}) with error: {}",
                    self.src_chain.id(),
                    e
                ))
            })?
            .wrap_any();

        let consensus_state = self.src_chain
            .build_consensus_state(client_state.latest_height(),  latest_height, client_state.clone())
            .map_err(|e| ForeignClientError::ClientCreate(format!("failed while building client consensus state from src chain ({}) with error: {}", self.src_chain.id(), e)))?
            .wrap_any();

        //TODO Get acct_prefix
        let msg = MsgCreateAnyClient::new(client_state, consensus_state, signer).map_err(|e| {
            ForeignClientError::ClientCreate(format!(
                "failed while building the create client message: {}",
                e
            ))
        })?;

        Ok(msg)
    }
/// Lower-level interface for preparing a message to create a client.
Lower-level interface for preparing a message to create a client.
Lower - level interface for preparing a message to create a client .
pub fn build_create_client(&self) -> Result<MsgCreateAnyClient, ForeignClientError> {
        // Get signer
        let signer = self.dst_chain.get_signer().map_err(|e| {
            ForeignClientError::ClientCreate(format!(
                "failed while fetching the destination chain ({}) signer: {}",
                self.dst_chain.id(),
                e
            ))
        })?;
        // Build client create message with the data from source chain at latest height.
        let latest_height = self.src_chain.query_latest_height().map_err(|e| {
            ForeignClientError::ClientCreate(format!(
                "failed while querying src chain ({}) for latest height: {}",
                self.src_chain.id(),
                e
            ))
        })?;
        let client_state = self
            .src_chain
            .build_client_state(latest_height)
            .map_err(|e| {
                ForeignClientError::ClientCreate(format!(
                    "failed while building client state from src chain ({}) with error: {}",
                    self.src_chain.id(),
                    e
                ))
            })?
            .wrap_any();
        let consensus_state = self.src_chain
            .build_consensus_state(client_state.latest_height(),  latest_height, client_state.clone())
            .map_err(|e| ForeignClientError::ClientCreate(format!("failed while building client consensus state from src chain ({}) with error: {}", self.src_chain.id(), e)))?
            .wrap_any();
        //TODO Get acct_prefix
        let msg = MsgCreateAnyClient::new(client_state, consensus_state, signer).map_err(|e| {
            ForeignClientError::ClientCreate(format!(
                "failed while building the create client message: {}",
                e
            ))
        })?;
        Ok(msg)
    }
pub fn build_create_client ( & self ) -> Result < MsgCreateAnyClient , ForeignClientError > { // Get signer let signer = self . dst_chain . get_signer ( ) . map_err ( | e | { ForeignClientError :: ClientCreate ( format ! ( " " self dst_chain id ( ) e ) ) } ) ? ; // Build client create message with the data from source chain at latest height. let latest_height = self . src_chain . query_latest_height ( ) . map_err ( | e | { ForeignClientError :: ClientCreate ( format ! ( " " self src_chain id ( ) e ) ) } ) ? ; let client_state = self . src_chain . build_client_state ( latest_height ) . map_err ( | e | { ForeignClientError :: ClientCreate ( format ! ( " " self src_chain id ( ) e ) ) } ) ? . wrap_any ( ) ; let consensus_state = self . src_chain . build_consensus_state ( client_state . latest_height ( ) , latest_height , client_state . clone ( ) ) . map_err ( | e | ForeignClientError :: ClientCreate ( format ! ( " " self src_chain id ( ) e ) ) ) ? . wrap_any ( ) ; //TODO Get acct_prefix let msg = MsgCreateAnyClient :: new ( client_state , consensus_state , signer ) . map_err ( | e | { ForeignClientError :: ClientCreate ( format ! ( " " e ) ) } ) ? ; Ok ( msg ) }
Lower-level interface for preparing a message to create a client.
Lower - level interface for preparing a message to create a client .
&self
&self