# eth-checksum

> Ethereum address checksum with EIP-1191 support

Latest version **1.0.1** (published 2020-03-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install eth-checksum
pnpm add eth-checksum
yarn add eth-checksum
bun add eth-checksum
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-03-02 |
| First published | 2020-03-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Emil Bay |
| Maintainers | emilbayes |

## Links

- npm: https://www.npmjs.com/package/eth-checksum
- Repository: https://github.com/hyperdivision/eth-checksum
- Homepage: https://github.com/hyperdivision/eth-checksum#readme
- Issues: https://github.com/hyperdivision/eth-checksum/issues
- npm.io page: https://npm.io/package/eth-checksum

## Dependencies (1)

- [keccak](https://npm.io/package/keccak.md) ^3.0.0

## Recent versions

- 1.0.1 (latest) — 2020-03-02

## README

# `eth-checksum`

[![Build Status](https://travis-ci.com/hyperdivision/eth-checksum.svg?branch=master)](https://travis-ci.com/hyperdivision/eth-checksum)

> Ethereum address checksum with EIP-1191 support

## Usage

```js
var checksum = require('eth-checksum')

console.log(checksum.encode('0x27b1fdb04752bbc536007a920d24acb045561c26'))
console.log(checksum.verify('0x27b1fdb04752bbc536007a920d24acb045561c26'))

// With chain id
console.log(checksum.encode('0x27b1FdB04752BBc536007A920D24ACB045561c26', 30))
console.log(checksum.verify('0x27b1FdB04752BBc536007A920D24ACB045561c26', 30))
```

## API

### `const addrStr = checksum.encode(address, [chainId = null])`

Encode `address` with optional `chainId`. Can encode a `string` or a `Buffer`

### `const bool = checksum.verify(address, [chainId = null])`

Validate `address` with optional `chainId`. Can validate a `string` or a `Buffer`

## Install

```sh
npm install eth-checksum
```

## License

[ISC](LICENSE)

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