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 🙏

© 2025 – Pkg Stats / Ryan Hefner

pixa_bip39

v0.0.5

Published

WASM-ready BIP-39 mnemonic + base58 master key generator with brute-force resistance

Downloads

11

Readme

Pixa BIP39 WASM

Pixa BIP39 WASM is a WebAssembly-compatible Rust library that generates BIP-39 compliant mnemonics and converts them into a hardened 51-character Base58 master key. Designed for browser and Node environments with brute-force resistance using scrypt.


🔧 Features

  • Generate BIP-39 mnemonics (12–24 words)
  • Harden mnemonic with optional passphrase using scrypt
  • Output a Base58 WIF (Wallet Import Format) master key (compatible with Steem/Hive-style keys)
  • WebAssembly-ready using wasm-bindgen
  • Brute-force resistance by slow key derivation
  • 🔍 Autocomplete BIP-39 words in any supported language

📦 Usage (in JS after wasm-pack build)

import init, {
  generate_mnemonic,
  mnemonic_to_base58_master_key,
  search_mnemonic_words
} from 'pixa_bip39';

await init();

// Generate a mnemonic
const phrase = generate_mnemonic(24, "english");

// Derive a base58 master key
const masterKey = await mnemonic_to_base58_master_key(phrase, "optional-passphrase");

// Search for valid BIP-39 words that start with a query string
const suggestions = search_mnemonic_words("ent", "english", 5);

console.log("Mnemonic:", phrase);
console.log("Master Key (Base58):", masterKey);
console.log("Suggestions:", suggestions);

🧪 Supported Word Counts & Languages

Word Counts:

  • 12 words (128 bits entropy)
  • 15 words (160 bits)
  • 18 words (192 bits)
  • 21 words (224 bits)
  • 24 words (256 bits)

Languages:

This module supports all BIP-39 standard wordlists:

  • 🇬🇧 English — "english"
  • 🇨🇿 Czech — "czech"
  • 🇫🇷 French — "french"
  • 🇮🇹 Italian — "italian"
  • 🇯🇵 Japanese — "japanese"
  • 🇰🇷 Korean — "korean"
  • 🇵🇹 Portuguese — "portuguese"
  • 🇪🇸 Spanish — "spanish"

To use a specific language, pass its keyword as the second argument to generate_mnemonic.


🔍 Word Search Utility

search_mnemonic_words(query: string, lang: string, maxLength: number)

Returns a list of BIP-39 words (in the selected language) that begin with the query string. This is especially useful for autocomplete features or validating partially entered mnemonics.

Parameters:

  • query: A string with at least 1 character to match the beginning of valid words.
  • lang: The language keyword (e.g., "english").
  • maxLength: Maximum number of matching words to return.

Example:

const words = search_mnemonic_words("tra", "english", 10);
console.log(words); // ["track", "trade", "traffic", ...]

🛠 Build Instructions

wasm-pack build --target web

Available targets: web, bundler, nodejs


📜 License

MIT OR Apache-2.0
© Affolter Matias