diff options
author | polwex <polwex@sortug.com> | 2025-09-17 15:56:00 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-09-17 15:56:00 +0700 |
commit | f0df4c7297a05bd592d8717b8997284c80fd0500 (patch) | |
tree | 2d38e079e971a2e98e78a0f7a3104f2bd3c5daeb /desk/lib/json/nostr.hoon | |
parent | 387af8fc1603805b02ce03f8adba4fa73a954f7c (diff) |
argh
Diffstat (limited to 'desk/lib/json/nostr.hoon')
-rw-r--r-- | desk/lib/json/nostr.hoon | 16 |
1 files changed, 9 insertions, 7 deletions
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) |