Documentation
¶
Index ¶
- Constants
- Variables
- func CreateCmd(p utils.Prompter) *cobra.Command
- func ExportCmd(p utils.Prompter) *cobra.Command
- func GetAddress(keyStoreFile string) (string, error)
- func GetECDSAPrivateKey(keyStoreFile string, password string) (*ecdsa.PrivateKey, error)
- func GetIDFromBLSPubKey(pubKey string) (string, error)
- func GetKeysStoredDir(cfg *cmtcfg.Config) string
- func GetPubKey(keyStoreFile string) (string, error)
- func ImportCmd(p utils.Prompter) *cobra.Command
- func ListCmd(p utils.Prompter) *cobra.Command
- func ShowCmd(p utils.Prompter) *cobra.Command
- type BoolFlag
- type KeyPath
- type StringFlag
Constants ¶
View Source
const ( KeyTypeECDSA = "ecdsa" KeyTypeBLS = "bls" // MinEntropyBits For password validation MinEntropyBits = 70 )
Variables ¶
View Source
var ( ErrInvalidNumberOfArgs = errors.New("invalid number of arguments") ErrEmptyKeyName = errors.New("key name cannot be empty") ErrEmptyPrivateKey = errors.New("private key cannot be empty") ErrKeyContainsWhitespaces = errors.New("key name cannot contain spaces") ErrPrivateKeyContainsWhitespaces = errors.New("private key cannot contain spaces") ErrInvalidKeyType = errors.New("invalid key type. key type must be either 'ecdsa' or 'bls'") ErrInvalidPassword = errors.New("invalid password") ErrInvalidHexPrivateKey = errors.New("invalid hex private key") )
View Source
var ( KeyTypeFlag = StringFlag{ Name: "key-type", Aliases: "k", Required: true, Usage: "Type of key you want to create. Currently supports 'ecdsa' and 'bls'", EnvVars: []string{"KEY_TYPE"}, } InsecureFlag = BoolFlag{ Name: "insecure", Aliases: "i", Usage: "Use this flag to skip password validation", EnvVars: []string{"INSECURE"}, } KeyPathFlag = StringFlag{ Name: "key-path", Aliases: "p", Usage: "Use this flag to specify the path of the key", EnvVars: []string{"KEY_PATH"}, } )
Functions ¶
func GetAddress ¶
func GetECDSAPrivateKey ¶
func GetECDSAPrivateKey(keyStoreFile string, password string) (*ecdsa.PrivateKey, error)
GetECDSAPrivateKey - Keeping it right now as we might need this function to export the keys
func GetIDFromBLSPubKey ¶
func GetKeysStoredDir ¶
Types ¶
type KeyPath ¶
func (*KeyPath) IsAllExists ¶
func (*KeyPath) IsAnyExists ¶
func (*KeyPath) IsBLSExist ¶
func (*KeyPath) IsECDSAExist ¶
Click to show internal directories.
Click to hide internal directories.