This package has been deprecated

Author message:

WARNING: This package has been renamed to @holo-host/wasm-key-manager

@holo-host/chaperone-key-manager
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Overview

Usage

const { KeyManager } = require('@holo-host/chaperone-key-manager');
const crypto = require('crypto');

const seed = crypto.randomBytes( 32 );
// or derive seed
const seed = KeyManager.deriveSeed("some dna hash", "someone@example.com", "Passw0rd!");

const message = "Hello World";
const keys = new KeyManager( seed );

const signature = keys.sign( message );
const verified = keys.verify( message, signature );

Bundle for web

bootstrap.js

import("./index.js")
    .then(m => Object.assign(window, m))
    .catch(e => console.error("Error importing `index.js`:", e));

index.js

const { KeyManager } = require("@holo-host/chaperone-key-manager");

module.exports = {
    KeyManager,
};

webpack.config.js

module.exports = {
    target: "web",

    entry: "./bootstrap.js",

    // Assign 'module.exports' to the window variable
    output: {
        libraryTarget: "window",
    },
};

Readme

Keywords

none

Package Sidebar

Install

npm i @holo-host/chaperone-key-manager

Weekly Downloads

18

Version

0.0.4

License

none

Unpacked Size

250 kB

Total Files

7

Last publish

Collaborators

  • mrruby
  • evangineer
  • brisebom
  • peeech
  • jetttech
  • robbiecarlton
  • zo-el