hc_utils 0.5.3

Helper functions for holochain hdk development
Documentation
1
2
3
4
5
6
7
8
9
10
use hdk::prelude::*;

pub fn get_action(entry: EntryHash) -> ExternResult<ActionHash> {
    match get(entry, Default::default())? {
        Some(record) => Ok(record.action_address().to_owned()),
        None => Err(wasm_error!(WasmErrorInner::Guest(
            "Unable to find entry in dht".to_string()
        ))),
    }
}