aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols/Session.mli
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-09-26 22:29:45 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-09-26 22:29:45 -0300
commit63352e46a880985efbdfab2e539d0f4975960b94 (patch)
treec85a0c47d425d371773d7a66896e41099d2dc9ef /lib/protocols/Session.mli
parent504e2d03a10f1641b36a9d5f127a18bc943562ce (diff)
downloadRNT-63352e46a880985efbdfab2e539d0f4975960b94.tar.gz
RNT-63352e46a880985efbdfab2e539d0f4975960b94.zip
add session object and protocol with pinning
Diffstat (limited to '')
-rw-r--r--lib/protocols/Session.mli13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/protocols/Session.mli b/lib/protocols/Session.mli
new file mode 100644
index 0000000..141c250
--- /dev/null
+++ b/lib/protocols/Session.mli
@@ -0,0 +1,13 @@
+type state = {branch: string; snapshot: Concepts.Hash.hash}
+type t
+
+class type implementation = object
+ method state : state
+ method pin : state -> unit
+end
+
+val make : #implementation -> Handle.protocol
+val from : Handle.t -> t Handle.interface option
+val require : Handle.t -> (t Handle.interface, Concepts.Condition.condition) result
+val state : t Handle.interface -> state
+val pin : t Handle.interface -> state -> unit