pub async fn msg_create_solo_machine_client(
    signer: impl Signer,
    chain: &Chain,
    memo: String,
    request_id: Option<&str>,
) -> Result<TxRaw> {
    let any_public_key = signer.to_public_key()?.to_any()?;

    let consensus_state = SoloMachineConsensusState {
        public_key: Some(any_public_key),
        diversifier: chain.config.diversifier.clone(),
        timestamp: to_u64_timestamp(chain.consensus_timestamp)?,
    };
    let any_consensus_state = consensus_state.to_any()?;

    let client_state = SoloMachineClientState {
        sequence: chain.sequence.into(),
        #[cfg(not(feature = "solomachine-v2"))]
        frozen_sequence: 0,
        #[cfg(feature = "solomachine-v2")]
        is_frozen: false,
        consensus_state: Some(consensus_state),
        allow_update_after_proposal: true,
    };
    let any_client_state = client_state.to_any()?;

    let message = MsgCreateClient {
        client_state: Some(any_client_state),
        consensus_state: Some(any_consensus_state),
        signer: signer.to_account_address()?,
    };

    build(signer, chain, &[message], memo, request_id).await
}
/// Builds a transaction to create a solo machine client on IBC enabled chain
Builds a transaction to create a solo machine client on IBC enabled chain
Builds a transaction to create a solo machine client on IBC enabled chain
pub async fn msg_create_solo_machine_client(
    signer: impl Signer,
    chain: &Chain,
    memo: String,
    request_id: Option<&str>,
) -> Result<TxRaw> {
    let any_public_key = signer.to_public_key()?.to_any()?;
    let consensus_state = SoloMachineConsensusState {
        public_key: Some(any_public_key),
        diversifier: chain.config.diversifier.clone(),
        timestamp: to_u64_timestamp(chain.consensus_timestamp)?,
    };
    let any_consensus_state = consensus_state.to_any()?;
    let client_state = SoloMachineClientState {
        sequence: chain.sequence.into(),
        #[cfg(not(feature = "solomachine-v2"))]
        frozen_sequence: 0,
        #[cfg(feature = "solomachine-v2")]
        is_frozen: false,
        consensus_state: Some(consensus_state),
        allow_update_after_proposal: true,
    };
    let any_client_state = client_state.to_any()?;
    let message = MsgCreateClient {
        client_state: Some(any_client_state),
        consensus_state: Some(any_consensus_state),
        signer: signer.to_account_address()?,
    };
    build(signer, chain, &[message], memo, request_id).await
}
pub async fn msg_create_solo_machine_client ( signer : impl Signer , chain : & Chain , memo : String , request_id : Option < & str > , ) -> Result < TxRaw > { let any_public_key = signer . to_public_key ( ) ? . to_any ( ) ? ; let consensus_state = SoloMachineConsensusState { public_key : Some ( any_public_key ) , diversifier : chain . config . diversifier . clone ( ) , timestamp : to_u64_timestamp ( chain . consensus_timestamp ) ? , } ; let any_consensus_state = consensus_state . to_any ( ) ? ; let client_state = SoloMachineClientState { sequence : chain . sequence . into ( ) , # [ cfg ( not ( feature " " ) ) ] frozen_sequence : 0 , # [ cfg ( feature " " ) ] is_frozen : false , consensus_state : Some ( consensus_state ) , allow_update_after_proposal : true , } ; let any_client_state = client_state . to_any ( ) ? ; let message = MsgCreateClient { client_state : Some ( any_client_state ) , consensus_state : Some ( any_consensus_state ) , signer : signer . to_account_address ( ) ? , } ; build ( signer , chain , & [ message ] , memo , request_id ) . await }
Builds a transaction to create a solo machine client on IBC enabled chain
Builds a transaction to create a solo machine client on IBC enabled chain
signer
impl Signer
chain
&Chain
memo
String
request_id
Option<&str>
signer
impl Signer
chain
&Chain
memo
String
request_id
Option<&str>