Last active
November 28, 2022 17:13
-
-
Save Ebazhanov/2ff099e4ae7b3d7e94165b0950563b7b to your computer and use it in GitHub Desktop.
Generates Mnemonic a 16-word recovery phrase that can be used to recover a private key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Bip39, Random} from "@cosmjs/crypto"; | |
const generateMnemonic = () => Bip39.encode(Random.getBytes(16)).toString() | |
console.log(generateMnemonic()) | |
/** | |
* Generates (your own Mnemonic) a 16-word recovery phrase that can be used to recover a private key | |
* Install `$ yarn add @cosmjs/crypto` | |
**/ | |
https://codesandbox.io/s/generate-12-words-mnemonic-nsu2uf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment