summaryrefslogtreecommitdiff
path: root/desk/lib/json/nostr.hoon
diff options
context:
space:
mode:
Diffstat (limited to 'desk/lib/json/nostr.hoon')
-rw-r--r--desk/lib/json/nostr.hoon16
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)