Versions in this module Expand all Collapse all v1 v1.0.2 Dec 20, 2016 Changes in this version + const LightScryptN + const LightScryptP + const StandardScryptN + const StandardScryptP + 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 EncryptKey(key *Key, auth string, scryptN, scryptP int) ([]byte, error) + type Account struct + Address common.Address + File string + func (acc *Account) MarshalJSON() ([]byte, error) + func (acc *Account) UnmarshalJSON(raw []byte) error + type AmbiguousAddrError struct + Addr common.Address + Matches []Account + func (err *AmbiguousAddrError) Error() string + type Key struct + Address common.Address + Id uuid.UUID + PrivateKey *ecdsa.PrivateKey + func DecryptKey(keyjson []byte, auth string) (*Key, error) + func NewKeyForDirectICAP(rand io.Reader) *Key + func (k *Key) MarshalJSON() (j []byte, err error) + func (k *Key) UnmarshalJSON(j []byte) (err error) + type Manager struct + func NewManager(keydir string, scryptN, scryptP int) *Manager + func NewPlaintextManager(keydir string) *Manager + func (am *Manager) AccountByIndex(i int) (Account, error) + func (am *Manager) Accounts() []Account + 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) Key(addr common.Address) (*ecdsa.PrivateKey, 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) ([]byte, error) + func (am *Manager) SignEthereum(addr common.Address, hash []byte) ([]byte, 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