Module S.Set
val initialize : ?secret_key:Signify.SecretKey.t -> tree -> (ContainerIdentifier.t * Signify.SecretKey.t * tree) Lwt.tinitialize ~secret_key treecreates a new set definition usingsecret_keyand add it totree.If no
secret_keyis 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.tadd_ref container_id ~secret_key ~element treeadds referenceelementto the set usingsecret_keyto 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.tadd_binary container_id ~secret_key ~content treeaddscontentto the set usingsecret_keyto 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.tremove container_id ~secret_key ~operation treeremove the elements that were added to the set withoperationusingsecret_keyto 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.tmembers container_id treereturns a list of members in the Set.
val resolve : ContainerIdentifier.t -> ?deep:bool -> tree -> Rdf.Graph.t Lwt.tresolve container_id ~deep treeresolves the state of the set with identifiercontainer_id. Ifcontainer_idis not a set or not locally known the empty graph will be returned.