electrum-rpc gets own sur

This commit is contained in:
timlucmiptev 2020-10-22 11:02:18 +03:00 committed by ixv
parent 827be962c4
commit 3ec5bb91de
3 changed files with 17 additions and 13 deletions

View File

@ -57,7 +57,7 @@
~& >> pax
`this
:: ?> (is-whitelisted:hc src.bowl)
:: ~& > "added client {<src.bowl>}"
:: ~& > "added client {<src.bowl>}"
:: :_ this(clients.host-info (~(put in clients.host-info) src.bowl))
:: ~[[%give %fact ~ [%btc-provider-update !>([%status connected.host-info])]]]
::

View File

@ -1,4 +1,4 @@
/- *btc, bnh=btc-node-hook
/- *btc, brpc=btc-node-hook, erpc=electrum-rpc
|%
+$ btc-credentials [rpc-url=@t rpc-user=@t rpc-password=@t]
+$ electrum-credentials [rpc-url=@t]
@ -13,7 +13,7 @@
[%get-balance (set [=address balance=sats])]
[%get-transactions ~]
==
+$ update :: sub updates from /clients path (connection etc.)
+$ update :: sub updates from /clients path (connection etc.)
$% [%status connected=?]
==
::
@ -23,7 +23,6 @@
==
++ rpc
|%
+$ type $?(%erpc %brpc)
+$ action
$% [%erpc request:electrum]
[%brpc request:bitcoin-core]
@ -34,18 +33,13 @@
==
++ electrum
|%
+$ request
$% [%get-address-balance =address]
[%get-address-utxos =address]
==
+$ response
$% [%get-address-utxos utxos=(set utxo)]
==
+$ request request:erpc
+$ response response:erpc
--
++ bitcoin-core
|%
+$ request btc-node-hook-action:bnh
+$ response btc-node-hook-response:bnh
+$ request btc-node-hook-action:brpc
+$ response btc-node-hook-response:brpc
--
--

10
sur/electrum-rpc.hoon Normal file
View File

@ -0,0 +1,10 @@
/- *btc
|%
+$ request
$% [%get-address-balance =address]
[%get-address-utxos =address]
==
+$ response
$% [%get-address-utxos utxos=(set utxo)]
==
--