open-index/open-npm huggingface dataset:
npm package: @identity-stack/authorization-module
Description: Sample core for higher packages to depend on
Author: CDMBase LLC
Latest version: 0.0.4

# Client Core Package
Helper methods and interfaces that can be used by the client part of the packages 

What does it include:
---
    1. exported reducers
    2. exported actions
    3. exported graphql queries
    4. Typescript 2.0.0 => ES6
    5. unit testing with jest

Purpose:
---
    This package can be installable in front-end webserver

What's not included
---
    It does not have any client UI components such as React
    It does have configured Redux Store

Useful commands:
---
    npm run build       - build the library files
    npm run test        - run tests once
    npm run test:watch  - run tests in watchmode (Useful for development)
    
Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported reducers and actions
        index.spec.ts            - Tests file for main
        actions                  - Contains Actions to transform the state tree
            index.ts             - References all the exported actions
        reducers                 - Contains reducers, pure function with (state, action) => state signature. 
            index.ts             - References all the exported reducers.
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library
npm package: @identity-stack/client-core
Description: Sample core for higher packages to depend on
Author: CDMBase LLC
Latest version: 0.0.4

# Client Core Package
Helper methods and interfaces that can be used by the client part of the packages 

What does it include:
---
    1. exported reducers
    2. exported actions
    3. exported graphql queries
    4. Typescript 2.0.0 => ES6
    5. unit testing with jest

Purpose:
---
    This package can be installable in front-end webserver

What's not included
---
    It does not have any client UI components such as React
    It does have configured Redux Store

Useful commands:
---
    npm run build       - build the library files
    npm run test        - run tests once
    npm run test:watch  - run tests in watchmode (Useful for development)
    
Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported reducers and actions
        index.spec.ts            - Tests file for main
        actions                  - Contains Actions to transform the state tree
            index.ts             - References all the exported actions
        reducers                 - Contains reducers, pure function with (state, action) => state signature. 
            index.ts             - References all the exported reducers.
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library
npm package: @identity-stack/client-react
Description: browser plugin for git
Author: CDMBase LLC
Latest version: 0.0.4

# React Package
React components and containers

What does it include:
---
    1. exported react pure components
    2. exported react containers
    3. Typescript 2.0.0 => ES6
    4. unit testing with jest

Purpose:
---
This package can be installable in front-end webserver

Useful commands:
---
    npm run build       - build the library files
    npm run test        - run tests once
    npm run test:watch  - run tests in watchmode (Useful for development)
    
Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported components and containers
        index.spec.ts            - Tests file for main
        components               - All pure components which don't depend on backend data or external state such as redux
            index.ts             - References all the exported components
        containers               - Components with data to render. Tightly coupled with redux. 
            index.ts             - References all the exported containers
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library


Tutorials:
---
[react-jest-enzymes test](https://www.youtube.com/watch?v=bMmntkVM4wQ)

[testing react with enzyme tutorial](http://codeheaven.io/testing-react-components-with-enzyme/)

[react-redux-typescript-guide](https://github.com/piotrwitek/react-redux-typescript-guide)

Performance:
---
[Redux FAQ: Connecting multiple components](http://redux.js.org/docs/FAQ.html#react-multiple-components)

[React/Redux Links: Performance articles](https://github.com/markerikson/react-redux-links/blob/master/react-performance.md)

[React/Redux: Component re-rendering too often?](http://redux.js.org/docs/faq/ReactRedux.html#react-rendering-too-often)
npm package: @identity-stack/client-redux
Description: GraphQL for sample
Author: CDMBase LLC
Latest version: 0.0.4

# Redux Package
Redux npm package includes actions, action-types and reducers

  1. [TypeScript and Redux: getting started][article-1]
  2. [TypeScript and Redux: async actions][article-3]
  3. [TypeScript and Redux: unit testing with Jest][article-4]
  4. [Integrating TypeScript and redux-thunk][article-5]


What does it include:
---
    1. exported reducers
    2. exported actions
    3. exported graphql queries
    4. Typescript 2.0.0 => ES6
    5. unit testing with jest

Purpose:
---
This package can be installable in front-end webserver to use the reducers and actions.

The goal is to make a isolated and reusable module that is self-contained. In order to avoid name conflicts, following rules need to be abide.
1. MUST export a function call reducer()
2. MUST export its action creators as functions
3. MUST have action types in the form `@npm-module-or-app/ACTION_TYPE` eg. `@@identity-stack/INCREMENT_COUNTER`
4. MUST have reducer in the form `npm-module-or-app/reducer_name` eg. `@identity-stack/counter`

What's not included
---
- It does not have any client UI components such as React
- It does not configure Redux Store

Useful commands:
---
    npm run build       - build the library files
    npm run test        - run tests once
    npm run test:watch  - run tests in watchmode (Useful for development)
    
Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported reducers and actions
        index.spec.ts            - Tests file for main
        actions                  - Contains Actions to transform the state tree
            index.ts             - References all the exported actions
        reducers                 - Contains reducers, pure function with (state, action) => state signature. 
            index.ts             - References all the exported reducers.
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library
                 

[article-1]: https://rjzaworski.com/2016/08/getting-started-with-redux-and-typescript
[article-2]: https://rjzaworski.com/2016/08/typescript-redux-and-react
[article-3]: https://rjzaworski.com/2016/09/typescript-redux-async-actions
[article-4]: https://rjzaworski.com/2016/12/testing-typescript-with-jest
[article-5]: https://rjzaworski.com/2017/01/typescript-redux-thunk
npm package: @identity-stack/graphql-schema
Description: Identity Schema Module
Author: CDMBase LLC
Latest version: 0.0.4

# @identity-stack/graphql-schema
This package is intended to be used with [Apollo Server](http://docs.apollostack.com/apollo-server/tools.html) to provide an easy way to setup a GraphQL server and connect it to your database. Note that Apollo Server is not a depenedency of this package. 

Usage
---

Sample Schema exports four things: **database**, **resolvers**, **subscriptions** and **typeDefs**.


*resolvers*
Resolvers are functions that tell the server how to find and return the data for each field in a GraphQL query. The resolving functions simply call your Database Connectors by passing in parameters and return the Connectors result (usually a Promise).

After creating your Database and Connectors from Database, you can call the resolvers function by passing in the Connectors and your public application settings (since settings are stored in the application state). Building on the previous examples:

*typeDefs* is a GraphQL Schema based on the queries provided to it from database. With the schema, you can do things like Find Posts by post_type, get the Postmeta of a Post by the post_id, and so on.

*subscriptions* 
GraphQL subscriptions allow developers to introduce new levels of interactivity to their apps with near-realtime updates. You can keep your app updated to the latest changes (that you subscribe to) between different users:

*database*
The first part of Sample Schema is **database**. This class provides an easy connection to your database using some connection settings, explained below.


Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported components and containers
        index.spec.ts            - Tests file for main
        modules                  - Fractal route for server-side application module splitting (schema definition, resolvers, subscription filters, database connectors )
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library


Setup
---
`modules` directory consists of the sub directories based on the criteria for module splitting. Each sub-directory may have schema definition, resolvers, subscriptions, database

Schema definition files should have suffix as `.graphql` or `.graphqls`. Resolvers file should be named as `resolvers.ts` and subscriptions filter file as `subscriptions.ts`.

All the files under modules are automatically bundled when you run `npm run build`, so the above naming convention should be followed.

## Reference:
https://github.com/ramsaylanier/WordExpressSchema
npm package: @identity-stack/passport-oauth2
Description: Sample core for higher packages to depend on
Author: CDMBase LLC
Latest version: 0.0.4

# Client Core Package
Helper methods and interfaces that can be used by the client part of the packages 

What does it include:
---
    1. exported reducers
    2. exported actions
    3. exported graphql queries
    4. Typescript 2.0.0 => ES6
    5. unit testing with jest

Purpose:
---
    This package can be installable in front-end webserver

What's not included
---
    It does not have any client UI components such as React
    It does have configured Redux Store

Useful commands:
---
    npm run build       - build the library files
    npm run test        - run tests once
    npm run test:watch  - run tests in watchmode (Useful for development)
    
Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported reducers and actions
        index.spec.ts            - Tests file for main
        actions                  - Contains Actions to transform the state tree
            index.ts             - References all the exported actions
        reducers                 - Contains reducers, pure function with (state, action) => state signature. 
            index.ts             - References all the exported reducers.
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library
npm package: @identity-stack/passport-oauth2-oidc
Description: Sample core for higher packages to depend on
Author: CDMBase LLC
Latest version: 0.0.4

# Client Core Package
Helper methods and interfaces that can be used by the client part of the packages 

What does it include:
---
    1. exported reducers
    2. exported actions
    3. exported graphql queries
    4. Typescript 2.0.0 => ES6
    5. unit testing with jest

Purpose:
---
    This package can be installable in front-end webserver

What's not included
---
    It does not have any client UI components such as React
    It does have configured Redux Store

Useful commands:
---
    npm run build       - build the library files
    npm run test        - run tests once
    npm run test:watch  - run tests in watchmode (Useful for development)
    
Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported reducers and actions
        index.spec.ts            - Tests file for main
        actions                  - Contains Actions to transform the state tree
            index.ts             - References all the exported actions
        reducers                 - Contains reducers, pure function with (state, action) => state signature. 
            index.ts             - References all the exported reducers.
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library
npm package: @identity-stack/resource-module
Description: Sample core for higher packages to depend on
Author: CDMBase LLC
Latest version: 0.0.4

# Client Core Package
Helper methods and interfaces that can be used by the client part of the packages 

What does it include:
---
    1. exported reducers
    2. exported actions
    3. exported graphql queries
    4. Typescript 2.0.0 => ES6
    5. unit testing with jest

Purpose:
---
    This package can be installable in front-end webserver

What's not included
---
    It does not have any client UI components such as React
    It does have configured Redux Store

Useful commands:
---
    npm run build       - build the library files
    npm run test        - run tests once
    npm run test:watch  - run tests in watchmode (Useful for development)
    
Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported reducers and actions
        index.spec.ts            - Tests file for main
        actions                  - Contains Actions to transform the state tree
            index.ts             - References all the exported actions
        reducers                 - Contains reducers, pure function with (state, action) => state signature. 
            index.ts             - References all the exported reducers.
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library
npm package: @identity-stack/schema
Description: Identity Schema Module
Author: CDMBase LLC
Latest version: 0.0.3

# @identity-stack/schema
This package is intended to be used with [Apollo Server](http://docs.apollostack.com/apollo-server/tools.html) to provide an easy way to setup a GraphQL server and connect it to your database. Note that Apollo Server is not a depenedency of this package. 

Usage
---

Sample Schema exports four things: **database**, **resolvers**, **subscriptions** and **typeDefs**.


*resolvers*
Resolvers are functions that tell the server how to find and return the data for each field in a GraphQL query. The resolving functions simply call your Database Connectors by passing in parameters and return the Connectors result (usually a Promise).

After creating your Database and Connectors from Database, you can call the resolvers function by passing in the Connectors and your public application settings (since settings are stored in the application state). Building on the previous examples:

*typeDefs* is a GraphQL Schema based on the queries provided to it from database. With the schema, you can do things like Find Posts by post_type, get the Postmeta of a Post by the post_id, and so on.

*subscriptions* 
GraphQL subscriptions allow developers to introduce new levels of interactivity to their apps with near-realtime updates. You can keep your app updated to the latest changes (that you subscribe to) between different users:

*database*
The first part of Sample Schema is **database**. This class provides an easy connection to your database using some connection settings, explained below.


Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported components and containers
        index.spec.ts            - Tests file for main
        modules                  - Fractal route for server-side application module splitting (schema definition, resolvers, subscription filters, database connectors )
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library


Setup
---
`modules` directory consists of the sub directories based on the criteria for module splitting. Each sub-directory may have schema definition, resolvers, subscriptions, database

Schema definition files should have suffix as `.graphql` or `.graphqls`. Resolvers file should be named as `resolvers.ts` and subscriptions filter file as `subscriptions.ts`.

All the files under modules are automatically bundled when you run `npm run build`, so the above naming convention should be followed.

## Reference:
https://github.com/ramsaylanier/WordExpressSchema
npm package: @identity.com/did-io-driver-sol
Description: A SOL driver for the [did.io](https://github.com/digitalbazaar/did-io) DID client.
Author: dankelleher
Latest version: 1.0.0-beta.0

# DID.io SOL Driver

A SOL driver for the [did.io](https://github.com/digitalbazaar/did-io) DID client.

## Usage

The SOL driver supports the `generate()` and `get()` functions only, and generates
'sparse' DID documents, i.e. those derived from an initial private key with no additional
properties.

To generate a DID:

```js
import { CachedResolver } from '@digitalbazaar/did-io';
import didSol from '@identity.com/did-io-driver-sol';

const resolver = new CachedResolver(); 
resolver.use(didSol.driver({payer: PAYER_KEY}))

// Generate a DID
const did = await resolver.generate({
  method: 'sol',
  cluster: 'devnet'   // omit for mainnet
})
```

where PAYER_KEY is the private key of the transaction payer on solana
and OWNER_KEY is the public key of the owner of the DID,
both encrypted as base58 strings.
npm package: @identity.com/dids
Description: This library is a simple client library for generating DIDs for use with Solana applications.
Author: dankelleher
Latest version: 0.1.2

# DIDS (Decentralized Identity library for Solana)

This library is a simple client library for generating DIDs for use with Solana applications.

It supports two DID methods:

- [did-key](https://w3c-ccg.github.io/did-method-key/): A static DID method based on 
X25519 ECC Curve keys, that are compatible with Solana public keys.
- [did-sol](https://identity-com.github.io/sol-did/did-method-spec.html): A Solana-native
DID method.
  
# Quick Start

To register a DID from a Solana public key:

```js
const DIDs = require('@identity.com/dids');
const dids = new DIDs({ payer: payerAccount.secretKey });

const owner = new Account().publicKey;
const keyIdentifier = await dids.register('key', owner);
const solIdentifier = await dids.register('sol', owner);
```

To retrieve a DID document:

```js
const identifier = 'did:key:z6MkszyYuyjZ31XZKXT4qdb5HqsWjAZGZoVvGzsoX1Tnno9s';
const document = await dids.get(identifier);
```

For more examples, see tests/index.test.ts



## Testing & Development

Note: Before contributing to this project, please check out the code of conduct
and contributing guidelines.

DIDS uses [nvm](https://github.com/nvm-sh/nvm) and [yarn](https://yarnpkg.com/)

```shell
nvm i
yarn
```

### Running the tests

DIDS uses the mocha and chai test libraries

Run the tests using:

```shell
yarn test
```

Note: DIDS was bootstrapped and is packaged using [TSDX](https://tsdx.io/), which includes
Jest. Jest has a bug when importing some dependencies of this project, so mocha is used instead. 

### Repl

To test using the repl, run

```shell
yarn repl
```

Then try:

```js
await dids.register('sol', new Account().publicKey)
await dids.register('key', new Account().publicKey)

await dids.get('<YOUR IDENTIFIER HERE>')
```
npm package: @identity.com/gateway-solana-idl
Description: Gateway IDL on Solana
Author: Identity.com
Latest version: 2.0.1

# `Gateway Protocol` IDL

The [anchor-based](https://github.com/coral-xyz/anchor) auto-generated IDL for the `gateway protocol` program.

## Program references

This IDL allows for the simple interaction with the `gateway protocol` on-chain Solana program.

### Deployments

- Mainnet-beta: gate2TBGydKNyMNUqz64s8bz4uaWS9PNreMbmAjb1Ft
- Devnet: gate2TBGydKNyMNUqz64s8bz4uaWS9PNreMbmAjb1Ft
- Testnet: TODO...

### APR Reference

- `gateway protocol` program on [APR](TODO...)
npm package: @identity.com/gateway-usage
Description: Client SDK for the Gateway Usage Solana program
Author: dankelleher @dankelleher
Latest version: 0.0.10

# Solana On-Chain Token Usage Settlement contract

This program defines all operations around tracking and settling gateway token usage from
various chains.

## Actors
The following actors are interacting with the Token Usage Settlement contract:

### The Token Usage Oracle.
An authoritative oracle that is able to publish accumulated token usage data onto 
one or more dedicated PDA account(s). 
Data is published onto an PDA account that is derived from
- Gatekeeper address
- dApp address
- Source Chain Contract address? (SOL-Mainnet, ETH ...)
uniquely identifying the open token usage positions
npm package: @identity.com/prove-ethereum-wallet
Description: Library for providing a standard proof creation and verification for ethereum wallets
Author: Kevin Colgan
Latest version: 1.1.1

# Prove-Ethereum-Wallet

This library proves ownership of an Ethereum wallet to off-chain verifiers. To create proof of ownership, a signing function must be provided that allows the user to sign some typed-data with their private key, thus proving they own the wallet. The verifier will check that the signature of the signer matches the wallet address to check, and that the contents of the signed typed-message are valid. The proof consists of a string of a base64 version of the message concatenated with a '.' and the base64 version of the signature. 

## Install

```sh
npm install @identity.com/prove-ethereum-wallet
```

or 

```sh
yarn add @identity.com/prove-ethereum-wallet
```

## Usage

Prove ownership of an Ethereum wallet

Prover side: 
```js
const { create } = require('@identity.com/prove-ethereum-wallet');
const ownerWallet = Wallet.createRandom();

const proof = await create((domain, types, message) => wallet._signTypedData(domain, types, message), { message: '<verifierUrl>' });
```

Verifier side:
```js
const { verify } = require('@identity.com/prove-ethereum-wallet');
const success = await verify(expectedOwnerAddress, proof, { message: '<verifierUrl>' });
```

## Details

The prove() function generates some typed-data, including an expiry timestamp and message and
signs it with the wallet private key. For the transaction to be verified
by the verify() function, it must:

- have an expiry that is before UTC now()
- be signed by the expected wallet address
- contain a matching message


## Configuration

The prove and verify functions can be configured as follows:

### `domain` Optionally set the domain for the signed data

Optional
Default:
```
export const defaultDomain: TypedDataDomain = {
  name: "Proof Of Ethereum Wallet Ownership",
  version: "1",
};
```

### `types` Optionally set the types to be used in the signed data

Optional
Default:
```
export const defaultTypes: Record<string, Array<TypedDataField>> = {
  PoWo: [
    { name: "expires", type: "string" },
    { name: "message", type: "string" },
  ],
};
```

### `message` 

Optional
Default: empty

The message passed to check against the proof. This would normally be a nonce, or single use message to prevent the POWO from being re-used in a replay-attack.
npm package: @identity.com/sol-did-cli
Description: sol is a CLI client for the did:sol method on Solana
Author: Martin Riedel @rado0x54
Latest version: 3.3.0

# `did:sol` CLI

A typescript-based CLI for registering, manipulating, and resolving DIDs using the `did:sol` method.

## Command line tool
The client library comes with a command line tool `sol` that resolves and manipulate
DIDs.

### Installation
```shell
yarn global add @identity.com/sol-did-cli # or npm install -g @identity.com/sol-did-cli
```
### Usage

#### Resolve a DID
```shell
sol did:sol:ygGfLvAyuRymPNv2fJDK1ZMpdy59m8cV5dak6A8uHKa # resolves a DID on mainnet-beta
...
sol did:sol:devnet:6fjuEFDTircJVNCQWYe4UHNfbYrU1a4sEr8FQ5w7d8Fx # resolves a DID on devnet
````

<!-- toc -->
* [`did:sol` CLI](#didsol-cli)
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @identity.com/sol-did-cli
$ sol COMMAND
running command...
$ sol (--version)
@identity.com/sol-did-cli/3.1.0 darwin-arm64 node-v16.13.0
$ sol --help [COMMAND]
USAGE
  $ sol COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`sol help [COMMAND]`](#sol-help-command)
* [`sol resolve DIDSOL`](#sol-resolve-didsol)

## `sol help [COMMAND]`

Display help for sol.

```
USAGE
  $ sol help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for sol.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_

## `sol resolve DIDSOL`

Resolves a did:sol DID

```
USAGE
  $ sol resolve [DIDSOL]

ARGUMENTS
  DIDSOL  did:sol DID to be resolved

DESCRIPTION
  Resolves a did:sol DID

EXAMPLES
  $ sol resolve did:sol:devnet:ygGfLvAyuRymPNv2fJDK1ZMpdy59m8cV5dak6A8uHKa
  {
    "@context": [
      "https://w3id.org/did/v1.0",
      "https://w3id.org/sol/v2.0"
    ],
    "controller": [],
    "verificationMethod": [
      {
        "id": "did:sol:devnet:ygGfLvAyuRymPNv2fJDK1ZMpdy59m8cV5dak6A8uHKa#default",
        "type": "Ed25519VerificationKey2018",
        "controller": "did:sol:devnet:ygGfLvAyuRymPNv2fJDK1ZMpdy59m8cV5dak6A8uHKa",
        "publicKeyBase58": "ygGfLvAyuRymPNv2fJDK1ZMpdy59m8cV5dak6A8uHKa"
      }
    ],
    "authentication": [],
    "assertionMethod": [],
    "keyAgreement": [],
    "capabilityInvocation": [
      "#default"
    ],
    "capabilityDelegation": [],
    "service": [],
    "id": "did:sol:devnet:ygGfLvAyuRymPNv2fJDK1ZMpdy59m8cV5dak6A8uHKa"
  }
```

_See code: [dist/commands/resolve/index.ts](https://github.com/identity-com/sol-did/blob/v3.1.0/dist/commands/resolve/index.ts)_
<!-- commandsstop -->
npm package: @identity.com/sol-did-client-legacy
Description: A typescript client library for registering and resolving DIDs using the SOL method
Author: dankelleher
Latest version: 2.0.4

# SOL DID Client

A typescript client library for registering and resolving DIDs using the SOL method

## Getting Started

### Command line tool

```shell
yarn global add @identity.com/sol-did-client # or npm install -g @identity.com/sol-did-client
sol did:sol:ygGfLvAyuRymPNv2fJDK1ZMpdy59m8cV5dak6A8uHKa
```

### Client library

```js
import {
  register, 
  resolve, 
  addKey, 
  removeKey, 
  addController, 
  removeController, 
  addService, 
  removeSerice
} from '@identity.com/sol-did-client';

// generate an X25519 key, eg using 'tweetnacl'
import nacl from 'tweetnacl';

const keyPair = nacl.sign.keyPair();

// register a DID
const did = await register({
  payer: keyPair.secretKey,
});

// resolve a DID
const document = await resolve(did);

// update a DID
const request = {
  payer: keyPair.secretKey,
  did,
  document: {
    service: [{
      description: 'Messaging Service',
      id: `${did}#service1`,
      serviceEndpoint: `https://dummmy.dummy/${did}`,
      type: 'Messaging',
    }],
  },
};
await update(request);

// deactivate a DID
await deactivate({
  payer: keyPair.secretKey,
  did,
});

// Add a key to the DID
addKey({
  payer: keyPair.secretKey,
  did,
  fragment: 'ledger',
  key
});

// Remove a key from the DID
removeKey({
  payer: keyPair.secretKey,
  did,
  fragment: 'ledger',
});

// Add a controller to the DID
addController({
  payer: keyPair.secretKey,
  did,
  controller,
});

// Remove a controller from the DID
removeController({
  payer: keyPair.secretKey,
  did,
  controller,
});

// Add a service to the DID
addService({
  payer: keyPair.secretKey,
  did,
  service: {
    id: `${did}#${fragment}`,
    type: 'Service',
    serviceEndpoint: `https://service.com/${did}`,
    description: 'Service'
  },
});

// Remove a service from the DID
removeService({
  payer: keyPair.secretKey,
  did,
  fragment,
});
```

## Contributing

Note: Before contributing to this project, please check out the code of conduct and contributing guidelines.

Sol-DID uses [nvm](https://github.com/nvm-sh/nvm) and [yarn](https://yarnpkg.com/)

```shell
nvm i
yarn
```

## Running the tests

### Unit tests

```shell
yarn test
```

### E2E tests

Install Solana locally by following the steps described [here](https://docs.solana.com/cli/install-solana-cli-tools).

In one shell, run:

```shell
yarn build-program
yarn start-validator
```

In another shell:

```shell
yarn test-e2e
```
npm package: @identity.com/sol-did-idl
Description: The official Solana IDL for did:sol
Author: Martin Riedel
Latest version: 3.1.0

# `did:sol` IDL

The [anchor-based](https://github.com/coral-xyz/anchor) auto-generated IDL for the `did:sol` program.

## Program references

This IDL allows for the simple interaction with the `did:sol` on-chain Solana program.

### Deployments

- Mainnet-beta: [didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc](https://explorer.solana.com/address/didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc)
- Devnet: [didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc](https://explorer.solana.com/address/didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc?cluster=devnet)
- Testnet: TODO...

### APR Reference

- `did:sol` program on [APR](https://www.apr.dev/program/didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc)
npm package: @identity.com/solana-gateway-http-client
Description: Client for interacting with OCIV gatekeepers
Author: Kevin Colgan
Latest version: 1.2.1

# Solana Gateway Http Client library

This library provides a client for allowing 
decentralized Apps (dApps) to make use of on-chain identity methods
like gateway token creation, lookup, and revocation.

- [Solana Gateway Http Client library](#solana-gateway-http-client-library)
  - [Usage](#usage)
    - [Installation](#installation)
    - [Import](#import)
  - [Functions/Classes](#functionsclasses)
    - [GatekeeperClient](#gatekeeperclient)
      - [initialisation](#initialisation)
      - [requestGatewayToken](#requestgatewaytoken)
      - [auditGatewayToken](#auditgatewaytoken)
      - [requestAirdrop](#requestairdrop)

## Usage
### Installation
```
yarn add @identity.com/solana-gateway-http-client
```
### Import
```
import { GatekeeperClient, GatekeeperClientConfig, GatekeeperRecord } from '@identity.com/solana-gateway-http-client';
```

## Functions/Classes

### GatekeeperClient
The GatekeeperClient is a class with helper methods to enable communication with a Gatekeeper server.

#### initialisation
The baseUrl of the gatekeeper server must be provided when creating a client instance. Additional headers can be passed in config
that will be added to HTTP requests to the gatekeeper-api:
```
const baseUrl: string = 'http://<gateway url>';
const clientInst = new GatekeeperClient({ baseUrl });
```

#### requestGatewayToken
Requests that a gateway token be created for the given Solana public key. Returns the newly created gateway token as a string.
```
const gatewayToken = await gatekeeperClientInst.requestGatewayToken(walletPublicKey);

const gatewayToken = await gatekeeperClientInst.requestGatewayToken({ walletPublicKey });
```
A gateway token can be requested by providing a Civic presentationRequestId. The gatekeeper server validates that the presentation provided by the user is successful and a token is generated. The presentationRequest created by the DAPP should contain the publicKey address to create the gateway token for.
```
const gatewayToken = await gatekeeperClientInst.requestGatewayToken({ presentationRequestId });
```

#### auditGatewayToken
Requests a GatekeeperRecord for the given gateway token. The requester must have sufficient privileges to access the GatekeeperRecord.
```
const auditGatewayTokenResponse: GatekeeperRecord = await gatekeeperClientInst.auditGatewayToken(token);
```

#### requestAirdrop
Requests an airdrop of test tokens for predefined test market token accounts (defined in the gatekeeper server). Only available in test environments.
```
await gatekeeperClientInst.requestAirdrop(walletPublicKey);
```
npm package: @identity.com/solid-did-client
Description: A typescript client library for registering and resolving DIDs using the SOLID method
Author: dankelleher
Latest version: 0.1.1
Deprecated: This package has been renamed to @identity.com/sol-did-client

# SOLID DID Client

A typescript client library for registering and resolving DIDs using the SOLID method

## Getting Started


### Command line tool

```shell
yarn global add @identity.com/solid-did-client # or npm install -g @identity.com/solid-did-client
solid did:solid:devnet:HxzSJWiK9R4bpRu2YPgg47s2x2D4zT8AK5ziqoQqkzAo
```

### Client library

```js
import { register, resolve } from '@identity.com/solid-did-client';

// generate an X25519 key, eg using 'tweetnacl'
import nacl from 'tweetnacl';

const keyPair = nacl.sign.keyPair();

// register a DID
const identifier = await register({
  payer: keyPair.secretKey,
});

// resolve a DID
const document = await resolve(identifier);

// update a DID
const request = {
  payer: keyPair.secretKey,
  identifier,
  document: {
    service: [{
      description: 'Messaging Service',
      id: `${identifier}#service1`,
      serviceEndpoint: `https://dummmy.dummy/${identifier}`,
      type: 'Messaging',
    }],
  },
};
await update(request);

// deactivate a DID
await deactivate({
  payer: keyPair.secretKey,
  identifier: did,
});
```

## Contributing

Note: Before contributing to this project, please check out the code of conduct
and contributing guidelines.

Solid-DID uses [nvm](https://github.com/nvm-sh/nvm) and [yarn](https://yarnpkg.com/)

```shell
nvm i
yarn
```

## Running the tests

### Unit tests

```shell
yarn test
```

### E2E tests

Install Solana locally by following the steps described [here](https://docs.solana.com/cli/install-solana-cli-tools).

In one shell, run:

```shell
yarn build-program
yarn start-test-validator
```

In another shell:

```shell
yarn test-e2e
```
npm package: @identityinvest/escape-string-regexp
Description: CommonJS version of escape-string-regexp 5.0.0. See https://github.com/mifi/commonify
Author: Sindre Sorhus
Latest version: 5.0.0

# escape-string-regexp

> Escape RegExp special characters

## Install

```
$ npm install escape-string-regexp
```

## Usage

```js
import escapeStringRegexp from 'escape-string-regexp';

const escapedString = escapeStringRegexp('How much $ for a 🦄?');
//=> 'How much \\$ for a 🦄\\?'

new RegExp(escapedString);
```

You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.

---

<div align="center">
	<b>
		<a href="https://tidelift.com/subscription/pkg/npm-escape-string-regexp?utm_source=npm-escape-string-regexp&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
	</b>
	<br>
	<sub>
		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
	</sub>
</div>
npm package: @identityinvest/make-synchronous
Description: CommonJS version of make-synchronous 1.0.0. See https://github.com/mifi/commonify
Author: Sindre Sorhus
Latest version: 1.0.0

# make-synchronous

> Make an asynchronous function synchronous

**This is the wrong tool for most tasks!** Prefer using async APIs whenever possible.

The benefit of this package over packages like [`deasync`](https://github.com/abbr/deasync) is that this one is not a native Node.js addon (which comes with a lot of problems). Instead, this package executes the given function synchronously in a subprocess.

This package works in Node.js only, not the browser.

## Install

```sh
npm install make-synchronous
```

## Usage

```js
import makeSynchronous from 'make-synchronous';

const fn = makeSynchronous(async number => {
	const {default: delay} = await import('delay');

	await delay(100);

	return number * 2;
});

console.log(fn(2));
//=> 4
```

## API

### makeSynchronous(asyncFunction)

Returns a wrapped version of the given async function which executes synchronously. This means no other code will execute (not even async code) until the given async function is done.

The given function is executed in a subprocess, so you cannot use any variables/imports from outside the scope of the function. You can pass in arguments to the function. To import dependencies, use `await import(…)` in the function body.

It uses the V8 serialization API to transfer arguments, return values, errors between the subprocess and the current process. It supports most values, but not functions and symbols.

## Related

- [sleep-synchronously](https://github.com/sindresorhus/sleep-synchronously) - Block the main thread for a given amount of time
npm package: @identityinvest/steno
Description: CommonJS version of steno 4.0.2. See https://github.com/mifi/commonify
Author: Typicode
Latest version: 4.0.2

# Steno [![](http://img.shields.io/npm/dm/steno.svg?style=flat)](https://www.npmjs.org/package/steno) [![Node.js CI](https://github.com/typicode/steno/actions/workflows/node.js.yml/badge.svg)](https://github.com/typicode/steno/actions/workflows/node.js.yml)

> Specialized fast async file writer

**Steno** makes writing to the same file often/concurrently fast and safe.

Used in [lowdb](https://github.com/typicode/lowdb).

_https://en.wikipedia.org/wiki/Stenotype_

## Features

- ⚡ Fast (see benchmark)
- 🐦 Lightweight (~6kb)
- 👍 ⚛️ Safe: No partial writes (writes are atomic)
- 👍 🏁 Safe: No race conditions (writes are ordered even if they're async)

## Usage

```javascript
import { Writer } from 'steno'

// Create a singleton writer
const file = new Writer('file.txt')

// Use it in the rest of your code
async function save() {
  await file.write('some data')
}
```

## Benchmark

`npm run benchmark` (see `src/benchmark.ts`)

```
Write 1KB data to the same file x 1000
  fs     :   62ms
  steno  :    1ms

Write 1MB data to the same file x 1000
  fs     : 2300ms
  steno  :    5ms
```

_Steno uses a smart queue and avoids unnecessary writes._

## License

MIT - [Typicode](https://github.com/typicode)
npm package: @identityinvest/subsume
Description: CommonJS version of subsume 4.0.0. See https://github.com/mifi/commonify
Author: Sindre Sorhus
Latest version: 4.0.0

# subsume

> Embed data in other data and easily extract it when needed

Can for example be useful when you run a child process that has multiple entities writing to stdout and you want to handle those outputs differently. I personally use it in [`run-jxa`](https://github.com/sindresorhus/run-jxa) to allow the code run in that context to use `console.log`, but also allow me to send the result of the execution back through `console.log`.

## Install

```
$ npm install subsume
```

## Usage

```js
import Subsume from 'subsume';

const subsume = new Subsume();

console.log(subsume.id);
//=> '7febcd0b3806fbc48c01d7cea4ed1219'

const text = subsume.compose('🦄');
//=> '@@[7febcd0b3806fbc48c01d7cea4ed1219]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1219]##'

// The text can now be embedded in some other text
const output = `some${text} random text`;
//=> 'some@@[7febcd0b3806fbc48c01d7cea4ed1219]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1219]## random text'

// At a later point we extract it
subsume.parse(output);
//=> {data: '🦄', rest: 'some random text'}

// Or in a different process by using the `id`
const input = 'some@@[7febcd0b3806fbc48c01d7cea4ed1219]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1219]## random text';
Subsume.parse(text, '7febcd0b3806fbc48c01d7cea4ed1219');
//=> {data: '🦄', rest: 'some random text'}
```

## API

### `subsume = new Subsume(id?)`

Returns a new instance.

#### id

Type: `string`\
Default: Unique ID

You probably don't need to set this. Can be useful if you need a stable ID.

### subsume

`Subsume` instance.

#### compose(text)

Type: `Function`

Returns a wrapped version of `text` that you can embed in other content.

#### parse(text)

Type: `Function`

Extract your embedded data from `text`.

Returns an object with properties `.data` for your embedded data and `.rest` for everything else.

#### id

Type: `string`

The used identifier.

#### prefix

Type: `string`

Prefix used in `.compose()`.

#### postfix

Type: `string`

Postfix used in `.compose()`.

#### regex

Type: `RegExp`

Regex used in `.parse()`.

### Subsume.parse(text, id)

Extract embedded data with a specific `id` out of `text`.

Useful when `text` comes from an external source.

### Subsume.parseAll(text, idArray?)

Extract embedded data corresponding to all IDs in `idArray`, if specified. Otherwise it will extract embedded data for all top-level IDs.

Returns an object with properties `.data`, a Map with an entry for each parsed ID, and `.rest` for what remains after all the required IDs have been parsed, as seen below:

The input:

```
some@@[7febcd0b3806fbc48c01d7cea4ed1219]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1219]## random@@[7febcd0b3806fbc48c01d7cea4ed1218]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1218]## text@@[7febcd0b3806fbc48c01d7cea4ed1217]@@🦄##[7febcd0b3806fbc48c01d7cea4ed1217]##
```

Gives the following output:

```js
{
	data: Map {
		'7febcd0b3806fbc48c01d7cea4ed1219' => '🦄',
		'7febcd0b3806fbc48c01d7cea4ed1218' => '🦄',
		'7febcd0b3806fbc48c01d7cea4ed1217' => '🦄'
	},
	rest: 'some random text'
}
```
npm package: @identityinvest/unique-string
Description: CommonJS version of unique-string 3.0.0. See https://github.com/mifi/commonify
Author: Sindre Sorhus
Latest version: 3.0.0

# unique-string

> Generate a unique random string

## Install

```
$ npm install unique-string
```

## Usage

```js
import uniqueString from 'unique-string';

uniqueString();
//=> 'b4de2a49c8ffa3fbee04446f045483b2'
```

## API

### uniqueString()

Returns a 32 character unique string. Matches the length of MD5, which is [unique enough](https://stackoverflow.com/a/2444336/64949) for non-crypto purposes.
npm package: @identitysquare/cookiechimp-segment-wrapper
Description: CookieChimp wrapper for Segment
Author: Daniel Paul
Latest version: 0.0.1

# CookieChimp Segment Wrapper

[![npm package][npm-img]][npm-url]
[![Build Status][build-img]][build-url]
[![Downloads][downloads-img]][downloads-url]
[![Issues][issues-img]][issues-url]
[![Code Coverage][codecov-img]][codecov-url]
[![Commitizen Friendly][commitizen-img]][commitizen-url]
[![Semantic Release][semantic-release-img]][semantic-release-url]


## Install

```bash
npm install @identitysquare/cookiechimp-segment-wrapper
npm install @segment/analytics-next
```

## Usage

```ts
import { withCookieChimpCMP } from '@identitysquare/cookiechimp-segment-wrapper'
import { AnalyticsBrowser } from '@segment/analytics-next'

export const analytics = new AnalyticsBrowser()

withCookieChimpCMP(analytics).load({
  writeKey: '<MY_WRITE_KEY>'
})
```

### Always Load Segment

If Segment is a Required vendor, you can enable it to load in opt-in locations before consent is given while ensuring non-required destinations remain blocked.

```ts
withCookieChimpCMP(analytics, { alwaysLoadSegment: true }).load({
  writeKey: '<MY_WRITE_KEY>'
})
```


[build-img]:https://github.com/IdentitySquare/CookieChimp-Segment-Wrapper/actions/workflows/release.yml/badge.svg
[build-url]:https://github.com/IdentitySquare/CookieChimp-Segment-Wrapper/actions/workflows/release.yml
[downloads-img]:https://img.shields.io/npm/dt/@identitysquare/cookiechimp-segment-wrapper
[downloads-url]:https://www.npmtrends.com/@identitysquare/cookiechimp-segment-wrapper
[npm-img]:https://img.shields.io/npm/v/CookieChimp-Segment-Wrapper
[npm-url]:https://www.npmjs.com/package/@identitysquare/cookiechimp-segment-wrapper
[issues-img]:https://img.shields.io/github/issues/IdentitySquare/CookieChimp-Segment-Wrapper
[issues-url]:https://github.com/IdentitySquare/CookieChimp-Segment-Wrapper/issues
[codecov-img]:https://codecov.io/gh/IdentitySquare/CookieChimp-Segment-Wrapper/branch/main/graph/badge.svg
[codecov-url]:https://codecov.io/gh/IdentitySquare/CookieChimp-Segment-Wrapper
[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release-url]:https://github.com/semantic-release/semantic-release
[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commitizen-url]:http://commitizen.github.io/cz-cli/