diff options
Diffstat (limited to 'desk/sur/nostrill.hoon')
-rw-r--r-- | desk/sur/nostrill.hoon | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/desk/sur/nostrill.hoon b/desk/sur/nostrill.hoon new file mode 100644 index 0000000..ad82661 --- /dev/null +++ b/desk/sur/nostrill.hoon @@ -0,0 +1,52 @@ +/- trill=trill-feed, nostr +|% ++$ state state-0 ++$ state-0 + $: %0 + :: nostr config + relays=(map @t relay-stats:nostr) + keys=(lest keys:nostr) :: cycled, i.keys is current one + :: own feed + feed=feed:trill + :: nostr feed from relays + =nostr-feed + :: profiles + profiles=(map @ux user-meta:nostr) + following=(map @ux =feed:trill) + follow-graph=(map @ux (set follow)) + :: for http requests + pending=(map @t [pending=filter:nostr done=filter:nostr]) + :: TODO global feed somehow? + + == ++$ nostr-feed ((mop @ud event:nostr) gth) +++ norm ((on @ud event:nostr) gth) ++$ follow [pubkey=@ux name=@t relay=(unit @t)] +++ ui + |% + +$ poke + $% [%fols fols-poke] + [%post post-poke] + :: [%reac reac-poke] + [%prof prof-poke] + [%keys ~] :: cycle-keys + [%rela relay-poke] + == + +$ post-poke + $% [%add pubkey=@ux content=@t] + [%rt id=@ux pubkey=@ux relay=@t] :: NIP-18 + [%del pubkey=@ux] + == + +$ fols-poke + $% [%add pubkey=@ux] + [%del pubkey=@ux] + == + +$ prof-poke + $% [%add pubkey=@ux meta=user-meta:nostr] + [%del pubkey=@ux] + == + +$ relay-poke + $% [%send host=@p id=@ relays=(list @t)] + == + -- +-- |