cli/wallet: add warning for dump and export commands

This commit is contained in:
Roman Khimov 2022-09-01 21:03:53 +03:00
parent cad0d7f00d
commit cbc2299295

View file

@ -173,6 +173,11 @@ func NewCommands() []cli.Command {
Name: "dump", Name: "dump",
Usage: "check and dump an existing NEO wallet", Usage: "check and dump an existing NEO wallet",
UsageText: "neo-go wallet dump -w wallet [--wallet-config path] [-d]", UsageText: "neo-go wallet dump -w wallet [--wallet-config path] [-d]",
Description: `Prints the given wallet (via -w option or via wallet configuration file) in JSON
format to the standard output. If -d is given, private keys are unencrypted and
displayed in clear text on the console! Be very careful with this option and
don't use it unless you know what you're doing.
`,
Action: dumpWallet, Action: dumpWallet,
Flags: []cli.Flag{ Flags: []cli.Flag{
walletPathFlag, walletPathFlag,
@ -198,6 +203,12 @@ func NewCommands() []cli.Command {
Name: "export", Name: "export",
Usage: "export keys for address", Usage: "export keys for address",
UsageText: "export -w wallet [--wallet-config path] [--decrypt] [<address>]", UsageText: "export -w wallet [--wallet-config path] [--decrypt] [<address>]",
Description: `Prints the key for the given account to the standard output. It uses NEP-2
encrypted format by default (the way NEP-6 wallets store it) or WIF format if
-d option is given. In the latter case the key can be displayed in clear text
on the console, so be extremely careful with this option and don't use unless
you really need it and know what you're doing.
`,
Action: exportKeys, Action: exportKeys,
Flags: []cli.Flag{ Flags: []cli.Flag{
walletPathFlag, walletPathFlag,