Skip to content
Docs

Client: wallets

Import a mnemonic

Restore a BIP-39 wallet; strict mode throws conflict on duplicate seeds.

Overview

Restores a BIP-39 wallet from an existing phrase. Same path / account options as create. Under default duplicates: "strict", an exact mnemonic match throws conflict.

Signature

js
await client.wallets.importMnemonic(options)

Parameters

ImportMnemonicOptions

FieldRequiredDescription
mnemonicYes`string` — BIP-39 phrase.
bip39PassphraseNo`string` — must match the original wallet’s BIP-39 passphrase if one was used.
labelNo`string` — UI name.
pathsNo`FamilyPaths` — same keys as create (`evm` + per-coin ids).
accountsNo`number` — default `1`.
passwordNo`string` — keystore PIN when storage is encrypted.

Response

Promise<Wallet> — kind: "mnemonic"

ts
Wallet // same surface as create — accounts, derive, sign, persist

Usage

js
await client.wallets.importMnemonic({
  mnemonic: "abandon abandon … about",
  label: "Restored",
  bip39Passphrase: optional25th,
  password: pin,
});

await client.wallets.importMnemonic({
  mnemonic,
  paths: { evm: "m/44'/60'/0'/0/0", bitcoin: "m/84'/0'/0'/0/0" },
  password: pin,
});

Throws

FieldRequiredDescription
conflictNoMnemonic already imported (strict) or overlapping receive address. Message includes existing wallet id + label.
invalid_argumentNoInvalid BIP-39 checksum / word list, or bad paths.
unauthorizedNoEncrypted storage — bad or missing PIN.

Pre-check with findMnemonic (returns an array) before showing a confirm UI.