Module S.Set
val initialize : ?secret_key:Signify.SecretKey.t -> tree -> (ContainerIdentifier.t * Signify.SecretKey.t * tree) Lwt.t
initialize ~secret_key tree
creates a new set definition usingsecret_key
and add it totree
.If no
secret_key
is provided a new key will be generated.- returns
The container identifier, the secret key and the tree with the initialized container added.
val add_ref : ContainerIdentifier.t -> secret_key:Signify.SecretKey.t -> element:Eris.urn -> tree -> (Eris.urn * tree) Lwt.t
add_ref container_id ~secret_key ~element tree
adds referenceelement
to the set usingsecret_key
to sign the add operation.- returns
The ERIS urn of the operation and the tree with operation and signature added.
val add_binary : ContainerIdentifier.t -> secret_key:Signify.SecretKey.t -> content:string -> tree -> (Eris.urn * Eris.urn * tree) Lwt.t
add_binary container_id ~secret_key ~content tree
addscontent
to the set usingsecret_key
to sign the add operation.- returns
The ERIS urn of the added content, of the operation and the tree.
val remove : ContainerIdentifier.t -> secret_key:Signify.SecretKey.t -> operation:Eris.urn -> tree -> (Eris.urn * tree) Lwt.t
remove container_id ~secret_key ~operation tree
remove the elements that were added to the set withoperation
usingsecret_key
to sign the remove operation.- returns
The ERIS urn of the operation and the tree with operation and signature added.
val members : ContainerIdentifier.t -> tree -> Eris.urn list Lwt.t
members container_id tree
returns a list of members in the Set.
val resolve : ContainerIdentifier.t -> ?deep:bool -> tree -> Rdf.Graph.t Lwt.t
resolve container_id ~deep tree
resolves the state of the set with identifiercontainer_id
. Ifcontainer_id
is not a set or not locally known the empty graph will be returned.