@activeledger/sdk-bip39
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Activeledger

Activeledger - Node SDK with BIP39 Support

Extends the default NodeJS SDK with added support for generating key pairs with a BIP39 wordlist and restoring Key pair from a BIP39 wordlist

GitHub

Repository here

Further Documentation

Documentation here

Installation

$ npm i -s @activeledger/sdk-bip39

KeyHandler

KeyHandler has been extended so Elliptic curve keys can follow BIP39. Both compressed and uncompressed formats have been supported

Generating a key

When generating a key you must pass it a name.

Example

Note: This example uses the IKeyExtended interface which provides the structure of the key

import { KeyHandler, IKeyExtended } from "@activeledger/sdk-bip39";

const keyHandler = new KeyHandler();

let key: IKeyExtended;

// Generate RSA Key
keyHandler
  .generateBIP39Key("keyname", true)
  .then((generatedKey: IKey) => {
    key = generatedKey;
  })
  .catch();
// or to generate an uncompressed key
// keyHandler.generateBIP39Key("keyname", false)

Activeledger

Visit Activeledger.io

Read Activeledgers documentation

License

This project is licensed under the MIT License

Package Sidebar

Install

npm i @activeledger/sdk-bip39

Weekly Downloads

145

Version

1.0.3

License

none

Unpacked Size

12.6 kB

Total Files

7

Last publish

Collaborators

  • adamwalker
  • chris.holdt