package tezos-context

  1. Overview
  2. Docs
type index
type context
type tree
type hash
type contents := bytes
type step := string
type commit_info
type batch
val batch : index -> (batch -> 'a Lwt.t) -> 'a Lwt.t
val commit_info_encoding : commit_info Data_encoding.t
val hash_equal : hash -> hash -> bool
module Block_header : sig ... end
module Commit_hash : sig ... end
module Kinded_hash : sig ... end
val context_parents : context -> Commit_hash.t list
val context_info : context -> commit_info
val checkout : index -> Commit_hash.t -> context option Lwt.t
val set_context : info:commit_info -> parents:Commit_hash.t list -> context -> Commit_hash.t -> bool Lwt.t
val context_tree : context -> tree
val tree_iteri_unique : ([ `Branch of (step * Kinded_hash.t) list | `Leaf of contents ] -> unit Lwt.t) -> tree -> int Lwt.t

Visit each branch and leaf of the given tree exactly once, in depth-first post-order traversal. Branch children are visited in ascending key order. Memory usage is linear in the size of the tree.

val make_context : index -> context
val update_context : context -> tree -> context
val add_bytes : batch -> bytes -> tree Lwt.t
OCaml

Innovation. Community. Security.