diff options
Diffstat (limited to 'desk/lib/nostril.hoon')
-rw-r--r-- | desk/lib/nostril.hoon | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/desk/lib/nostril.hoon b/desk/lib/nostril.hoon new file mode 100644 index 0000000..1392380 --- /dev/null +++ b/desk/lib/nostril.hoon @@ -0,0 +1,23 @@ +/- sur=nostril +|% +++ gen-keys |= eny=@ ^- keys:sur + =, secp256k1:secp:crypto + =/ privkey + |- + =/ k (~(rad og eny) (bex 256)) + ?. (lth k n.t) $ k + + =/ pubkey (priv-to-pub privkey) + ~& priv=privkey + ~& pub=pubkey + =/ pub (compress-point pubkey) + :: =/ pub (serialize-point pubkey) + ~& pub-hex=((x-co:co 0) pub) + [pub=pub priv=privkey] +:: +++ cards +|_ =bowl:gall + ++ shim-binding ^- card:agent:gall + [%pass /binding %arvo %e %connect [~ /nostr-shim] dap.bowl] + -- +-- |