prompt

package
v4.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Birthday

func Birthday(reader *bufio.Reader) (*time.Time, *uint32, error)

Birthday prompts for a wallet birthday. Return values may be nil with no error.

func ImportedAccounts

func ImportedAccounts(reader *bufio.Reader, params *chaincfg.Params) (names []string, xpubs []*hdkeychain.ExtendedKey, err error)

ImportedAccounts prompts for any additional account names and xpubs to import at wallet creation.

func PassPrompt

func PassPrompt(reader *bufio.Reader, prefix string, confirm bool) ([]byte, error)

PassPrompt prompts the user for a passphrase with the given prefix. The function will ask the user to confirm the passphrase and will repeat the prompts until they enter a matching response.

func PrivatePass

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

PrivatePass prompts the user for a 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, configPubPass []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) (seed []byte, imported bool, err 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. The bool returned indicates if the wallet was restored from a given seed or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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