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

ethmonic

v1.0.5

Published

Convert Ethereum addresses to memorable 4-word mnemonics for easy verification

Readme

ethmonic

Convert Ethereum addresses to memorable 4-word mnemonics for easy verification.

Why?

Ethereum addresses are 40 hex characters that are nearly impossible to verify at a glance. Ethmonic converts any address into 4 memorable words, making it easy to confirm you're sending to the right address.

0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 → "framework ivan masaccio weill"

The conversion is:

  • Deterministic: Same address always produces the same 4 words
  • One-way: You cannot recover the address from the mnemonic (this is for verification, not storage)
  • Case-insensitive: Works with any address casing

Installation

npm install ethmonic

Usage

Encode an address to mnemonic

import { encode } from 'ethmonic';

const words = encode('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045');
// Returns: ['framework', 'ivan', 'masaccio', 'weill']

console.log(words.join(' '));
// "framework ivan masaccio weill"

Verify an address matches a mnemonic

import { verify } from 'ethmonic';

// With array of words
verify('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', ['framework', 'ivan', 'masaccio', 'weill']); // true

// With space-separated string
verify('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 'framework ivan masaccio weill'); // true

// Case-insensitive
verify('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 'FRAMEWORK IVAN MASACCIO WEILL'); // true

API

encode(address: string): Mnemonic

Converts an Ethereum address to a 4-word mnemonic.

  • address: Ethereum address with 0x prefix (required, any case)
  • returns: Tuple of 4 lowercase words
  • throws: Error if address format is invalid

verify(address: string, words: string[] | string): boolean

Checks if a mnemonic matches an address.

  • address: Ethereum address to verify
  • words: Array of 4 words, or space-separated string
  • returns: true if the mnemonic matches, false otherwise

WORDLIST: string[]

The complete wordlist (65,536 unique words) used for encoding.

How It Works

  1. The address is normalized to lowercase
  2. The hex bytes are hashed with keccak256 (for uniform distribution)
  3. The first 8 bytes of the hash are split into 4 × 16-bit indices
  4. Each index maps to one of 65,536 unique words

This gives 64 bits of entropy (2^64 possible combinations), providing strong collision resistance for verification purposes.

Use Cases

  • Wallet verification: Display a mnemonic alongside addresses in your wallet UI
  • Transaction confirmation: Show the mnemonic on hardware wallet screens
  • Phone verification: Read 4 words instead of 40 hex characters
  • Address books: Store memorable names for frequently used addresses

Security Notes

  • This is a verification tool, not a replacement for full address validation
  • The mnemonic is derived from the address, not the other way around
  • Always verify the full address when security is critical
  • The 64-bit entropy provides strong protection against accidental collisions but is not suitable for cryptographic key derivation

License

MIT