How to get a mnemonic phrase from a secret key in Rust SDK?

Is it possible to get a mnemonic phrase from SecretKey in Rust SDK? I didn’t find an appropriate function

1 Like

There is no way to do this, but you shouldn’t need to as you can create a Wallet from either a secret key or a mnemonic phrase.

2 Likes

Thanks for the response
However, I have a use case where I need it. I’m working on a wallet and we’d like to give our users an opportunity to export seed phrases. For that, we need a way to transform secret keys to mnemonic phrases
For sure, we can generate mnemonic phrases and use them to create accounts, but it will work only with newly created accounts

It’s impossible to get mnemonics from private key cause bip39 uses a one-way derivation. You can only derive a secret key from the mnemonic phrase, not the other way around

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.