1.2.1 • Published 5 years ago

raidden v1.2.1

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Raidden

npm version

Sometimes a padlock is enough!

A bunker is not always necessary to control access, or to hide content. A padlock can be much more practical and simple to use.

Raidden was made with this idea, being simple, light, and easy to use.

Installation

npm install raidden

or

yarn add raidden  

How to use

  1. Create Keys
  2. Create a Keychain
  3. Create a Padlock

import { KeyChain, Key, PadLock } from 'raidden';  
  
const adminKey = new Key("my-secret-admin-string-key");  
const userKey = new Key("my-user-string-key");  
const anonKey = new Key("my-anon-string-key");  
  
const loggedInKeychain = new KeyChain([adminKey, userKey]);  
const loggedInPadlock = new PadLock(loggedInKeychain);
  1. Use key to check
    loggedInPadlock.canUnlock(adminKey);  
    // true  
     

loggedInPadlock.canUnlock(userKey);
// true

loggedInPadlock.canUnlock(anonKey);
// false

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago