urbit/app/btc-wallet-store.hoon

51 lines
901 B
Plaintext
Raw Normal View History

2020-10-24 19:13:36 +03:00
:: btc-wallet-store.hoon
2020-10-19 12:04:51 +03:00
:: Manages wallet pubkeys
::
2020-10-24 19:13:36 +03:00
/+ dbug, default-agent
2020-10-19 12:04:51 +03:00
|%
+$ versioned-state
$% state-0
==
::
+$ state-0 [%0 connected=?]
::
2020-10-24 19:13:36 +03:00
+$ card card:agent:gall
2020-10-19 12:04:51 +03:00
+$ command
$? %add-wallet
==
::
--
=| state-0
=* state -
%- agent:dbug
^- agent:gall
|_ =bowl:gall
+* this .
des ~(. (default:shoe this command) bowl)
def ~(. (default-agent this %|) bowl)
::
++ on-init
^- (quip card _this)
2020-10-24 19:13:36 +03:00
~& > '%btc-wallet-store initialized'
2020-10-19 12:04:51 +03:00
`this
++ on-save
^- vase
!>(state)
++ on-load
|= old-state=vase
^- (quip card _this)
2020-10-24 19:13:36 +03:00
~& > '%btc-wallet-store recompiled'
2020-10-19 12:04:51 +03:00
`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
--