on master help sign in
add new jael docs and remove old
commitb43e480cf5e8a78660ea81f949491ea50ecfc6e5 authortinnus-napbus <admin@tinnus-napbus.xyz> dateWed 28 Jul 2021, 23:20 (5 years ago) parent5c10d5b
7 files changed+1009−393
content/docs/arvo/jael/_index.md+20 content/docs/arvo/jael/data-types.md+248 content/docs/arvo/jael/examples.md+258 content/docs/arvo/jael/jael-api.md−393 content/docs/arvo/jael/jael.md+22 content/docs/arvo/jael/scry.md+222 content/docs/arvo/jael/tasks.md+239
content/docs/arvo/jael/_index.md+20
@@ -5,3 +5,23 @@ sort_by = "weight"
55template = "sections/docs/chapters.html"
66insert_anchor_links = "right"
77+++
8+
9+## [Overview](@/docs/arvo/jael/jael.md)
10+
11+An overview of Jael, Urbit's security and encryption vane.
12+
13+## [API Reference](@/docs/arvo/jael/tasks.md)
14+
15+The `task`s Jael takes and the `gift`s it returns.
16+
17+## [Scry Reference](@/docs/arvo/jael/scry.md)
18+
19+The scry endpoints of Jael.
20+
21+## [Data Types](@/docs/arvo/jael/data-types.md)
22+
23+Reference documentation of the various data types used by Jael.
24+
25+## [Examples](@/docs/arvo/jael/examples.md)
26+
27+Practical examples of using Jael's `task`s.
content/docs/arvo/jael/data-types.mdnew file+248
@@ -0,0 +1,248 @@
1++++
2+title = "Data Types"
3+weight = 4
4+template = "doc.html"
5++++
6+
7+Jael's section in `lull.hoon` contains three ancillary cores with their own type definitions as well as Jael's general types, so this reference is divided as follows:
8+
9+- [jael](#public-keys-result) - General structures.
10+- [block:jael](#block) - Structures for Ethereum blocks.
11+- [point:jael](#point) - Structures for points (Ship IDs in Azimuth).
12+- [pki:jael](#pki) - Largely unused apart from [$oath:pki](#oath-pki).
13+
14+## `$public-keys-result`
15+
16+```hoon
17++$ public-keys-result
18+ $% [%full points=(map ship point)]
19+ [%diff who=ship =diff:point]
20+ [%breach who=ship]
21+ ==
22+```
23+
24+This is what Jael gives (in a [%public-keys](@/docs/arvo/jael/tasks.md#public-keys) `gift`) to subcribers who are tracking public key information for a `set` of `ship`s.
25+
26+Typically the `%full` kind with a `map` of `ship`s to [$point:point](#point-point)s is given immediately upon subscription and contains all public key records for the ships in question. After the `%full`, a `%diff` (including a [$diff:point](#diff-point)) will be given whenever a change (such as the sponsor or pubkey) has occurred for one of the ships being tracked, and a `%breach` will be given whenever a continuity breach for a tracked ship occurs.
27+
28+## `$seed`
29+
30+```hoon
31++$ seed [who=ship lyf=life key=ring sig=(unit oath:pki)]
32+```
33+
34+Private boot parameters. The `who` field is the name of the ship, `lyf` is the `life` (key revision number), `key` is the private key and `sig` is the signature of the parent ship if it's a moon, and `~` otherwise.
35+
36+## `$dawn-event`
37+
38+```hoon
39++$ dawn-event
40+ $: =seed
41+ spon=(list [=ship point:azimuth-types])
42+ czar=(map ship [=rift =life =pass])
43+ turf=(list turf)
44+ bloq=@ud
45+ node=(unit purl:eyre)
46+ ==
47+```
48+
49+Ship initialisation parameters.
50+
51+- [$seed](#seed) contains the private boot parameters.
52+- `spon` is a `list` of ships and their [$point](#point-point)s in the ship's sponsorship chain, all the way to the galaxy level.
53+- `czar` is a map from each galaxy's `@p` to its `rift`, `life`, and public key (`pass`).
54+- `turf` is a `list` of DNS suffixes used for galaxies, which is `urbit.org` by default.
55+- `bloq` is the number of the Ethereum block in which the ship registered its keys with the Azimuth smart contract.
56+- `node` is the URL of the Ethereum node used to monitor Azimuth.
57+
58+## `$source`
59+
60+```hoon
61++$ source (each ship term)
62+```
63+
64+Source of public key updates for Jael. If it's a `term` it's a Gall agent e.g `%azimuth-tracker`. If it's a `ship`, Jael will subscribe to that ship's Jael for updates - e.g. Jael will subscribe to the parent planet of moons for updates about the moons.
65+
66+## `$source-id`
67+
68+```hoon
69++$ source-id @udsourceid
70+```
71+
72+Numerical index for Jael to organise its `source`s. Jael assigns its `source-id`s sequentially, starting from `0`.
73+
74+## `$state-eth-node`
75+
76+```hoon
77++$ state-eth-node :: node config + meta
78+ $: top-source-id=source-id
79+ sources=(map source-id source)
80+ sources-reverse=(map source source-id)
81+ default-source=source-id
82+ ship-sources=(map ship source-id)
83+ ship-sources-reverse=(jug source-id ship)
84+ ==
85+```
86+
87+Jael's data about `source`s for PKI updates about ships.
88+
89+- `top-source-id` tracks the highest `source-id` so Jael can easily determine what the next `source-id` should be.
90+- `sources` is a `map` of [$source-id](#source-id)s to [$source](#source)s.
91+- `sources-reverse` the same as `sources` but in reverse.
92+- `default-source` is the default `source` to use (typically `0` - `%azimuth-tracker`).
93+- `ship-sources` is a `map` from `ship`s to `source-id`s and records where to get updates from for the ships in question. Typically these will map moons to their parent ships.
94+- `ship-sources-reverse` is the same as `ship-sources` but in reverse.
95+
96+# block
97+
98+Structures for Ethereum blocks.
99+
100+## `$hash:block`
101+
102+```hoon
103++$ hash @uxblockhash
104+```
105+
106+Ethereum block hash.
107+
108+## `$number:block`
109+
110+```hoon
111++$ number @udblocknumber
112+```
113+
114+Ethereum block number.
115+
116+## `$id:block`
117+
118+```hoon
119++$ id [=hash =number]
120+```
121+
122+Ethereum block identifier - contains both the [$hash:block](#hash-block) and [$number:block](#number-block).
123+
124+## `$block:block`
125+
126+```hoon
127++$ block [=id =parent=hash]
128+```
129+
130+A reference to an Ethereum block - contains the [$id:block](#id-block) and the [$hash:block](#hash-block) of its parent for ordering purposes.
131+
132+# point
133+
134+Structures for points (Ship IDs in Azimuth).
135+
136+## `$point:point`
137+
138+```hoon
139++$ point
140+ $: =rift
141+ =life
142+ keys=(map life [crypto-suite=@ud =pass])
143+ sponsor=(unit @p)
144+ ==
145+```
146+
147+Public key data for a particular ship. The `rift` is the current continuity breach number and `life` is the current key revision number. The `keys` `map` contains the public key (`pass`) for each `life` up to the current one. The `sponsor` is the current sponsor of the ship in question, if it has one.
148+
149+## `$key-update:point`
150+
151+```hoon
152++$ key-update [=life crypto-suite=@ud =pass]
153+```
154+
155+An update to a ship's keys. The `life` is the key revision number, `crypt-suite` is a version number for the cryptographic suite used for keys in Azimuth, and `pass` is the public key itself.
156+
157+## `$diffs:point`
158+
159+```hoon
160++$ diffs (list diff)
161+```
162+
163+A list of invertible [$diff:point](#diff-point)s.
164+
165+## `$diff:point`
166+
167+```hoon
168++$ diff
169+ $% [%rift from=rift to=rift]
170+ [%keys from=key-update to=key-update]
171+ [%spon from=(unit @p) to=(unit @p)]
172+ ==
173+```
174+
175+An invertible diff for public key (and related) changes to the state of an Azimuth point (ship ID).
176+
177+- `%rift` is a change to the `rift` (continuity breach number) that occurs when a ship undergoes a continuity breach.
178+- `%keys` is a change to a ship's `life` and public key, specified in the [$key-update:point](#key-update-point).
179+- `%spon` is a change to a ship's sponsor.
180+
181+The `from` and `to` field specify the old a new values respectively.
182+
183+## `$udiffs:point`
184+
185+```hoon
186++$ udiffs (list [=ship =udiff])
187+```
188+
189+A list of non-invertible [$udiff:point](#udiff-point)s.
190+
191+## `$udiff:point`
192+
193+```hoon
194++$ udiff
195+ $: =id:block
196+ $% [%rift =rift]
197+ [%keys key-update]
198+ [%spon sponsor=(unit @p)]
199+ [%disavow ~]
200+ == ==
201+```
202+
203+A non-invertible diff for public key (and related) changes to the state of an Azimuth point (ship ID).
204+
205+The [$id:block](#id-block) contains the block number and block hash of the Ethereum block in which the change occurred. The next part specifies what changed, where:
206+
207+- `%rift` means the ship has undergone a continuity breach and therefore the `rift` (continuity revision number) has changed.
208+- `%keys` means the ship's `life` (key revision number) has changed, the [$key-update:point](#key-update-point) contains the new `life` and pubkeys.
209+- `%spon` means the ship's sponsor has changed.
210+- `%disavow` means a previous Ethereum block has been disavowed.
211+
212+A `udiff:point` can be converted to a [$diff:point](#diff-point) with the `+udiff-to-diff:point` function.
213+
214+# pki
215+
216+This structure is mostly a holdover from prior versions of Jael and is unused apart from [$oath:pki](#oath-pki).
217+
218+## `$hand:pki`
219+
220+```hoon
221++$ hand @uvH
222+```
223+
224+128-bit Hash.
225+
226+## `$mind:pki`
227+
228+```hoon
229++$ mind [who=ship lyf=life]
230+```
231+
232+Key identifier.
233+
234+## `$name:pki`
235+
236+```hoon
237++$ name (pair @ta @t)
238+```
239+
240+Name in both ASCII and Unicode.
241+
242+## `$oath:pki`
243+
244+```hoon
245++$ oath @
246+```
247+
248+Signature. This type is used in the [$seed](#seed) for moons as a signature from the moon's parent.
content/docs/arvo/jael/examples.mdnew file+258
@@ -0,0 +1,258 @@
1++++
2+title = "Examples"
3+weight = 5
4+template = "doc.html"
5++++
6+
7+This documents contains practical examples of a number of Jael's `task`s.
8+
9+General documentation of the `task`s demonstrated here can be found in the [API Reference](@/docs/arvo/jael/tasks.md) document, and details of the data types mentioned can be found in the [Data Types](@/docs/arvo/jael/data-types.md) document.
10+
11+# Contents
12+
13+- [%private-keys](#private-keys)
14+- [%public-keys and %nuke](#public-keys-and-nuke)
15+- [%turf](#turf)
16+- [%step](#step)
17+
18+# `%private-keys`
19+
20+Here we'll look at subscribing to private key updates from Jael. We'll use a thread to pass Jael a `%private-keys` `task`, take the `%private-keys` `gift` it returns, debug print it to the terminal and finally unsubscribe with a `%nuke` `task`.
21+
22+`sub-priv.hoon`
23+
24+```hoon
25+/- spider
26+/+ strandio
27+=, strand=strand:spider
28+=, card=card:agent:gall
29+^- thread:spider
30+|= arg=vase
31+=/ m (strand ,vase)
32+^- form:m
33+;< ~ bind:m (send-raw-card:strandio %pass /sub-priv %arvo %j %private-keys ~)
34+;< res=[=wire =sign-arvo] bind:m take-sign-arvo:strandio
35+?> ?=([%sub-priv ~] wire.res)
36+?> ?=([%jael *] sign-arvo.res)
37+~& +.sign-arvo.res
38+;< ~ bind:m (send-raw-card:strandio %pass /sub-priv %arvo %j %nuke ~)
39+(pure:m !>(~))
40+```
41+
42+Save the above thread in the `/ted` directory of your `%home` desk and `|commit %home`.
43+
44+Now let's run the thread:
45+
46+```
47+> -sub-priv
48+```
49+
50+You should see the `%private-key` `gift` it returns in the Dojo:
51+
52+```
53+[ %private-keys
54+ life=1
55+ vein
56+ { [ p=1
57+ q
58+ 1.729.646.917.183.337.[...truncated for brevity]
59+ ]
60+ }
61+]
62+```
63+
64+At this point our thread unsubscribes again with a `%nuke` `task` but without that it would send a new `%private-key` `gift` each time the private keys were changed.
65+
66+# `%public-keys` and `%nuke`
67+
68+Here we'll look at both subscribing and unsubscribing to updates of a ship's public keys in Jael. We'll subscribe by sending Jael a `%public-keys` `task`, take the `%public-keys` `gift` it responds with, print it to the terminal, scry for the `set` of `duct`s subscribed to the ship in question, print them to the terminal, and finally send Jael a `%nuke` `task` to unsubscribe.
69+
70+Here's a thread that performs these actions:
71+
72+`sub-pub.hoon`
73+
74+```hoon
75+/- spider
76+/+ strandio
77+=, strand=strand:spider
78+=, card=card:agent:gall
79+=>
80+|%
81++$ subs
82+ $: yen=(jug duct ship)
83+ ney=(jug ship duct)
84+ nel=(set duct)
85+ ==
86+--
87+^- thread:spider
88+|= arg=vase
89+=/ m (strand ,vase)
90+^- form:m
91+=/ =@p (need !<((unit @p) arg))
92+::
93+:: sub to public updates for specified ship
94+=/ c1=card [%pass /sub-pubkeys %arvo %j %public-keys (silt ~[p])]
95+;< ~ bind:m (send-raw-card:strandio c1)
96+::
97+:: take response from jael & print it
98+;< res=[=wire =sign-arvo] bind:m take-sign-arvo:strandio
99+?> ?=([%sub-pubkeys ~] wire.res)
100+?> ?=([%jael %public-keys *] sign-arvo.res)
101+~& +.sign-arvo.res
102+::
103+:: scry for tracking subs for specified ship in jael & print
104+;< =subs bind:m (scry:strandio ,subs /j/subscriptions/1)
105+=/ ducts=(set duct) (~(get ju ney.subs) p)
106+~& ducts
107+::
108+:: unsub from public updates for specified ships
109+=/ c2=card [%pass /sub-pubkeys %arvo %j %nuke (silt ~[p])]
110+;< ~ bind:m (send-raw-card:strandio c2)
111+(pure:m !>(~))
112+```
113+
114+Note this example was performed on a comet as a fake ship won't have the required information in Jael.
115+
116+Save the above thread in the `/ted` directory and `|commit %home`. The thread takes a `ship` as an argument, so we'll try to subscribe to pubkey updates for `~dopzod`. Let's run the thread:
117+
118+```
119+> -sub-pub ~dopzod
120+```
121+
122+It first passes a `%public-keys` `task` to Jael that looks like `[%public-keys (silt ~[~dopzod])]` in order to subscribe. Jael will immediately respond with a `%public-keys` `gift` that contains a `%full` [$public-keys-result](@/docs/arvo/jael/data-types.md#public-keys-result). The `(map ship point)` contained will (for each ship specified in the `task`) include the current pubkeys for the ship's current life as well as previous keys for previous `life`s. It thus contains a complete record of keys up to the present for each ship. Our thread will print these out to the terminal like so:
123+
124+```
125+[ %public-keys
126+ public-keys-result
127+ [ %full
128+ points
129+ { [ p=~dopzod
130+ q
131+ [ rift=2
132+ life=3
133+ keys
134+ { [ p=1
135+ q
136+ [ crypto-suite=1
137+ pass
138+ 939.529.329.928[...truncated for brevity...]
139+ ]
140+ ]
141+ [ p=2
142+ q
143+ [ crypto-suite=1
144+ pass
145+ 2.215.774.809.906.200.376.0[...truncated for brevity...]
146+ ]
147+ ]
148+ [ p=3
149+ q
150+ [ crypto-suite=1
151+ pass
152+ 707.070.568.606.374.[...truncated for brevity...]
153+ ]
154+ ]
155+ }
156+ sponsor=~
157+ ]
158+ ]
159+ }
160+ ]
161+]
162+```
163+
164+Along with giving us the current information, Jael will also subscribe us to any future updates for the ships in question. Such updates will come as additional `%public-keys` `gift`s, but rather than a `%full` `public-keys-result`, they'll instead contain either a `%diff` or `%breach` `public-keys-result`, depending on what's happened to the ship in question. It's difficult to simulate such events for demonstrative purposes so an example is not included, but you can look at the [$public-keys-result](@/docs/arvo/jael/data-types.md#public-keys-result) to get an idea.
165+
166+Jael maintains a `(jug duct ship)` and its reverse `(jug ship duct)` in its state to track subscriptions. If we do a [subscriptions](@/docs/arvo/jael/scry.md#subscriptions) scry and filter the result for `~dopzod`, we can see the duct of our thread has now been added to the `~dopzod` `set`. Our thread does this, and will output something like:
167+
168+```
169+{~[/gall/use/spider/0w1.vGVi-/~sampel-palnet/thread/~.dojo_0v6.0hlak.dam1b.bcdou.ai7gq.19fi8/sub-pubkeys /dill //term/1]}
170+```
171+
172+At this point our thread will send a `%nuke` `task` like `[%nuke (silt ~[~dopzod])]` to cancel our subscription. Jael doesn't respond to it, but now, with our thread having finished and exited, we can again scry & filter for subscriptions to `~dopzod`:
173+
174+```
175+> =/(a .^([yen=(jug duct ship) ney=(jug ship duct) nel=(set duct)] %j /=subscriptions=/1) (~(get ju ney.a) ~dopzod))
176+~
177+```
178+
179+As you can see the `set` is now empty, so we know the `%nuke` succeeded and Jael will no longer send us pubkey updates for `~dopzod`. One thing to note about `%nuke` is that it _must_ come from the same `duct` as the original subscription. You can't unsubscribe another app, ship, thread or what have you, so if we'd tried `%nuke`ing the subscription from a separate thread it wouldn't have worked.
180+
181+# `%turf`
182+
183+Here we'll look at using a `%turf` `task` to get Jael's list of domains. Note on a fake ship the list will be empty, so you may with to run it on a comet or moon.
184+
185+Here's a simple thread that'll pass Jael a `%turf` `task`, take the `%turf` `gift` it sends back and print it to the terminal:
186+
187+`turf.hoon`
188+
189+```hoon
190+/- spider
191+/+ strandio
192+=, strand=strand:spider
193+^- thread:spider
194+|= arg=vase
195+=/ m (strand ,vase)
196+^- form:m
197+=/ =task:jael [%turf ~]
198+=/ =card:agent:gall [%pass /get-domains %arvo %j task]
199+;< ~ bind:m (send-raw-card:strandio card)
200+;< resp=[=wire =sign-arvo] bind:m take-sign-arvo:strandio
201+?> ?=([%get-domains ~] wire.resp)
202+?> ?=([%jael %turf *] sign-arvo.resp)
203+~& +.sign-arvo.resp
204+(pure:m !>(~))
205+```
206+
207+Save in in the `/ted` directory of your ship and `|commit %home`. Next, let's try running it:
208+
209+```
210+> -turf
211+[%turf turf=~[<|org urbit|>]]
212+```
213+
214+As you see, the `%turf` `gift` contains `urbit.org` as `~['org' 'urbit']`.
215+
216+# `%step`
217+
218+Here we'll look at changing the web login code with a `%step` task.
219+
220+First, let's see the current `step` with a `%step` scry:
221+
222+```
223+> .^(@ud %j /=step=/(scot %p our))
224+0
225+```
226+
227+...and the current code with the `+code` generator:
228+
229+```
230+> +code
231+lidlut-tabwed-pillex-ridrup
232+```
233+
234+Now, let's pass Jael a `%step` task by using `|pass` in the dojo:
235+
236+```
237+> |pass [%j %step ~]
238+```
239+
240+Jael will `pass` Eyre a `%code-changed` `task:eyre` to let Eyre know the code's changed so you'll see a message from Eyre in the terminal:
241+
242+```
243+eyre: code-changed: throwing away cookies and sessions
244+```
245+
246+Now let's again scry for the `step` and see that it's been incremented:
247+
248+```
249+> .^(@ud %j /=step=/(scot %p our))
250+1
251+```
252+
253+And finally, let's again run `+code` and see there's now a new web login code:
254+
255+```
256+> +code
257+raldev-topnul-mirnut-lablut
258+```
content/docs/arvo/jael/jael-api.mddeleted−393
@@ -1,393 +0,0 @@
1−+++
2−title = "API Reference"
3−weight = 10
4−template = "doc.html"
5−+++
6−
7−In this document we describe the public interface for Jael. Namely, we describe
8−each `task` that Jael can be `%pass`ed, and which `gift`(s) Jael can `%give` in return.
9−
10−
11−## Tasks
12−
13−### `%dawn`
14−
15−This `task` is called once per ship during the vane initialization
16−phase immediately following the beginning of the [adult
17−stage](/docs/arvo/overview#structural-interface-core). This `task` is `%pass`ed to Jael by Dill, as Dill is the first vane to be loaded for
18−technical reasons, though we consider Jael to be the true "first" vane. This
19−`task` is only used for ships that will join the Ames network - fake ships (i.e.
20−made with `./urbit -F zod`) use the `%fake` `task` instead.
21−
22−`%dawn` is used to perform a sequence of initialization tasks related to saving
23−information about Azimuth and the Ames network and booting other vanes for the first time. Upon
24−receipt of a `%dawn` `task`, Jael will:
25− - record the Ethereum block the public key is registered to,
26− - record the URL of the Ethereum node used,
27− - save the signature of the parent planet (if the ship is a moon),
28− - load the initial public and private keys for the ship,
29− - set the DNS suffix(es) used by the network (currently just `arvo.network`),
30− - save the public keys of all galaxies,
31− - set Jael to subscribe to `%azimuth-tracker`,
32− - `%slip` a `%init` `task` to Ames, Clay, Gall, Dill, and Eyre, and `%give` an `%init`
33−`gift` to Arvo, which then informs Unix that the initialization process has concluded.
34−
35−#### Accepts
36−
37−`%dawn` accepts a `dawn-event`:
38−
39−```hoon
40− +$ dawn-event
41− $: =seed
42− spon=(list [=ship point:azimuth-types])
43− czar=(map ship [=rift =life =pass])
44− turf=(list turf)
45− bloq=@ud
46− node=(unit purl:eyre)
47− ==
48−```
49−
50−The `seed` is `[who=ship lyf=life key=ring sig=(unit oath:pki)]`. `who` is the
51−`@p` of the ship running the `task`, `lyf` is the current ship key revision,
52−`key` is the ship's private key, and `sig` is the signature of the ship's parent
53−planet if the ship is moon and `[~]` otherwise.
54−
55−`spon` is a `list` of ships and their `point`s in the ship's sponsorship chain,
56−all the way to the galaxy level. `point:azimuth-types` contains all Azimuth
57−related data and can be found in `zuse.hoon`.
58−
59−`czar` is a map from each galaxy's `@p` to its `rift`, `life`, and public key (`pass`).
60−
61−`turf` is a `list` of DNS suffixes used by the Ames network, which for now is
62−just `arvo.network`.
63−
64−`bloq` is the number of the Ethereum block in which the ship registered its keys
65−with the Azimuth smart contract.
66−
67−`node` is the URL of the Ethereum node used to register the ship's keys with Azimuth.
68−
69−#### Returns
70−
71−Jael `%give`s an `%init` `gift` to Unix. This occurs after the Dill `%slip`
72−init.
73−
74−#### Slips
75−
76−Jael `%slip`s `%init` `task`s to each of Eyre, Dill, Gall, Clay, and Ames, in
77−that order.
78−
79−
80−### `%fake`
81−
82−This `task` is used instead of `%dawn` when creating a fake ship via the `-F`
83−flag when calling the Urbit binary. It performs a subset of the actions that
84−`%dawn` performs, modified to accommodate the fake ship.
85−
86−`%fake` endows the ship with a private key and a public key deterministically derived from the
87−ship's `@p`. It sets `fak.own.pki` to `%.y`, which is the bit that determines
88−whether or not a ship is fake. Other parts of the Jael state, such as the
89−sponsorship chain and galaxy public keys are left at their bunted values.
90−
91−#### Accepts
92−
93−```hoon
94−[=ship]
95−```
96−`ship` is the `@p` of the fake ship being created.
97−
98−#### Returns
99−
100−Jael `%give`s a `%init` `gift` to Unix.
101−
102−#### Slips
103−
104−In response to a `%fake` `task`, Jael `%slip`s a `%init` `task` to each of Eyre, Dill, Gall,
105−Clay, and Ames, in that order.
106−
107−
108−### `%listen`
109−
110−Sets the source that the public keys for a set of `ship`s should be obtained
111−from. This can either be a Gall app that communicates with an Ethereum node such
112−as `%azimuth-tracker`, as in the case for galaxies, stars,
113−and planets, or a ship, as in the case of a moon or comet.
114−
115−After setting the source, Jael will then subscribe to the source for updates on
116−public keys for the given ships.
117−
118−
119−#### Accepts
120−
121−```hoon
122−[whos=(set ship) =source]
123−```
124−
125−`whos` is the set of ships whose key data source is to be altered. `source` is
126−`(each ship term)`, where `term` will ultimately be treated as a handle for a
127−Gall app.
128−
129−A `%listen` `task` with empty `whos` will set the default source to `source`.
130−This is the source used for all ships unless otherwise specified.
131−
132−When the `source` is a `term`, Jael looks into its state to find what source has
133−been previously assigned to that `term` and will henceforth obtain public keys for
134−ships in `(set ship)` from there. In practice, this is always
135−`%azimuth-tracker`, but the ability to use other sources is present.
136−
137−When the `source` is a ship, Jael will obtain public keys for ships in `(set ship)` from
138−the given ship. By default, the `source` for a moon will be the planet that
139−spawned that moon, and the `source` for a comet will be the comet itself.
140−
141−#### Returns
142−
143−This `task` returns no `gift`s.
144−
145−#### Passes
146−
147−If the `source` is a `term`, Jael will `%pass` a `%deal` `task` to Gall asking to
148−`%watch` the app given by `source` at path `/`.
149−
150−If the `source` is a `ship`, Jael will `%pass` a `%plea` `task` to Ames wrapping
151−a `%public-keys` `task` intended for Jael on the `ship` specified by `source`.
152−
153−
154−### `%meet`
155−
156−This `task` is deprecated and does not perform any actions.
157−
158−#### Accepts
159−
160−```hoon
161−[=ship =life =pass]
162−```
163−
164−#### Returns
165−
166−This `task` returns no `gift`s.
167−
168−
169−### `%moon`
170−
171−This `task` sets the public keys of a moon.
172−
173−#### Accepts
174−
175−```hoon
176−[=ship =udiff:point]
177−```
178−
179−The `ship` is the `@p` of the moon. The `task` will be a no-op if the `@p` is not that
180−of a moon, or if the moon does not belong to the ship.
181−
182−`udiff:point` contains the new public keys to be stored for the moon.
183−
184−#### Returns
185−
186−This `task` returns no `gift`s.
187−
188−
189−### `%nuke`
190−
191−This `task` cancels subscriptions to Jael's state from a given set of `ship`s.
192−This `task` works differently depending on whether the `task` originated locally
193−or remotely.
194−
195−#### Accepts
196−
197−```hoon
198−[whos=(set ship)]
199−```
200−`whos` is the `set` of `ship`s from which subscriptions are to be canceled.
201−
202−#### Returns
203−
204−This `task` returns no `gift`s.
205−
206−
207−### `%plea`
208−
209−This `task` is `%pass`ed to Jael from Ames. `%plea`s are wrappers for `task`s
210−that originate from a remote source, as the `%plea` pattern
211−is used to extend the `%pass`/`%give` semantics over the Ames network. Jael
212−attempts to perform the `task` wrapped in the `%plea`.
213−
214−Jael accepts two kinds of `%plea`s: [`%nuke`](#nuke) and
215−[`%public-keys`](#public-keys) and will crash if passed anything else. See the
216−relevant entries to learn how Jael responds to these.
217−
218−#### Accepts
219−
220−```hoon
221−[=ship =plea:ames]
222−```
223−`ship` is the origin of the plea, and `plea:ames` is `[vane=@tas =path
224−payload=*]`. Here, `vane=%j`, `path` is the internal route on the receiving ship, and `payload` is either a `%nuke` or
225−a `%public-keys` `task`.
226−
227−#### Returns
228−
229−Jael `%give`s a `%done` `gift` in response to a `%plea` `task`.
230−
231−#### Passes
232−
233−Jael `%pass`es itself the wrapped `task`.
234−
235−
236−### `%private-keys`
237−
238−This `task` creates a subscription to the private keys kept by Jael.
239−
240−We note that there are two `+private-keys` arms in Jael - one located in the
241−`+feed` core and the other located in the `+feel` core. This `task` calls the
242−arm in the `+feed` core.
243−
244−#### Accepts
245−
246−```hoon
247−[~]
248−```
249−
250−#### Returns
251−
252−```hoon
253−[%private-keys =life vein=(map life ring)]
254−```
255−
256−In response to a `%private-keys` `task`, Jael `%give`s a `%private-keys` `gift`.
257−`life=@ud` is the current `life` of the ship, and `vein` is a `map` from
258−`life`s to `ring`s that keeps track of all `life`-`ring` pairs throughout the
259−history of the ship.
260−
261−
262−### `%public-keys`
263−
264−This `task` creates a subscription for the callee to a selection of the public
265−keys kept by Jael. This `task` can originate locally or remotely.
266−
267−#### Accepts
268−
269−```hoon
270−[ships=(set ship)]
271−```
272−`ships` is the `set` of `ship`s whos' public keys are being subscribed to.
273−
274−#### Returns
275−
276−```hoon
277−[%public-keys =public-keys-result]
278−```
279−If the `task` originated locally, Jael `%give`s a `%public-keys` `gift` in
280−response. If it originated remotely, Jael `%give`s a `%boon` `gift` to back
281−to Ames wrapping a `%public-keys` `gift`.
282−
283−A `$public-keys-result` is the following.
284−```hoon
285− +$ public-keys-result
286− $% [%full points=(map ship point)]
287− [%diff who=ship =diff:point]
288− [%breach who=ship]
289−```
290−The first time Jael receives a `%public-keys` `task` from a ship it will return
291−a `[%public-keys-result %full]` `gift`, which contains all information about ships and
292−their associated points that Jael knows. Subsequent updates will typically be
293−`[%public-keys-result %diff]`, which tells the caller what has changed
294−since last time they sent a `%public-keys` `task`, and `[%public-keys-result
295−%breach]`, which informs the caller of ship breaches.
296−
297−
298−### `%rekey`
299−
300−This `task` updates the ship's private keys.
301−
302−#### Accepts
303−
304−```hoon
305−[=life =ring]
306−```
307−
308−`life` is a `@ud` that is the new ship key revision number. `ring` is a `@` that is the new private key.
309−
310−#### Returns
311−
312−```hoon
313−[%private-keys =life vein=(map life ring)]
314−```
315−
316−In response to a `%rekey` `task`, Jael `%give`s a `%private-keys` `gift`. `life`
317−is the new `life` given in the original `task`, and `vein` is a `map` from
318−`life`s to `ring`s that keeps track of all `life`-`ring` pairs throughout the
319−history of the ship.
320−
321−
322−### `%trim`
323−
324−This `task` is sent by the interpreter in order to free up memory.
325− This `task` is empty for Jael, since it is not a good idea to forget your
326− private keys and other cryptographic data.
327−
328−#### Accepts
329−
330−```hoon
331−[p=@ud]
332−```
333−This argument is unused by Jael.
334−
335−#### Returns
336−
337−This task returns nothing.
338−
339−
340−
341−### `%turf`
342−
343−This `task` is a request for Jael to provide its list of `turf`s, e.g. DNS
344−suffixes for the Ames network. Currently `arvo.network` is the only `turf` in use.
345−
346−#### Accepts
347−
348−```hoon
349−[~]
350−```
351−
352−#### Returns
353−
354−```hoon
355−[%turn tuf.own.pki]
356−```
357−
358−Jael `%give`s a `%turf` `gift` in response to a `%turf` `task`. `tuf.own.pki` is
359−a `(list turf)`, which is Jael's list of `turf`s.
360−
361−
362−### `%vega`
363−
364−`%vega` is called whenever the kernel is updated. Jael currently does not do
365−anything in response to this.
366−
367−#### Accepts
368−
369−`%vega` takes no arguments.
370−
371−#### Returns
372−
373−This `task` returns no `gift`s.
374−
375−
376−
377−### `%wegh`
378−
379−This `task` is a request to Jael to produce a memory usage report.
380−
381−#### Accepts
382−
383−This `task` has no arguments.
384−
385−#### Returns
386−
387−In response to this `task,` Jael `%give`s a `%mass` `gift` containing Ames'
388−current memory usage.
389−
390−
391−
392−
393−
content/docs/arvo/jael/jael.mdnew file+22
@@ -0,0 +1,22 @@
1++++
2+title = "Overview"
3+weight = 1
4+template = "doc.html"
5++++
6+
7+Jael is the networking key infrastructure vane.
8+
9+The main purpose of Jael is keeping track of [Azimuth](@/docs/azimuth/azimuth.md) related information. For each ship, this consists of its public keys, its key revision number (or `life`), its continuity breach number (or `rift`) (see [Life and Rift](@/docs/azimuth/life-and-rift.md), and who the sponsor of the ship is. It also handles the local ship's private keys, keeps track of galaxy domain prefixes, and performs some boot-related tasks.
10+
11+By default, Jael's primary source of information is the Gall agent `%azimuth-tracker`, which (using `%eth-watcher`) runs a thread that polls an Ethereum node for transactions in the Azimuth contract. It can also get updates from other ships on the network. This is always the case for moons, where it subscribes to the moon's parent's Jael for updates.
12+
13+The database of PKI information that Jael maintains is used by other vanes and agents for identity validation, encryption, decryption, and other cryptographic functions. In particular, Ames (the network vane) uses the information stored in Jael to encrypt packets it sends to other ships, and to decrypt & validate packets it receives from other ships.
14+
15+Jael has a few `task`s you can use to interact with it. In particular, its [%public-keys task](@/docs/arvo/jael/tasks.md#public-keys) allows an agent or thread to subscribe for PKI updates for a `set` of `ship`s.
16+
17+# Jael Documentation Sections
18+
19+- [API Reference](@/docs/arvo/jael/tasks.md) - The `task`s Jael takes and the `gift`s it returns.
20+- [Scry Reference](@/docs/arvo/jael/scry.md) - The scry endpoints of Jael.
21+- [Data Types](@/docs/arvo/jael/data-types.md) - Reference documentation of the various data types used by Jael.
22+- [Examples](@/docs/arvo/jael/examples.md) - Practical examples of using Jael's `task`s.
content/docs/arvo/jael/scry.mdnew file+222
@@ -0,0 +1,222 @@
1++++
2+title = "Scry Reference"
3+weight = 3
4+template = "doc.html"
5++++
6+
7+Jael's scry endpoints never take a `care`. The particular endpoints are specified in the place of the desk in the path prefix, then additional arguments are specified in the path. Note this style of scry path is considered outdated, and may be changed in the future.
8+
9+# Contents
10+
11+- [step](#step) - Web login code revision number.
12+- [code](#code) - Web login code.
13+- [life](#life) - Key revision number (`life`).
14+- [lyfe](#lyfe) - Unitised `life`.
15+- [rift](#rift) - Continuity number (`rift`).
16+- [ryft](#ryft) - Unitised `rift`.
17+- [vein](#vein) - Private key.
18+- [vile](#vile) - Jammed `seed` boot parameters.
19+- [deed](#deed) - Public key and related details.
20+- [earl](#earl) - Derive moon keys.
21+- [sein](#sein) - Sponsor.
22+- [saxo](#saxo) - Sponsorship chain.
23+- [subscriptions](#subscriptions) - Public key trackers.
24+- [sources](#sources) - PKI sources.
25+- [turf](#turf) - Galaxy domain prefixes.
26+
27+# `%step`
28+
29+A `%step` scry gets the current web login code revision number. It takes your ship name as its `path` and the type returned is a `@ud`.
30+
31+## Example
32+
33+```
34+> .^(@ud %j /=step=/(scot %p our))
35+0
36+```
37+
38+# `%code`
39+
40+A `%code` scry gets the current web login code. It takes your ship name as its `path` and the type returned is a `@p`.
41+
42+## Example
43+
44+```
45+> .^(@p %j /=code=/(scot %p our))
46+~lidlut-tabwed-pillex-ridrup
47+```
48+
49+# `%life`
50+
51+A `%life` scry gets the current `life` (key revision number) of a ship if known, otherwise it crashes. It takes a ship as its `path` and the type returned is a `@ud`.
52+
53+## Example
54+
55+```
56+> .^(@ud %j /=life=/(scot %p our))
57+1
58+```
59+
60+# `%lyfe`
61+
62+A `%lyfe` scry gets the current unitized `life` (key revision number) of a ship if known, otherwise returns `~`. It takes a ship as its `path` and the type returned is a `(unit @ud)`.
63+
64+## Example
65+
66+```
67+> .^((unit @ud) %j /=lyfe=/(scot %p our))
68+[~ 1]
69+```
70+
71+# `%rift`
72+
73+A `%rift` scry gets the current `rift` (continuity number) of a ship if known, otherwise it crashes. It takes a ship as its `path` and the type returned is a `@ud`.
74+
75+## Example
76+
77+```
78+.^(@ud %j /=rift=/(scot %p our))
79+1
80+```
81+
82+# `%ryft`
83+
84+A `%ryft` scry gets the current unitized `rift` (continuity number) of a ship if known, otherwise it returns `~`. It takes a ship as its `path` and the type returned is a `(unit @ud)`.
85+
86+## Example
87+
88+```
89+> .^((unit @ud) %j /=ryft=/(scot %p our))
90+[~ 1]
91+```
92+
93+# `%vein`
94+
95+A `%vein` scry gets your ship's private key for the specified `life`. It takes a `life` `@ud` as its `path` and the type returned is a `ring`.
96+
97+## Example
98+
99+```
100+> .^(@uw %j /=vein=/1)
101+0w84.0MwlQ.y2Ly9.6HVmH.8SYwo.EvuLC.f5YRw.T2NzD.EHtjZ.gpHZb.J0Pu5.aTGVL.UugSA.EZ~E9.~PODC.cohVD.B1zWj.ZWnJ2
102+```
103+
104+# `%vile`
105+
106+A `%vile` scry gets your `jam`mmed private boot parameters at your ship's current `life`. It takes no additional arguments in its `path`. The type returned is a `@` which is a `jam`med [$seed](@/docs/arvo/jael/data-types.md#seed).
107+
108+## Examples
109+
110+```
111+> .^(@ %j /=vile=)
112+73.825.716.773.695.891.582.219.653.213.376.682.408.892.852.624.025.387.720.465.884.094.267.975.202.807.896.467.150.282.384.122.104.470.678.155.055.914.950.319.747.613.107.324.566.157.366.237.078.063.363.527.599.682.750.233
113+```
114+
115+```
116+> ;;(seed:jael (cue .^(@ %j /=vile=)))
117+[ who=~zod
118+ lyf=1
119+ key
120+ 1.729.646.917.183.337.262.068.568.133.450.460.269.618.308.934.734.494.661.340.450.478.360.301.077.532.415.587.141.242.844.893.269.500.211.196.916.184.768.225.437.577.083.064.475.012.067.992.317.942.521.494.338
121+ sig=~
122+]
123+```
124+
125+# `%deed`
126+
127+A `%deed` scry gets the `life`, pubkey and maybe a signature if the ship in question is a comet. It takes the target ship and life as its `path` like `/~sampel-palnet/1` and the type returned is a `[life pass (unit @ux)]`.
128+
129+## Example
130+
131+```
132+> .^([life pass (unit @ux)] %j /=deed=/(scot %p our)/1)
133+[ 1
134+ 2.649.818.598.466.464.524.534.996.841.661.372.043.001.125.438.577.869.575.450.096.229.472.239.369.342.882.589.479.483.389.735.480.760.982.635.242.955.515.616.049.650.771.700.602.823.946.406.713.457.849.302.626
135+ ~
136+]
137+```
138+
139+# `%earl`
140+
141+A `%earl` scry deterministically derives a private key for a moon. Note this is a holdover from an old version of moon infrastructure, the current `|moon` generator doesn't use this and instead generates moon private keys non-deterministically. It takes the moon name and your ship's current `life` (not the moon's `life`) as its `path` like `/~doznec-dozzod-dozzod-dozzod/1`. The type returned is a [$seed](@/docs/arvo/jael/data-types.md#seed), the `life` of the moon in the `lyf` field of the `seed` will always be `1`.
142+
143+## Example
144+
145+```
146+> .^(seed:jael %j /=earl=/~doznec-dozzod-dozzod-dozzod/1)
147+[ who=~doznec-dozzod-dozzod-dozzod
148+ lyf=1
149+ key
150+ 1.055.418.877.440.612.330.077.014.834.463.499.863.663.523.990.336.436.220.536.921.445.512.367.957.276.250.223.724.881.932.188.751.226.308.505.496.234.256.625.462.295.144.257.529.749.880.805.247.600.674.018.370
151+ sig=~
152+]
153+```
154+
155+# `%sein`
156+
157+A `%sein` scry gets the sponsor for the specified ship. This scry is used implicitly by `sein:title`. It takes the target ship as its `path` and the type returned is a `@p`.
158+
159+## Example
160+
161+```
162+> .^(@p %j /=sein=/~sampel-palnet)
163+~talpur
164+```
165+
166+# `%saxo`
167+
168+A `%saxo` scry gets the sponsorship chain for the target ship (including the target ship itself). For example, a `%saxo` scry for a planet will return the planet, its star and the star's galaxy. This scry is used implicitly by `saxo:title`. It takes the target ship as its `path` and the type returned is a `(list @p)`.
169+
170+## Example
171+
172+```
173+> .^((list @p) %j /=saxo=/~sampel-palnet)
174+~[~sampel-palnet ~talpur ~pur]
175+```
176+
177+# `%subscriptions`
178+
179+A `%subscriptions` scry gets the current state of subscriptions to public key updates (typically initiated with a [%public-keys task](@/docs/arvo/jael/tasks.md#public-keys)). It takes a `life` as its `path` and returns a triple consisting of the following:
180+
181+```hoon
182+yen=(jug duct ship) :: trackers
183+ney=(jug ship duct) :: reverse trackers
184+nel=(set duct) :: trackers of all
185+```
186+
187+The `yen` `jug` maps subscribed `duct`s to the `ship`s they're tracking, and `ney` is just the inverse, mapping tracked `ship`s to subscribed `duct`s. The `nel` set contains `duct`s track all public key updates.
188+
189+## Example
190+
191+```
192+.^([yen=(jug duct ship) ney=(jug ship duct) nel=(set duct)] %j /=subscriptions=/1)
193+[yen={} ney={} nel={}]
194+```
195+
196+# `%sources`
197+
198+A `%sources` scry gets the current state of Jael's sources for PKI updates. It takes no additional arguments in its `path` and returns a [$state-eth-node](@/docs/arvo/jael/data-types.md#state-eth-node).
199+
200+## Example
201+
202+```
203+> .^(state-eth-node:jael %j /=sources=)
204+[ top-source-id=0
205+ sources={}
206+ sources-reverse={}
207+ default-source=0
208+ ship-sources={}
209+ ship-sources-reverse={}
210+]
211+```
212+
213+# `%turf`
214+
215+A `%turf` scry gets the list of domain prefixes for galaxies. It takes no additional arguments in its `path`. It returns a `(list turf)`, where a `turf` is a TLD-first `(list @t)`, so `urbit.org` as a `turf` is `~['org' 'urbit']`.
216+
217+## Example
218+
219+```
220+> .^((list turf) %j /=turf=)
221+~[<|org urbit|>]
222+```
content/docs/arvo/jael/tasks.mdnew file+239
@@ -0,0 +1,239 @@
1++++
2+title = "API Reference"
3+weight = 2
4+template = "doc.html"
5++++
6+
7+This document details all the `task`s you may wish to send Jael, as well as the `gift`s you'll receive in response.
8+
9+You may also wish to reference the [Data Types](@/docs/arvo/jael/data-types.md) document for details of the types referenced here, and the [Examples](@/docs/arvo/jael/examples.md) document for practical examples of using these `task`s.
10+
11+# Contents
12+
13+- [%dawn](#dawn) - _(Internal only)_ - Boot from keys.
14+- [%fake](#fake) - _(Internal only)_ - Boot fake ship.
15+- [%listen](#listen) - _(Usually internal)_ - Set Ethereum Source.
16+- [%meet](#meet) - _Deprecated._
17+- [%moon](#moon) - Register moon keys or otherwise administer a moon.
18+- [%nuke](#nuke) - Cancel subscription to public or private key updates.
19+- [%private-keys](#private-keys) - Subscribe to private key updates.
20+- [%public-keys](#public-keys) - Subscribe to public key (and related) updates from Jael.
21+- [%rekey](#rekey)- Update private keys.
22+- [%turf](#turf) - View domains.
23+- [%step](#step) - Reset web login code.
24+
25+# `%dawn`
26+
27+```hoon
28+[%dawn dawn-event]
29+```
30+
31+Boot from keys.
32+
33+This `task` is called once per ship during the vane initialization phase immediately following the beginning of the [adult stage](@/docs/arvo/overview.md#structural-interface-core). This `task` is `%pass`ed to Jael by Dill, as Dill is the first vane to be loaded for technical reasons, though we consider Jael to be the true "first" vane. This `task` is only used for ships that will join the Ames network - fake ships (i.e. made with `./urbit -F zod`) use the [%fake](#fake) `task` instead.
34+
35+`%dawn` is used to perform a sequence of initialization tasks related to saving information about Azimuth and the Ames network and booting other vanes for the first time. Upon receipt of a `%dawn` `task`, Jael will:
36+
37+- record the Ethereum block the public key is registered to,
38+- record the URL of the Ethereum node used,
39+- save the signature of the parent planet (if the ship is a moon),
40+- load the initial public and private keys for the ship,
41+- set the DNS suffix(es) used by the network (currently just `urbit.org`),
42+- save the public keys of all galaxies,
43+- set Jael to subscribe to `%azimuth-tracker`,
44+- `%slip` a `%init` `task` to Ames, Clay, Gall, Dill, and Eyre, and `%give` an `%init`
45+ `gift` to Arvo, which then informs Unix that the initialization process has concluded.
46+
47+This `task` takes a [$dawn-event](@/docs/arvo/jael/data-types.md#dawn-event) as its argument.
48+
49+You would not use this `task` manually.
50+
51+## Returns
52+
53+Jael `%give`s an `%init` `gift` to Unix. This occurs after the Dill `%slip` init.
54+
55+# `%fake`
56+
57+```hoon
58+[%fake =ship]
59+```
60+
61+Boot fake ship.
62+
63+This `task` is used instead of [%dawn](#dawn) when creating a fake ship via the `-F` flag when calling the Urbit binary. It performs a subset of the actions that `%dawn` performs, modified to accommodate the fake ship.
64+
65+`%fake` endows the ship with a private key and a public key deterministically derived from the ship's `@p`. It sets `fak.own.pki` to `%.y`, which is the bit that determines whether or not a ship is fake. Other parts of the Jael state, such as the sponsorship chain and galaxy public keys are left at their bunted values.
66+
67+The `ship` field specifies the `@p` of the fake ship being created.
68+
69+You would not use this `task` manually.
70+
71+## Returns
72+
73+Jael `%give`s a `%init` `gift` to Unix.
74+
75+# `%listen`
76+
77+```hoon
78+[%listen whos=(set ship) =source]
79+```
80+
81+Set Ethereum source.
82+
83+Sets the source that the public keys for a set of `ship`s should be obtained from. This can either be a Gall app that communicates with an Ethereum node such as `%azimuth-tracker`, as in the case of galaxies, stars, and planets, or a ship, as in the case of moons.
84+
85+`whos` is the set of ships whose key data source is to be monitored. The [$source](@/docs/arvo/jael/data-types.md#source) is either a ship or the name of a Gall app to use as a source. A `%listen` `task` with empty `whos` will set the default source. When the `source` is a ship, Jael will obtain public keys for ships in `(set ship)` from the given ship. By default, the `source` for a moon will be the planet that spawned that moon.
86+
87+You are unlikely to use this `task` manually.
88+
89+## Returns
90+
91+Jael will not return any `gift`s in response to a `%listen` `task`.
92+
93+# `%meet`
94+
95+```hoon
96+[%meet =ship =life =pass]
97+```
98+
99+This `task` is deprecated and does not perform any actions.
100+
101+# `%moon`
102+
103+```hoon
104+[%moon =ship =udiff:point]
105+```
106+
107+Register moon keys or otherwise administer a moon.
108+
109+This is what is sent to Jael by `%hood` behind the scenes when you run `|moon`, `|moon-breach` or `|moon-cycle-keys`. The `ship` field is the moon's `@p`. The [$udiff:point](@/docs/arvo/jael/data-types.md#udiff-point) will contain the bunt of an [$id:block](@/docs/arvo/jael/data-types.md#id-block) (since moons aren't registered in Azimuth) and one of the `udiff` actions depending on what you want to do.
110+
111+## Returns
112+
113+Jael does not return any `gift`s in response to a `%moon` `task`.
114+
115+# `%nuke`
116+
117+```hoon
118+[%nuke whos=(set ship)]
119+```
120+
121+Cancel subscription to public or private key updates.
122+
123+If you've subscribed to public or private key updates from Jael with a [%private-keys](#private-keys) or [%public-keys](#public-keys) `task`, you can unsubscribe and stop receiving updates with a `%nuke` `task`. The `(set ship)` is the `set` of `ship`s which you want to stop tracking. Jael organises subscriptions based on `duct`s, and will determine which subscription to cancel implicitly based on the `duct` the `%nuke` `task` came from. This means a `%nuke` `task` only works from the same thread or agent and on the same `path` as the original subscription request.
124+
125+To cancel a subscription to the ship's private keys you must leave `whos` empty like `[%nuke ~]`.
126+
127+## Returns
128+
129+Jael does not return a `gift` in response to a `%nuke` `task`.
130+
131+## Examples
132+
133+See the [%public-keys and %nuke](@/docs/arvo/jael/examples.md#public-keys-and-nuke) section of the Examples document for an example of using `%nuke` to cancel a `%public-keys` subscription. See the thread in the [%private-keys](@/docs/arvo/jael/examples.md#private-keys) example for cancelling a `%private-keys` subscription.
134+
135+# `%private-keys`
136+
137+```hoon
138+[%private-keys ~]
139+```
140+
141+Subscribe to private key updates.
142+
143+Subscribe to be notified of private key updates for the local ship. The subscription will continue until Jael receives a [%nuke](#nuke) `task` to cancel it.
144+
145+## Returns
146+
147+Jael responds to a `%private-keys` `task` with a `%private-keys` `gift` which looks like:
148+
149+```hoon
150+[%private-keys =life vein=(map life ring)]
151+```
152+
153+The `life` is the current life of the ship and the `vein` `map` contains the private key for each life up to (and including) the current one. Upon first subscribing, Jael will immediately respond with a `%private-keys` `gift`. Then, whenever the ship's private keys are changed, it'll send a new and updated `%private-keys` `gift`.
154+
155+## Example
156+
157+See the [%private-keys](@/docs/arvo/jael/examples.md#private-keys) section of the Examples document for a practical example.
158+
159+# `%public-keys`
160+
161+```hoon
162+[%public-keys ships=(set ship)]
163+```
164+
165+Subscribe to public key (and related) updates from Jael.
166+
167+An agent or thread can subscribe to be notified of public key updates, sponsorship changes and continuity breaches for the `set` of `ship`s specified in the `ships` field. The subscription will continue until Jael receives a [%nuke](#nuke) `task` to cancel it.
168+
169+## Returns
170+
171+Jael responds to a `%public-keys` `task` with `%public-keys` `gift`s which look like:
172+
173+```hoon
174+[%public-keys =public-keys-result]
175+```
176+
177+The [$public-keys-result](@/docs/arvo/jael/data-types.md#public-keys-result) contains whatever changes have occurred.
178+
179+Upon subscription, Jael will immeditely respond with a `%public-keys` `gift` containing a `%full` `public-keys-result` with the public key for each `life` up until the current one for each `ship` specified in the original `task`. After than, Jael will send a `%public-keys` `gift` with either a `%diff` or `%breach` `public-keys-result` each time a change occurs for any of the `ship`s to which you're subscribed.
180+
181+## Example
182+
183+See the [%public-keys and %nuke](@/docs/arvo/jael/examples.md#public-keys-and-nuke) section of the Examples document for a practical example.
184+
185+# `%rekey`
186+
187+```hoon
188+[%rekey =life =ring]
189+```
190+
191+Update private keys.
192+
193+This is what is sent to Jael by `%hood` when you run `|rekey`, as you must after setting new Azimuth keys or running `|cycle-moon-keys` on a moon's parent. It will update your `life` (key revision number) and private keys. The `life` field is the new `life` (typically an increment of the current `life`) and the `ring` is a private key `@`.
194+
195+## Returns
196+
197+Jael does not return any `gift` in response to a `%rekey` `task`.
198+
199+# `%turf`
200+
201+```hoon
202+[%turf ~]
203+```
204+
205+View domains.
206+
207+The domains returned by a `%turf` `task` are used as the base for individual galaxy domain names (e.g. from `urbit.org` you get `zod.urbit.org`, `bus.urbit.org`, etc). Jael gets these from Azimuth, then Ames gets them from Jael and passes them to the runtime, which will perform the DNS lookups and give Ames back the galaxy IP addresses. A `%turf` task takes no additional arguments. You're unlikely to use this manually - if you want the current `turf`s you'd likely want to do a [turf scry](@/docs/arvo/jael/scry.md#turf) instead.
208+
209+## Returns
210+
211+Jael will respond to a `%turf` `task` with a `%turf` `gift`, which looks like:
212+
213+```hoon
214+[%turf turf=(list turf)]
215+```
216+
217+The `turf` in the `(list turf)` is a domain as a `(list @t)`, TLD-first. The current default is `[['org' 'urbit' ~] ~]`.
218+
219+## Example
220+
221+See the [%turf section of the Examples document](@/docs/arvo/jael/examples.md#turf) for a practical example.
222+
223+# `%step`
224+
225+```hoon
226+[%step ~]
227+```
228+
229+Reset web login code.
230+
231+Jael maintains a `step` value that represents the web login code revision number, and uses it to derive the code itself. It begins at `0` and is incremented each time the code is changed. When Jael updates the web login code, it sends Eyre a `%code-changed` `task:eyre` so that Eyre can throw away all of its current cookies and sessions. A `%step` task takes no additional argument.
232+
233+## Returns
234+
235+Jael does not return a `gift` in response to a `%step` `task`.
236+
237+## Example
238+
239+See the [%step](@/docs/arvo/jael/examples.md#step) section of the Examples document for a practical example.