Expand description
Defines HoloHash and its various HashTypes
Re-exports§
pub use hash_type::HashType;
pub use hash_type::PrimitiveHashType;
Modules§
- encode_
raw - By default, disable string encoding and just display raw bytes
- hash_
type - Defines the prefixes for the various HashTypes, as well as the traits which unify them
Macros§
- assert_
length - Helper for ensuring the proper number of bytes is used in various situations
- impl_
hashable_ content - A default HashableContent implementation, suitable for content which
is already
TryInto<SerializedBytes>
, and uses a PrimitiveHashType
Structs§
- Composite
Hash Conversion Error - Error converting a composite hash into a subset composite hash, due to type mismatch
- Entry
Hashes - A newtype for a collection of EntryHashes, needed for some wasm return types.
- Hash
Conversion Error - Error converting a composite hash into a primitive one, due to type mismatch
- Holo
Hash - 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.
- Holo
Hashed - 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.
Enums§
- AnyDht
Hash Primitive - The primitive hash types represented by this composite hash
- AnyLinkable
Hash Primitive - The primitive hash types represented by this composite hash
- Hashable
Content Bytes - HashableContent can be expressed as “content”, or “prehashed”, which affects how a HoloHashed type will be constructed from it.
- Holo
Hash Error - HoloHash Error Type.
Constants§
- HOLO_
HASH_ CORE_ LEN - Length of the core bytes (32)
- HOLO_
HASH_ FULL_ LEN - Length of the full HoloHash bytes (39 = 3 + 32 + 4)
- HOLO_
HASH_ LOC_ LEN - Length of the location bytes (4)
- HOLO_
HASH_ PREFIX_ LEN - Length of the prefix bytes (3)
- HOLO_
HASH_ UNTYPED_ LEN - Length of the core bytes + the loc bytes (36 = 32 + 4), i.e. everything except the type prefix
Traits§
- HasHash
- Anything which has an owned HoloHashOf.
- Hashable
Content - Any implementor of HashableContent may be used in a HoloHashed to pair data with its HoloHash representation. It also has an associated HashType.
Type Aliases§
- Action
Hash - The hash of an action
- Agent
PubKey - An Agent public signing key. Not really a hash, more of an “identity hash”.
- AnyDht
Hash - The hash of anything referrable in the DHT. This is a composite of either an EntryHash or a ActionHash
- AnyLinkable
Hash - The hash of anything linkable.
- DhtOp
Hash - The hash of a DhtOp’s “unique form” representation
- DnaHash
- The hash of a DnaDef
- Entry
Hash - The hash of an Entry.
- External
Hash - The hash of some external data that can’t or doesn’t exist on the DHT.
- Holo
Hash Of - A convenience type, for specifying a hash by HashableContent rather than by its HashType
- Holo
Hash Result - HoloHash Result type
- NetId
Hash - The hash of a network ID
- OpBasis
- Alias for AnyLinkableHash. This hash forms the notion of the “basis hash” of an op.
- Warrant
Hash - The hash of a Warrant
- Wasm
Hash - The hash of some wasm bytecode
- Zome
Call Signing Key - A public key of a pair of signing keys for signing zome calls.