# alakeygen1

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

Latest version **1.3.2** (published 2019-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install alakeygen1
pnpm add alakeygen1
yarn add alakeygen1
bun add alakeygen1
```

## 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.3.2 |
| Published | 2019-12-17 |
| First published | 2019-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 28.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jamesc |
| Maintainers | aladinnetwork |
| Keywords | ALADIN, Blockchain |

## Links

- npm: https://www.npmjs.com/package/alakeygen1
- Repository: https://github.com/ALADIN-Network/alakeygen1
- Homepage: https://github.com/ALADIN-Network/alakeygen1#readme
- Issues: https://github.com/ALADIN-Network/alakeygen1/issues
- npm.io page: https://npm.io/package/alakeygen1

## Dependencies (4)

- [history](https://npm.io/package/history.md) ^4.7.2
- [ala-ecc4](https://npm.io/package/ala-ecc4.md) ^4.0.1
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [localStorage](https://npm.io/package/localStorage.md) ^1.0.3

## Recent versions

- 1.3.2 (latest) — 2019-12-17

## README

<!--[![Build Status](https://travis-ci.org/ALAIO/alakeygen1.svg?branch=master)](https://travis-ci.org/ALAIO/alakeygen1)-->
[![NPM](https://img.shields.io/npm/v/alakeygen1.svg)](https://www.npmjs.org/package/alakeygen1)

# Repository

Provides hierarchical deterministic key generation, storage, and management.

General purpose cryptography is found in [ala-ecc4](http://github.com/ALADIN-Network/ala-ecc4) library.

### Usage

```javascript
let {Keystore, Keygen} = require('alakeygen1')
Ala = require('alaexplorerjs4')

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

keystore = Keystore('myaccount', sessionConfig)
ala = Ala.Testnet({keyProvider: keystore.keyProvider})

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

  ala.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/ALADIN-Network/alakeygen1.git
cd alakeygen1
npm install
npm run build
# builds: ./dist/alakeygen1.js
```

```html
<script src="alakeygen1.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/alakeygen1 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
