mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
7449eba612
* begin hd wallet refactor * further simplify the new derived keymanager * make it almost a full wrapper around an imported keymanager * fix up the EIP test * deprecated derived * fixing keymanager tests * fix up derived tests * refactor initialize keymanager * simplify hd * pass some tests * pass accounts list test * gaz * regenerate protos without create account privilege * enforce account recovery on wallet create * allow accounts delete to work * remove mentions of accounts create * resolve comments and go mod * fix up tests * build fixes * remove insecure warning * revert * fix proto file * remove create account message * gaz * remove account create * update web api protos * fix up imports * change func sig * tidy Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
23 lines
886 B
Go
23 lines
886 B
Go
package iface
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/validator/keymanager"
|
|
)
|
|
|
|
// Wallet defines a struct which has capabilities and knowledge of how
|
|
// to read and write important accounts-related files to the filesystem.
|
|
// Useful for keymanagers to have persistent capabilities for accounts on-disk.
|
|
type Wallet interface {
|
|
// Methods to retrieve wallet and accounts metadata.
|
|
AccountsDir() string
|
|
Password() string
|
|
// Read methods for important wallet and accounts-related files.
|
|
ReadFileAtPath(ctx context.Context, filePath string, fileName string) ([]byte, error)
|
|
// Write methods to persist important wallet and accounts-related files to disk.
|
|
WriteFileAtPath(ctx context.Context, pathName string, fileName string, data []byte) error
|
|
// Method for initializing a new keymanager.
|
|
InitializeKeymanager(ctx context.Context) (keymanager.IKeymanager, error)
|
|
}
|