Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MnemonicCmd = &cobra.Command{ Use: "mnemonic", Short: "Generate a BIP39 mnemonic seed.", Long: "", RunE: func(cmd *cobra.Command, args []string) error { mnemonic, err := hdwallet.NewMnemonic(*inputMnemonicWords, *inputMnemonicLang) if err != nil { return err } cmd.Println(mnemonic) return nil }, PreRunE: func(cmd *cobra.Command, args []string) error { if *inputMnemonicWords < 12 { return fmt.Errorf("the number of words in the mnemonic must be 12 or more. Given: %d", *inputMnemonicWords) } if *inputMnemonicWords > 24 { return fmt.Errorf("the number of words in the mnemonic must be 24 or less. Given: %d", *inputMnemonicWords) } if *inputMnemonicWords%3 != 0 { return fmt.Errorf("the number of words in the mnemonic must be a multiple of 3") } return nil }, }
mnemonicCmd represents the mnemonic command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.