# MlDsa44.fromMnemonic

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

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

## Imports

:::code-group
```ts [Named]
import { MlDsa44 } from 'ox'
```

```ts [Entrypoint]
import * as MlDsa44 from 'ox/MlDsa44'
```
:::

## Examples

```ts twoslash
import { MlDsa44 } from 'ox'

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>
```

**Source:** [src/core/MlDsa44.ts](https://github.com/wevm/ox/blob/main/src/core/MlDsa44.ts#L161)

## 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>`
