Commit Graph

15 Commits

Author SHA1 Message Date
Felix Lange
ea54283b30 all: update license information 2015-07-07 14:12:44 +02:00
zelig
fc17a527bc fix account ordering
* chronological order of creation
* new naming scheme keystore/UTC--<created_at UTC ISO8601>-<address hex>
* KeyStore2 -> KeyStore
* backward compatibility
* refactor keyStore methods
2015-07-03 03:19:32 +01:00
zelig
fc2e33c594 unlock multiple passes and obsolete primary
* multiple passwords allowed in password file
* split on "\n", sideeffect: chop trailing slashes. fixes common mistake <(echo 'pass')
* remove accounts.Primary method
* do not fall back to primary account for mining
2015-07-02 23:28:11 +01:00
zelig
1d72aaa0cd simplify account unlocking 2015-07-02 23:28:11 +01:00
Felix Lange
487f68ec48 accounts: add {Timed,}Unlock, remove SignLocked 2015-03-10 00:19:01 +01:00
Felix Lange
fb53a9362e accounts: AccountManager -> Manager 2015-03-08 01:58:35 +01:00
Felix Lange
afc530ea41 accounts: use time.Duration correctly
There is no point to using time.Duration if the value is interpreted as
milliseconds. Callers should use the standard multiplication idiom to
choose the unit. In fact, the only caller outside of the tests already
does so.
2015-03-08 00:35:23 +01:00
Felix Lange
fda7b4c79d accounts: use pointers consistently
Account is now always a non-pointer. This will be important once
the manager starts remembering accounts.

AccountManager is now always a pointer because it contains locks
and locks cannot be copied.
2015-03-08 00:18:13 +01:00
Gustav Simonsson
d1311c53ee Address pull request comments
* Use RWMutex instead of Mutex
* Use time.Duration instead of int for unlock time
* Use time.After with select instead of time.Sleep
2015-02-25 18:40:59 +01:00
Gustav Simonsson
b296b36d2b Add automatic locking / unlocking of accounts
* Change account signing API to two sign functions;
  Sign without passphrase - works if account is unlocked
  Sign with passphrase - always works and unlocks the account
* Account stays unlocked for X ms and is then automatically locked
2015-02-25 17:37:12 +01:00
Gustav Simonsson
923950ccaa Fix key store address hex decoding and accounts test
Thanks to https://github.com/jaekwon for original fix!
2015-02-24 18:05:10 +01:00
Maran
40adb7feb6 Implement OS sensitive dataDirs 2015-02-23 11:28:20 +01:00
Felix Lange
4ab7a290cd accounts: use crypto/randentropy in test 2015-02-20 11:40:58 +01:00
Gustav Simonsson
8d9752a557 Address pull request comments
* Use crypto.Sign instead of directly calling secp256k1 lib
* Rename UserAccount to Account and Addr to Address (for consistency)
* Change AccountManager.Sign to take ptr to Account instead of
  address byte array
* Simplify copying of Accounts in Accounts()
* PubkeyToAddress and GetEntropyCSPRNG now exported
2015-01-28 05:12:57 +01:00
Gustav Simonsson
512ffa2bf4 Add accounts package and refactor key stores
* Add initial UserAccount and AccountManager structs
* Add NewAccount, Sign and Accounts functions
* Refactor key stores to use key address as main identifier
  while keeping the UUID.
* Use key address as file/dir names instead of UUID
2015-01-26 04:30:17 +01:00