pub async fn create_for_zome(
        cell_id: &CellId,
        handle: &ConductorHandle,
        saf_file: &SafFile,
        zome_index: usize,
    ) -> HostFnCaller {
        let env = handle.get_cell_env(cell_id).await.unwrap();
        let cache = handle.get_cache_env(cell_id).await.unwrap();
        let keystore = env.keystore().clone();
        let network = handle
            .aingle_p2p()
            .to_cell(cell_id.saf_hash().clone(), cell_id.agent_pubkey().clone());

        let zome_path = (
            cell_id.clone(),
            saf_file.saf().zomes.get(zome_index).unwrap().0.clone(),
        )
            .into();
        let ribosome = RealRibosome::new(saf_file.clone());
        let signal_tx = handle.signal_broadcaster().await;
        let call_zome_handle =
            CellConductorApi::new(handle.clone(), cell_id.clone()).into_call_zome_handle();
        HostFnCaller {
            env,
            cache,
            ribosome,
            zome_path,
            network,
            keystore,
            signal_tx,
            call_zome_handle,
        }
    }
/// Create HostFnCaller for a specific zome if there are multiple.
Create HostFnCaller for a specific zome if there are multiple.
Create HostFnCaller for a specific zome if there are multiple .
pub async fn create_for_zome(
        cell_id: &CellId,
        handle: &ConductorHandle,
        saf_file: &SafFile,
        zome_index: usize,
    ) -> HostFnCaller {
        let env = handle.get_cell_env(cell_id).await.unwrap();
        let cache = handle.get_cache_env(cell_id).await.unwrap();
        let keystore = env.keystore().clone();
        let network = handle
            .aingle_p2p()
            .to_cell(cell_id.saf_hash().clone(), cell_id.agent_pubkey().clone());
        let zome_path = (
            cell_id.clone(),
            saf_file.saf().zomes.get(zome_index).unwrap().0.clone(),
        )
            .into();
        let ribosome = RealRibosome::new(saf_file.clone());
        let signal_tx = handle.signal_broadcaster().await;
        let call_zome_handle =
            CellConductorApi::new(handle.clone(), cell_id.clone()).into_call_zome_handle();
        HostFnCaller {
            env,
            cache,
            ribosome,
            zome_path,
            network,
            keystore,
            signal_tx,
            call_zome_handle,
        }
    }
pub async fn create_for_zome ( cell_id : & CellId , handle : & ConductorHandle , saf_file : & SafFile , zome_index : usize , ) -> HostFnCaller { let env = handle . get_cell_env ( cell_id ) . await . unwrap ( ) ; let cache = handle . get_cache_env ( cell_id ) . await . unwrap ( ) ; let keystore = env . keystore ( ) . clone ( ) ; let network = handle . aingle_p2p ( ) . to_cell ( cell_id . saf_hash ( ) . clone ( ) , cell_id . agent_pubkey ( ) . clone ( ) ) ; let zome_path = ( cell_id . clone ( ) , saf_file . saf ( ) . zomes . get ( zome_index ) . unwrap ( ) . 0 . clone ( ) , ) . into ( ) ; let ribosome = RealRibosome :: new ( saf_file . clone ( ) ) ; let signal_tx = handle . signal_broadcaster ( ) . await ; let call_zome_handle = CellConductorApi :: new ( handle . clone ( ) , cell_id . clone ( ) ) . into_call_zome_handle ( ) ; HostFnCaller { env , cache , ribosome , zome_path , network , keystore , signal_tx , call_zome_handle , } }
Create HostFnCaller for a specific zome if there are multiple.
Create HostFnCaller for a specific zome if there are multiple .
cell_id
&CellId
handle
&ConductorHandle
saf_file
&SafFile
zome_index
usize
cell_id
&CellId
handle
&ConductorHandle
saf_file
&SafFile
zome_index
usize