mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 01:41:37 +03:00
41 lines
842 B
Plaintext
41 lines
842 B
Plaintext
/- *btc, bnh=btc-node-hook
|
|
|%
|
|
+$ btc-credentials [rpc-url=@t rpc-user=@t rpc-password=@t]
|
|
+$ electrum-credentials [rpc-url=@t]
|
|
+$ credentials [bc=btc-credentials ec=electrum-credentials]
|
|
+$ status
|
|
$% [%host connected=? clients=(set ship)]
|
|
[%client connected=? host=(unit ship)]
|
|
==
|
|
+$ action
|
|
$% [%check-status ~]
|
|
[%get-block-count ~]
|
|
[%balance =address]
|
|
[%transactions =address]
|
|
==
|
|
::
|
|
+$ command
|
|
$% [%become-host =credentials]
|
|
[%connect-as-client host=ship]
|
|
[%allow-clients users=(set ship)]
|
|
==
|
|
+$ rpc-action
|
|
$% [%erpc request:electrum:rpc]
|
|
[%brpc request:bitcoin-core:rpc]
|
|
==
|
|
++ rpc
|
|
|%
|
|
++ electrum
|
|
|%
|
|
+$ request
|
|
$% [%get-address-balance =address]
|
|
==
|
|
--
|
|
++ bitcoin-core
|
|
|%
|
|
+$ request btc-node-hook-action:bnh
|
|
--
|
|
--
|
|
--
|
|
|