iface

package
v1.0.0-alpha.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

type Wallet interface {
	// Methods to retrieve wallet and accounts metadata.
	AccountsDir() string
	Password() string
	SetPassword(newPass string)
	// 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
	// Method for initializing a new keymanager.
	InitializeKeymanager(ctx context.Context, skipMnemonicConfirm bool) (v2keymanager.IKeymanager, error)
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL