Documentation ¶
Index ¶
- func DelegatedFromEthAddr(addr common.Address) (address.Address, error)
- func DeriveAddrFromPk(pk *ecdsa.PrivateKey) (common.Address, address.Address, error)
- func DeriveAddrFromPkString(pk string) (common.Address, address.Address, error)
- func DeriveAddressFromPk(pk *ecdsa.PrivateKey) (common.Address, error)
- func IsZeroAddress(address common.Address) bool
- func KeyStore() *keystore.KeyStore
- func NewAccountsStore(filename string) error
- func NewAgentStore(filename string) error
- func NewBackupsStore(filename string) error
- func NewKeyStore(keydir string)
- func NewKeyStoreLegacy(filename string) error
- func TruncateAddr(addr string) string
- type AccountsStorage
- type AgentStorage
- type BackupsStorage
- type ErrKeyNotFound
- type KeyStorage
- type KeyStorageLegacy
- type KeyType
- type Storage
- type StorageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelegatedFromEthAddr ¶
func DeriveAddrFromPk ¶
func DeriveAddrFromPk(pk *ecdsa.PrivateKey) (common.Address, address.Address, error)
func DeriveAddrFromPkString ¶
func DeriveAddressFromPk ¶
func DeriveAddressFromPk(pk *ecdsa.PrivateKey) (common.Address, error)
func IsZeroAddress ¶
IsZeroAddress validate if it's a 0 address
func NewAccountsStore ¶
func NewAgentStore ¶
func NewBackupsStore ¶
func NewKeyStore ¶
func NewKeyStore(keydir string)
func NewKeyStoreLegacy ¶
func TruncateAddr ¶
Types ¶
type AccountsStorage ¶
type AccountsStorage struct {
*Storage
}
func AccountsStore ¶
func AccountsStore() *AccountsStorage
type AgentStorage ¶
type AgentStorage struct {
*Storage
}
func AgentStore ¶
func AgentStore() *AgentStorage
type BackupsStorage ¶
type BackupsStorage struct {
*Storage
}
func BackupsStore ¶
func BackupsStore() *BackupsStorage
func (*BackupsStorage) Invalidate ¶
func (a *BackupsStorage) Invalidate()
type ErrKeyNotFound ¶
type ErrKeyNotFound struct {
Key string
}
func (*ErrKeyNotFound) Error ¶
func (e *ErrKeyNotFound) Error() string
type KeyStorage ¶
type KeyStorage struct {
*Storage
}
type KeyStorageLegacy ¶
type KeyStorageLegacy struct {
*Storage
}
func KeyStoreLegacy ¶
func KeyStoreLegacy() *KeyStorageLegacy
func (*KeyStorageLegacy) GetAddrs ¶
func (s *KeyStorageLegacy) GetAddrs(key KeyType) (common.Address, address.Address, error)
func (*KeyStorageLegacy) GetPrivate ¶
func (s *KeyStorageLegacy) GetPrivate(key KeyType) (*ecdsa.PrivateKey, error)
func (*KeyStorageLegacy) SetKey ¶
func (s *KeyStorageLegacy) SetKey(key KeyType, pk *ecdsa.PrivateKey) error
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a structure that holds the filename and a map of key-value pairs.
func NewStorage ¶
NewStorage creates a new Storage instance and initializes it with the given filename.
func (*Storage) AccountNames ¶
AccountNames retrieves a list of all the account names
func (*Storage) Delete ¶
Delete removes a key-value pair from the data map and saves the data to the file.
type StorageData ¶
Click to show internal directories.
Click to hide internal directories.