mock

package
v1.0.0-alpha.28 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: GPL-3.0 Imports: 8 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 struct {
	InnerAccountsDir  string
	Directories       []string
	Files             map[string]map[string][]byte
	EncryptedSeedFile []byte
	AccountPasswords  map[string]string
	WalletPassword    string
	UnlockAccounts    bool
	// contains filtered or unexported fields
}

Wallet contains an in-memory, simulated wallet implementation.

func (*Wallet) AccountNames

func (m *Wallet) AccountNames() ([]string, error)

AccountNames --

func (*Wallet) AccountsDir

func (m *Wallet) AccountsDir() string

AccountsDir --

func (*Wallet) Exists

func (m *Wallet) Exists() (bool, error)

Exists --

func (*Wallet) InitializeKeymanager

func (m *Wallet) InitializeKeymanager(ctx context.Context, skipMnemonicConfirm bool) (v2keymanager.IKeymanager, error)

InitializeKeymanager --

func (*Wallet) Password

func (m *Wallet) Password() string

Password --

func (*Wallet) ReadEncryptedSeedFromDisk

func (m *Wallet) ReadEncryptedSeedFromDisk(ctx context.Context) (io.ReadCloser, error)

ReadEncryptedSeedFromDisk --

func (*Wallet) ReadFileAtPath

func (m *Wallet) ReadFileAtPath(ctx context.Context, pathName string, fileName string) ([]byte, error)

ReadFileAtPath --

func (*Wallet) SetPassword

func (m *Wallet) SetPassword(newPass string)

SetPassword sets a new password for the wallet.

func (*Wallet) WriteEncryptedSeedToDisk

func (m *Wallet) WriteEncryptedSeedToDisk(ctx context.Context, encoded []byte) error

WriteEncryptedSeedToDisk --

func (*Wallet) WriteFileAtPath

func (m *Wallet) WriteFileAtPath(ctx context.Context, pathName string, fileName string, data []byte) error

WriteFileAtPath --

Jump to

Keyboard shortcuts

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