mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
working lib skeleton; action restriction
This commit is contained in:
parent
dc09351e0e
commit
c962435265
@ -43,9 +43,17 @@
|
|||||||
?> ?|((team:title our.bowl src.bowl) (is-client:hc src.bowl))
|
?> ?|((team:title our.bowl src.bowl) (is-client:hc src.bowl))
|
||||||
=^ cards state
|
=^ cards state
|
||||||
?+ mark (on-poke:def mark vase)
|
?+ mark (on-poke:def mark vase)
|
||||||
|
%btc-provider-action
|
||||||
|
:: TODO: check whether endpoint/credentials are set
|
||||||
|
(handle-action:hc !<(action vase))
|
||||||
|
::
|
||||||
%btc-provider-command
|
%btc-provider-command
|
||||||
|
?> (team:title our.bowl src.bowl)
|
||||||
(handle-command:hc !<(command vase))
|
(handle-command:hc !<(command vase))
|
||||||
|
::
|
||||||
%btc-provider-rpc-action
|
%btc-provider-rpc-action
|
||||||
|
?> (team:title our.bowl src.bowl)
|
||||||
|
:: TODO: check whether endpoint/credentials are set
|
||||||
(handle-rpc-action !<(rpc-action vase))
|
(handle-rpc-action !<(rpc-action vase))
|
||||||
==
|
==
|
||||||
[cards this]
|
[cards this]
|
||||||
@ -86,6 +94,10 @@
|
|||||||
--
|
--
|
||||||
:: helper core
|
:: helper core
|
||||||
|_ =bowl:gall
|
|_ =bowl:gall
|
||||||
|
++ handle-action
|
||||||
|
|= act=action
|
||||||
|
~& > act
|
||||||
|
`state
|
||||||
++ handle-command
|
++ handle-command
|
||||||
|= comm=command
|
|= comm=command
|
||||||
^- (quip card _state)
|
^- (quip card _state)
|
||||||
@ -224,7 +236,7 @@
|
|||||||
++ electrum-http-response
|
++ electrum-http-response
|
||||||
|= [status=@ud rpc-resp=response:rpc:jstd]
|
|= [status=@ud rpc-resp=response:rpc:jstd]
|
||||||
^- (quip card _state)
|
^- (quip card _state)
|
||||||
~& >> (parse-response:electrum-rpc:elib rpc-resp)
|
~& >> (to-response (rpc-response [%erpc (parse-response:electrum-rpc:elib rpc-resp)]))
|
||||||
`state
|
`state
|
||||||
::
|
::
|
||||||
--
|
--
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
:: Sends a raw RPC action to the BTC Bridge
|
:: Sends a raw RPC action to the BTC Provider
|
||||||
::
|
::
|
||||||
:: Commands:
|
:: Commands:
|
||||||
::
|
::
|
||||||
::
|
::
|
||||||
::
|
::
|
||||||
/- *btc-bridge
|
/- *btc-provider
|
||||||
::
|
::
|
||||||
:- %say
|
:- %say
|
||||||
|= $: [now=@da eny=@uvJ =beak]
|
|= $: [now=@da eny=@uvJ =beak]
|
||||||
[[act=action ~] ~]
|
[[act=action ~] ~]
|
||||||
==
|
==
|
||||||
[%btc-bridge-action act]
|
[%btc-provider-action act]
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
=, sur
|
=, sur
|
||||||
|%
|
|%
|
||||||
++ to-response
|
++ to-response
|
||||||
|= response:rpc
|
|= rpc-response:sur
|
||||||
^- response:sur
|
^- response:sur
|
||||||
[%get-address-info *address-info]
|
*response:sur
|
||||||
|
::[%get-address-info *address-info]
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user