start types

This commit is contained in:
timlucmiptev 2020-10-01 16:51:37 +03:00 committed by ixv
parent 66fceb6b12
commit 129fe493ba
6 changed files with 28 additions and 14 deletions

View File

@ -1,6 +1,7 @@
:: bippy-provider.hoon
:: bippy-bridge.hoon
:: Provider for accessing BTC full node
::
/- *bippy-bridge
/+ dbug, default-agent
|%
+$ versioned-state
@ -23,7 +24,7 @@
::
++ on-init
^- (quip card _this)
~& > '%bippy-provider initialized successfully'
~& > '%bippy-bridge initialized successfully'
`this
++ on-save
^- vase
@ -31,7 +32,7 @@
++ on-load
|= old-state=vase
^- (quip card _this)
~& > '%bippy-provider recompiled successfully'
~& > '%bippy-bridge recompiled successfully'
`this(state !<(versioned-state old-state))
++ on-poke
|= [=mark =vase]
@ -41,10 +42,7 @@
?+ q.vase (on-poke:def mark vase)
%send-tx
~& >>> %send-tx
:_ this
~
:: :~ [%pass /[url.action] %arvo %i %request (get-url url.action) *outbound-config:iris]
==
`this
==
==
::

16
sur/bippy-bridge.hoon Normal file
View File

@ -0,0 +1,16 @@
|%
+$ address ?(@uc [%bech32 @t])
+$ tx @
+$ credentials [rpc-url=@t rpc-user=@t rpc-password=@t]
+$ bio $: mode=?(%remote %local)
=credentials :: for connecting to btc-provider
clients=(set ship) :: allowed clients for this node
==
+$ action
$% [%connect =credentials]
[%status ~]
[%balance =address]
[%transactions =address]
[%broadcast-tx =tx]
==
--

View File

@ -1,4 +0,0 @@
|%
+$ credentials [rpc-url=@t rpc-user=@t rpc-password=@t]
+$ clients (set ship)
--

View File

@ -1,3 +0,0 @@
|%
+$ xpub tape
--

7
sur/bippy-wallet.hoon Normal file
View File

@ -0,0 +1,7 @@
|%
+$ xpub tape
--
:: wallets
:: how many should we store?
:: seems like a list or a map keyed by xpub