working lib skeleton; action restriction

This commit is contained in:
timlucmiptev 2020-10-20 13:59:10 +03:00 committed by ixv
parent dc09351e0e
commit c962435265
3 changed files with 19 additions and 6 deletions

View File

@ -43,9 +43,17 @@
?> ?|((team:title our.bowl src.bowl) (is-client:hc src.bowl))
=^ cards state
?+ mark (on-poke:def mark vase)
%btc-provider-action
:: TODO: check whether endpoint/credentials are set
(handle-action:hc !<(action vase))
::
%btc-provider-command
?> (team:title our.bowl src.bowl)
(handle-command:hc !<(command vase))
::
%btc-provider-rpc-action
?> (team:title our.bowl src.bowl)
:: TODO: check whether endpoint/credentials are set
(handle-rpc-action !<(rpc-action vase))
==
[cards this]
@ -86,6 +94,10 @@
--
:: helper core
|_ =bowl:gall
++ handle-action
|= act=action
~& > act
`state
++ handle-command
|= comm=command
^- (quip card _state)
@ -224,7 +236,7 @@
++ electrum-http-response
|= [status=@ud rpc-resp=response:rpc:jstd]
^- (quip card _state)
~& >> (parse-response:electrum-rpc:elib rpc-resp)
~& >> (to-response (rpc-response [%erpc (parse-response:electrum-rpc:elib rpc-resp)]))
`state
::
--

View File

@ -1,13 +1,13 @@
:: Sends a raw RPC action to the BTC Bridge
:: Sends a raw RPC action to the BTC Provider
::
:: Commands:
::
::
::
/- *btc-bridge
/- *btc-provider
::
:- %say
|= $: [now=@da eny=@uvJ =beak]
[[act=action ~] ~]
==
[%btc-bridge-action act]
[%btc-provider-action act]

View File

@ -4,7 +4,8 @@
=, sur
|%
++ to-response
|= response:rpc
|= rpc-response:sur
^- response:sur
[%get-address-info *address-info]
*response:sur
::[%get-address-info *address-info]
--