getMnemonic
getMnemonic(): Promise<string[]>
Retrieves the current mnemonic phrase from the wallet.
This method returns the wallet's existing mnemonic seed phrase. Use this when you need to display the mnemonic to the user for backup purposes or to verify it has been set correctly.
Returns
string[] - An array of mnemonic words representing the wallet's seed phrase.
Example
ts
import { WalletDirector } from '@fedimint/core'
import { WasmWorkerTransport } from '@fedimint/transport-web'
const director = new WalletDirector(new WasmWorkerTransport())
// Retrieve the current mnemonic
const mnemonic = await director.getMnemonic()
console.log('Current mnemonic:', mnemonic)
// Display to user for backup purposesRelated Methods
hasMnemonicSet()- Checks if a mnemonic has been setgenerateMnemonic()- Generates a new mnemonic phrasesetMnemonic(words)- Sets a mnemonic phrase