wallet

package
v0.0.0-...-ee306bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func CheckCreateArgs(cmd *cobra.Command, args []string) (err error)

CheckCreateArgs - Checks if wallet already exists.

func CheckDeriveArgs

func CheckDeriveArgs(cmd *cobra.Command, args []string) (err error)

CheckDeriveArgs - Checks derivation path.

func HandleCreateCmd

func HandleCreateCmd(cmd *cobra.Command, args []string) (err error)

HandleCreateCmd - Handles seed new command.

func HandleDeriveCmd

func HandleDeriveCmd(cmd *cobra.Command, args []string) (err error)

HandleDeriveCmd - Handles key derive command.

func HandleExportCmd

func HandleExportCmd(cmd *cobra.Command, args []string) (err error)

HandleExportCmd - Handles seed export command.

func HandleImportCmd

func HandleImportCmd(cmd *cobra.Command, args []string) (err error)

HandleImportCmd - Handles seed import command.

func HandleListCmd

func HandleListCmd(cmd *cobra.Command, args []string) (err error)

HandleListCmd - Handles key list command.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL