-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakemylocker.rho
29 lines (29 loc) · 1.08 KB
/
makemylocker.rho
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
new lookupCh, stdout(`rho:io:stdout`),
lookup(`rho:registry:lookup`), insert(`rho:registry:insertArbitrary`), insCh in {
lookup!($Locker, *lookupCh) |
for(Locker <- lookupCh) {
stdout!(["found Locker",*Locker]) |
new capabilities, ret, inboxCh, lockerCh, uriCh in {
Locker!($mypubkey.hexToBytes(), *lockerCh) | for(locker <- lockerCh) {
stdout!("made Locker") |
insert!(*locker, *uriCh) | for (@uri <- uriCh) {
stdout!(["#define $locker_" ++ $myusername, uri])
} |
lookup!($Inbox, *inboxCh) |
for (inbox <- inboxCh) {
inbox!(*capabilities) |
for (receive, send, peek <- capabilities) {
stdout!(["#define $locker_nonce_" ++ $myusername, 1]) |
locker!("update", $myprivkey.hexToBytes(),0, {"inbox": *send, "receive": *receive, "peek": *peek}, *stdout, *ret) |
for (_ <- ret) {
insert!(*send,*ret)|
for (uri <- ret) {
stdout!(["#define $inbox_" ++ $myusername, *uri])
}
}
}
}
}
}
}
}