From 7c0681a06e0358887d2f64001dc43125554766c9 Mon Sep 17 00:00:00 2001 From: polwex Date: Thu, 28 Aug 2025 12:59:01 +0700 Subject: init --- desk/lib/nostril.hoon | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 desk/lib/nostril.hoon (limited to 'desk/lib/nostril.hoon') 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] + -- +-- -- cgit v1.2.3