# eip55

> A EIP55 compatible address encoding library

Latest version **2.1.1** (published 2023-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install eip55
pnpm add eip55
yarn add eip55
bun add eip55
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2023-05-26 |
| First published | 2017-12-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Daniel Cousens |
| Maintainers | jprichardson, junderw |
| Keywords | EIP55, ethereum, address, checksum, encode, verify |

## Links

- npm: https://www.npmjs.com/package/eip55
- Repository: https://github.com/cryptocoinjs/eip55
- Homepage: https://github.com/cryptocoinjs/eip55#readme
- Issues: https://github.com/cryptocoinjs/eip55/issues
- npm.io page: https://npm.io/package/eip55

## Dependencies (1)

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

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 2.1.1 (latest) — 2023-05-26
- 2.1.0 — 2020-12-21
- 2.0.0 — 2020-12-20
- 1.0.3 — 2017-12-08
- 1.0.2 — 2017-12-07
- 1.0.1 — 2017-12-04
- 1.0.0 — 2017-12-02

## README

# eip55

[![build status](https://secure.travis-ci.org/cryptocoinjs/eip55.png)](https://travis-ci.org/cryptocoinjs/eip55)
[![Version](https://img.shields.io/npm/v/eip55.svg)](https://www.npmjs.org/package/eip55)

An [EIP55](https://github.com/ethereum/EIPs/blob/f3a591f6718035ba358d6a479cadabe313f6ed36/EIPS/eip-55.md) compatible address encoding library.


## Example

``` javascript
let eip55 = require('eip55')

eip55.encode('0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359')
// => 0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359

eip55.verify('0xAcA128edBD274F2aBa534d67DD55Ebf67767B9A5')
// => true

eip55.verify('0xaca128edbd274f2aba534d67dd55ebf67767b9a5')
// => false

// The second argument of verify allows for single case addresses
// In this case it will only verify the leading 0x and length
// therefore the above example returns true instead of false

// lower case
eip55.verify('0xaca128edbd274f2aba534d67dd55ebf67767b9a5', true)
// => true

// upper case
eip55.verify('0xACA128EDBD274F2ABA534D67DD55EBF67767B9A5', true)
// => true

// EIP-1191 chainId support has been added
// pass the optional chainId to get the casing for that network

// Encode for RSK Mainnet (chainId 30) (notice the difference from above)
eip55.encode('0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359', 30)
// => 0xFb6916095cA1Df60bb79ce92cE3EA74c37c5d359

eip55.verify('0xFb6916095cA1Df60bb79ce92cE3EA74c37c5d359')
// => false (we need to pass the chainId)

// Note: the second argument is allowOneCase (default: false)
eip55.verify('0xFb6916095cA1Df60bb79ce92cE3EA74c37c5d359', false, 30)
// => true
```


## License [MIT](LICENSE)

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