mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 10:21:31 +03:00
refactor types into sur; initial types
This commit is contained in:
parent
350c004411
commit
a066d6f337
@ -43,7 +43,7 @@
|
|||||||
?+ q.vase (on-poke:def mark vase)
|
?+ q.vase (on-poke:def mark vase)
|
||||||
%status
|
%status
|
||||||
:_ this
|
:_ this
|
||||||
~[[%pass / %agent [our.bowl %btc-node-hook] %poke %btc-node-hook-action !>([%get-block-count ~])]]
|
~[[%pass / %agent [our.bowl %btc-node-hook] %poke %btc-node-hook-action !>([%ping ~])]]
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
:: btc-scratch.hoon
|
:: btc-scratch.hoon
|
||||||
|
/- *btc
|
||||||
/+ bip32, btc
|
/+ bip32, btc
|
||||||
=+ ecc=secp256k1:secp:crypto
|
=+ ecc=secp256k1:secp:crypto
|
||||||
=, bech32:btc
|
=, bech32:btc
|
||||||
|%
|
|%
|
||||||
+$ bech32-address $%([%bech32 tape])
|
|
||||||
+$ address ?(@uc bech32-address)
|
|
||||||
++ bip84
|
++ bip84
|
||||||
|_ [network=network:btc xpub=tape]
|
|_ [network=network:btc xpub=tape]
|
||||||
++ address
|
++ address
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
/- *btc
|
||||||
|%
|
|%
|
||||||
+$ network ?(%main %testnet)
|
|
||||||
++ hash-160
|
++ hash-160
|
||||||
|= pubkey=@ux
|
|= pubkey=@ux
|
||||||
^- @ux
|
^- @ux
|
||||||
@ -154,5 +154,6 @@
|
|||||||
%+ encode-raw u.prefix
|
%+ encode-raw u.prefix
|
||||||
(weld ~[0] (convert:bits 8 5 (hash-160 pubkey)))
|
(weld ~[0] (convert:bits 8 5 (hash-160 pubkey)))
|
||||||
--
|
--
|
||||||
|
|
||||||
::
|
::
|
||||||
--
|
--
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
|
/- *btc
|
||||||
|%
|
|%
|
||||||
+$ address ?(@uc [%bech32 @t])
|
|
||||||
+$ tx @
|
+$ tx @
|
||||||
+$ credentials [rpc-url=@t rpc-user=@t rpc-password=@t]
|
+$ credentials [rpc-url=@t rpc-user=@t rpc-password=@t]
|
||||||
+$ bio $: mode=?(%remote %local)
|
+$ status
|
||||||
=credentials :: for connecting to btc-provider
|
$: [%host connected=? clients=(set ship)]
|
||||||
clients=(set ship) :: allowed clients for this node
|
[%client connected=? host=ship]
|
||||||
==
|
==
|
||||||
+$ action
|
+$ action
|
||||||
$% [%connect =credentials]
|
$% [%connect-as-host =credentials]
|
||||||
[%status ~]
|
[%connect-as-client host=ship]
|
||||||
|
[%check-status ~]
|
||||||
[%balance =address]
|
[%balance =address]
|
||||||
[%transactions =address]
|
[%transactions =address]
|
||||||
[%broadcast-tx =tx]
|
[%broadcast-tx =tx]
|
||||||
|
5
sur/btc.hoon
Normal file
5
sur/btc.hoon
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|%
|
||||||
|
+$ network ?(%main %testnet)
|
||||||
|
+$ bech32-address $%([%bech32 tape])
|
||||||
|
+$ address ?(@uc bech32-address)
|
||||||
|
--
|
Loading…
Reference in New Issue
Block a user