mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
29 lines
524 B
Plaintext
29 lines
524 B
Plaintext
|
|
/- *btc-bridge, *btc
|
|
/+ lib=btc-node-json
|
|
|%
|
|
++ address-to-cord
|
|
|= =address ^- cord
|
|
?: ?=([%legacy *] address)
|
|
(scot %uc +.address)
|
|
+.address
|
|
++ http-request
|
|
|= url=@t
|
|
^- request:http
|
|
[%'GET' url ~ ~]
|
|
::
|
|
++ electrum-rpc
|
|
|%
|
|
++ request-to-http
|
|
|= [endpoint=@t req=request:electrum:rpc]
|
|
^- request:http
|
|
?- -.req
|
|
%get-address-balance
|
|
%- http-request
|
|
%^ cat 3
|
|
(cat 3 endpoint '/addresses/balance/')
|
|
(address-to-cord address.req)
|
|
==
|
|
--
|
|
--
|