Mavryk_dac_lib.Dac_pluginProtocol.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.
val hash_to_bytes : hash -> bytesval hash_to_hex : hash -> Mavryk_base.TzPervasives.Hex.traw_compare h1 h2 compares hashes through their internal representation. Because the internal representation of Dac_plugin.hashes is compared, this function does not require an instance of Dac_plugin.t.
val raw_hash_to_hex : raw_hash -> Mavryk_base.TzPervasives.Hex.traw_hash_to_hex raw_hash returns the Hex representation of the provided raw_hash.
val raw_hash_encoding : raw_hash Mavryk_base.TzPervasives.Data_encoding.tProtocol 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).
val raw_hash_to_bytes : raw_hash -> bytesraw_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.
val raw_hash_of_bytes : bytes -> raw_hashThis conversion is safe.
val raw_hash_rpc_arg : raw_hash Mavryk_rpc.Arg.argraw_hash argument definition for RPC.
val pp_raw_hash : Stdlib.Format.formatter -> raw_hash -> unitpp_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 : Mavryk_base.TzPervasives.Protocol_hash.t;}Type used to track exception when impossible to convert raw_hash to hash.
type Mavryk_base.TzPervasives.error += | Cannot_convert_raw_hash_to_hash of cannot_convert_raw_hash_to_hashmodule type T = sig ... endtype t = (module T)Dac plugin module type.
val raw_to_hash : t -> raw_hash -> hash Mavryk_base.TzPervasives.tzresultUnlike 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.
val get : Mavryk_base.TzPervasives.Protocol_hash.Table.key -> (module T) option