bchwallet: github.com/gcash/bchwallet/internal/prompt Index | Files

package prompt

import "github.com/gcash/bchwallet/internal/prompt"

Index

Package Files

prompt.go

func PrivatePass Uses

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 Uses

func ProvidePrivPassphrase() ([]byte, error)

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

func ProvideSeed Uses

func ProvideSeed() ([]byte, error)

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

func PublicPass Uses

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 Uses

func Seed(reader *bufio.Reader) ([]byte, bool, 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.

Package prompt imports 10 packages (graph) and is imported by 2 packages. Updated 2019-09-14. Refresh now. Tools for package owners.