mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-14 22:18:20 +00:00
cbc27e0f2e
* wallet should no longer deal with account passwords * ensure tests are fixed * Merge branch 'master' into corrupted-pass * move mnemonic logic into right place * rem fmts * add fileutil * gazelle * imports * move seed logic to derived * fix tests * imports * gaz * Merge refs/heads/master into corrupted-pass * merge confs * Merge refs/heads/master into corrupted-pass * ivan's feedback * Merge branch 'corrupted-pass' of github.com:prysmaticlabs/prysm into corrupted-pass * gaz * fix shared test * Merge refs/heads/master into corrupted-pass * resolve conflicts * fix test build
22 lines
866 B
Go
22 lines
866 B
Go
package iface
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
)
|
|
|
|
// 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
|
|
ListDirs() ([]string, error)
|
|
// Read methods for important wallet and accounts-related files.
|
|
ReadEncryptedSeedFromDisk(ctx context.Context) (io.ReadCloser, error)
|
|
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
|
|
WriteEncryptedSeedToDisk(ctx context.Context, encoded []byte) error
|
|
}
|