diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-08-01 23:45:17 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-08-09 16:30:17 +0800 |
commit | db568a61e2a98880ab308bf2224aa34073dc7f39 (patch) | |
tree | 97da46661ad3002b6ff9f6dca07e3105da5a9c5a /accounts/accounts.go | |
parent | 17ce0a37de5a2712a8bf9d58df705e718b3b2cd6 (diff) | |
download | go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.gz go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.bz2 go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.lz go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.xz go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.zst go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.zip |
accounts, console, internal: support trezor hardware wallet
Diffstat (limited to 'accounts/accounts.go')
-rw-r--r-- | accounts/accounts.go | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/accounts/accounts.go b/accounts/accounts.go index 640de5220..5872bb4a3 100644 --- a/accounts/accounts.go +++ b/accounts/accounts.go @@ -147,9 +147,26 @@ type Backend interface { Subscribe(sink chan<- WalletEvent) event.Subscription } +// WalletEventType represents the different event types that can be fired by +// the wallet subscription subsystem. +type WalletEventType int + +const ( + // WalletArrived is fired when a new wallet is detected either via USB or via + // a filesystem event in the keystore. + WalletArrived WalletEventType = iota + + // WalletOpened is fired when a wallet is successfully opened with the purpose + // of starting any background processes such as automatic key derivation. + WalletOpened + + // WalletDropped + WalletDropped +) + // WalletEvent is an event fired by an account backend when a wallet arrival or // departure is detected. type WalletEvent struct { - Wallet Wallet // Wallet instance arrived or departed - Arrive bool // Whether the wallet was added or removed + Wallet Wallet // Wallet instance arrived or departed + Kind WalletEventType // Event type that happened in the system } |