Versions in this module Expand all Collapse all v0 v0.2.2 May 2, 2020 Changes in this version type AccountKey + func ImportAccountKey(privateKeyStr string, keyfile string, password string) *AccountKey v0.2.1 Nov 19, 2019 Changes in this version + var ErrAddrNotMatch = errors.New("the address is not match the account") + var ErrDecrypt = errors.New("could not decrypt key with given passphrase") + var ErrEmptyAddr = errors.New("the address is empty") + var ErrNoMatch = errors.New("no key for given address or file") + var ErrNoValidKey = errors.New("there is no valid key for this round") + var ErrNotSupport = errors.New("this function is not support") + func CreatePackerKey(address common.Address, password string, keyfile string) crypto.PublicKey + func DecryptData(cryptoJson cryptoJSON, auth string) ([]byte, error) + func EncryptData(data, auth []byte, scryptN, scryptP int) (cryptoJSON, error) + func PublicKeyForPacker(key crypto.PublicKey) types.PackerECPubKey + type AccountKey struct + Address common.Address + PrivKey crypto.PrivateKey + func CreateAccountKey(keyfile string, password string) *AccountKey + func LoadAccountKey(path string, password string) (*AccountKey, error) + type MiningKey struct + Address common.Address + CreateTime int64 + PrivKey crypto.PrivateKey + type MiningKeyManager struct + func NewMiningKeyManager(directory string, password string) *MiningKeyManager + func (s *MiningKeyManager) CreateKey(address common.Address) crypto.PublicKey + func (s *MiningKeyManager) Keys() map[common.Address]MiningKeys + func (s *MiningKeyManager) Load() error + func (s *MiningKeyManager) Sign(address common.Address, pubkey MiningPubkey, hash []byte) ([]byte, error) + func (s *MiningKeyManager) Start() error + func (s *MiningKeyManager) Stop() + type MiningKeys map[MiningPubkey]*MiningKey + type MiningPubkey [crypto.BlsPubkeyLen]byte + func PublicKeyForMining(key crypto.PublicKey) MiningPubkey + type PackerKey struct + Address common.Address + PrivKey crypto.PrivateKey + func LoadPackerKey(path string, password string) (*PackerKey, error) + type PackerKeyManager struct + func NewPackerKeyManager(directory string, password string) *PackerKeyManager + func (s *PackerKeyManager) CreateKey(address common.Address) crypto.PublicKey + func (s *PackerKeyManager) GetPrivateKey(address common.Address, pubkey types.PackerECPubKey) (crypto.PrivateKey, error) + func (s *PackerKeyManager) Keys() map[common.Address]PackerKeys + func (s *PackerKeyManager) Load() error + func (s *PackerKeyManager) Start() error + func (s *PackerKeyManager) Stop() + type PackerKeys map[types.PackerECPubKey]*PackerKey