urbit/app/btc-wallet.hoon

60 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-10-19 12:04:51 +03:00
:: btc-wallet.hoon
:: Manages wallet pubkeys
::
/+ shoe, dbug, default-agent
|%
+$ versioned-state
$% state-0
==
::
+$ state-0 [%0 connected=?]
::
+$ card card:shoe
+$ command
$? %add-wallet
==
::
--
=| state-0
=* state -
%- agent:dbug
^- agent:gall
%- (agent:shoe command)
^- (shoe:shoe command)
|_ =bowl:gall
+* this .
des ~(. (default:shoe this command) bowl)
def ~(. (default-agent this %|) bowl)
::
++ command-parser command-parser:des
++ tab-list tab-list:des
++ can-connect can-connect:des
++ on-command on-command:des
++ on-connect on-connect:des
++ on-disconnect on-disconnect:des
::
++ on-init
^- (quip card _this)
~& > '%btc-wallet initialized'
`this
++ on-save
^- vase
!>(state)
++ on-load
|= old-state=vase
^- (quip card _this)
~& > '%btc-wallet recompiled'
`this(state !<(versioned-state old-state))
++ on-poke
|= [=mark =vase]
^- (quip card _this)
`this
::
++ on-watch on-watch:def
++ on-leave on-leave:def
++ on-peek on-peek:def
++ on-agent on-agent:def
++ on-arvo on-arvo:def
++ on-fail on-fail:def
--