summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 9f6cade..40540fe 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -24,9 +24,14 @@ main = do
putStr "Name: "
hFlush stdout
name <- T.getLine
+
(secret, public) <- generateKeys st
+ (devSecret, devPublic) <- generateKeys st
+
+ owner <- wrappedStore st =<< sign secret =<< wrappedStore st (emptyIdentity public) { idName = Just name }
+ base <- signAdd devSecret =<< sign secret =<<
+ wrappedStore st (emptyIdentity devPublic) { idOwner = Just owner }
- base <- sign secret =<< wrappedStore st (Identity name Nothing public)
Right h <- replaceHead base (Left (st, "identity"))
return h
let sidentity = wrappedLoad (headRef idhead) :: Stored Identity