npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ercref/erc8117

v0.1.1

Published

TypeScript implementation of [ERC-8117](https://eips.ethereum.org/EIPS/eip-8117) — a compressed display format for Ethereum addresses with leading zeros.

Readme

@ercref/erc8117

TypeScript implementation of ERC-8117 — a compressed display format for Ethereum addresses with leading zeros.

What is ERC-8117?

Ethereum vanity addresses with many leading zeros (e.g. 0x00000000219ab540356cBB839Cbe05303d7705Fa) are hard to read. ERC-8117 defines a compact notation that replaces consecutive leading zero nibbles with a subscript count:

| Full Address | ERC-8117 (Unicode) | ERC-8117 (ASCII) | |---|---|---| | 0x00000000219ab540... | 0x0₈219ab540... | 0x0(8)219ab540... | | 0x0000000071727De2... | 0x0₇71727De2... | 0x0(7)71727De2... |

Compression only triggers when there are 4 or more consecutive leading zero nibbles after the 0x prefix.

Install

npm install @ercref/erc8117
# or
bun add @ercref/erc8117

Usage

import { compressAddressERC8117 } from '@ercref/erc8117';

// Unicode mode (default) — uses subscript digits
compressAddressERC8117('0x00000000219ab540356cBB839Cbe05303d7705Fa');
// → '0x0₈219ab540356cBB839Cbe05303d7705Fa'

// ASCII mode — uses parentheses
compressAddressERC8117('0x00000000219ab540356cBB839Cbe05303d7705Fa', 'ascii');
// → '0x0(8)219ab540356cBB839Cbe05303d7705Fa'

// Truncated display
compressAddressERC8117('0x00000000219ab540356cBB839Cbe05303d7705Fa', 'unicode', true);
// → '0x0₈219a...05Fa'

Helper utilities

import { toSubscript, SUBSCRIPTS } from '@ercref/erc8117';

toSubscript(42);  // → '₄₂'
SUBSCRIPTS['7'];  // → '₇'

API

compressAddressERC8117(address, mode?, truncate?)

Compress an Ethereum address using ERC-8117 notation.

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | address | string | — | Ethereum address (with or without 0x prefix) | | mode | 'unicode' \| 'ascii' | 'unicode' | 'unicode' uses subscript digits (0₇), 'ascii' uses parentheses (0(7)) | | truncate | boolean | false | Truncate the suffix with ellipsis for compact display |

Returns the compressed address string.

toSubscript(num)

Convert a number to its Unicode subscript representation.

SUBSCRIPTS

Record mapping digit characters ('0''9') to their Unicode subscript equivalents ('₀''₉').

License

MIT