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 using secret_key and add it to tree.

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 reference element to the set using secret_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 adds content to the set using secret_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 with operation using secret_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 identifier container_id. If container_id is not a set or not locally known the empty graph will be returned.