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
| Field | Required | Description |
|---|---|---|
| mnemonic | Yes | `string` — BIP-39 phrase. |
| bip39Passphrase | No | `string` — must match the original wallet’s BIP-39 passphrase if one was used. |
| label | No | `string` — UI name. |
| paths | No | `FamilyPaths` — same keys as create (`evm` + per-coin ids). |
| accounts | No | `number` — default `1`. |
| password | No | `string` — keystore PIN when storage is encrypted. |
Response
Promise<Wallet> — kind: "mnemonic"
ts
Wallet // same surface as create — accounts, derive, sign, persistUsage
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
| Field | Required | Description |
|---|---|---|
| conflict | No | Mnemonic already imported (strict) or overlapping receive address. Message includes existing wallet id + label. |
| invalid_argument | No | Invalid BIP-39 checksum / word list, or bad paths. |
| unauthorized | No | Encrypted storage — bad or missing PIN. |
Pre-check with findMnemonic (returns an array) before showing a confirm UI.