Closed mostafamshk closed 1 year ago
Hi @mostafamshk. Unfortunately we don't provide a function to retrieve a mnemonic from a generated wallet, since each wallet might be generated in different ways and there might not always be a way to get the mnemonic from it (e.g. if the wallet was generrated from a private key). In order to achieve what you want to get, I would suggest:
Bip39.generateMnemonic(strength: 256)
Wallet.derive
function to create a Wallet instance using the mnemonic you have generated:
const wallet = Wallet.derive(mnemonic, networkInfo)
This way you will have full control over the generated mnemonic and you will be able to show it where you need.
Hey I'm using
alan.dart
for my custom wallet that manages my customcosmos-sdk
based blockchain. I couldn't find any data inWallet
class that represents the mnemonic phrase after creating a random wallet.and I have to show the user his mnemonic phrase after he creates an account and I can't.
Can you guys help me? Thanks