prompt

package
v0.0.2-0...-1c7e8a7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Unlicense, ISC Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(err error) bool

func Debug

func Debug(a ...interface{})

func Debugc

func Debugc(fn func() string)

func Debugf

func Debugf(format string, a ...interface{})

func Debugs

func Debugs(a interface{})

func Error

func Error(a ...interface{})

func Errorc

func Errorc(fn func() string)

func Errorf

func Errorf(format string, a ...interface{})

func Errors

func Errors(a interface{})

func Fatal

func Fatal(a ...interface{})

func Fatalc

func Fatalc(fn func() string)

func Fatalf

func Fatalf(format string, a ...interface{})

func Fatals

func Fatals(a interface{})

func Info

func Info(a ...interface{})

func Infoc

func Infoc(fn func() string)

func Infof

func Infof(format string, a ...interface{})

func Infos

func Infos(a interface{})

func PrivatePass

func PrivatePass(reader *bufio.Reader, legacyKeyStore *keystore.Store) ([]byte, error)

PrivatePass prompts the user for a private passphrase with varying behavior depending on whether the passed legacy keystore exists. When it does, the user is prompted for the existing passphrase which is then used to unlock it.

On the other hand, when the legacy keystore is nil, the user is prompted for a new private passphrase. All prompts are repeated until the user enters a valid response.

func ProvidePrivPassphrase

func ProvidePrivPassphrase() ([]byte, error)

ProvidePrivPassphrase is used to prompt for the private passphrase which maybe required during upgrades.

func ProvideSeed

func ProvideSeed() ([]byte, error)

ProvideSeed is used to prompt for the wallet seed which maybe required during upgrades.

func PublicPass

func PublicPass(reader *bufio.Reader, privPass []byte,
	defaultPubPassphrase, configPubPassphrase []byte) ([]byte, error)

PublicPass prompts the user whether they want to add an additional layer of encryption to the wallet. When the user answers yes and there is already a public passphrase provided via the passed config, it prompts them whether or not to use that configured passphrase.

It will also detect when the same passphrase is used for the private and public passphrase and prompt the user if they are sure they want to use the same passphrase for both. Finally, all prompts are repeated until the user enters a valid response.

func Seed

func Seed(reader *bufio.Reader) ([]byte, error)

Seed prompts the user whether they want to use an existing wallet generation seed.

When the user answers no, a seed will be generated and displayed to the user along with prompting them for confirmation.

When the user answers yes, a the user is prompted for it.

All prompts are repeated until the user enters a valid response.

func Trace

func Trace(a ...interface{})

func Tracec

func Tracec(fn func() string)

func Tracef

func Tracef(format string, a ...interface{})

func Traces

func Traces(a interface{})

func Warn

func Warn(a ...interface{})

func Warnc

func Warnc(fn func() string)

func Warnf

func Warnf(format string, a ...interface{})

func Warns

func Warns(a interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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