# HdKey.fromExtendedKey

Creates a HD Key from an extended private key.

## Imports

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

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

## Examples

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

const hdKey = HdKey.fromExtendedKey('...')

console.log(hdKey.privateKey)
// @log: '0x...'
```

## Definition

```ts
function fromExtendedKey(
  extendedKey: string,
): HdKey
```

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

## Parameters

### extendedKey

* **Type:** `string`

The extended private key.

## Return Type

The HD Key.

`HdKey.HdKey`
