Module S.Blocks

type reference = string

Reference to a block (the Blake2b hash of the block).

val add : reference -> string -> tree -> tree Lwt.t

add reference content tree adds a block to tree.

val add_list : (reference * string) list -> tree -> tree Lwt.t

add_list blocks tree add a list of blocks to tree.

val get : tree -> reference -> string option Lwt.t

get tree reference returns the block if it is present.

val to_list : tree -> (reference * string) list Lwt.t

to_list tree returns a list of blocks.