mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 12:51:51 +03:00
dm-hook: sign, hash messages
This commit is contained in:
parent
31a84f583f
commit
251f0a5bd1
@ -59,12 +59,12 @@
|
|||||||
::
|
::
|
||||||
%graph-update-2
|
%graph-update-2
|
||||||
=+ !<(=update:store vase)
|
=+ !<(=update:store vase)
|
||||||
?+ -.q.update `this
|
?+ -.q.update !!
|
||||||
%add-nodes
|
%add-nodes
|
||||||
?> ?=([@ %inbox] resource.q.update)
|
?> ?=([@ %inbox] resource.q.update)
|
||||||
=^ cards state
|
=^ cards state
|
||||||
?: =(our.bowl src.bowl)
|
?: =(our.bowl src.bowl)
|
||||||
(outgoing-add nodes.q.update)
|
(outgoing-add (hash-and-sign nodes.q.update))
|
||||||
?: &(screening !(dm-exists src.bowl))
|
?: &(screening !(dm-exists src.bowl))
|
||||||
(screen-add nodes.q.update)
|
(screen-add nodes.q.update)
|
||||||
(incoming-add nodes.q.update)
|
(incoming-add nodes.q.update)
|
||||||
@ -72,6 +72,25 @@
|
|||||||
==
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ hash-and-sign
|
||||||
|
|= =nodes
|
||||||
|
%- ~(gas by *^nodes)
|
||||||
|
%+ turn ~(tap by nodes)
|
||||||
|
|= [=index:store =node:store]
|
||||||
|
^- [index:store node:store]
|
||||||
|
:- index
|
||||||
|
?> ?=(%& -.post.node)
|
||||||
|
=* p post.node
|
||||||
|
=/ =hash:store
|
||||||
|
`@ux`(sham [~ author time-sent contents]:p.p)
|
||||||
|
%_ node
|
||||||
|
hash.p.post `hash
|
||||||
|
::
|
||||||
|
signatures.p.post
|
||||||
|
%- ~(gas in *signatures:store)
|
||||||
|
[(sign:sig our.bowl now.bowl hash)]~
|
||||||
|
==
|
||||||
|
::
|
||||||
++ give
|
++ give
|
||||||
|= =action:hook
|
|= =action:hook
|
||||||
^- card
|
^- card
|
||||||
|
Loading…
Reference in New Issue
Block a user