1

I fear I may have made an expensive error. I have an account that has more Tezos than I would like to admit. Upon trying to transfer Tezos out of the account like this:

./tezos-client transfer 1 from <account a> to <account b>

I receive a message that says:

Unknown secret key for <account a>

Fortunately, I have copied the secret key, the public key and the hash--or account number in my records. However, ./tezos-client doesn't seem to know the secret key for this account anymore. How can I sign this transaction with ./tezos-client?

I have tried

./tezos-client import secret key <alias> unencrypted:<secret key>

that yields:

Failed to read a b58check_encoding data (Signature.Secret_key): "<secret key>"

I have also tried 'encrypted' instead of 'unencrypted' and that yields:

Not a Base58Check-encoded encrypted key

2 Answers 2

2

If your secret key begins with 'edesk', then it is encrypted, it should also be either 98 or 54 characters in length. You should be able to import 'encrypted:edesk....' into the tezos client.

1

I solved it this problem:

Let's say you want to import an account from one machine/enviroment to other.

generate keys with the following command:

octez-client gen keys <alias> -s p256 

octez-client show address <alias> -S 

It will shows these values:

Hash: [tz…]
Public Key: [p2p…]
Secret Key: unencrypted:[This is the one you should copy]

Then when you want to import it run the following command:

octez-client import secret key <alias> unencrypted:[paste what you previously copy] 

It might start with something like… “p2s…” It will prompt that tezos account was added.

What I think might happened is that you were passing the public key instead of the Secret Key.

I hope this can help anyone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.