diff --git a/README.md b/README.md index d8e78e0..9a74cd0 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ EigenLayer CLI is used to manage core operator functionalities like local key ma * [Create keys](#create-keys) * [Import keys](#import-keys) * [List keys](#list-keys) + * [Export keys](#export-keys) * [Operator Registration](#operator-registration) * [Sample config creation](#sample-config-creation) * [Registration](#registration) @@ -189,6 +190,20 @@ eigenlayer operator keys list It will show all the keys created with this command with the public key +### Export keys +If you want to see the private key of the existing keys, you can use the below command. + +```bash +eigenlayer operator keys export --key-type ecdsa [keyname] +``` +This will also prompt for the password used to encrypt the key. + +If your keys is not in the default location (`~/.eigenlayer/operator_keys`), you can give the path to the key file using `--key-path` flag. +You don't need to give the key name in that case. + +```bash +eigenlayer operator keys export --key-type ecdsa --key-path [path] +``` ## Operator Registration ### Sample config creation diff --git a/cmd/eigenlayer/main.go b/cmd/eigenlayer/main.go index 44c38ee..29dac56 100644 --- a/cmd/eigenlayer/main.go +++ b/cmd/eigenlayer/main.go @@ -23,7 +23,7 @@ func main() { app.Name = "eigenlayer" app.Usage = "EigenLayer CLI" - app.Version = "0.5.0" + app.Version = "0.5.1" app.Copyright = "(c) 2023 EigenLabs" // Initialize the dependencies diff --git a/pkg/operator/keys/export.go b/pkg/operator/keys/export.go index 635580a..8042360 100644 --- a/pkg/operator/keys/export.go +++ b/pkg/operator/keys/export.go @@ -44,9 +44,6 @@ But if you want it to export from a different location, use --key-path flag`, keyType := c.String(KeyTypeFlag.Name) keyName := c.Args().Get(0) - if err := validateKeyName(keyName); err != nil { - return err - } keyPath := c.String(KeyPathFlag.Name) if len(keyPath) == 0 && len(keyName) == 0 {