accounts

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

README

Accounts

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAccountNotFound account is not found.
	ErrAccountNotFound = errors.New("account is not found")

	// ErrAccountIsLocked account locked.
	ErrAccountIsLocked = errors.New("account is locked")

	// ErrInvalidSignerAddress sign addr not from
	ErrInvalidSignerAddress = errors.New("transaction sign not use from address")
)

Functions

This section is empty.

Types

type AccountManager

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

func NewAccountManager

func NewAccountManager(config *config.Config) (*AccountManager, error)

func (*AccountManager) Accounts

func (am *AccountManager) Accounts() []*address.Address

func (*AccountManager) CreateNewAccount

func (am *AccountManager) CreateNewAccount(passphrase []byte) (*address.Address, error)

func (*AccountManager) GetUnlocked

func (am *AccountManager) GetUnlocked(address string) ([]byte, error)

func (*AccountManager) Import

func (am *AccountManager) Import(keyContent []byte, passphrase []byte) (*address.Address, error)

func (*AccountManager) Lock

func (am *AccountManager) Lock(address *address.Address) error

func (*AccountManager) ResetPassword

func (am *AccountManager) ResetPassword(address *address.Address, oldPass []byte, newPass []byte) error

func (*AccountManager) SignHash

func (am *AccountManager) SignHash(address *address.Address, hash common.Hash) ([]byte, error)

func (*AccountManager) Unlock

func (am *AccountManager) Unlock(address *address.Address, passphrase []byte, duration time.Duration) error

Jump to

Keyboard shortcuts

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