diff --git a/go-client/README.md b/go-client/README.md index 8020ee6..40a388f 100644 --- a/go-client/README.md +++ b/go-client/README.md @@ -152,6 +152,12 @@ go run keygen/keygen.go --key 0x1512de600a10a0aac01580dbfc080965b89ed2329a7b2bf5 where the key value needs to be replaced by the generated private key and the address value needs to be replaced by the actual address that will be used to sign the updates. + +In case you forgot your public key, but saved the private one, you can run the following for outputting the key: +```bash +go run keygen/keygen.go --key 0x1512de600a10a0aac01580dbfc080965b89ed2329a7b2bf538f4c7e09e34aa1 +``` + Alternatively, one can save and read the (encrypted) key from a file and save the signature with: ```bash diff --git a/go-client/keygen/keygen.go b/go-client/keygen/keygen.go index 5854b12..f798db0 100644 --- a/go-client/keygen/keygen.go +++ b/go-client/keygen/keygen.go @@ -207,8 +207,8 @@ func main() { logger.Info("Saved the signature in file " + *SigOutFlag) } } else { - // in case that key was read and decrypted from a file, but not used for the signature, just print it - if *InFileFlag != "" { + // in the case that a key was provided but not used for the signature, just print it out + if *InFileFlag != "" || *InFlag != "" { keysString := keyStrings{PrivateKey: "0x" + keys.Sk.Text(16), PublicKeyX: "0x" + keys.Pk.X.Text(16), PublicKeyY: "0x" + keys.Pk.Y.Text(16)} keyBytes, err := json.Marshal(keysString) if err != nil {