shrub/pkg/garden/sur/treaty.hoon
2021-08-23 11:51:50 +10:00

60 lines
1.1 KiB
Plaintext

/- docket
|%
++ treaty
=< treaty
|%
:: $treaty: An extrajudicial docket
::
:: Includes the docket itself, plus provenance generated by clay
::
+$ treaty
[=ship =desk =case hash=@uv =docket:docket]
::
:: $update:treaty: Diff of treaty state
::
+$ update
$% [%ini init=(map [=ship =desk] =treaty)]
[%add =treaty]
[%del =ship =desk]
==
--
++ alliance
=< alliance
|%
:: $alliance: Dockets to be advertised for install
::
+$ alliance (set [=ship =desk])
+$ diff
$% [%add =ship =desk]
[%del =ship =desk]
==
::
+$ update
$% [%ini init=(set [=ship =desk])]
diff
==
--
:: +ally: Discovery structures
::
++ ally
|%
::
:: $allies: Provider ships and their alliances
::
+$ allies (map ship alliance)
:: $diff: Request to change ally state
+$ diff
$% [%add =ship]
[%del =ship]
==
:: $update: Changed ally state
::
+$ update
$% diff
[%ini init=(map ship alliance)]
[%new =ship =alliance]
==
--
--