account

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: LGPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTxAddressLocked from address locked.
	ErrTxAddressLocked = errors.New("transaction from address locked")

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

Functions

This section is empty.

Types

type Manager

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

Manager accounts manager ,handle account generate and storage

func NewManager

func NewManager(neblet Neblet) *Manager

NewManager new a account manager

func (*Manager) Accounts

func (m *Manager) Accounts() []*core.Address

Accounts returns slice of address

func (*Manager) Export

func (m *Manager) Export(addr *core.Address, passphrase []byte) ([]byte, error)

Export export address to key file

func (*Manager) Import

func (m *Manager) Import(keyjson, passphrase []byte) (*core.Address, error)

Import import a key file to keystore, compatible ethereum keystore file

func (*Manager) Lock

func (m *Manager) Lock(addr *core.Address) error

Lock lock address

func (*Manager) NewAccount

func (m *Manager) NewAccount(passphrase []byte) (*core.Address, error)

NewAccount returns a new address and keep it in keystore

func (*Manager) SignTransaction

func (m *Manager) SignTransaction(addr *core.Address, tx *core.Transaction) error

SignTransaction sign transaction with the specified algorithm

func (*Manager) Unlock

func (m *Manager) Unlock(addr *core.Address, passphrase []byte) error

Unlock unlock address with passphrase

type Neblet

type Neblet interface {
	Config() nebletpb.Config
}

Neblet interface breaks cycle import dependency and hides unused services.

Jump to

Keyboard shortcuts

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