Documentation ¶
Overview ¶
Copyright (C) 2018 go-gamc authors
This file is part of the go-gamc library.
the go-gamc library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
the go-gamc library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the go-gamc library. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- Variables
- type AccountManager
- func (am *AccountManager) AddressIsValid(address string) (*core.Address, error)
- func (am *AccountManager) AddressManager() *address.AddressManager
- func (am *AccountManager) GetAllAddress() []*core.Address
- func (am *AccountManager) ImportAccount(priKey, passphrase []byte) (*core.Address, error)
- func (am *AccountManager) Lock(address *core.Address) error
- func (am *AccountManager) NewAccount(passphrase []byte) (*core.Address, string, error)
- func (am *AccountManager) Sign(address *core.Address, hash []byte) ([]byte, error)
- func (am *AccountManager) SignBlock(address *core.Address, block *core.Block) error
- func (am *AccountManager) UnLock(address *core.Address, passphrase []byte, duratuion time.Duration) error
- func (am *AccountManager) UpdateAccount(address string, oldPassphrase, newPassphrase []byte) error
- func (am *AccountManager) Verify(pubKey []byte, message, sig []byte) bool
Constants ¶
const (
DefaultAddressUnlockedDuratuion = time.Second * 60
)
Variables ¶
var ( ErrSaveDBError = errors.New("Failed to save datebase") ErrInitDBError = errors.New("Failure of database initialization") )
Functions ¶
This section is empty.
Types ¶
type AccountManager ¶
type AccountManager struct {
// contains filtered or unexported fields
}
func NewAccountManager ¶
func (*AccountManager) AddressIsValid ¶
func (am *AccountManager) AddressIsValid(address string) (*core.Address, error)
func (*AccountManager) AddressManager ¶
func (am *AccountManager) AddressManager() *address.AddressManager
func (*AccountManager) GetAllAddress ¶
func (am *AccountManager) GetAllAddress() []*core.Address
func (*AccountManager) ImportAccount ¶
func (am *AccountManager) ImportAccount(priKey, passphrase []byte) (*core.Address, error)
func (*AccountManager) NewAccount ¶
return address,mnemonicWord
func (*AccountManager) UpdateAccount ¶
func (am *AccountManager) UpdateAccount(address string, oldPassphrase, newPassphrase []byte) error