mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 13:04:17 +03:00
naive: fix key format for tests
This commit is contained in:
parent
2099f87290
commit
84a8a5c860
@ -1,4 +1,4 @@
|
||||
/+ *test, naive, ethereum
|
||||
/+ *test, naive, ethereum, azimuth
|
||||
|%
|
||||
++ address @ux
|
||||
++ n |=([=^state:naive =^input:naive] (%*(. naive lac |) verifier 1.337 +<))
|
||||
@ -383,15 +383,17 @@
|
||||
++ test-l1-changed-keys ^- tang
|
||||
=/ encrypt (shax 'Your eyes dont see, you do.')
|
||||
=/ auth (shax 'We think much less than we think we think.')
|
||||
=/ new-keys [~bud encrypt auth 1 1]
|
||||
=/ suite 1
|
||||
=/ life 1
|
||||
=/ new-keys [~bud encrypt auth suite life]
|
||||
%+ expect-eq
|
||||
!> (pass-from-eth:naive 32^encrypt 32^auth 1)
|
||||
!> [suite auth encrypt]
|
||||
::
|
||||
!>
|
||||
=| =^state:naive
|
||||
=^ f state (init-bud state)
|
||||
=^ f state (n state (changed-keys:l1 new-keys))
|
||||
pass.net:(~(got by points.state) ~bud)
|
||||
|1:keys.net:(~(got by points.state) ~bud)
|
||||
::
|
||||
++ test-l2-set-spawn-proxy ^- tang
|
||||
%+ expect-eq
|
||||
@ -456,28 +458,29 @@
|
||||
++ test-marbud-l2-change-keys
|
||||
=/ encrypt (shax 'You will forget that you ever read this sentence.')
|
||||
=/ auth (shax 'You cant know that this sentence is true.')
|
||||
=/ new-keys-own [0 ~marbud %marbud-key-0 %own 0 encrypt auth 1]
|
||||
=/ new-keys-mgt [0 ~marbud %marbud-mgt %manage 0 encrypt auth 1]
|
||||
=/ suite 1
|
||||
=/ new-keys-own [0 ~marbud %marbud-key-0 %own 0 encrypt auth suite]
|
||||
=/ new-keys-mgt [0 ~marbud %marbud-mgt %manage 0 encrypt auth suite]
|
||||
=/ mgt-proxy [0 ~marbud %marbud-key-0 %own (addr %marbud-mgt)]
|
||||
;: weld
|
||||
%+ expect-eq
|
||||
!> (pass-from-eth:naive 32^encrypt 32^auth 1)
|
||||
!> [suite auth encrypt]
|
||||
::
|
||||
!>
|
||||
=| =^state:naive
|
||||
=^ f state (init-marbud state)
|
||||
=^ f state (n state %bat q:(configure-keys:l2 new-keys-own))
|
||||
pass.net:(~(got by points.state) ~marbud)
|
||||
|1:keys.net:(~(got by points.state) ~marbud)
|
||||
::
|
||||
%+ expect-eq
|
||||
!> (pass-from-eth:naive 32^encrypt 32^auth 1)
|
||||
!> [suite auth encrypt]
|
||||
::
|
||||
!>
|
||||
=| =^state:naive
|
||||
=^ f state (init-marbud state)
|
||||
=^ f state (n state %bat q:(set-management-proxy:l2 mgt-proxy))
|
||||
=^ f state (n state %bat q:(configure-keys:l2 new-keys-mgt))
|
||||
pass.net:(~(got by points.state) ~marbud)
|
||||
|1:keys.net:(~(got by points.state) ~marbud)
|
||||
::
|
||||
:: TODO: make sure nobody else can change these keys
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user