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
    Dec 16 '19 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. Dec 16 '19 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
    Dec 16 '19 at 13:56

You can do this with sotez@8.0.0. 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, privacy policy and cookie policy

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