accounts

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2016 License: GPL-3.0 Imports: 9 Imported by: 6

Documentation

Overview

Package implements a private key management facility.

This abstracts part of a user's interaction with an account she controls.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLocked = errors.New("account is locked")
	ErrNoKeys = errors.New("no keys in store")
)

Functions

This section is empty.

Types

type Account

type Account struct {
	Address common.Address
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(keyStore crypto.KeyStore) *Manager

func (*Manager) Accounts

func (am *Manager) Accounts() ([]Account, error)

func (*Manager) AddressByIndex

func (am *Manager) AddressByIndex(index int) (addr string, err error)

func (*Manager) DeleteAccount

func (am *Manager) DeleteAccount(address common.Address, auth string) error

func (*Manager) Export

func (am *Manager) Export(path string, addr common.Address, keyAuth string) error

USE WITH CAUTION = this will save an unencrypted private key on disk no cli or js interface

func (*Manager) HasAccount

func (am *Manager) HasAccount(addr common.Address) bool

func (*Manager) Import

func (am *Manager) Import(path string, keyAuth string) (Account, error)

func (*Manager) ImportPreSaleKey

func (am *Manager) ImportPreSaleKey(keyJSON []byte, password string) (acc Account, err error)

func (*Manager) NewAccount

func (am *Manager) NewAccount(auth string) (Account, error)

func (*Manager) Sign

func (am *Manager) Sign(a Account, toSign []byte) (signature []byte, err error)

func (*Manager) TimedUnlock

func (am *Manager) TimedUnlock(addr common.Address, keyAuth string, timeout time.Duration) error

TimedUnlock unlocks the account with the given address. The account stays unlocked for the duration of timeout. A timeout of 0 unlocks the account until the program exits.

If the accout is already unlocked, TimedUnlock extends or shortens the active unlock timeout.

func (*Manager) Unlock

func (am *Manager) Unlock(addr common.Address, keyAuth string) error

Unlock unlocks the given account indefinitely.

func (*Manager) Update

func (am *Manager) Update(addr common.Address, authFrom, authTo string) (err error)

Directories

Path Synopsis
Package abi implements the Ethereum ABI (Application Binary Interface).
Package abi implements the Ethereum ABI (Application Binary Interface).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL