diff --git a/app/btc-provider.hoon b/app/btc-provider.hoon index 27473880d..dff9f4004 100644 --- a/app/btc-provider.hoon +++ b/app/btc-provider.hoon @@ -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 :: -- diff --git a/gen/btc-provider/action.hoon b/gen/btc-provider/action.hoon index 47f814e25..2182dbd57 100644 --- a/gen/btc-provider/action.hoon +++ b/gen/btc-provider/action.hoon @@ -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] diff --git a/lib/btc-provider.hoon b/lib/btc-provider.hoon index 41e19ad81..21026a9b1 100644 --- a/lib/btc-provider.hoon +++ b/lib/btc-provider.hoon @@ -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] --