> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://viem-7qkv6fceu-wevm.vercel.app/api/mcp` to find what you need.

# MlDsa44.fromMnemonic

:::info
`MlDsa44.fromMnemonic` is a re-export of ox's [`MlDsa44.fromMnemonic`](https://oxlib.sh/api/MlDsa44/fromMnemonic). Refer to the ox documentation for the full reference.
:::

Derives an ML-DSA-44 private key from a BIP-39 mnemonic.

This is equivalent to passing `Mnemonic.toSeed(mnemonic, { passphrase })` to [`MlDsa44.fromSeed`](/docs/utilities/mldsa44/fromSeed).

## Imports

```ts
import { MlDsa44 } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { MlDsa44 } from 'viem/utils'

const privateKey = MlDsa44.fromMnemonic(
  'test test test test test test test test test test test junk'
)
```

## Definition

```ts
function fromMnemonic<as>(
  mnemonic: string,
  options?: fromMnemonic.Options<as>,
): fromMnemonic.ReturnType<as>
```

## Parameters

### mnemonic

* **Type:** `string`

BIP-39 mnemonic phrase.

### options

* **Type:** `fromMnemonic.Options<as>`
* **Optional**

Options.

#### options.as

* **Type:** `"Bytes" | "Hex" | as`
* **Optional**

Format of the returned private key.

#### options.passphrase

* **Type:** `string`
* **Optional**

Optional BIP-39 passphrase.

## Return Type

An ML-DSA-44 private key (32-byte seed).

`fromMnemonic.ReturnType<as>`
