# ed25519-hd-key

> BIP-0032 like derivation for ed25519 curve

Latest version **2.0.0** (published 2026-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install ed25519-hd-key
pnpm add ed25519-hd-key
yarn add ed25519-hd-key
bun add ed25519-hd-key
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-05-03 |
| First published | 2017-12-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 72 |
| Author | Aleksey Popov |
| Maintainers | alepop |
| Keywords | ed25519, bip32, slip-0010, crypto, trezor, hierarchical, deterministic, hd key |

## Links

- npm: https://www.npmjs.com/package/ed25519-hd-key
- Repository: https://github.com/alepop/ed25519-hd-key
- Issues: https://github.com/alepop/ed25519-hd-key/issues
- npm.io page: https://npm.io/package/ed25519-hd-key

## Dependencies (2)

- [@noble/hashes](https://npm.io/package/@noble/hashes.md) 2.2.0
- [@noble/ed25519](https://npm.io/package/@noble/ed25519.md) 3.1.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-05-03
- 1.3.0 — 2022-07-22
- 1.2.1 — 2022-07-21
- 1.2.0 — 2021-02-03
- 1.1.2 — 2020-02-11
- 1.1.1 — 2020-01-27
- 1.1.0 — 2019-11-21
- 1.0.0 — 2018-03-21
- 0.5.0 — 2017-12-14

## README

[![BuyMeACoffee](https://raw.githubusercontent.com/pachadotdev/buymeacoffee-badges/main/bmc-yellow.svg)](https://www.buymeacoffee.com/alepop)
[![codecov](https://codecov.io/gh/alepop/ed25519-hd-key/branch/master/graph/badge.svg)](https://codecov.io/gh/alepop/ed25519-hd-key)

ed25519 HD Key
=====

Version 2.0.0
------------

I've rebuilt the library from the ground up for version 2.0.0. It now uses `@noble/ed25519` and `@noble/hashes`. These libraries are faster, audited, and cleaner.

If you need to use `tweetnacl`, you can stick with version 1.3.0.

Key Derivation for `ed25519`
------------


[SLIP-0010](https://github.com/satoshilabs/slips/blob/master/slip-0010.md) - Specification

Installation
------------

    npm i --save ed25519-hd-key


Usage
-----

**example:**

```js
const { derivePath, getMasterKeyFromSeed, getPublicKey } = require('ed25519-hd-key')
const hexSeed = 'fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542';

const { key, chainCode } = getMasterKeyFromSeed(hexSeed);
console.log(key.toString('hex'))
// => 2b4be7f19ee27bbf30c667b642d5f4aa69fd169872f8fc3059c08ebae2eb19e7
console.log(chainCode.toString('hex'));
// => 90046a93de5380a72b5e45010748567d5ea02bbf6522f979e05c0d8d8ca9fffb

const { key, chainCode} = derivePath("m/0'/2147483647'", hexSeed);

console.log(key.toString('hex'))
// => ea4f5bfe8694d8bb74b7b59404632fd5968b774ed545e810de9c32a4fb4192f4
console.log(chainCode.toString('hex'));
// => 138f0b2551bcafeca6ff2aa88ba8ed0ed8de070841f0c4ef0165df8181eaad7f

console.log(getPublicKey(key).toString('hex'))
// => 005ba3b9ac6e90e83effcd25ac4e58a1365a9e35a3d3ae5eb07b9e4d90bcf7506d
```
Tests
-----
```
npm test
```

References
----------
[SLIP-0010](https://github.com/satoshilabs/slips/blob/master/slip-0010.md)

[BIP-0032](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)

[BIP-0044](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki)

---
_Source: https://npm.io/package/ed25519-hd-key · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
