How to use the bip39/wordlists/english.json.join function in bip39

To help you get started, we’ve selected a few bip39 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github danfinlay / hd-seed-phrase-guesser / index.js View on Github external
const spell = require('spell')
const EventEmitter = require('events')
const HdKeyring = require('eth-hd-keyring')
const words = require('bip39/wordlists/english.json')
const dict = spell()

dict.load(words.join(' '))

class Guesser extends EventEmitter {

  constructor(opts) {
    super()
    const { phrase, getBalance } = opts
    this.phrase = phrase
    this.getBalance = getBalance

    this.cleanup()
  }

  cleanup () {
    this.phrase = this.phrase.split(' ')
    .filter((word) => {
      return word !== ''
github danfinlay / hd-seed-phrase-guesser / spellcheck.js View on Github external
const spell = require('spell')
const EventEmitter = require('events')
const HdKeyring = require('eth-hd-keyring')
const words = require('bip39/wordlists/english.json')
const dict = spell()

dict.load(words.join(' '))

console.log(dict.suggest('scoter'))