#holochain #hdk #holo #hdk-helpers

hc_utils

Helper functions for holochain hdk development

68 releases

0.4.1 Feb 6, 2025
0.4.0 Dec 18, 2024
0.4.0-rc.0 Nov 14, 2024
0.4.0-dev.11 Jul 30, 2024
0.0.115 Nov 12, 2021

#2 in #hdk

Download history 35/week @ 2024-11-16 36/week @ 2024-11-23 31/week @ 2024-11-30 134/week @ 2024-12-07 407/week @ 2024-12-14 38/week @ 2024-12-21 7/week @ 2025-01-11 32/week @ 2025-01-18 103/week @ 2025-01-25 193/week @ 2025-02-01 73/week @ 2025-02-08 37/week @ 2025-02-15 69/week @ 2025-02-22 162/week @ 2025-03-01

408 downloads per month
Used in hc_cz_profile

Apache-2.0

21KB
425 lines

hc-utils

A util crate for holochain

Note: Currently the hc-utils crate will always follow the version of hdk, when hdk version is 1.2.1, hc_utils version will be v1.2.1 Note: all the functions are converted to macros

Helper Functions

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.
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
gets latest link created to the specific base

local_source_chain

Returns a list of elements from the local source-chain
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
Gets the entries that are linked to a base with LinkTag by matching with the declared TryFrom Entry.

Map versions:

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

License: CAL 1.0

Copyright (C) 2017-2020, Holo Ltd.

This program is free software: you can redistribute it and/or modify it under the terms of the license provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Dependencies

~7–15MB
~193K SLoC