Function holochain::test_utils::new_zome_call
source · pub async fn new_zome_call<P, Z: Into<ZomeName>>(
keystore: &MetaLairClient,
cell_id: &CellId,
func: &str,
payload: P,
zome: Z
) -> Result<ZomeCall, SerializedBytesError>where
P: Serialize + Debug,
Expand description
Helper to create a signed zome invocation for tests
Examples found in repository?
src/test_utils.rs (line 896)
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908
pub async fn new_invocation<P, Z: Into<Zome> + Clone>(
keystore: &MetaLairClient,
cell_id: &CellId,
func: &str,
payload: P,
zome: Z,
) -> Result<ZomeCallInvocation, SerializedBytesError>
where
P: serde::Serialize + std::fmt::Debug,
{
let ZomeCall {
cell_id,
cap_secret,
fn_name,
payload,
provenance,
signature,
nonce,
expires_at,
..
} = new_zome_call(keystore, cell_id, func, payload, zome.clone().into()).await?;
Ok(ZomeCallInvocation {
cell_id,
zome: zome.into(),
cap_secret,
fn_name,
payload,
provenance,
signature,
nonce,
expires_at,
})
}