mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-03 12:42:48 +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))
|
||||
=^ 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
|
||||
::
|
||||
--
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user