open-index/open-npm huggingface dataset:
npm package: @notabene/cli
Description: CLI for Notabene's API
Author: Notabene
Latest version: 1.2.1

<div align="center">

<img src="https://assets-global.website-files.com/5e68f0772de982756aa8c1a4/5eee5fb470215e6ecdc34b94_Full_transparent_black_1280x413.svg" height=50>

<br>

# Notabene CLI

[![pipeline status](https://gitlab.com/notabene/open-source/cli/badges/master/pipeline.svg)](https://gitlab.com/notabene/open-source/cli/-/commits/master)
[![Latest Release](https://gitlab.com/notabene/open-source/cli/-/badges/release.svg)](https://gitlab.com/notabene/open-source/cli/-/releases)

Notabene CLI for managing tokens and keys.

[Documentation](https://devx.notabene.id) •
[Installation](#installation)

</div>

## Installation

Install the library globally using Yarn:

```
yarn global add @notabene/cli
```

or NPM:

```
npm i -g @notabene/cli
```

Make sure that the path to globally installed packages are in your `$PATH` environment variable.

## Tokens

### Login

Login using your Notabene issued Client ID and Client Secret:

```bash
notabene auth:login --clientId={CLIENT_ID} --clientSecret={CLIENT_SECRET}
```

### Logout

Logout from Notabene:

```bash
notabene auth:logout
```

### Token

Generate a M2M token for use with the Notabene Travel Rule gateway. Note you must be logged in first:

```bash
notabene auth:token
```

## Keys

### Create a key

You can use the CLI to generate a key that can be used to encrypt PII information to be sent as part of a Travel Rule message:

```
notabene keys:create
```

This will generate a JSON object containing an [Ed25519](https://en.wikipedia.org/wiki/EdDSA) key and metadata which can be passed to the [Notabene SDK](https://gitlab.com/notabene/open-source/notabene-nodejs) when creating transactions to encrypt the PII.

## [License](LICENSE.md)

BSD 3-Clause © Notabene Inc.
npm package: @notabene/crypto
Description: Encryption Library for Notabene Services
Latest version: 1.1.0

# notabene-crypto

[![Build Status](https://github.com/notabene-id/notabene-crypto/workflows/build/badge.svg)](https://github.com/notabene-id/notabene-crypto/actions)
[![License](https://img.shields.io/github/license/notabene-id/notabene-crypto.svg?color=blue)](./LICENSE.md)
![npm](https://img.shields.io/npm/v/notabene-crypto)
![GitHub last commit](https://img.shields.io/github/last-commit/notabene-id/notabene-crypto)
[![codecov](https://codecov.io/gh/Notabene-id/notabene-crypto/branch/master/graph/badge.svg)](https://codecov.io/gh/Notabene-id/notabene-crypto)

Documentation: https://notabene-id.github.io/notabene-crypto/

## Description

Encryption Library for Notabene Services

## Installation

**yarn**

`yarn add @notabene/crypto`

**npm**

`npm install @notabene/crypto`

## Usage

```javascript
const {
  createEncriptionKeyPair,
  serializeKey,
  deserializeKey,
  encrypt,
  decrypt,
} = require("@notabene/crypto");

//Create pair of keys
const alice = createEncriptionKeyPair();
console.log(serializeKey(alice));
/*
 {
  publicKeyB64: '...',
  secretKeyB64: '...'
 }
*/

//Get bob key
const bobSerializedKeys = {
  publicKeyB64: "vBTvb1MGLOahUPgzAJJB/fPqi6GOG4kcaaNAqD3SDzU=",
  secretKeyB64: "iKVZwIFyONUNga0dKlZqD1mlVRBVUmVnsiFICkTY9Vk=",
};
console.log(bobSerializedKeys);

const bob = deserializeKey(bobSerializedKeys);

//Encrypt a message from alice to bob
encrypt(alice, bob.publicKey, "sensitive data").then(enc => {
  console.log(enc);
  /*
    {
    ciphertext: '...',
    nonce: '...',
    fromPublicKey: '...',
    toPublicKey: 'vBTvb1MGLOahUPgzAJJB/fPqi6GOG4kcaaNAqD3SDzU=',
    version: 'x25519-xsalsa20-poly1305'
    }
  */

  //Decrypt message with bob secretKey
  const message = decrypt(bob.secretKey, enc);
  console.log(message);
  /*
    "sensitive data"
  */
});
```

## Development

Instal dependencies

```
$ npm install
```

Build

```
$ npm run build
```

Test

```
$ npm test
```

To publish to NPM:

```
$ pika publish
```

To publish dosc:

```
$ npm run docs
```

## Contributing

Contributions are welcome!

Want to file a bug, request a feature or contribute some code?

- Check out the [Code of Conduct](./CODE_OF_CONDUCT.md)
- Check that there is no existing [issue](https://github.com/Notabene-id/notabene-crypto/issues) corresponding to your bug or feature
- Before implementing a new feature, discuss your changes in an issue first!

## License

[MIT](./LICENSE.md) © Notabene