pub fn new_invocation<P, Z: Into<Zome>>(
    cell_id: &CellId,
    func: &str,
    payload: P,
    zome: Z,
) -> Result<ZomeCallInvocation, SerializedBytesError>
where
    P: serde::Serialize,
{
    Ok(ZomeCallInvocation {
        cell_id: cell_id.clone(),
        zome: zome.into(),
        cap: Some(CapSecretFixturator::new(Unpredictable).next().unwrap()),
        fn_name: func.into(),
        payload: ExternIO::encode(payload)?,
        provenance: cell_id.agent_pubkey().clone(),
    })
}
/// Helper to create a zome invocation for tests
Helper to create a zome invocation for tests
Helper to create a zome invocation for tests
pub fn new_invocation<P, Z: Into<Zome>>(
    cell_id: &CellId,
    func: &str,
    payload: P,
    zome: Z,
) -> Result<ZomeCallInvocation, SerializedBytesError>
where
    P: serde::Serialize,
{
    Ok(ZomeCallInvocation {
        cell_id: cell_id.clone(),
        zome: zome.into(),
        cap: Some(CapSecretFixturator::new(Unpredictable).next().unwrap()),
        fn_name: func.into(),
        payload: ExternIO::encode(payload)?,
        provenance: cell_id.agent_pubkey().clone(),
    })
}
pub fn new_invocation < P , Z : Into < Zome > > ( cell_id : & CellId , func : & str , payload : P , zome : Z , ) -> Result < ZomeCallInvocation , SerializedBytesError > where P : serde :: Serialize , { Ok ( ZomeCallInvocation { cell_id : cell_id . clone ( ) , zome : zome . into ( ) , cap : Some ( CapSecretFixturator :: new ( Unpredictable ) . next ( ) . unwrap ( ) ) , fn_name : func . into ( ) , payload : ExternIO :: encode ( payload ) ? , provenance : cell_id . agent_pubkey ( ) . clone ( ) , } ) }
Helper to create a zome invocation for tests
Helper to create a zome invocation for tests
cell_id
&CellId
func
&str
payload
P
zome
Z
cell_id
&CellId
func
&str
payload
P
zome
Z