When creating a crypto wallet often we see the 12 words pattern. This patterns allow you to store 12 english words and generate your private keys from it.

Some wallets add an extra layer by composing those 12 words with a PIN or password.

Here I want to give an understandable guide to creating your own wallet using BIP39 using javascript. You can vary stuff here to give you different standards of security with its own tradeoffs

Basic Steps

Necessary libraries

We will be using a few well know JS libraries:

$ npm i scrypt-async
$ npm i bip39
$ npm i eosjs

[scrypt-async](<https://www.npmjs.com/package/scrypt>) is the async implementation of scrypt, a C++ library for cryptographic hashes. Will be using it to hash our 12 word entropy (that is the hex that is used to derive into those 12 words)

[bip39](<https://www.npmjs.com/package/bip39>) is the JS lib that implements BIP39, a Bitcoin Improvement Proposal that generate private keys from a mnemoic (another way we call those 12 words). Its a Bitcoin standard that translates and works well with several other blockchains. Make sure you study that proposal, its a clever and impressive way to generate keys from human readable words.