Skip to content

Instantly share code, notes, and snippets.

@Ebazhanov
Last active November 28, 2022 17:13
Show Gist options
  • Save Ebazhanov/2ff099e4ae7b3d7e94165b0950563b7b to your computer and use it in GitHub Desktop.
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
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