I'm using sotez, but I don't know how to convert edsk to edesk like tezos-client.

var mnemonic = crypto.generateMnemonic();
crypto.generateKeys(mnemonic, pass).then(function (data) { /* data.sk prefix is edsk, not edesk */ }

Any solutions?

  • I'm not sure if I understand your question. I think that the prefix of tezos-client private keys are also edsk.
    – arvidj
    Commented Dec 16, 2019 at 13:03
  • Thank you for your comment. I remember that it was edsk before. Now I need a password when I do gen key. Commented Dec 16, 2019 at 13:18
  • Ah, I see. edesk keys are encrypted, password-protected, edsk keys. With tezos-client, edsk is generated by gen keys. To generate edsk, do gen keys --encrypted. Unfortunately, I don't know how to do this with sotez. Try posting an issue on their github page: github.com/AndrewKishino/sotez/issues
    – arvidj
    Commented Dec 16, 2019 at 13:56

1 Answer 1


You can do this with [email protected]. There is a new method cryptoUtils.encryptSecretKey(secretKey, password) which encrypts secret keys into the 'esk' format. https://github.com/AndrewKishino/sotez/wiki/Documentation#encryptsecretkey

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.