Socket
Socket
Sign inDemoInstall

@ethersproject/wordlists

Package Overview
Dependencies
5
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/wordlists

Word lists for BIP39 wallets.


Version published
Weekly downloads
689K
increased by8.22%
Maintainers
1
Created
Weekly downloads
 

Package description

What is @ethersproject/wordlists?

@ethersproject/wordlists is a part of the ethers.js library, which provides utilities for working with wordlists, such as those used in mnemonic phrases for cryptocurrency wallets. It supports multiple languages and allows for encoding and decoding of mnemonic phrases.

What are @ethersproject/wordlists's main functionalities?

Get Wordlist

This feature allows you to retrieve a specific wordlist, such as the English wordlist, and access individual words by their index.

const { wordlists } = require('@ethersproject/wordlists');
const englishWordlist = wordlists.en;
console.log(englishWordlist.getWord(0)); // 'abandon'

Get Wordlist Language

This feature allows you to get the language/locale of a specific wordlist.

const { wordlists } = require('@ethersproject/wordlists');
const englishWordlist = wordlists.en;
console.log(englishWordlist.locale); // 'en'

Get Word Index

This feature allows you to get the index of a specific word in the wordlist.

const { wordlists } = require('@ethersproject/wordlists');
const englishWordlist = wordlists.en;
console.log(englishWordlist.getWordIndex('abandon')); // 0

Other packages similar to @ethersproject/wordlists

Readme

Source

BIP39 Wordlists

This sub-module is part of the ethers project.

Supported Languages:

  • en - English
  • es - Spanish
  • fr - French
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • zh_cn - Chinese (simplified)
  • zh_tw - Chinese (traditional)

For more information, see the documentation.

Browser

In the browser distribution file, only the English word list is included in the root ethers pacakge. To include additional word lists, they must be added using additional <script> tags, after the root ethers library has been included.

License

MIT License

Keywords

FAQs

Last updated on 20 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc