Defines HoloHash and its various HashTypes
Include nice string encoding methods and From impls
HoloHash Error Type.
Implements base-64 serialization for HoloHashes
Defines the prefixes for the various HashTypes, as well as the traits which unify them
Helper for ensuring the the proper number of bytes is used in various situations
A default HashableContent implementation, suitable for content which
is already TryInto
A newtype for a collection of EntryHashes, needed for some wasm return types.
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.
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.
HashableContent can be expressed as “content”, or “prehashed”, which affects how a HoloHashed type will be constructed from it.
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
Anything which has an owned HoloHashOf.
Any implementor of HashableContent may be used in a HoloHashed to pair data with its HoloHash representation. It also has an associated HashType.
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
An Agent public signing key. Not really a hash, more of an “identity hash”.
The hash of anything referrable in the DHT. This is a composite of either an EntryHash or a HeaderHash
The hash of a DhtOp’s “unique form” representation
The hash of a DnaDef
The hash of an Entry.
The hash of a Header
A convenience type, for specifying a hash by HashableContent rather than by its HashType
The hash of a network ID
The hash of some wasm bytecode