working JSON request and parsing
%btc-bridge-command
(handle-command:hc !<(command vase))
%btc-bridge-rpc-action
- ~& > !<(rpc-action vase)
- `state
+ =/ act=rpc-action !<(rpc-action vase)
+ ?+ -.act (on-poke:def mark vase)
+ %brpc
+ (handle-action +.act)
+ ==
==
[cards this]
::
^- (quip card _state)
?- -.comm
%become-host
- :: TODO send a subscription to the node hook; update status in on-agent when ack'd
- `state(credentials credentials.comm)
+ `state(credentials credentials.comm, status [%host connected=%.y clients=*(set ship)])
%connect-as-client
:: TODO send a subscription to the btc-bridge host
:: update status in on-agent when ack'd by BTC-BRIDGE
++ http-response
|= [=wire response=client-response:iris]
^- (quip card _state)
+ ~& >> response
?. ?=(%finished -.response)
[~ state]
=* status status-code.response-header.response
?. ?=([%result *] rpc-resp)
~& [%error +.rpc-resp]
[~ state]
+ ~& > (parse-response:btc-rpc:lib rpc-resp)
[~ state]
-:: %- handle-btc-response
-:: (parse-response:btc-rpc:lib rpc-resp)
::
--
