pub async fn genesis<Ribosome>(
        id: CellId,
        conductor_handle: ConductorHandle,
        cell_env: EnvWrite,
        ribosome: Ribosome,
        membrane_proof: Option<SerializedBytes>,
    ) -> CellResult<()>
    where
        Ribosome: RibosomeT + Send + 'static,
    {
        // get the saf
        let saf_file = conductor_handle
            .get_saf(id.saf_hash())
            .await
            .ok_or_else(|| SafError::SafMissing(id.saf_hash().to_owned()))?;

        let conductor_api = CellConductorApi::new(conductor_handle, id.clone());

        // run genesis
        let workspace = GenesisWorkspace::new(cell_env.clone())
            .map_err(ConductorApiError::from)
            .map_err(Box::new)?;

        let args = GenesisWorkflowArgs::new(
            saf_file,
            id.agent_pubkey().clone(),
            membrane_proof,
            ribosome,
        );

        genesis_workflow(workspace, conductor_api, args)
            .await
            .map_err(Box::new)
            .map_err(ConductorApiError::from)
            .map_err(Box::new)?;
        Ok(())
    }
/// Performs the Genesis workflow the Cell, ensuring that its initial
/// elements are committed. This is a prerequisite for any other interaction
/// with the SourceChain
Performs the Genesis workflow the Cell, ensuring that its initial
elements are committed. This is a prerequisite for any other interaction
with the SourceChain
Performs the Genesis workflow the Cell ensuring that its initial elements are committed . This is a prerequisite for any other interaction with the SourceChain
pub async fn genesis<Ribosome>(
        id: CellId,
        conductor_handle: ConductorHandle,
        cell_env: EnvWrite,
        ribosome: Ribosome,
        membrane_proof: Option<SerializedBytes>,
    ) -> CellResult<()>
    where
        Ribosome: RibosomeT + Send + 'static,
    {
        // get the saf
        let saf_file = conductor_handle
            .get_saf(id.saf_hash())
            .await
            .ok_or_else(|| SafError::SafMissing(id.saf_hash().to_owned()))?;
        let conductor_api = CellConductorApi::new(conductor_handle, id.clone());
        // run genesis
        let workspace = GenesisWorkspace::new(cell_env.clone())
            .map_err(ConductorApiError::from)
            .map_err(Box::new)?;
        let args = GenesisWorkflowArgs::new(
            saf_file,
            id.agent_pubkey().clone(),
            membrane_proof,
            ribosome,
        );
        genesis_workflow(workspace, conductor_api, args)
            .await
            .map_err(Box::new)
            .map_err(ConductorApiError::from)
            .map_err(Box::new)?;
        Ok(())
    }
pub async fn genesis < Ribosome > ( id : CellId , conductor_handle : ConductorHandle , cell_env : EnvWrite , ribosome : Ribosome , membrane_proof : Option < SerializedBytes > , ) -> CellResult < ( ) > where Ribosome : RibosomeT + Send + ' static , { // get the saf let saf_file = conductor_handle . get_saf ( id . saf_hash ( ) ) . await . ok_or_else ( | | SafError :: SafMissing ( id . saf_hash ( ) . to_owned ( ) ) ) ? ; let conductor_api = CellConductorApi :: new ( conductor_handle , id . clone ( ) ) ; // run genesis let workspace = GenesisWorkspace :: new ( cell_env . clone ( ) ) . map_err ( ConductorApiError :: from ) . map_err ( Box :: new ) ? ; let args = GenesisWorkflowArgs :: new ( saf_file , id . agent_pubkey ( ) . clone ( ) , membrane_proof , ribosome , ) ; genesis_workflow ( workspace , conductor_api , args ) . await . map_err ( Box :: new ) . map_err ( ConductorApiError :: from ) . map_err ( Box :: new ) ? ; Ok ( ( ) ) }
Performs the Genesis workflow the Cell, ensuring that its initial
elements are committed.
Performs the Genesis workflow the Cell ensuring that its initial elements are committed .
id
CellId
conductor_handle
ConductorHandle
cell_env
EnvWrite
ribosome
Ribosome
membrane_proof
Option<SerializedBytes>
id
CellId
conductor_handle
ConductorHandle
cell_env
EnvWrite
ribosome
Ribosome
membrane_proof
Option<SerializedBytes>