Function restoreWallet

Uses the given mnemonic phrase and hd path to re-generate a wallet.

import { generateWallet, restoreWallet } from "@sei-js/cosmjs";

const restoredWallet = await restoreWallet(SEED_PHRASE); // has optional parameter for account index
console.log('restored mnemonic', restoredWallet.mnemonic);
  • Parameters

    • seedPhrase: string

      The mnemonic phrase created with the wallet

    • OptionalhdPath: HdPath

      hdPath for the wallet you want to restore.

    Returns Promise<DirectSecp256k1HdWallet>

    A DirectSecp256k1HdWallet object representing an existing wallet.