61 个版本
新 0.4.0-dev.14 | 2024年8月23日 |
---|---|
0.4.0-dev.11 | 2024年7月30日 |
0.3.0-beta-dev… | 2024年3月25日 |
0.3.0-beta-dev.5 | 2023年6月28日 |
0.0.115 | 2021年11月12日 |
#331 in 魔法豆
429 每月下载量
用于 hc_cz_profile
23KB
440 行
hc-utils
holochain-rsm 的 util 包
注意:目前 hc-utils 包将始终跟随 hdk 的版本,当 hdk 版本为 1.2.1 时,hc_utils 版本将为 v1.2.1
注意:所有函数都已转换为宏
commit_idempotent
Query for an existing Entry in the local source-chain matching the given EntryType name(s). If one exists, return it Address, otherwise commit it.
create_idempotent_link
Query for an existing Link in the local source-chain matching the given LinkType name(s). If one exists, return it Address, otherwise commit it.
exists
Query for an existing Entry in the local source-chain matching the given EntryType name(s). If one exists, return it Address, otherwise returns error
get_action
Gets the action of an Entry
get_latest_entry
Obtains the updates for the target Entry, and examines all of them to selects the latest one by looking at the update time in its action.
An identical Entry can be committed by multiple Agents; this obtains the Entry's Action from the perspective of _this_ Agent. It also may be committed by the same Agent multiple times, this algorithm depends on either making the Entry unique, _or_ that the caller is OK with it returning the latest Update by any of this Agent's commits of this identical Entry.
get_latest_link
gets latest link created to the specific base
local_source_chain
Returns a list of elements from the local source-chain
remove_link
Removes link. The current hdk expects you to get all links and delete_link by specifying the entry_hash of the entry that you want to delete
wrappers
String wrapper for all holo_hash types
get_details
Get details for a list of links passed using the HDK::borrow functions
get
Get element for a list of links passed using the HDK::borrow functions
宏
get_links_and_load_type!
Gets the entries that are linked to a base with LinkTag by matching with the declared TryFrom Entry.
**Macros:**
- `get_links_and_load_type!(base, tag)`
- `include_latest_updated_entry = true` is used when an entry is updated in the zome and if you need the latest update of those entries
- `get_links_and_load_type!(base, tag, false)`
- `include_latest_updated_entry = false` is used when an entry does not have updates.
版本映射
hc-utils | hdk |
---|---|
v0.0.107 | v0.0.107 |
v0.0.110 | v0.0.110 |
... | ... |
v0.0.111 | v0.0.111 |
v0.0.115 | v0.0.115 |
版权 (C) 2017-2020, Holo Ltd.
本程序是自由软件:您可以在许可证文件(CAL-1.0)所提供的条款下重新分发和/或修改它。本程序是在希望它将是有用的前提下分发的,但没有任何保证;甚至没有关于适销性或适用于特定目的的暗示保证。
依赖关系
~12–26MB
~405K SLoC