Documentation ¶
Index ¶
- Variables
- func CheckCreateArgs(cmd *cobra.Command, args []string) (err error)
- func CheckDeriveArgs(cmd *cobra.Command, args []string) (err error)
- func HandleCreateCmd(cmd *cobra.Command, args []string) (err error)
- func HandleDeriveCmd(cmd *cobra.Command, args []string) (err error)
- func HandleExportCmd(cmd *cobra.Command, args []string) (err error)
- func HandleImportCmd(cmd *cobra.Command, args []string) (err error)
- func HandleListCmd(cmd *cobra.Command, args []string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateCmd = &cobra.Command{ Use: "create [name]", Short: "Create new seed", Long: `Creates new wallet seed. Default wallet name used is "default".`, Example: " $ rcx wallet create exampple", Annotations: map[string]string{"category": "wallet"}, Args: CheckCreateArgs, Run: cmdutil.WrapCommand(HandleCreateCmd), }
CreateCmd - Seed new command.
View Source
var DeriveCmd = &cobra.Command{ Use: "derive", Short: "Derive from seed", Long: `Derives key from seed and path or mnemonic name. Path is defined as: "/<purpose>'/<coin_type>'/<account>'/<change>/<address_index>". Mnemonic can be used for path by using --hash or -x flag. Default wallet name used is "default".`, Example: ` $ rcx wallet derive -xd memo $ rcx wallet derive -k wallet/x/memo $ rcx wallet derive -w wallet -xd memo $ rcx wallet derive -d m/44'/138'/0'/0/0`, Annotations: map[string]string{"category": "wallet"}, Args: CheckDeriveArgs, Run: cmdutil.WrapCommand(HandleDeriveCmd), }
DeriveCmd - Key derive command.
View Source
var ExportCmd = &cobra.Command{ Use: "export [name]", Short: "Export master key", Long: `Exports wallet private key and mnmemonic seed. Default wallet name used is "default".`, Annotations: map[string]string{"category": "wallet"}, Args: checkExistsArgs, Run: cmdutil.WrapCommand(HandleExportCmd), }
ExportCmd - Seed export command.
View Source
var ImportCmd = &cobra.Command{ Use: "import [name]", Short: "Import master key", Long: `Imports wallet private key or mnemonic seed. Default wallet name used is "default".`, Annotations: map[string]string{"category": "wallet"}, Args: CheckCreateArgs, Run: cmdutil.WrapCommand(HandleImportCmd), }
ImportCmd - Seed import command.
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "List master keys", Long: `Prints names of all available wallets.`, Annotations: map[string]string{"category": "key"}, Run: cmdutil.WrapCommand(HandleListCmd), }
ListCmd - Key list command.
View Source
var RootCmd = &cobra.Command{ Use: "wallet", Short: "Wallets commands", Annotations: map[string]string{"category": "wallet"}, }
RootCmd - Root seed RootCmd.
Functions ¶
func CheckCreateArgs ¶
CheckCreateArgs - Checks if wallet already exists.
func CheckDeriveArgs ¶
CheckDeriveArgs - Checks derivation path.
func HandleCreateCmd ¶
HandleCreateCmd - Handles seed new command.
func HandleDeriveCmd ¶
HandleDeriveCmd - Handles key derive command.
func HandleExportCmd ¶
HandleExportCmd - Handles seed export command.
func HandleImportCmd ¶
HandleImportCmd - Handles seed import command.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.