From f0df4c7297a05bd592d8717b8997284c80fd0500 Mon Sep 17 00:00:00 2001 From: polwex Date: Wed, 17 Sep 2025 15:56:00 +0700 Subject: argh --- desk/lib/json/nostr.hoon | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'desk/lib/json/nostr.hoon') diff --git a/desk/lib/json/nostr.hoon b/desk/lib/json/nostr.hoon index 9c36eb0..6f93c1c 100644 --- a/desk/lib/json/nostr.hoon +++ b/desk/lib/json/nostr.hoon @@ -38,9 +38,11 @@ :: ++ raw-event |= raw-event:sur :: WTF nostr doesn't want the prefix on the pubkey - =/ pubkeyt (scow:sr %ux pubkey) + =/ scw scow:sr + =/ pubkeyt (scw(min-chars 64) %ux pubkey) ?~ pubkeyt !! - =/ pubkeyj [%s (crip t.pubkeyt)] + :: =/ pubkeyj [%s (crip t.pubkeyt)] + =/ pubkeyj [%s (crip pubkeyt)] :- %a :~ [%n '0'] pubkeyj @@ -51,13 +53,13 @@ == ++ event |= e=event:sur ^- json - =/ pubkeyt (scow:sr %ux pubkey.e) - ?~ pubkeyt !! - =/ pubkeyj [%s (crip t.pubkeyt)] + :: =/ pubkeyt (scow:sr %ux pubkey.e) + :: ?~ pubkeyt !! + :: =/ pubkeyj [%s (crip t.pubkeyt)] %: pairs id+(hex:en:common id.e) - :: pubkey+(hex:en:common pubkey.e) - pubkey+pubkeyj + pubkey+(hex:en:common pubkey.e) + :: pubkey+pubkeyj sig+(hex:en:common sig.e) ['created_at' (numb created-at.e)] kind+(numb kind.e) -- cgit v1.2.3