Documentation ¶
Index ¶
- Constants
- Variables
- type Manager
- func (m *Manager) Accounts() []*core.Address
- func (m *Manager) Contains(addr *core.Address) bool
- func (m *Manager) Export(addr *core.Address, passphrase []byte) ([]byte, error)
- func (m *Manager) GenerateRandomSeed(addr *core.Address, ancestorHash, parentSeed []byte) (vrfSeed, vrfProof []byte, err error)
- func (m *Manager) Import(keyjson, passphrase []byte) (*core.Address, error)
- func (m *Manager) Load(keyjson, passphrase []byte) (*core.Address, error)
- func (m *Manager) LoadPrivate(privatekey, passphrase []byte) (*core.Address, error)
- func (m *Manager) Lock(addr *core.Address) error
- func (m *Manager) NewAccount(passphrase []byte) (*core.Address, error)
- func (m *Manager) Remove(addr *core.Address, passphrase []byte) error
- func (m *Manager) SignBlock(addr *core.Address, block *core.Block) error
- func (m *Manager) SignHash(addr *core.Address, hash byteutils.Hash, alg keystore.Algorithm) ([]byte, error)
- func (m *Manager) SignTransaction(addr *core.Address, tx *core.Transaction) error
- func (m *Manager) SignTransactionWithPassphrase(addr *core.Address, tx *core.Transaction, passphrase []byte) error
- func (m *Manager) Unlock(addr *core.Address, passphrase []byte, duration time.Duration) error
- func (m *Manager) Update(addr *core.Address, oldPassphrase, newPassphrase []byte) error
- type Neblet
Constants ¶
View Source
const ( EccSecp256K1 = "ECC_SECP256K1" EccSecp256K1Value = 1 DefaultKeyDir = "keydir" )
const SignatureCiphers
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 Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager accounts manager ,handle account generate and storage
func (*Manager) GenerateRandomSeed ¶ added in v1.0.2
func (m *Manager) GenerateRandomSeed(addr *core.Address, ancestorHash, parentSeed []byte) (vrfSeed, vrfProof []byte, err error)
GenerateRandomSeed generate rand
func (*Manager) Import ¶
Import import a key file to keystore, compatible ethereum keystore file, write to file
func (*Manager) LoadPrivate ¶
LoadPrivate load a private key to keystore, unable to write file
func (*Manager) NewAccount ¶
NewAccount returns a new address and keep it in keystore
func (*Manager) Remove ¶ added in v1.0.0
Remove remove address and encrypted private key from keystore
func (*Manager) SignHash ¶ added in v1.0.0
func (m *Manager) SignHash(addr *core.Address, hash byteutils.Hash, alg keystore.Algorithm) ([]byte, error)
SignHash sign hash
func (*Manager) SignTransaction ¶
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
Click to show internal directories.
Click to hide internal directories.