Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Tezos_dac_lib.Dac_plugin
SourceProtocol.Sc_protocol_reveal_hash.t
is unknown to modules outside the protocol and only known at runtime. To avoid the proliferation of functors in the dac node, hash
hides the dynamic Protocol.Sc_protocol_reveal_hash.t
behind an abstract static type. An instance of Dac_plugin.T
behaviour of operations on hash
.
raw_compare h1 h2
compares hashes through their internal representation. Because the internal representation of Dac_plugin.hash
es is compared, this function does not require an instance of Dac_plugin.t
.
Protocol independant hash. Useful to avoid needing the Plugin in the RPC APIs.
raw_hash_to_hex raw_hash
returns the Hex representation of the provided raw_hash
.
Protocol independent encoding of Dac_plugin.hash values. Only use in situations where the plugin is not available, and for reporting purposes (e.g. when emitting an event or registering an error).
raw_hash_to_bytes
converts a raw_hash
value to a bytes
one. This conversion is safe.
hash_to_raw
converts a hash
value to a raw_hash
one. This conversion is safe.
pp_raw_hash
is a pretty printer for raw_hash
values.
FIXME: https://gitlab.com/tezos/tezos/-/issues/4856 Fix static supported_hashes type.
type cannot_convert_raw_hash_to_hash = {
raw_hash : raw_hash;
proto : Tezos_base.TzPervasives.Protocol_hash.t;
}
Type used to track exception when impossible to convert raw_hash
to hash
.
type Tezos_base.TzPervasives.error +=
| Cannot_convert_raw_hash_to_hash of cannot_convert_raw_hash_to_hash
Unlike hash_to_raw
this conversion is unsafe.
register make_plugin
derives and registers a new Dac_plugin.T
given an of_bytes
. Implementers of plugin are responsible for providing the definition of this derivation. Functions that expose Protocol.Sc_protocol_reveal_hash.t
can be wrapped into hash
via Dac_hash.to_bytes
and of_bytes
.