mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 11:11:20 +00:00
fbeba94a92
* Change import and export to be non-interactive * Fix * fix lint * Merge branch 'master' into make-export-import-nonint * Comments * Merge branch 'make-export-import-nonint' of github.com:prysmaticlabs/prysm into make-export-import-nonint * Merge refs/heads/master into make-export-import-nonint
62 lines
1.9 KiB
Go
62 lines
1.9 KiB
Go
package v2
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/validator/flags"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// AccountCommands for accounts-v2 for Prysm validators.
|
|
var AccountCommands = &cli.Command{
|
|
Name: "accounts-v2",
|
|
Category: "accounts",
|
|
Usage: "defines commands for interacting with eth2 validator accounts (work in progress)",
|
|
Subcommands: []*cli.Command{
|
|
// AccountCommands for accounts-v2 for Prysm validators.
|
|
{
|
|
Name: "new",
|
|
Description: `creates a new validator account for eth2. If no account exists at the wallet path, creates a new wallet for a user based on
|
|
specified input, capable of creating a direct, derived, or remote wallet.
|
|
this command outputs a deposit data string which is required to become a validator in eth2.`,
|
|
Flags: []cli.Flag{
|
|
flags.WalletDirFlag,
|
|
flags.WalletPasswordsDirFlag,
|
|
flags.PasswordFileFlag,
|
|
flags.SkipMnemonicConfirmFlag,
|
|
},
|
|
Action: NewAccount,
|
|
},
|
|
{
|
|
Name: "list",
|
|
Description: "Lists all validator accounts in a user's wallet directory",
|
|
Flags: []cli.Flag{
|
|
flags.WalletDirFlag,
|
|
flags.WalletPasswordsDirFlag,
|
|
flags.ShowDepositDataFlag,
|
|
},
|
|
Action: ListAccounts,
|
|
},
|
|
{
|
|
Name: "export",
|
|
Description: `exports the account of a given directory into a zip of the provided output path. This zip can be used to later import the account to another directory`,
|
|
Flags: []cli.Flag{
|
|
flags.WalletDirFlag,
|
|
flags.WalletPasswordsDirFlag,
|
|
flags.BackupPathFlag,
|
|
flags.AccountsFlag,
|
|
},
|
|
Action: ExportAccount,
|
|
},
|
|
{
|
|
Name: "import",
|
|
Description: `imports the accounts from a given zip file to the provided wallet path. This zip can be created using the export command`,
|
|
Flags: []cli.Flag{
|
|
flags.WalletDirFlag,
|
|
flags.WalletPasswordsDirFlag,
|
|
flags.BackupPathFlag,
|
|
flags.PasswordFileFlag,
|
|
},
|
|
Action: ImportAccount,
|
|
},
|
|
},
|
|
}
|