summaryrefslogtreecommitdiff
path: root/app/lib/nostrill.hoon
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/nostrill.hoon')
-rw-r--r--app/lib/nostrill.hoon19
1 files changed, 18 insertions, 1 deletions
diff --git a/app/lib/nostrill.hoon b/app/lib/nostrill.hoon
index 41caff2..933dc7f 100644
--- a/app/lib/nostrill.hoon
+++ b/app/lib/nostrill.hoon
@@ -1,5 +1,6 @@
/- post=trill-post, nsur=nostr, sur=nostrill, gate=trill-gate, comms=nostrill-comms
-/+ trill=trill-post, nostr-keys, sr=sortug, jsonlib=json-nostrill
+/+ trill=trill-post, nostr-keys, sr=sortug, jsonlib=json-nostrill,
+ ws=websockets
|%
::
++ default-state |= =bowl:gall ^- state:sur
@@ -28,12 +29,28 @@
~& >> total=total-received
$(l t.l)
+++ ui-ws-res |= [wid=@ msg=@t]
+
+ =/ resmsg (cat 3 msg (cat 3 msg msg))
+ =/ octs (as-octs:mimes:html resmsg)
+ =/ res-event=websocket-event:eyre [%message 1 `octs]
+ (give-ws-payload:ws wid res-event)
::
++ cards
|_ =bowl:gall
++ shim-binding ^- card:agent:gall
[%pass /binding %arvo %e %connect [~ /nostr-shim] dap.bowl]
+
+ ++ relay-binding ^- card:agent:gall
+ [%pass /binding %arvo %e %connect [~ /nostrill] dap.bowl]
+ ++ ui-binding ^- card:agent:gall
+ [%pass /binding %arvo %e %connect [~ /nostrill-ui] dap.bowl]
+ ++ bindings
+ :~ shim-binding
+ relay-binding
+ ui-binding
+ ==
++ update-ui |= =fact:ui:sur ^- card:agent:gall
=/ jon (fact:en:jsonlib fact)
[%give %fact ~[/ui] %json !>(jon)]