Module holochain::prelude

source ·

Re-exports

pub use holo_hash;

Modules

Data structures to be stored in the agent/peer database.
Normalized, validated representation of the App Manifest.
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.
Defines the structure of the DHT, the objects which inhabit it, and the operations on these objects.
Defines DnaDef struct
Include nice string encoding methods and From impls
An Entry is a unit of data in a Holochain Source Chain.
ffs - the Friendly Filesystem
Fixturator definitions for kitsune_p2p.
Various gossip strategies for Kitsune.
Defines the prefixes for the various HashTypes, as well as the traits which unify them
Items related to the DNA initialization callback.
A variant of Zome which is defined entirely by native, inline Rust code
Wrapper type to indicate some data which has a ValidationStatus associated with it.
P2p / dht communication framework.
Metadata types for use in wasm
metrics tracked by kitsune_p2p spaces
Tools for simulating a network around real holochain nodes. This is a very early prototype and subject to change.
Common types
Utilities to make kitsune testing a little more sane.
crate::dna::wasm is a module for managing webassembly code
KitsuneP2p Wire Protocol Encoding Decoding

Macros

Helper for ensuring the the proper number of bytes is used in various situations
unidiomatic way to derive default trait implementations of TryFrom in/out of SerializedBytes
A default HashableContent implementation, suitable for content which is already TryInto<SerializedBytes>, and uses a PrimitiveHashType
Helper macro for implementing ToSql, when using rusqlite as a dependency
Helper macro for implementing ToSql, when using rusqlite as a dependency
Boilerplate shortcut for implementing TestVal on an item

Structs

A simple wrapper around the AdaptorFactory to allow implementing Debug and PartialEq.
An agents chain records returned from a agent_activity_query
An agents chain records returned from a agent_activity_query
The struct containing all information about the executing agent’s identity.
Action for an agent validation package, used to determine whether an agent is allowed to participate in this DNA
A bundle of an AppManifest and collection of DNAs
a curve to spit out Entry::App values
Newtype for the bytes comprising an App entry
Information about a class of Entries provided by the DNA
The location of an app entry definition.
Identifier for an entry definition. This may be removed.
Version 1 of the App manifest schema
Normalized, validated representation of the App Manifest.
App “roles” correspond to cell entries in the AppManifest.
The DNA portion of an app role
Description of an app “role” defined by this app. Roles get filled according to the provisioning rules, as well as by potential runtime clones.
The answer to the question: “how do we concretely assign DNAs to the open roles of this App?” Includes the DNAs selected to fill the roles and the details of the role assignments.
A signal emitted by an app via emit_signal
System entry to hold a capability token claim for use as a caller. Stored by a claimant so they can remember what’s necessary to exercise this capability by sending the secret to the grantor.
A CapSecret is used by a caller to prove to a callee access to a committed CapGrant.
The unique identifier for a Cell. Cells are uniquely determined by this pair - this pair is necessary and sufficient to refer to a cell in a conductor
Filter source chain items. Starting from some chain position given as an ActionHash the chain is walked backwards to genesis. The filter can stop early by specifying the number of chain items to take and / or an ActionHash to consume until.
Iterate over a source chain and apply the ChainFilter to each element. This iterator will:
A ChainFilter with the action sequences for the starting position and any until hashes.
The chain has been forked by these two actions
The action at the head of the complete chain. This is as far as this authority can see a chain with no gaps.
Specifies arguments to a query of the source chain, including ordering and filtering.
Identifier of a clone cell, composed of the DNA’s role name and the index of the clone, starting at 0.
When migrating to a new version of a DNA, this action is committed to the old chain to declare the migration path taken. Currently unused
A bundle of coordinator zomes.
Coordinator zomes.
A type marker for a coordinator InlineZome.
Every countersigning agent must sign against their chain state. The chain must be frozen until each agent decides to sign or exit the session.
All the data required for a countersigning session.
Every countersigning session must complete a full set of actions between the start and end times to be valid.
A action which “speaks” Entry content into being. The same content can be referenced by multiple such actions.
Base data for Create actions.
The arguments to create a clone of an existing cell.
Zome input to create an entry.
Declares that a metadata Link should be made between two EntryHashes
Zome IO inner type for link creation.
@todo Ability to forcibly curry payloads into functions that are called with a claim.
Path to persistence storage.
Specifies the environment used for authoring data by all cells on the same DnaHash.
Specifies the environment used by each Cache (one per dna).
Specifies the environment used by a Conductor
Specifies the environment used for dht data by all cells on the same DnaHash.
Specifies the environment used to witness nonces.
State of the p2p network (one per space).
Metrics for peers on p2p network (one per space).
Specifies the environment used to save wasm
A read-only version of DbWrite. This environment can only generate read-only transactions, never read-write.
The canonical representation of a (singleton) database. The wrapper contains methods for managing transactions and database connections,
Declare that a previously published Action should be nullified and considered deleted.
Placeholder for future when we want to have deletes on actions Not currently in use.
Zome input for all delete operations.
Declares that a previously made Link should be nullified and considered removed.
Query arguments for the deterministic version of GetAgentActivity
Arguments to specify the clone cell to be disabled.
The Dna Action is always the first action in a source chain
A bundle of Wasm zomes, respresented as a file.
The definition of a DNA: the hash of this data is what produces the DnaHash.
Builder for DnaDef.
Represents a full DNA, including DnaDef and WebAssembly bytecode.
Representation of all DNAs and Cells available in a given context. When given a DnaVersionSpec, a particular DNA can be selected from this gamut.
Information about the current DNA.
The structure of data that goes in the DNA bundle manifest “dna.yaml”.
The structure of data that goes in the DNA bundle manifest “dna.yaml”.
Modifiers of this DNA - the network seed, properties and origin time - as opposed to the actual DNA code. These modifiers are included in the DNA hash computation.
DnaModifiers options of which all are optional.
We don’t have any notion of DNA versioning other than the hash, but this is a placeholder to indicate the need for it in the future and to start using it in public interfaces.
Defines a criterion for a DNA version to match against.
Represents web assembly code.
An inline zome clonable type object.
All entry data common to an get entry request.
Key for the EntryDef buffer
All definitions for all entry types in an integrity zome.
An Entry with all its metadata.
A newtype for a collection of EntryHashes, needed for some wasm return types.
Combination of the three main rate limiting data types, for convenience
The output of ephemeral signing. The private key for this public key has been discarded by this point. The signatures match the public key provided but cannot be reproduced or forged because the private key no longer exists. The signatures match the input items positionally in the vector, it is up to the caller to reconstruct/align/zip them back together.
A single function name.
Data passed into the genesis_self_check callback for verifying the initial chain entries
Zome input for get and get_details calls.
Link response to get links
Options for controlling how get works
Parameters for granting a zome call capability.
256 Bit generic hash.
512 Bit generic hash.
The highest action sequence observed by this authority. This also includes the actions at this sequence. If there is more then one then there is a fork.
A HoloHash contains a vector of 36 bytes representing a 32-byte blake2b hash plus 4 bytes representing a DHT location. It also contains a zero-sized type which specifies what it is a hash of.
A wrapper around HoloHash that Serializes into a base64 string rather than a raw byte array.
Represents some piece of content along with its hash representation, so that hashes need not be calculated multiple times. Provides an easy constructor which consumes the content.
A wrapper around HolochainP2pSender that partially applies the dna_hash / agent_pub_key. I.e. a sender that is tied to a specific cell.
Access a call has to host functions
Dummy host impl for plumbing
A action which declares that all zome init functions have successfully completed, and the chain is ready for commits. Contains no explicit data.
An “inline” zome definition in pure Rust, as opposed to a zome defined in Wasm.
A set of inline integrity and coordinator zomes.
Information needed to specify a DNA as part of an App
An app which has been installed. An installed app is merely its collection of “roles”, associated with an ID.
The common data between apps of any status
Data about an installed Cell.
Manifest for all items that will change the DnaHash.
A type marker for an integrity InlineZome.
Data with an optional validation status.
Distinguish multiple agents within the same network module.
The basis hash/coordinate when identifying a neighborhood.
Data and handlers for diagnostic info, to be used by the host.
The op data with its location
Top-level “KitsuneDataHash” items are buckets of related meta-data. These metadata “Operations” each also have unique OpHashes.
Configure the kitsune actor.
A cryptographic signature.
Distinguish multiple categories of communication within the same network module.
CreateLinks with and DeleteLinks on them [CreateLink, [DeleteLink]]
Opaque tag for the link applied at the app layer, used to differentiate between different semantics and validation rules for different links
Metadata that can be requested on a basis
Metadata returned from a GetMeta request. The Ord derive on TimedActionHash means each set is ordered by time.
A wrapper around HolochainP2pSender that partially applies the dna_hash / agent_pub_key. I.e. a sender that is tied to a specific cell.
Zome input for must_get_action.
Input to the must_get_agent_activity call.
Zome input for must_get_entry.
Zome input for must_get_valid_record.
The instructions on how to request NetworkInfo
256 Bit generic nonce.
This is used as an index for ordering ops in our database. It gives the most likely ordering where dependencies will come first.
When migrating to a new version of a DNA, this action is committed to the new chain to declare the migration path taken. Currently unused
Every preflight request can have optional arbitrary bytes that can be agreed to.
The same PreflightRequest is sent to every agent. Each agent signs this data as part of their PreflightResponse. Every preflight must be identical and signed by every agent for a session to be valid.
Every agent must send back a preflight response. All the preflight response data is signed by each agent and included in the session data.
A curve to make actions have public entry types
Specifies arguments to a query of the source chain, including ordering and filtering.
Combination of two rate limiting data types, for convenience
This type gives full metadata that can be combined monotonically with other metadata and the actual data
a chain record containing the signed action along with the entry if the action type has one.
A specific Record with any updates and deletes. This is all the metadata available for a record.
A group of records with a common entry
Record with it’s status
Registers a new Action on an agent source chain. This is the act of creating any Action and publishing it to the DHT.
Registers a link between two Entrys. This is the act of creating a Action::CreateLink and publishing it to the DHT. The authority is the entry authority for the base Entry.
Registers a deletion of an instance of an Entry in the DHT. This is the act of creating a Action::Delete and publishing it to the DHT.
Deletes a link between two Entrys. This is the act of creating a Action::DeleteLink and publishing it to the DHT. The delete always references a specific Action::CreateLink.
The instructions on how to get the DNA to be registered
Registers an update from an instance of an Entry in the DHT. This is the act of creating a Action::Update and publishing it to the DHT. Note that the Action::Update stores an new instance of an Entry and registers it as an update to the original Entry. This operation is only concerned with registering the update.
Remote signal many agents without waiting for responses.
The data rendered from a wire op to place in the database.
The full data for insertion into the database. The reason we don’t use DhtOp is because we don’t want to clone the entry for every action.
The number of validations required for an entry to be considered published.
Agents can have a role specific to each countersigning session. The role is app defined and opaque to the subconscious.
An active app
A fully qualified scheduled function.
A type with the zome that it is defined in.
zome types that are in scope for the calling zome.
The set of EntryDefIndex and LinkTypes in scope for the calling zome.
A Canonical Serialized Bytes representation for data If you have a data structure that needs a canonical byte representation use this Always round-trip through SerializedBytes via. a single TryFrom implementation. This ensures that the internal bytes of SerializedBytes are indeed canonical. The corrolary is that if bytes are NOT wrapped in SerializedBytes we can assume they are NOT canonical. Typically we need a canonical serialization when data is to be handled at the byte level by independently implemented and maintained systems.
Input structure for creating a signature.
Ephemerally sign a vector of bytes (i.e. a Vec<Vec<u8>>) Each of the items of the outer vector represents something to sign and will have a corresponding Signature in the output. The public key for the ephemeral operation will be returned in the output. Structurally mirrors/complements the Signature struct as a new type. There we know the key on the input side, here we receive the key on the output.
The raw bytes of a signature.
A combination of an action and its signature.
Any content that has been hashed and signed.
An app which is either Paused or Disabled, i.e. not Running
Stores a new Entry in the DHT. This is the act of creating a either a Action::Create or a Action::Update and publishing it to the DHT. These actions create a new instance of an Entry.
Stores a new Record in the DHT. This is the act of creating a new Action and publishing it to the DHT. Note that not all Actions contain an Entry.
Timestamp of when the action was created with the actions hash.
A microsecond-precision UTC timestamp for use in Holochain’s actions.
Representation of message to be logged via the debug host function
UnsafeBytes the only way to implement a custom round trip through bytes for SerializedBytes It is intended to be an internal implementation in TryFrom implementations The assumption is that any code using UnsafeBytes is NOT valid messagepack data This allows us to enforce that all data round-tripping through SerializedBytes is via TryFrom and also allow for custom non-messagepack canonical representations of data types.
A action which specifies that some new Entry content is intended to be an update to some old Entry.
Placeholder for future when we want to have updates on actions Not currently in use.
Base data for Update actions.
The instructions on how to update coordinators for a dna file.
Zome input type for all update operations.
A dna manifest that has been successfully validated.
Type for sending responses to get_validation_package
Mirror struct for Sign that includes a signature to verify against a key and data.
Placeholder for warrant type
Wasms need to be an ordered map from WasmHash to a wasm::DnaWasm
A zome defined by Wasm bytecode
A action of one of the two types that create a new entry.
The minimum unique data for Create actions that share a common entry
Condensed version of a CreateLink
Condensed version of a DeleteLink
Struct for encoding DhtOp as bytes.
Condensed data needed for a get entry request.
Link key for sending across the wire for get links requests.
Condensed link ops for sending across the wire in response to get links.
Record without the hashes for sending across the network TODO: Remove this as it’s no longer needed.
A condensed version of get record request. This saves bandwidth by removing duplicated and implied data.
The minimum unique data for Update actions that share a common entry
This type is used when sending updates from the original entry authority to someone asking for metadata on that original entry.
Data that can be encrypted with secretbox.
Key refs represent shared secrets stored in the keystore. They can either be user-specified, or auto-generated at time of secret creation, or ingestion.
A type to allow json values to be used as SerializedBytes
A Holochain Zome. Includes the ZomeDef as well as the name of the Zome.
The entry for the ZomeCall capability grant. This data is committed to the callee’s source chain as a private entry. The remote calling agent must provide a secret and we source their pubkey from the active network connection. This must match the strictness of the CapAccess.
Zome calls need to be signed regardless of how they are called. This defines exactly what needs to be signed.
Manifest for integrity zomes that another zome depends on.
The index into the ZomeIndex vec.
this id is an internal reference, which also serves as a canonical ordering for zome initialization. The value should be auto-generated from the Zome Bundle def
The properties of the current dna/zome being called.
Manifest for an individual Zome
ZomeName as a String.
A key to the ScopedZomeTypes container.

Enums

Action contains variants for each type of action.
Enum to mirror Action for all the shared data required to build session actions. Does NOT hold any agent specific information.
A unit enum which just maps onto the different Action variants, without containing any extra data
Get either the full activity or just the status of the chain
The primitive hash types represented by this composite hash
The primitive hash types represented by this composite hash
Errors occurring while installing an AppBundle
The possible locations of an AppBundle
Container struct which uses the manifest_version field to determine which manifest version to deserialize to.
Rules to determine if and how a Cell will be created for this Dna
The status of an installed app.
A declaration of the side effects of a particular AppStatusTransition.
The AppStatus without the reasons.
Represents a state transition operation from one state to another
The various processes which run “autonomically”, aka subconsciously. These are currently not used.
Represents access requirements for capability grants.
Represents a potentially valid access grant to a zome call. Zome call response will be Unauthorized without a valid grant.
Rules to determine if and how a Cell will be created for this Dna
Uninhabitable placeholder
Specifies what step should be taken to provision a cell while installing an App
Possible results of Cell resolution
Specify which Actions to allow through this filter.
The type of agent activity returned in this request
Defines several ways that queries can be restricted to a range. Notably hash bounded ranges disambiguate forks whereas sequence indexes do not as the same position can be found in many forks. The reason that this does NOT use native rust range traits is that the hash bounded queries MUST be inclusive otherwise the integrity and fork disambiguation logic is impossible. An exclusive range bound that does not include the final action tells us nothing about which fork to select between N forks of equal length that proceed it. With an inclusive hash bounded range the final action always points unambiguously at the “correct” fork that the range is over. Start hashes are not needed to provide this property so ranges can be hash terminated with a length of preceeding records to return only. Technically the seq bounded ranges do not imply any fork disambiguation and so could be a range but for simplicity we left the API symmetrical in boundedness across all enum variants. @TODO It may be possible to provide/implement RangeBounds in the case that a full sequence of records/actions is provided but it would need to be handled as inclusive first, to enforce the integrity of the query, then the exclusiveness achieved by simply removing the final record after the fact.
Status of the agent activity chain
Ways of specifying a clone cell.
Errors during conversion from RoleName to CloneId.
The source of coordinators to be installed, either as binary data, or from a path
Errors related to the secure primitive macro.
The various types of database, used to specify the list of databases to initialize
The sqlite synchronous level. Corresponds to the PRAGMA synchronous pragma. See sqlite documentation.
The strategy for database file system synchronization. Some databases like the cache can be safely rebuilt if corruption occurs due to using the faster DbSyncLevel::Off.
Return type for get_details calls. ActionHash returns a Record. EntryHash returns an Entry.
A unit of DHT gossip. Used to notify an authority of new (meta)data to hold as well as changes to the status of already held data.
A type for storing in databases that don’t need the actual data. Everything is a hash of the type except the signatures.
This enum is used to
The reason for an app being in a Disabled state.
Holochain DnaError type.
The enum which encompasses all versions of the DNA manifest, past and present.
Possible results of DNA resolution
The source of the DNA to be installed, either as binary data, or from a path
Allow the DNA version to be specified as a single hash, rather than a singleton list. Just a convenience.
Structure holding the entry portion of a chain record.
Either a Action::Create or a Action::Update. These actions both create a new instance of an Entry.
Either an EntryDefIndex or one of:
The status of an Entry in the Dht
Errors involving app entry creation
Allows Actions which reference Entries to know what type of Entry it is referencing. Useful for examining Actions without needing to fetch the corresponding Entries.
Responses from a dht get. These vary is size depending on the level of metadata required
Describes the get call and what information the caller is concerned about. This helps the subconscious avoid unnecessary network calls.
The type of gossip module running this gossip.
A collection of zome/function pairs
Input to holochain hash function.
Output from the holochain hashing host function.
HashableContent can be expressed as “content”, or “prehashed”, which affects how a HoloHashed type will be constructed from it.
Error type for Holochain P2p.
Anything that can go wrong while calling a HostFnApi method
A human-readable timestamp which is represented/serialized as an RFC3339 when possible, and a microsecond integer count otherwise. Both representations can be deserialized to this type.
The result of the DNA initialization callback.
Some blank entry types to use for testing.
KitsuneP2p Error Type.
Maps directly to the tracing Levels but here to define the interface. See https://docs.rs/tracing-core/0.1.17/tracing_core/struct.Level.html
How do we match this link in queries?
Filter on a set of LinkTypes.
Response to a must_get_agent_activity call.
Method for connecting to other peers and broadcasting our AgentInfo
A action of one of the two types that create a new entry.
Same as NewEntryAction but takes actions as reference
These are the operations that can be applied to Holochain data. Every Action produces a set of operations. These operations are each sent to an authority for validation.
Data specific to the Op::RegisterAgentActivity operation.
Data specific to the Op::RegisterDelete operation.
Data specific to the Op::StoreEntry operation.
Type for deriving ordering of DhtOps Don’t change the order of this enum unless you mean to change the order we process ops
Data specific to the Op::StoreRecord operation.
A convenience type for validation Ops.
Data specific to the Op::RegisterUpdate operation.
The reason for an app being in a Paused state. NB: there is no way to manually pause an app.
Permission granted to a call
A preflight request can be accepted, or invalid, or valid but the local agent cannot accept it.
Whether we are willing to proxy on behalf of others
Proxy configuration options
Represents the different ways the entry_address reference within an action can be intepreted
The level of validation package required by an entry.
Defines either a persisted or ephemeral schedule for a schedule function. Persisted schedules survive a conductor reboot, ephemeral will not. Persisted schedules continue beyond irrecoverable errors, ephemeral do not.
Scheduling errors.
Outcome of trying to find the action sequences in a filter.
A Signal is some information emitted from within Holochain out through an Interface
The various reasons for why an App is not in the Running state.
A Signal which originates from within the Holochain system, as opposed to from within a Cell
Configure the network bindings for underlying kitsune transports.
Unresolved dependencies that are either a set of hashes or an agent activity query.
The validation status for an op or record much of this happens in the subconscious an entry missing validation dependencies may cycle through Pending many times before finally reaching a final validation state or being abandoned
Input to the weigh callback. Includes an “unweighed” action, and Entry if applicable.
A action of one of the two types that create a new entry.
Condensed version of ops for sending across the wire.
Response to a zome call.
Just the definition of a Zome, without the name included. This exists mainly for use in HashMaps where ZomeDefs are keyed by ZomeName.
Anything that can go wrong while calling a HostFnApi method

Constants

The default production bootstrap service url.
The default development bootstrap service url.
The number of bits we want for a comfy secret.
The number of bytes we want for a comfy secret.
Delimiter in a clone id that separates the base cell’s role id from the clone index.
Entries larger than this number of bytes cannot be created
Length of the core bytes (32)
Length of the full HoloHash bytes (39 = 3 + 32 + 4)
Length of the location bytes (4)
Length of the prefix bytes (3)
Length of the core bytes + the loc bytes (36 = 32 + 4), i.e. everything except the type prefix
8 seems like a reasonable limit of agents to countersign.
The maximum size to hash synchronously. Anything larger than this will take too long to hash within a single tokio context
Need at least two to countersign.
One million
Expire persisted schedules after this long.
Any action with a action_seq less than this value is part of a record created during genesis. Anything with this seq or higher was created after genesis.
Tick the scheduler every this many millis.
The timestamps on actions for a session use this offset relative to the session start time. This makes it easier for agents to accept a preflight request with actions that are after their current chain top, after network latency.
Maximum time in the future the session start can be in the opinion of the participating agent. As the action will be SESSION_ACTION_TIME_OFFSET after the session start we include that here.
Ed25519 signatures are always the same length, 64 bytes.

Traits

Builder for non-genesis Actions
A trait to unify the “inner” parts of an Action, i.e. the structs inside the Action enum’s variants. This trait is used for the “unweighed” version of each struct, i.e. the version with weight information erased.
A trait to unify the “inner” parts of an Action, i.e. the structs inside the Action enum’s variants. This trait is used for the “weighed” version of each struct, i.e. the version without weight information erased.
Helpers for constructing AgentActivity
Extension trait for holo/kitsune conversion
Extension trait for holo/kitsune conversion
Extension trait for holo/kitsune conversion
Extension trait to treat connection instances as p2p store accessors.
Extension trait to treat transaction instances as p2p store accessors.
The API which a Chain Head Coordinator service must implement.
Abstraction over an item in a chain.
A data structure that can be deserialized from any data format supported by Serde.
Extension trait for holo/kitsune conversion
Extension trait for holo/kitsune conversion
Trait for binding static EntryDef property access for a type. This trait maps a type to its corresponding EntryDef property at compile time.
Helper trait for deserializing Entrys to the correct type.
Holochain-specific FetchContext extension trait.
Anything which has an owned HoloHashOf.
Data that requires a validation status.
Every HoloHash is generic over HashType. Additionally, every HashableContent has an associated HashType. The HashType is the glue that binds together HashableContent with its hash.
Any implementor of HashableContent may be used in a HoloHashed to pair data with its HoloHash representation. It also has an associated HashType.
Adds convenience methods for constructing HoloHash and HoloHashed from some HashableContent
Adds convenience methods for constructing HoloHash and HoloHashed from some HashableContent
A wrapper around HolochainP2pSender that partially applies the dna_hash / agent_pub_key. I.e. a sender that is tied to a specific cell.
The HolochainP2pSender struct allows controlling the HolochainP2p actor instance.
Kitsune hashes are expected to be 36 bytes. The first 32 bytes are the proper hash. The final 4 bytes are a hash-of-the-hash that can be treated like a u32 “location”.
The interface to be implemented by the host, which handles various requests for data
A supertrait of KitsuneHost convenient for defining test handlers. Allows only specifying the methods you care about, and letting all the rest throw errors if called
A helper trait for finding the app defined link type from a ZomeIndex and LinkType.
A PrimitiveHashType is one with a multihash prefix. In contrast, a non-primitive hash type could be one of several primitive types, e.g. an AnyDhtHash can represent one of three primitive types.
A trait for being generic over DbWrite and DbRead that both implement read access.
Implementors are able to create a new read-only DB transaction
Extension trait to keep zome types minimal
A data structure that can be serialized into any data format supported by Serde.
Extension trait to keep zome types minimal
Simple and safe type conversions that may fail in a controlled way under some circumstances. It is the reciprocal of TryInto.
An attempted conversion that consumes self, which may or may not be expensive.
Helper trait for types that are internally represented as u8 but need to be used as indicies into containers.
A utility trait for associating a data enum with a unit enum that has the same variants.
Implementors are able to create a new read-write DB transaction

Functions

Produce op types from a given Action.
internal compute a 32 byte blake2b hash
Clamp a u64 to the range of a i64.
A fixture ActionHash for unit testing.
A fixture AgentPubKey for unit testing.
A fixture AgentPubKey for unit testing. NB: This must match up with AgentPubKeyFixturator’s Predictable curve
Another fixture AgentPubKey for unit testing. NB: This must match up with AgentPubKeyFixturator’s Predictable curve
A fixture example CellId for unit testing.
A fixture DhtOpHash for unit testing.
A fixture example dna for unit testing.
A named dna for unit testing.
A fixture DnaHash for unit testing.
A fixture example dna for unit testing.
A named dna for unit testing.
A fixture EntryHash for unit testing.
Create a fake SignedActionHashed and EntryHashed pair with random content
Return the first element of a 2-tuple
Return the first element of a 2-tuple ref
internal PARSE for holo hash REPR
internal PARSE for holo hash REPR
internal REPR for holo hash
Fact: The action must be a NewEntryAction
Convenience function for when you have a RecordEntry but need a Option EntryHashed
Prune all expired AgentInfoSigned records from the p2p_store
Put an AgentInfoSigned record into the p2p_store
Put an iterator of AgentInfoSigned records into the p2p_store
Insert a p2p record from within a write transaction.
Produce op lights from iter of (action hash, action, maybe entry).
Produce all the op lights from this record group with a shared entry
Produce all the op lights for tese records
Produce all DhtOps for a Record
Get a random network seed
Assemble records from a list of Actions and a map of Entries
Return the second element of a 2-tuple
Return the second element of a 2-tuple ref
Spawn a new HolochainP2p actor. Conductor will call this on initialization.
Spawn a new KitsuneP2p actor.
Spawn a new KitsuneP2p actor, using a closure to generate the HostApi. Used for some test cases where the HostApi requires some of the intermediate values created by this function.
Spawn a stub network that doesn’t respond to any messages. Use test_network() if you want a real test network.
Swap the two items in 2-tuple
Generate a test keystore pre-populated with a couple test keypairs.
Create a test signal
WIP: Fact: The actions form a valid SourceChain
This function is called in places where it will be necessary to rework that area after use_existing has been implemented
Keeping with convention if Alice is pubkey 1 and bob is pubkey 2 the this helps make test logging easier to read.
Save a Dna to a file and return the path and tempdir that contains it

Type Definitions

The hash of an action
Base64-ready version of ActionHash
An Agent public signing key. Not really a hash, more of an “identity hash”.
Base64-ready version of AgentPubKey
The hash of anything referrable in the DHT. This is a composite of either an EntryHash or a ActionHash
Base64-ready version of AnyDhtHash
The hash of anything linkable.
Base64-ready version of AnyLinkableHash
simply alias whatever serde bytes is already doing for Vec<u8>
The data type written to the source chain to denote a capability claim
The data type written to the source chain when explicitly granting a capability. NB: this is not simply CapGrant, because the CapGrant::ChainAuthor grant is already implied by Entry::Agent, so that should not be committed to a chain. This is a type alias because if we add other capability types in the future, we may want to include them
A fixed size array of bytes that a secret must be.
Alias for getting the associated hash type of a ChainItem
A CHC implementation
Signature for check_op_data_impl
Ordered list of coordinator zomes in this DNA.
Alias for a list of agents and their roles.
Arguments to delete a disabled clone cell of an app.
The hash of a DhtOp’s “unique form” representation
Base64-ready version of DhtOpHash
A DhtOp paired with its DhtOpHash
A DnaDef paired with its DnaHash
The hash of a DnaDef
Base64-ready version of DnaHash
Specifies remote, local, or bundled location of DNA
Result type for DnaError
A DnaWasm paired with its WasmHash
Argumtents to specify the clone cell to be enabled.
The hash of an Entry.
Base64-ready version of EntryHash
An Entry paired with its EntryHash
The hash of some external data that can’t or doesn’t exist on the DHT.
Base64-ready version of ExternalHash
a single zome/function pair
A convenience type, for specifying a hash by HashableContent rather than by its HashType
Convenience type for referring to the HolochainP2p GhostSender
Trait object for the host interface
An inline zome function takes a Host API and an input, and produces an output.
The unique identifier for an installed app in this conductor
A map from InstalledAppId -> InstalledApp
Ordered list of integrity zomes in this DNA.
Convenience type
A boxed future result with dynamic error type
Result Type
App-specific payload for proving membership in the membrane of the app
The hash of a network ID
Base64-ready version of NetIdHash
Placeholder for a real network seed type. See DnaDef.
Alias for AnyLinkableHash. This hash forms the notion of the “basis hash” of an op.
The amount that a bucket is “filled”
A bucket ID, for rate limiting
The normalized total size of this action, for rate limiting
The weight of this action, for rate limiting
Identifier for an App Role, a foundational concept in the App manifest.
An EntryDefIndex within the scope of the zome where it’s defined.
A LinkType within the scope of the zome where it’s defined.
The hashed action and the signature that signed it
A type alias for a Vec<u8> whose fixturator is expected to only return a Vec of length 36
The hash of some wasm bytecode
Base64-ready version of WasmHash
A public key of a pair of signing keys for signing zome calls.
Alias for a suitable representation of zome location

Derive Macros