# lemojs-keygen

> General purpose library for private key storage and key management.

Latest version **1.0.0** (published 2018-03-28) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install lemojs-keygen
pnpm add lemojs-keygen
yarn add lemojs-keygen
bun add lemojs-keygen
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-03-28 |
| First published | 2018-03-28 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 149.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lemofoundationltd |
| Maintainers | lemofoundationltd |
| Keywords | LEMO, Blockchain |

## Links

- npm: https://www.npmjs.com/package/lemojs-keygen
- Repository: https://github.com/LemoFoundationLtd/lemojs-keygen
- Homepage: https://github.com/LemoFoundationLtd/lemojs-keygen#readme
- Issues: https://github.com/LemoFoundationLtd/lemojs-keygen/issues
- npm.io page: https://npm.io/package/lemojs-keygen

## Dependencies (5)

- [crypto](https://npm.io/package/crypto.md) ^1.0.1
- [history](https://npm.io/package/history.md) ^4.7.2
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [lemojs-ecc](https://npm.io/package/lemojs-ecc.md) ^1.0.1
- [localStorage](https://npm.io/package/localStorage.md) ^1.0.3

## Recent versions

- 1.0.0 (latest) — 2018-03-28

## README

[![NPM](https://img.shields.io/npm/v/lemojs-keygen.svg)](https://www.npmjs.org/package/lemojs-keygen)

# Repository

General purpose library for private key storage and key management.

### Usage

```javascript
let {Keystore, Keygen} = require('lemojs-keygen')
Lemo = require('lemojs')

sessionConfig = {
  timeoutInMin: 30,
  uriRules: {
    'owner' : '/account_recovery',
    'active': '/(transfer|contracts)',
    'active/**': '/producers'
  }
}

keystore = Keystore('myaccount', sessionConfig)
lemo = Lemo.Testnet({keyProvider: keystore.keyProvider})

Keygen.generateMasterKeys().then(keys => {
  // create blockchain account called 'myaccount'
  console.log(keys)

  lemo.getAccount('myaccount').then(account => {
    keystore.deriveKeys({
      parent: keys.masterPrivateKey,
      accountPermissions: account.permissions
    })
  })

})
```

See [./API](./API.md)

# Development

```javascript
let {Keystore, Keygen} = require('./src')
```

Use Node v8+ (updates `package-lock.json`)

# Browser

```bash
git clone https://github.com/LemoFoundationLtd/lemojs-keygen.git
cd lemojs-keygen
npm install
npm run build
# builds: ./dist/lemojs-keygen.js
```

```html
<script src="lemojs-keygen.js"></script>
<script>
//kos.Keystore
//kos.Keygen
//...
</script>
```

# Runtime Environment

Node 6+ and browser (browserify, webpack, etc)

Built with React Native in mind, create an issue if you find a bug.

---
_Source: https://npm.io/package/lemojs-keygen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
