@greymass/mnemonic-seeds
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

PACKAGE

Greymass TypeScript library template, intended for libraries that work in any JavaScript context (node.js, Browser, React native), @types/node are installed only for tests, don't rely on any node.js types or imports inside src/ (no buffer, crypto imports etc, they can be filled for browser but will bloat the bundle 100x)

Installation

The @greymass/mnemonic-seeds package is distributed as a module on npm.

yarn add @greymass/mnemonic-seeds
# or
npm install --save @greymass/mnemonic-seeds

Usage

 import { MnemonicSeeds } from '@greymass/mnemonic-seeds';
 
 const mnemonicSeed = MnemonicSeed.generate();
 const words = mnemonicSeed.words;
 
 const mnemonicSeedAtLaterDate = mnemonicSeed.from(words);
 const derivedPk = await mnemonicSeedAtLaterDate.derivePrivateKey('m/0/1/1');
 
 console.log(derivedPk.toString());
 // 'PVT_K1_4MwSem1F7gB7srwdJEZRsyDC5NzvSrcWqbkKFpHBaEQMHLMADbe'

Developing

You need Make, node.js and yarn installed.

Clone the repository and run make to checkout all dependencies and build the project. See the Makefile for other useful targets. Before submitting a pull request make sure to run make lint.


Made with ☕️ & ❤️ by Greymass, if you find this useful please consider supporting us.

Readme

Keywords

none

Package Sidebar

Install

npm i @greymass/mnemonic-seeds

Weekly Downloads

1

Version

0.0.1

License

BSD-3-Clause

Unpacked Size

19.3 kB

Total Files

10

Last publish

Collaborators

  • dafuga01
  • jesta
  • jnordberg