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

@ronickg/react-native-bip39

v1.0.4

Published

bip39

Readme

React Native Bip39

React Native implementation of Bitcoin BIP39. It's written in TypeScript and has direct bindings to a Bip39 C++ library. The primary function of this implementation is to provide mnemonic code for generating deterministic keys.

  • 🏎️ Up to 800x faster then js solutions (mnemonicToSeed)
  • ⚡️ Lightning fast implementation with pure C++ and JSI
  • 📚 Standalone library
  • 🧪 Tested in JS and C++ (OpenSSL)
  • 💳 Made for crypto wallets

Installation

To use this library in your React Native project, run the following command:

yarn add @ronickg/react-native-bip39

or

npm install @ronickg/react-native-bip39

Example

import { bip39 } from '@ronickg/react-native-bip39';

bip39.setDefaultWordlist('english');
console.log(bip39.getDefaultWordlist());

const mnemonic = bip39.generateMnemonic(12);
console.log(mnemonic); // Outputs a 12-word mnemonic
console.log(bip39.validateMnemonic(mnemonic));
console.log(bip39.mnemonicToSeed(mnemonic));
console.log(bip39.mnemonicToSeedHex(mnemonic));
const entropy = bip39.mnemonicToEntropy(mnemonic);
console.log(entropy);
console.log(bip39.entropyToMnemonic(entropy));

Documentation

setDefaultWordlist

setDefaultWordlist(wordlist: WordLists): void
  • Parameters:
    • wordlist The word list to use (e.g., 'chinese_simplified', 'english', etc.). Default is 'english'.

getDefaultWordlist

getDefaultWordlist(): WordLists
  • Returns: The word list to use (e.g., 'chinese_simplified', 'english', etc.). Default is 'english'.

generateMnemonic

generateMnemonic(wordCount?: WordCount, rng?: ArrayBuffer, wordlist?: WordLists): string
  • Parameters:
    • wordCount (optional): Number of words in the mnemonic (e.g., 12, 15, 18, 21, or 24). Default is 12.
    • rng (optional): A random number generator represented as a ArrayBuffer.
    • wordlist (optional): The word list to use (e.g., 'chinese_simplified', 'english', etc.). Default is 'english'.
  • Returns: A string representing the generated mnemonic.

validateMnemonic

validateMnemonic(mnemonic: string, wordlist?: WordLists): boolean
  • Parameters:
    • mnemonic: The mnemonic phrase to validate.
    • wordlist (optional): The word list to use (e.g., 'chinese_simplified', 'english', etc.). Default is 'english'.
  • Returns: A boolean indicating whether the mnemonic is valid.

mnemonicToSeed

mnemonicToSeed(mnemonic: string, password?: string): ArrayBuffer
  • Parameters:
    • mnemonic: The mnemonic phrase to convert.
    • password (optional): An optional passphrase for additional security.
  • Returns: A ArrayBuffer representing the binary seed.

mnemonicToSeedHex

mnemonicToSeedHex(mnemonic: string, password?: string): string
  • Parameters:
    • mnemonic: The mnemonic phrase to convert.
    • password (optional): An optional passphrase for additional security.
  • Returns: A string representing the hexadecimal seed.

mnemonicToEntropy

mnemonicToEntropy(mnemonic: string, wordlist?: WordLists): string
  • Parameters:
    • mnemonic: The mnemonic phrase to convert.
    • wordlist (optional): The word list to use (e.g., 'chinese_simplified', 'english', etc.). Default is 'english'.
  • Returns: A string representing the binary entropy.

entropyToMnemonic

entropyToMnemonic(entropy: string | ArrayBuffer, wordlist?: WordLists): string
  • Parameters:
    • entropy: The binary entropy to convert.
    • wordlist (optional): The word list to use (e.g., 'chinese_simplified', 'english', etc.). Default is 'english'.
  • Returns: A string representing the mnemonic phrase.

WordLists

A type representing different word lists that can be used for generating or validating mnemonics.

type WordLists =
  | 'chinese_simplified'
  | 'chinese_traditional'
  | 'czech'
  | 'english'
  | 'french'
  | 'italian'
  | 'japanese'
  | 'korean'
  | 'portuguese'
  | 'spanish';

WordCount

A type representing the number of words in a mnemonic.

type WordCount = 12 | 15 | 18 | 21 | 24;

Tests

All test cases have been sourced from the Python and JavaScript implementations of BIP39. They have been subsequently adapted to be compatible with React Native.

Resources