open-index/open-npm huggingface dataset:
npm package: @jollie/binary-search
Description: Binary search: Equal & closest search in sorted array.
Author: thejellyfish
Latest version: 1.0.8

[![Version](https://img.shields.io/npm/v/@jollie/binary-search)](https://www.npmjs.com/package/@jollie/binary-search)
[![Licence](https://img.shields.io/npm/l/@jollie/binary-search)](https://en.wikipedia.org/wiki/MIT_license)
[![Build](https://img.shields.io/travis/thejellyfish/binary-search)](https://travis-ci.org/github/thejellyfish/binary-search)
[![Coverage](https://img.shields.io/codecov/c/github/thejellyfish/binary-search)](https://codecov.io/gh/thejellyfish/binary-search)
[![Downloads](https://img.shields.io/npm/dt/@jollie/binary-search)](https://www.npmjs.com/package/@jollie/binary-search)


# Binary search

Equal or closest search in **sorted array** using binary search algorithm.    
See https://en.wikipedia.org/wiki/Binary_search_algorithm#Procedure

### Performance

Binary search is faster than linear search (except for small array ...).

![js-perf](https://github.com/thejellyfish/binary-search/raw/master/js-perf.jpg)

### Install

```bash
yarn add @jollie/binary-search
```

or

```bash
npm install @jollie/binary-search
```

### Usage

```javascript
import { equalSearch, closestSearch } from '@jollie/binary-search';

// Equal search in numeric array
equalSearch([1, 2, 3], 2);   // Found -> Output 1
equalSearch([1, 2, 3], 5);   // Not found -> Output -1

// Equal search in string array
equalSearch(['a', 'b', 'c'], 'c');   // Found -> Output 2
equalSearch(['a', 'b', 'c'], '?');   // Not found -> Output -1

// Closest search
closestSearch([1, 2, 3], 2.2);  // Output 1
closestSearch([1, 2, 3], 2.6);  // Output 2
closestSearch([1, 2, 3], -1);   // Output 0
closestSearch([1, 2, 3], 1000); // Output 2
```

### Params

```javascript
equalSearch(haystack, needle[, { compare, from, to }]);
closestSearch(haystack, needle[, { compare, from, to }]);
```


| Prop      | Type       | Default                             | Note |
|:-----------|:------------|:-------------------------------------|:------|
| `haystack` | `array`  | mandatory                                 | Array of values 
| `needle` | `any`  | mandatory                                 | Searched value
| `compare` | `function` | `(needle, value) => needle - value` | Compare function. <br /><em>Special case for equalSearch:</em><br />if needle is a string, default compare is<br />`(a, b) => a.localeCompare(b)`
| `from`    | `integer`  | `0`                                 | Start index for range searching
| `to`      | `integer`  | `haystack.length - 1`               | End index for range searching


### Return value

Index in the array or -1 if not found

### Exception

Throw RangerError if `from` or `to` are outbounds
npm package: @jollie/feather-icons
Description: React SVG Feather icons
Author: Mohamed BENARROUDJ
Latest version: 1.0.7

[![Version](https://img.shields.io/npm/v/@jollie/feather-icons)](https://www.npmjs.com/package/@jollie/feather-icons)
[![Licence](https://img.shields.io/npm/l/@jollie/feather-icons)](https://en.wikipedia.org/wiki/MIT_license)
[![Build](https://img.shields.io/travis/com/thejellyfish/feather-icons)](https://travis-ci.com/github/thejellyfish/feather-icons)
[![Coverage](https://img.shields.io/codecov/c/github/thejellyfish/feather-icons)](https://codecov.io/gh/thejellyfish/feather-icons)
[![Downloads](https://img.shields.io/npm/dt/@jollie/feather-icons)](https://www.npmjs.com/package/@jollie/feather-icons)


# Feather icons

Feather SVG icons for React.    
To search an icon, see https://feathericons.com    

### Install

```bash
yarn add @jollie/feather-icons
```

or

```bash
npm install @jollie/feather-icons
```

### Usage

```javascript
import React from 'react';
import { IconFeather, IconHeart, IconTrash } from '@jollie/feather-icons';

// Sizing
const FeatherXL = () => <IconFeather size="xl" />;
const Feather256 = () => <IconFeather size={256} />;

// Fill & stroke
const Heart = () => <IconHeart fill="red" />;
const FatIcon = () => <IconFeather strokeWidth={5} />;

// Colors
const DeleteButton = () => <IconTrash style={{ color: 'red' }} />;

// Tailwindcss
const IconTailwindClass = () => <IconTrash className="text-red-700" />;

```

```javascript
// Example import all icons
import React from 'react';
import * as Feather from '@jollie/feather-icons';

const DeleteButton = () => <Feather.IconTrash style={{ color: 'red' }} />;
const EditButton = () => <Feather.IconEdit style={{ color: 'red' }} />;

```


### Params

| Prop         | Type                  | Default                               |
|:-------------|:----------------------|:--------------------------------------|
| `size`       | `string` or `integer` | `base` predefined size or pixel value | 
| `strokeWidth`| `integer`             | `2`                                   |
| `fill`       | `string`              | `none`                                |

### Predefined sizes
   
`xs` `sm` `base` `lg` `xl` `2xl` `3xl` `4xl` `5xl` 


![sizes](https://github.com/thejellyfish/feather-icons/raw/master/icon-sizes.png)
npm package: @jollie/haversine
Description: Haversine formula to determine distance between 2 points
Author: thejellyfish
Latest version: 1.0.9

[![Version](https://img.shields.io/npm/v/@jollie/haversine)](https://www.npmjs.com/package/@jollie/haversine)
[![Licence](https://img.shields.io/npm/l/@jollie/haversine)](https://en.wikipedia.org/wiki/MIT_license)
[![Build](https://img.shields.io/travis/thejellyfish/haversine)](https://travis-ci.org/github/thejellyfish/haversine)
[![Coverage](https://img.shields.io/codecov/c/github/thejellyfish/haversine)](https://codecov.io/gh/thejellyfish/haversine)
[![Downloads](https://img.shields.io/npm/dt/@jollie/haversine)](https://www.npmjs.com/package/@jollie/haversine)

# haversine
Haversine formula to determine distance between 2 points in few lines of code  
Formula applied is taken from https://en.wikipedia.org/wiki/Haversine_formula


### Install
```bash
yarn add @jollie/haversine
```
or
```bash
npm install @jollie/haversine
```
### Usage
```javascript
import haversine from '@jollie/haversine';

// ... coordinates example
const a = [4.8668945, 36.7699898];
const b = [3.9354349, 36.6988394];
let dist;

// Distance in meters from array
dist = haversine(a, b);

// Output 83381.53382511878
console.log(dist); 

// Distance in meters from object
dist = haversine(
  { longitude: 4.8668945, latitude: 36.7699898 }, 
  { longitude: 3.9354349, latitude: 36.6988394 },
);

// Example from GeoJSON points
const pointA = { 
  type: 'Feature',
  geometry: {
    type: 'Point',
    coordinates: [4.8668945, 36.7699898],
  },
};

const pointB = { 
  type: 'Feature',
  geometry: {
    type: 'Point',
    coordinates: [3.9354349, 36.6988394],
  },
};

// Distance between geoJSON points
dist = haversine(pointA.geometry.coordinates, pointB.geometry.coordinates);

//-------
// Units support
//-------

// Distance in miles
dist = haversine(a, b, 'mi');

// Distance in nautical miles
dist = haversine(a, b, 'nmi');

// Distance in feet
dist = haversine(a, b, 'ft');

// Distance in inches
dist = haversine(a, b, 'in');

// Distance in Km
dist = haversine(a, b, 'km');
```

### Params

```javascript
haversine(a, b, unit='m');
```

| Prop   | Type                |  Note                                     |
|--------|---------------------|-------------------------------------------|
| `a`    | `array` or `object` | `[lon, lat]` or `{ longitude, latitude }` |
| `b`    | `array` or `object` | `[lon, lat]` or `{ longitude, latitude }` |
| `unit` | `string`            | Unit param is optional (default is meter) |


### Supported units
   
`m` for meter (default)  
`km` for kilometer   
`mi` for mile  
`nmi` for nautical mile  
`ft` for foot  
`in` for inch
  

### Return value

Distance in unit
npm package: @jollie/node-fetchjson
Description: Fetch wrapper to easily request an API
Author: thejellyfish
Latest version: 2.0.0

[![Version](https://img.shields.io/npm/v/@jollie/node-fetchjson)](https://www.npmjs.com/package/@jollie/node-fetchjson)
[![Licence](https://img.shields.io/npm/l/@jollie/node-fetchjson)](https://en.wikipedia.org/wiki/MIT_license)
[![Build](https://img.shields.io/travis/thejellyfish/node-fetchjson)](https://travis-ci.org/github/thejellyfish/node-fetchjson)
[![Coverage](https://img.shields.io/codecov/c/github/thejellyfish/node-fetchjson)](https://codecov.io/gh/thejellyfish/node-fetchjson)
[![Downloads](https://img.shields.io/npm/dt/@jollie/node-fetchjson)](https://www.npmjs.com/package/@jollie/node-fetchjson)

__*for internal use only - Just draft idea to easily fetch API in our apps*__

# fetchjson
Brings fetchjson to Node   
_for more infos, see [fetchjson](https://https://github.com/thejellyfish/fetch-json)_

### Install

```bash
yarn add @jollie/node-fetchjson
```
or
```bash
npm install @jollie/node-fetchjson
```
### Usage

```javascript
const fetchjson = require('@jollie/node-fetchjson');

fetchjson('https://myapi.io/v1/users').then(payload => console.log(payload));
```
npm package: @jollie/risky-email
Description: Check if email is risky (disposable provider or invalid DNS MX)
Author: thejellyfish
Latest version: 1.0.12

[![Version](https://img.shields.io/npm/v/@jollie/risky-email)](https://www.npmjs.com/package/@jollie/risky-email)
[![Licence](https://img.shields.io/npm/l/@jollie/risky-email)](https://en.wikipedia.org/wiki/MIT_license)
[![Build](https://img.shields.io/travis/thejellyfish/risky-email)](https://travis-ci.org/github/thejellyfish/risky-email)
[![Coverage](https://img.shields.io/codecov/c/github/thejellyfish/risky-email)](https://codecov.io/gh/thejellyfish/risky-email)
[![Downloads](https://img.shields.io/npm/dt/@jollie/risky-email)](https://www.npmjs.com/package/@jollie/risky-email)

__*for internal use only - Draft idea to check trustworthiness of email account*__

# risky-email
Check if email is from disposable provider or has no DNS MX record

### Install

```bash
yarn add @jollie/risky-email
```
or
```bash
npm install @jollie/risky-email
```
### Usage

```javascript
const isRiskyEmail = require('@jollie/risky-email');

// Diposable email 
// Output "Risky email : Disposable email address"
isRiskyEmail('contact@yopmail.com')
  .then(() => console.log('Not risky'))
  .catch(error => console.log(`Risky email : ${error.message}`);
  
// Non-existent domain 
// Output "Risky email : queryMx ENOTFOUND he-llo-w-orld.com"
isRiskyEmail('contact@he-llo-w-orld.com')
  .then(() => console.log('Not risky'))
  .catch(error => console.log(`Risky email : ${error.message}`);
    
// Valid email -> Output "Not risky"
isRiskyEmail('contact@google.com')
  .then(() => console.log('Not risky'))
  .catch(error => console.log(`Risky email : ${error.message}`);
```

### Return value

Promise resolved with the email or rejected if risky email
npm package: @jollie/soundex
Description: Calculate the soundex key of a string
Author: thejellyfish
Latest version: 1.0.8

[![Version](https://img.shields.io/npm/v/@jollie/soundex)](https://www.npmjs.com/package/@jollie/soundex)
[![Licence](https://img.shields.io/npm/l/@jollie/soundex)](https://en.wikipedia.org/wiki/MIT_license)
[![Build](https://img.shields.io/travis/thejellyfish/soundex)](https://travis-ci.org/github/thejellyfish/soundex)
[![Coverage](https://img.shields.io/codecov/c/github/thejellyfish/soundex)](https://codecov.io/gh/thejellyfish/soundex)
[![Downloads](https://img.shields.io/npm/dt/@jollie/soundex)](https://www.npmjs.com/package/@jollie/soundex)

# soundex
Calculate soundex key of a string by implementing the rules described on the wikipedia page
Compliant, optimized and small package to get soundex key

For mapping and formula, see https://en.wikipedia.org/wiki/Soundex#American_Soundex

### Install
```bash
yarn add @jellyfish-commuting/soundex
```
or
```bash
npm install @jellyfish-commuting/soundex
```
### Usage
```javascript
import soundex from '@jellyfish-commuting/soundex';

// Test 'Ashcraft' (it's a common error in soundex implementation)
console.log(soundex('Ashcraft')); // Output A261 (... not A226)

// Test equal phonetics
if (soundex('Robert') === soundex('Rupert')) {
  console.log('Equal soundex');
} else {
  console.log('Different soundex');
}

// Output : Equal soundex
```

### Params

```javascript
soundex(str, length = 4);
```

| Prop     | Type     |  Default         | Note                  |
|----------|----------|------------------|-----------------------|
| `str`    | `string` | _Required field_ | Input value           |
| `length` | `int`    | `4`              | Length of soundex key |


### Return value

Soundex key of `length` chars
npm package: @jollie/soundex-fr
Description: Soundex function adapted for french phonetics
Author: thejellyfish
Latest version: 1.0.8

[![Version](https://img.shields.io/npm/v/@jollie/soundex-fr)](https://www.npmjs.com/package/@jollie/soundex-fr)
[![Licence](https://img.shields.io/npm/l/@jollie/soundex-fr)](https://en.wikipedia.org/wiki/MIT_license)
[![Build](https://img.shields.io/travis/thejellyfish/soundex-fr)](https://travis-ci.org/github/thejellyfish/soundex-fr)
[![Coverage](https://img.shields.io/codecov/c/github/thejellyfish/soundex-fr)](https://codecov.io/gh/thejellyfish/soundex-fr)
[![Downloads](https://img.shields.io/npm/dt/@jollie/soundex-fr)](https://www.npmjs.com/package/@jollie/soundex-fr)

# soundex-fr
Soundex function adapted for french phonetics    
Compliant, optimized and small package to get soundex key    
     
For mapping used see https://fr.wikipedia.org/wiki/Soundex#Description


### Install
```bash
yarn add @jollie/soundex-fr
```
or
```bash
npm install @jollie/soundex-fr
```
### Usage
```javascript
import soundex from '@jollie/soundex-fr';

// Test equal phonetics
if (soundex('Robert') === soundex('Rupert')) {
  console.log('Equal soundex');
} else {
  console.log('Different soundex');
}

// Output : Equal soundex
```


### Params

```javascript
soundex(str, length);
```

| Prop     | Type     |  Default         | Note                  |
|----------|----------|------------------|-----------------------|
| `str`    | `string` | _Required field_ | Input value           |
| `length` | `int`    | `4`              | Length of soundex key |


### Return value

Soundex key of `length` chars
npm package: @jollie/unsafe-email
Description: Check if email is unsafe (disposable provider or invalid DNS MX)
Author: thejellyfish
Latest version: 1.1.0

[![Version](https://img.shields.io/npm/v/@jollie/unsafe-email)](https://www.npmjs.com/package/@jollie/unsafe-email)
[![Licence](https://img.shields.io/npm/l/@jollie/unsafe-email)](https://en.wikipedia.org/wiki/MIT_license)
[![Build](https://img.shields.io/travis/thejellyfish/unsafe-email)](https://travis-ci.org/github/thejellyfish/unsafe-email)
[![Coverage](https://img.shields.io/codecov/c/github/thejellyfish/unsafe-email)](https://codecov.io/gh/thejellyfish/unsafe-email)
[![Downloads](https://img.shields.io/npm/dt/@jollie/unsafe-email)](https://www.npmjs.com/package/@jollie/unsafe-email)

__*for internal use only - Draft idea to check trustworthiness of email account*__

# unsafe-email
Check if email is from disposable provider or has no DNS MX record

### Install

```bash
yarn add @jollie/unsafe-email
```
or
```bash
npm install @jollie/unsafe-email
```
### Usage

```javascript
const isTricky = require('@jollie/unsafe-email');

// Diposable email 
// Output "Unsafe email : Disposable email address"
isTricky('contact@yopmail.com')
  .then(() => console.log('Looks good'))
  .catch(error => console.log(`Unsafe email : ${error.message}`);
  
// Non-existent domain 
// Output "Unsafe email : queryMx ENOTFOUND he-llo-w-orld.com"
isTricky('contact@he-llo-w-orld.com')
  .then(() => console.log('Looks good'))
  .catch(error => console.log(`Unsafe email : ${error.message}`);
    
// Valid email -> Output "Looks good"
isTricky('contact@google.com')
  .then(() => console.log('Looks good'))
  .catch(error => console.log(`Unsafe email : ${error.message}`);
```

### Return value

Promise resolved with the email or rejected if unsafe email
npm package: @jolly-pixel/fs-tree
Description: <h1 align="center">   fs-tree </h1>
Author: GENTILHOMME Thomas
Latest version: 1.0.0

<h1 align="center">
  fs-tree
</h1>

<p align="center">
  A modern fork/re-implementation of <a href="https://github.com/sparklinlabs/dnd-tree-view">dnd-tree-view</a> from Sparklin Labs, rewritten to be fully compatible with the Web Platform using <code>EventTarget</code> and native <code>ES2022</code> features.
</p>

<p align="center">
<img src="./docs/tree-view-white.png">
</p>

## 💃 Getting Started

This package is available in the Node Package Repository and can be easily installed with [npm][npm] or [yarn][yarn].

```bash
$ npm i @jolly-pixel/fs-tree
# or
$ yarn add @jolly-pixel/fs-tree
```

## 👀 Usage example

```ts
import { TreeView } from "@jolly-pixel/tree-view";

const container = document.getElementById(
  "tree"
) as HTMLDivElement;

const tree = new TreeView(container, {
  multipleSelection: true,
  dragStartCallback(event, node) {
    // Optional: cancel drag for some nodes
    console.log("Dragging", node.textContent);

    return true;
  },
  dropCallback(event, location, nodes) {
    // Optional: handle drop and return false to cancel move
    console.log("Dropped", nodes, "at", location);

    return true;
  }
});

const group = document.createElement("li");
group.textContent = "Group A";

const item = document.createElement("li");
item.textContent = "Item A.1";

tree.append(group, "group");
tree.append(item, "item", group);
```

Then you can include a minimal stylesheets

```css
.tree {
  list-style: none;
}

.tree .group > .toggle::before {
  content: "▸";
  display: inline-block;
  margin-right: 5px;
  cursor: pointer;
}

.tree .group.collapsed > .toggle::before {
  content: "▾";
}
```

## 📚 API

- [TreeView](./docs/TreeView.md)

## 🎨 Custom theme

🚧 Integrated stylesheets are coming in a future release

- Dark
- Light

## ✨ Contributors guide

If you are a developer **looking to contribute** to the project, you must first read the [CONTRIBUTING][contributing] guide.

Once you have finished your development, check that the tests (and linter) are still good by running the following script:

```bash
$ npm run test
$ npm run lint
```

> [!CAUTION]
> In case you introduce a new feature or fix a bug, make sure to include tests for it as well.

### 🚀 Running the examples

One interactive example live in the `examples/` directory and are served by Vite. Start the dev server from the package root:

```bash
npm run preview -w @jolly-pixel/fs-tree
```

## 📃 License

MIT

<!-- Reference-style links for DRYness -->

[npm]: https://docs.npmjs.com/getting-started/what-is-npm
[yarn]: https://yarnpkg.com
[contributing]: ../../CONTRIBUTING.md
npm package: @jollyjerr/txtme
Description: A CLI app that sends you a text after a long script finishes 📲
Author: jollyjerr
Latest version: 0.1.3

# txtme

```sh
run-a-long-script && txtme
```

## Setup

1. Create a Twilio dev project -> [here](https://www.twilio.com/try-twilio)
    
2. Add a `.txtme.toml` like this

```toml
Name = "<your name>"
PhoneTo = "<your phone>"
PhoneFrom = "<twilio project phone>"
SID = "<twilio sid>"
Token = "<twilio token>"
```

If you do not add a .txtme.toml file, the cli will guide you through creating one on first run.
npm package: @jollyzombie/randomid-generator
Description: <h1>Generator ID</h1> Generate an unique id and show the result in the console.
Latest version: 1.0.3

<h1>Generator ID</h1>
Generate an unique id and show the result in the console.

<h1>Install</h1>
yarn add @jollyzombie/randomid-generator or npm install @jollyzombie/randomid-generator

<h1>Usage</h1>
console.log(randomID(10)); // provide ID length
npm package: @jolobo/react-pedigree
Description: A super useful react component for rendering a pedigree
Author: Shaun Lobisnger
Latest version: 0.0.3
Deprecated: no longer supported

# react-pedigree
React component for displaying a pedigree.

### Installation
Install via NPM `npm i @jolobo/react-pedigree`.

### Example Usage

```jsx
import React from 'react'
import Pedigree from '@jolobo/react-pedigree'

const Example = () => {
    const family = [
        [
            {
                name: 'James Smith',
                dob: '10-01-2019'
            }
        ],
        [
            {
                name: 'Jerry Smith',
                dob: '10-01-2019'
            },
            {
                name: 'Jane Smith',
                dob: '10-01-2019'
            }
        ]
    ]

    return (
        <Pedigree data={family} />
    )
}
```
npm package: @jolocom/cbas
Description: In order to show how the CBAS module can be used in the context of an example use case, a set of tests were written and included in the repository.  These tests showcase the currently supported API, and serve as a good example of how a developer would use
Author: Jolocom Dev
Latest version: 0.2.0

In order to show how the CBAS module can be used in the context of an example use case, a set of tests were written and included in the repository. 
These tests showcase the currently supported API, and serve as a good example of how a developer would use the CBAS library to implement authorization for their use case. 

We first show how an instance of the CBAS library can be used to issue capabilities authorizing the holder to perform some actions on certain resources. The tests for `getGrantsForCapability` and `canGrantPrivilege` further show how the issued capability can be evaluated against a governance framework document (specifically the [SGL statements](https://github.com/evernym/simple-grant-lang) in the `rules` section) to grant certain defined privileges. 

These useful helpers can aid the client in finding the appropriate capabilities for a request, and the server in evaluating / verifying received capabilities. The rest of the tests focus on the `evaluateCapability` and `evaluateInvocation` functions, which can be used to verify the signature and expiry date on a capability / invocation, and evaluate it against the `rules` defined in the governance framework.
npm package: @jolocom/de-cent-ts-linux-x64-gnu
Description: This is the **x86_64-unknown-linux-gnu** binary for `de-cent-ts`
Latest version: 0.2.0-rc17

# `de-cent-ts-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `de-cent-ts`
npm package: @jolocom/http-signature
Description: Jolocom fork of the Joyent's HTTP Signature library.
Author: Joyent, Inc
Latest version: 1.3.5

# Disclaimer

This module is published from a fork of the Joyent http-signature repository. The original readme is included below.

This version of the library adds initial support for the `HS2019` alg type. The API is also slightly different, in an attempt to decouple the library from the Node.js `request` object interface (e.g. to make it easier to use other HTTP clients with this module).

This fork will become obsolete once the [required functionality](https://github.com/joyent/node-http-signature/pull/116) is merged upstream.

# node-http-signature

node-http-signature is a node.js library that has client and server components
for Joyent's [HTTP Signature Scheme](http_signing.md).

## Usage

Note the example below signs a request with the same key/cert used to start an
HTTP server. This is almost certainly not what you actually want, but is just
used to illustrate the API calls; you will need to provide your own key
management in addition to this library.

### Client

```js
var fs = require('fs');
var https = require('https');
var httpSignature = require('http-signature');

var key = fs.readFileSync('./key.pem', 'ascii');

var options = {
  host: 'localhost',
  port: 8443,
  path: '/',
  method: 'GET',
  headers: {}
};

// Adds a 'Date' header in, signs it, and adds the
// 'Authorization' header in.
var req = https.request(options, function(res) {
  console.log(res.statusCode);
});


httpSignature.sign(req, {
  key: key,
  keyId: './cert.pem',
  keyPassphrase: 'secret' // (optional)
});

req.end();
```

### Server

```js
var fs = require('fs');
var https = require('https');
var httpSignature = require('http-signature');

var options = {
  key: fs.readFileSync('./key.pem'),
  cert: fs.readFileSync('./cert.pem')
};

https.createServer(options, function (req, res) {
  var rc = 200;
  var parsed = httpSignature.parseRequest(req);
  var pub = fs.readFileSync(parsed.keyId, 'ascii');
  if (!httpSignature.verifySignature(parsed, pub))
    rc = 401;

  res.writeHead(rc);
  res.end();
}).listen(8443);
```

## Installation

    npm install http-signature

## License

MIT.

## Bugs

See <https://github.com/joyent/node-http-signature/issues>.
npm package: @jolocom/jolo-did-registrar
Description: This module encapsulates the logic required to anchor Jolocom Identities using an instance of the Jolocom [registry smart contract](../registry-contract) and an IPFS gateway. Additional functionality for updating the DID Document with a public profile is 
Latest version: 1.0.2

# @jolocom/jolo-did-registrar

This module encapsulates the logic required to anchor Jolocom Identities using an instance of the Jolocom [registry smart contract](../registry-contract) and an IPFS gateway.
Additional functionality for updating the DID Document with a public profile is also exposed.

*Please note that this module is not meant to be used directly, but rather through an integration with the Jolocom Library ([source](https://github.com/jolocom/jolocom-lib/blob/next/ts/didMethods/jolo/registrar.ts#L33)).*

For logic related to resolving identities and associated public profiles, check out the [@jolocom/jolo-did-resolver](../jolo-did-resolver) package.
npm package: @jolocom/jolo-did-resolver
Description: This module encapsulates the logic required to resolve Jolocom Identities using an instance of the Jolocom [registry smart contract](../registry-contract) and an IPFS gateway. The exported interface is compatible with the [DIF DID-Resolver](https://github
Latest version: 1.0.0

# @jolocom/jolo-did-resolver
This module encapsulates the logic required to resolve Jolocom Identities using an instance of the Jolocom [registry smart contract](../registry-contract) and an IPFS gateway.
The exported interface is compatible with the [DIF DID-Resolver](https://github.com/decentralized-identity/did-resolver) module.

*Please note that this module is not meant to be used directly, but rather through an integration with either the Jolocom Library ([source](https://github.com/jolocom/jolocom-lib/blob/next/ts/didMethods/jolo/resolver.ts#L31)), or the DIF DID-Resolver module (as shown in the example below)*

## Usage examples
In combination with the [DIF DID-Resolver](https://github.com/decentralized-identity/did-resolver):

```typescript
import { getResolver } from "@jolocom/jolo-did-resolver";
import { Resolver } from "did-resolver";

const resolver = new Resolver(getResolver());
const didDocument = await resolver.resolve(did);
// didDocument now contains the corresponding Did Document in JSON form.
```

A number of configuration options can be passed to the `getResolver` function, as shown in this example:

```typescript
import { getResolver } from "@jolocom/jolo-did-resolver";
import { Resolver } from "did-resolver";

// The Ethereum gateway to use for reading the registry contract state and broadcasting transactions
const ethGatewayEndpoint = 'https://rinkeby.infura.io/v3/000085cafc1934feaa09ccb83630d5d8'

// The Ethereum address of a instance of the registry smart contract to use for anchoring / resolution
const registryContractAddress = '0xD333333333333333333AAAAAAAAAAFFFFFFFFF20'

// A public IPFS gateway which can be used to store and retrieve documents
const ipfsGatewayEndpoint = 'https://ipfs.example.com:443'

const resolver = new Resolver(getResolver(ethGatewayEndpoint, registryContractAddress, ipfsGatewayEndpoint));
const didDocument = await resolver.resolve(did);
// didDocument now contains the corresponding Did Document in JSON form.
```

If no arguments are passed to the `getResolver()` function, [default arguments are used](https://github.com/jolocom/jolo-did-method/blob/master/packages/jolo-did-resolver/ts/index.ts#L5).
npm package: @jolocom/local-resolver-registrar
Description: This repository can be used as a base for defining DID resolvers (compatible with the [DIF did-resolver](https://github.com/decentralized-identity/did-resolver) module), as well as the corresponding registrars, for various event based DID Methods.
Latest version: 1.0.1

# @jolocom/local-resolver-registrar
This repository can be used as a base for defining DID resolvers (compatible with the [DIF did-resolver](https://github.com/decentralized-identity/did-resolver) module), as well as the corresponding registrars, for various event based DID Methods.

The exported functions are agnostic to the structure of the underlying events, but rely on a number of functions being injected upon construction. These functions provide an implementation for operations which need to be aware of the event structure, allowing for registrars / resolvers relying on different event structures (e.g. [KERI](https://github.com/SmithSamuelM/Papers/blob/2a39bd7b99f39556bd9e204142a1f36c49372bd7/whitepapers/KERI_WP_2.x.web.pdf), [Peer DID](https://identity.foundation/peer-did-method-spec/index.html)) to be built by supplying different implementations of `getIdFromEvent` and `create` (required by the registrar), and `validateEvents` (required by the resolver and the registrar).

*Please note that these modules are not meant to be used directly, but rather through an integration with either the Jolocom Library ([resolver integration](https://github.com/jolocom/jolocom-lib/blob/next/ts/didMethods/local/resolver.ts#L22), [registrar integration](https://github.com/jolocom/jolocom-lib/blob/next/ts/didMethods/local/registrar.ts#L21)), or the DIF DID-Resolver module (as shown in the example below)*

## Usage examples
In combination with the [DIF DID-Resolver](https://github.com/decentralized-identity/did-resolver):

```typescript
import { getResolver, createSimpleEventDb } from "@jolocom/local-resolver-registrar";
import { Resolver } from "did-resolver";
import { validateEvents } from '@jolocom/native-core'

const dbInstance = createSimpleEventDb()

// The supported Event structures, and the logic for validating them
// is encapsulated in the implementation of validateEvents

const configuredResolver = getResolver('local')({
  validateEvents,
  dbInstance
})

const resolver = new Resolver(getResolver());
const didDocument = await resolver.resolve(did);

// didDocument now contains the corresponding Did Document in JSON form.
```

For an example of using the registrar / resolver modules (including an example of using an event database other than the default one) , please check out [the test folder](./tests).
npm package: @jolocom/protocol-ts
Description: Jolocom SSI protocol typescript definitions - jolocom.io
Author: Jolocom Dev
Latest version: 0.6.1

# jolocom-protocol-ts

[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/jolocom/SmartWallet)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)


This repository contains Typescript definitions for the Jolocom protocol.

## Jolocom

Interested in our vision? Take a look at our [whitepaper](https://jolocom.io/wp-content/uploads/2019/12/Jolocom-Whitepaper-v2.1-A-Decentralized-Open-Source-Solution-for-Digital-Identity-and-Access-Management.pdf)

Want to use our [library](https://github.com/jolocom/jolocom-lib)? Please refer to the following resources:

- [Library documentation](https://jolocom-lib.readthedocs.io/en/latest/gettingStarted.html)
- [Automatically generated api documentation](https://htmlpreview.github.io/?https://raw.githubusercontent.com/jolocom/jolocom-lib/master/api_docs/documentation/globals.html)
- [Generic backend](https://github.com/jolocom/generic-backend) - exposes a set of HTTP endpoints for client applications to interact with.
- [Demo service frontend](https://gitlab.com/jolocom/municipal-service) - to interact with the generic backend.
  - Instructions can be found in the repository README, more about the project as a whole can be found [here](https://stories.jolocom.com/demo-services-using-ssi-building-blocks-now-available-607e2ccd506d).
- Various Useful snippets: [Here](https://github.com/Exulansis/web3_snippets), and [here](https://github.com/Exulansis/Validation-Examples)
npm package: @jolocom/registry-contract
Description: Basic contract for registering DID / DID Document mappings
Latest version: 1.0.5

# RegistryContract
The repository contains the source code for the Ethereum smart contract used as part of our `did:jolo` [method spec](../jolocom-did-method-specification.md) implementation. The project also includes a configured [truffle](https://github.com/trufflesuite/truffle) environment for compiling, testing and deploying the contract, and a wrapper class allowing for easier integration.

*This is a lower level module used by the jolo-did-registrar ([integration](https://github.com/jolocom/jolo-did-method/blob/master/packages/jolo-did-registrar/ts/index.ts#L11)) and jolo-did-resolver ([integration](https://github.com/jolocom/jolo-did-method/blob/master/packages/jolo-did-resolver/ts/index.ts#L10)) packages to offer a more consumable API.*