# ethereum-private-key-to-address

> Convert an Ethereum private key to a public address

Latest version **0.0.7** (published 2021-04-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install ethereum-private-key-to-address
pnpm add ethereum-private-key-to-address
yarn add ethereum-private-key-to-address
bun add ethereum-private-key-to-address
```

Provides the commands `ethereum-private-key-to-address`, `ethereum_private_key_to_address`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2021-04-26 |
| First published | 2019-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 597.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Miguel Mota |
| Maintainers | miguelmota |
| Keywords | ethereum, eth, blockchain, private, key, public, address, converter, checksum, cli |

## Links

- npm: https://www.npmjs.com/package/ethereum-private-key-to-address
- Repository: https://github.com/miguelmota/ethereum-private-key-to-address
- Issues: https://github.com/miguelmota/ethereum-private-key-to-address/issues
- npm.io page: https://npm.io/package/ethereum-private-key-to-address

## Dependencies (3)

- [meow](https://npm.io/package/meow.md) ^5.0.0
- [ethereum-public-key-to-address](https://npm.io/package/ethereum-public-key-to-address.md) 0.0.1
- [ethereum-private-key-to-public-key](https://npm.io/package/ethereum-private-key-to-public-key.md) 0.0.2

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2021-04-26
- 0.0.6 — 2021-03-16
- 0.0.5 — 2020-07-23
- 0.0.4 — 2020-07-23
- 0.0.3 — 2019-10-15
- 0.0.2 — 2019-06-25
- 0.0.1 — 2019-06-24

## README

# ethereum-private-key-to-address

> Convert an Ethereum private key to a public address

[![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/miguelmota/ethereum-private-key-to-address/master/LICENSE)
[![NPM version](https://badge.fury.io/js/ethereum-private-key-to-address.svg)](http://badge.fury.io/js/ethereum-private-key-to-address)

## Demo

[https://lab.miguelmota.com/ethereum-private-key-to-address](https://lab.miguelmota.com/ethereum-private-key-to-address)

## Install

```bash
npm install ethereum-private-key-to-address
```

## Getting started

```javascript
const privateKeyToAddress = require('ethereum-private-key-to-address')

console.log(privateKeyToAddress(Buffer.from('4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d', 'hex'))) // '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1'
console.log(privateKeyToAddress('4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d')) // '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1'
console.log(privateKeyToAddress('0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d')) // '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1'
```

## CLI

Install:

```bash
npm install -g ethereum-private-key-to-address
```

Convert private key to public address:

```bash
$ ethereum_private_key_to_address 4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d

0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1
```

Piping private key example:

```bash
$ echo 4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d | ethereum_private_key_to_address

0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1
```

## Test

```bash
npm test
```

## License

[MIT](LICENSE)

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