Crate holochain_zome_types[][src]

Expand description

Holochain Zome Types: only the types needed by Holochain application developers to use in their Zome code, and nothing more.

This crate is intentionally kept as minimal as possible, since it is typically included as a dependency in Holochain Zomes, which are distributed as chunks of Wasm. In contrast, the holochain_types crate contains more types which are used by Holochain itself.


pub use kitsune_p2p_timestamp as timestamp;
pub use entry::Entry;
pub use header::Header;
pub use prelude::*;


represent arbitrary bytes (not serialized) e.g. totally random crypto bytes from random_bytes

Capability Grants and Claims

A “Cell” represents a DNA/AgentId pair - a space where one dna/agent can track its source chain and service network requests / responses.

Countersigned entries involve preflights between many agents to build a session that is part of the entry.

Re-exported dependencies

Defines DnaDef struct

Defines a Element, the basic unit of Holochain data.

An Entry is a unit of data in a Holochain Source Chain.

Fixturators for zome types

Types related to the genesis process whereby a user commits their initial elements and validates them to the best of their ability. Full validation may not be possible if network access is required, so they perform a “self-check” (as in “check yourself before you wreck yourself”) before joining to ensure that they can catch any problems they can before being subject to the scrutiny of their peers and facing possible rejection.

Wrapper type to indicate some data which has a ValidationStatus associated with it.

Metadata types for use in wasm

Common types

Types for source chain queries

Types for requesting metadata

Schedule functions to run outside a direct zome call.

App-defined signals

Signature for authenticity of data

Common helpers for writing tests against zome types

Types related to the debug host function

Tracking versions between the WASM host and guests and other interfaces.

Types for warrants

A Zome is a module of app-defined code which can be run by Holochain. A group of Zomes are composed to form a DnaDef.


Serialization for fixed arrays is generally not available in a way that can be derived. Being able to wrap fixed size arrays is important e.g. for crypto safety etc. so this is a simple way to implement serialization so that we can send these types between the host/guest.

Helper macro for implementing ToSql, when using rusqlite as a dependency

Helper macro for implementing ToSql, when using rusqlite as a dependency

Cryptographic secrets are fiddly at the best of times.


Errors related to the secure primitive macro.


10MB of entropy free for the taking. Useful for initializing arbitrary::Unstructured data