Versions in this module Expand all Collapse all v0 v0.1.0 May 8, 2018 Changes in this version + const LightScryptN + const LightScryptP + const StandardScryptN + const StandardScryptP + var ErrCacheDBNoUpdateStamp = errors.New("cachedb has no updated timestamp; expected for newborn dbs.") + var ErrDecrypt = errors.New("could not decrypt key with given passphrase") + var ErrLocked = errors.New("account is locked") + var ErrNoMatch = errors.New("no key for given address or file") + func Web3PrivateKey(web3JSON []byte, secret string) (*ecdsa.PrivateKey, error) + type Account struct + Address common.Address + EncryptedKey string + File string + func (acc *Account) MarshalJSON() ([]byte, error) + func (acc *Account) UnmarshalJSON(raw []byte) error + type AccountJSON struct + Address string + EncryptedKey string + File string + func (v *AccountJSON) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *AccountJSON) UnmarshalJSON(data []byte) error + func (v AccountJSON) MarshalEasyJSON(w *jwriter.Writer) + func (v AccountJSON) MarshalJSON() ([]byte, error) + type AmbiguousAddrError struct + Addr common.Address + Matches []Account + func (err *AmbiguousAddrError) Error() string + type Manager struct + func NewManager(keydir string, scryptN, scryptP int, wantCacheDB bool) (*Manager, error) + func (am *Manager) AccountByIndex(i int) (Account, error) + func (am *Manager) Accounts() []Account + func (am *Manager) BuildIndexDB() []error + func (am *Manager) DeleteAccount(a Account, passphrase string) error + func (am *Manager) Export(a Account, passphrase, newPassphrase string) (keyJSON []byte, err error) + func (am *Manager) HasAddress(addr common.Address) bool + func (am *Manager) Import(keyJSON []byte, passphrase, newPassphrase string) (Account, error) + func (am *Manager) ImportECDSA(priv *ecdsa.PrivateKey, passphrase string) (Account, error) + func (am *Manager) ImportPreSaleKey(keyJSON []byte, passphrase string) (Account, error) + func (am *Manager) Lock(addr common.Address) error + func (am *Manager) NewAccount(passphrase string) (Account, error) + func (am *Manager) Sign(addr common.Address, hash []byte) (signature []byte, err error) + func (am *Manager) SignWithPassphrase(addr common.Address, passphrase string, hash []byte) (signature []byte, err error) + func (am *Manager) TimedUnlock(a Account, passphrase string, timeout time.Duration) error + func (am *Manager) Unlock(a Account, passphrase string) error + func (am *Manager) Update(a Account, passphrase, newPassphrase string) error