mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-13 20:04:35 +03:00
watch commands
This commit is contained in:
parent
48183e57be
commit
5375f216c6
@ -41,16 +41,21 @@
|
||||
?+ mark (on-poke:def mark vase)
|
||||
%noun
|
||||
?+ q.vase (on-poke:def mark vase)
|
||||
%send-tx
|
||||
~& >>> %send-tx
|
||||
`this
|
||||
%status
|
||||
:_ this
|
||||
~[[%pass / %agent [our.bowl %btc-node-hook] %poke %btc-node-hook-action !>([%get-block-count ~])]]
|
||||
==
|
||||
==
|
||||
::
|
||||
++ on-watch on-watch:def
|
||||
++ on-leave on-leave:def
|
||||
++ on-peek on-peek:def
|
||||
++ on-agent on-agent:def
|
||||
++ on-agent
|
||||
|= [=wire =sign:agent:gall]
|
||||
^- (quip card _this)
|
||||
:: ?+ (on-agent:def wire sign)
|
||||
~& >> "{<sign>}"
|
||||
`this
|
||||
++ on-arvo on-arvo:def
|
||||
++ on-fail on-fail:def
|
||||
--
|
||||
|
@ -117,6 +117,12 @@
|
||||
%credentials
|
||||
:_ state(endpoint url.comm, user user.comm, pass pass.comm)
|
||||
[%pass / %arvo %d %flog [%text "credentials updated..."]]~
|
||||
%watch
|
||||
~& >> comm
|
||||
`state(watched-calls (~(put in watched-calls) call.comm))
|
||||
%unwatch
|
||||
~& >> comm
|
||||
`state(watched-calls (~(del in watched-calls) call.comm))
|
||||
==
|
||||
::
|
||||
++ httr-to-rpc-response
|
||||
|
@ -13,4 +13,6 @@
|
||||
:- %btc-node-hook-command
|
||||
?+ -.comm ~| [%unsupported-command -.comm] !!
|
||||
%credentials comm
|
||||
%watch comm
|
||||
%unwatch comm
|
||||
==
|
||||
|
@ -2020,6 +2020,12 @@
|
||||
$% :: Loads RPC node URL+credentials
|
||||
::
|
||||
[%credentials url=@t user=@t pass=@t]
|
||||
:: Adds an RPC call to the set of calls that trigger a broadcast to subscribers
|
||||
::
|
||||
[%watch call=term]
|
||||
:: Removes an RPC call from the set of calls that trigger a broadcast to subscribers
|
||||
::
|
||||
[%unwatch call=term]
|
||||
:: TODO: Sync data/wallets...
|
||||
::
|
||||
[%sync ~]
|
||||
|
Loading…
Reference in New Issue
Block a user