ames: handle remote scry requests for gall data

This commit is contained in:
~wicrum-wicrun 2023-03-23 18:51:19 +01:00
parent 439184fa7c
commit d76057cac7

View File

@ -4661,24 +4661,37 @@
?~ blk=(de-path-soft:balk pax.tyl) ~ ?~ blk=(de-path-soft:balk pax.tyl) ~
=+ nom=(en-roof:balk u.blk) =+ nom=(en-roof:balk u.blk)
~| nom ~| nom
:: we only support scrying into clay, |^
:: and only if the data is fully public. =/ van ?@(vis.nom (end 3 vis.nom) way.vis.nom)
:: ?+ van ~
?. =(%c ?@(vis.nom (end 3 vis.nom) way.vis.nom)) ~ %c
=+ pem=(rof lyc nom(vis %cp)) =+ pem=(rof lyc nom(vis %cp))
?. ?=(^ pem) ~ ?. ?=(^ pem) ~
?. ?=(^ u.pem) ~ ?. ?=(^ u.pem) ~
~| u.u.pem ~| u.u.pem
=+ per=!<([r=dict:clay w=dict:clay] q.u.u.pem) =+ per=!<([r=dict:clay w=dict:clay] q.u.u.pem)
?. =([%black ~ ~] rul.r.per) ~ ?. =([%black ~ ~] rul.r.per) ~
=+ res=(rof lyc nom) (en-hunk (rof lyc nom))
::
%g
=/ kyr ?@(vis.nom (rsh 3 vis.nom) car.vis.nom)
%- en-hunk
?+ kyr ~
%a (rof lyc nom)
==
==
::
++ en-hunk
|= res=(unit (unit cage))
^+ res
?~ res ~
=/ =hunk [(slav %ud lop.tyl) (slav %ud len.tyl)] =/ =hunk [(slav %ud lop.tyl) (slav %ud len.tyl)]
:: ::
=/ hu-co (etch-hunk our [life crypto-core]:ames-state) =/ hu-co (etch-hunk our [life crypto-core]:ames-state)
?- res ?- res
~ ~
[~ ~] ``noun+!>((etch:hu-co pax.tyl hunk ~)) [~ ~] ``noun+!>((etch:hu-co pax.tyl hunk ~))
[~ ~ *] ``noun+!>((etch:hu-co pax.tyl hunk [p q.q]:u.u.res)) [~ ~ *] ``noun+!>((etch:hu-co pax.tyl hunk [p q.q]:u.u.res))
== ==
--
== ==
-- --