account

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2017 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAddrNotFind address not find.
	ErrAddrNotFind = errors.New("address not find")

	// 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) Delete added in v0.3.0

func (m *Manager) Delete(a string, passphrase []byte) error

Delete delete 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) SignTransactionWithPassphrase added in v0.3.0

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

SignTransactionWithPassphrase sign transaction with the from passphrase

func (*Manager) Unlock

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

Unlock unlock address with passphrase

func (*Manager) Update added in v0.3.0

func (m *Manager) Update(addr *core.Address, oldPassphrase, newPassphrase []byte) error

Update update addr locked 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