package tezos-proxy

  1. Overview
  2. Docs
type t = Local.tree

The abstract type that implementors of this module type provide. Obtain an instance with empty. Think of t as a tree type.

type key = Local.key

An abstract type of key.

val empty : t

empty returns a pristine value

get t key returns the tree of data mapped by key, if any.

add_leaf t key raw_ctxt returns a variant of t where key is mapped to raw_ctxt. When this function is called, it transforms raw_ctxt, under the hood, into an instance of Proxy_context.M.tree, as the latter is the type internally stored in t (it needs to be, as it's the return type of get).

This function is called add_leaf, because the proxy mode iteratively builds its local copy of the endpoint's data. This function is only called when adding a new leaf in the tree of data, never to replace existing data. In other words, it's not a general purpose setter.