package tezos-protocol-alpha
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
    
    
  sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
    
    
  doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Merkle_list/Make/index.html
Module Merkle_list.MakeSource
Parameters
module El : sig ... endmodule H : Tezos_protocol_environment_alpha.S.HASHSignature
The type of a Merkle list
A path, together with an element's position, is the proof of inclusion of an element in the Merkle list.
A dummy path that can be used as a placeholder when no path is actually required.
snoc t el adds element el to a Merkle list t and returns the new list.
compute elems returns the root hash of the Merkle list constructed with elems.
Encoding of a path.
val bounded_path_encoding : 
  ?max_length:int ->
  unit ->
  path Tezos_protocol_environment_alpha.Data_encoding.tEncoding of a path, with optional bound max_length.
compute_path t pos computes the path of the element in position pos.
Can fail with Merkle_list_invalid_position if pos is negative or if it is greater than the number of elements in the list.
val check_path : 
  path ->
  int ->
  elt ->
  h ->
  bool Tezos_protocol_environment_alpha.Error_monad.tzresultcheck_path path pos elt expected_root checks that an elt with path path at position pos has the expected_root.
Can fail with Merkle_list_invalid_position if pos is negative or if it is greater than the number of elements in the list.