[−][src]Crate hdk
Holochain Development Kit (HDK)
The HDK helps in writing Holochain applications. Holochain DNAs need to be written in WebAssembly, or a language that compiles to Wasm, such as Rust. The HDK handles some of the low-level details of Wasm execution like memory allocation, (de)serializing data, and shuffling data and functions into and out of Wasm memory via some helper functions and Holochain-specific macros.
The HDK lets the developer focus on application logic and, as much as possible, forget about the underlying low-level implementation. It would be possible to write DNA source code without an HDK, but it would be extremely tedious!
Re-exports
pub extern crate serde; |
pub extern crate holochain_core_types; |
pub extern crate holochain_dna; |
pub extern crate holochain_wasm_utils; |
Modules
entry_definition | |
error | |
global_fns | |
globals |
Holds the internal/private globals used by the zome api library. Also contains the functions declarations of the external functions provided by the Ribosome. |
init_globals |
Holds the internal/private zome API function |
macros | |
meta |
Macros
define_zome |
Every Zome must utilize the |
entry |
The |
Structs
AGENT_ADDRESS |
The hash of your public key.
This is your node address on the DHT.
It can be used for node-to-node messaging with |
AGENT_ID_STR |
The identity string used when the chain was first initialized. |
AGENT_INITIAL_HASH |
The hash of the first identity entry on your chain (The second entry on your chain). This is your peer's identity on the DHT. |
DNA_HASH |
The hash of the DNA the Zome is embedded within. This is often useful as a fixed value that is known by all participants running the DNA. |
DNA_NAME |
The |
EntryStatus | |
EntryValidationArgs | |
GetEntryMask | |
ValidationData | |
ValidationPackage |
Enums
BundleOnClose | |
EntryAction | |
EntryLifecycle | |
LinkAction | |
ValidationPackageDefinition |
Functions
call |
Call an exposed function from another zome.
Arguments for the called function are passed as |
close_bundle |
Not Yet Available |
commit_entry |
Attempts to commit an entry to your local source chain. The entry will have to pass the defined validation rules for that entry type. If the entry type is defined as public, will also publish the entry to the DHT. Returns either an address of the committed entry as a string, or an error. |
debug |
Prints a string through the stdout of the running service, and also writes that string to the logger in the execution context |
get_entry |
Retrieves an entry from the local chain or the DHT, by looking it up using its address. |
get_entry_result |
Retrieves an entry and meta data from the local chain or the DHT, by looking it up using its address, and a the full options to specify exactly what data to return |
get_links |
Consumes two values, the first of which is the address of an entry, |
hash_entry |
Reconstructs an address of the given entry data.
This is the same value that would be returned if |
link_entries |
Consumes three values, two of which are the addresses of entries, and one of which is a string that defines a
relationship between them, called a |
property |
Not Yet Available |
query |
Returns a list of entries from your local source chain, that match a given type. |
remove_entry |
Not Yet Available |
send |
Not Yet Available |
sign |
Not Yet Available |
start_bundle |
Not Yet Available |
update_agent |
Not Yet Available |
update_entry |
Not Yet Available |
verify_signature |
Not Yet Available |