mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 04:00:05 +00:00
Change validator accounts-v2 to validator wallet-v2 accounts (#6589)
* Change `validator accounts-v2` to `validator wallet-v2 accounts-v2 * Change to accounts * Fix cmd * Rename cmd.go to cmd_accounts.go
This commit is contained in:
parent
774b4b7eef
commit
52e9155df3
@ -4,7 +4,8 @@ load("@prysm//tools/go:def.bzl", "go_library")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"cmd.go",
|
||||
"cmd_accounts.go",
|
||||
"cmd_wallet.go",
|
||||
"doc.go",
|
||||
"export.go",
|
||||
"import.go",
|
||||
|
@ -1,56 +0,0 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
"github.com/prysmaticlabs/prysm/validator/flags"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Commands for accounts-v2 for Prysm validators.
|
||||
var Commands = &cli.Command{
|
||||
Name: "accounts-v2",
|
||||
Category: "accounts-v2",
|
||||
Usage: "defines commands for interacting with eth2 validator accounts (work in progress)",
|
||||
Subcommands: []*cli.Command{
|
||||
{
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
Action: ImportAccount,
|
||||
},
|
||||
},
|
||||
}
|
51
validator/accounts/v2/cmd_accounts.go
Normal file
51
validator/accounts/v2/cmd_accounts.go
Normal file
@ -0,0 +1,51 @@
|
||||
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: "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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
Action: ImportAccount,
|
||||
},
|
||||
}
|
20
validator/accounts/v2/cmd_wallet.go
Normal file
20
validator/accounts/v2/cmd_wallet.go
Normal file
@ -0,0 +1,20 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Commands for accounts-v2 for Prysm validators.
|
||||
var Commands = &cli.Command{
|
||||
Name: "wallet-v2",
|
||||
Category: "wallet-v2",
|
||||
Usage: "defines commands for interacting with eth2 validator wallets (work in progress)",
|
||||
Subcommands: []*cli.Command{
|
||||
{
|
||||
Name: "accounts",
|
||||
Category: "accounts",
|
||||
Usage: "defines commands for interacting with eth2 validator accounts (work in progress)",
|
||||
Subcommands: AccountCommands,
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue
Block a user