open-index/open-npm huggingface dataset:
npm package: @leveraon/common
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.0.
Author: Leveraon Inc
Latest version: 1.0.3

# LvCommon

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.0.

## Code scaffolding

Run `ng generate component component-name --project lv-common` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project lv-common`.
> Note: Don't forget to add `--project lv-common` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build lv-common` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build lv-common`, go to the dist folder `cd dist/lv-common` and run `npm publish`.

## Running unit tests

Run `ng test lv-common` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
npm package: @leveraon/model
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.0.
Author: Leveraon Inc
Latest version: 1.0.0

# LvModel

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.0.

## Code scaffolding

Run `ng generate component component-name --project lv-model` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project lv-model`.
> Note: Don't forget to add `--project lv-model` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build lv-model` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build lv-model`, go to the dist folder `cd dist/lv-model` and run `npm publish`.

## Running unit tests

Run `ng test lv-model` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
npm package: @leverj/adapter
Description: common utilities used in leverj exchange
Author: leverj
Latest version: 4.3.1

# adapter
creates and verifies order signature for gluon plasma 

```bash
npm install @leverj/adapter
```

#### sign and validate order object

##### sign an order

```javascript
const adapter = require('@leverj/adapter/src/OrderAdapter')
const {v,r,s} = adapter.sign(order, pair, secret)
```

##### validate order
 
```javascript
const adapter = require('@leverj/adapter/src/OrderAdapter')
const apiKey = adapter.getSigner(order, pair, {v,r,s})
affirm(apiKey).to.eql(accountApiKey)
```
npm package: @leverj/gluon-plasma.exchange
Description: gluon-plasma off-chain exchange lib
Latest version: 2.0.2

# Exchange

#### description

an essential off-chain part of the LeverJ DEX, the Exchange is about executing trades; the matching of Orders.
the corresponding  domain objects [Match, Fill, Order] are a foundation for many fraud-proofs. 

note: all Orders are signed by the Order's originator (i.e. the trader's api-key private-key.)
npm package: @leverj/gluon-plasma.exchange.derivatives
Description: gluon-plasma off-chain exchange lib
Latest version: 2.0.2

# Exchange

#### description

an essential off-chain part of the LeverJ DEX, the Exchange is about executing trades; the matching of Orders.
the corresponding  domain objects [Match, Fill, Order] are a foundation for many fraud-proofs. 

note: all Orders are signed by the Order's originator (i.e. the trader's api-key private-key.)
npm package: @leverj/leverj-common
Description: common utilities used in leverj exchange
Author: leverj
Latest version: 0.0.18
Deprecated: use instead @leverj/adapter

# leverj-common
common utility features

```bash
npm install leverj-common
```

#### sign and validate order object

##### sign an order

```javascript 1.6
const auth = require('leverj-common/OrderAuthentication')
const {v,r,s} = auth.sign(order, tokenDecimalPlaces, secret)
```

##### validate order
 
```javascript 1.6
const auth = require('leverj-common/OrderAuthentication')
const apiKey = auth.getSigner(order, tokenDecimalPlaces, {v,r,s})
affirm(apiKey).to.eql(accountApiKey)
```
npm package: @leverj/lock.js
Description: lock asynchronous resources.
Latest version: 0.0.3

# lock

lock asynchronous resources.

## Simple Example

``` js
var Lock = require('lock').Lock
var lock = Lock()

lock('key', function (release) { //called when resource is available.

  //do an async operation, and wrap the callback with release.
  someAsyncOperation(args,..., release(function (err) {
    //'key' is now unlocked!
  })
})
```

## Multiple Locks at Once.

``` js
var Lock = require('lock').Lock
var lock = Lock()

lock(['A', 'B', 'C'], function (release) { //called, when ALL
                                           //resources are available.

  //do an async operation, and wrap the callback with release(cb)
  someAsyncOperation(args,..., release(function (err) {
    //A, B & C are now unlocked!
  })
})
```

## Lock with optional callback.

``` js
var Lock = require('lock').Lock
var lock = Lock()

lock('cache', function(release) { //called when no one is writing to cache
	//we do not care if this fails since its a cache so no callback needed
	fs.writeFile(fileCache, ... , release())
})
```

used in [level-update](https://github.com/dominictarr/level-update)

## promisified Lock
```javascript
const {AsyncLock}   = require('lock')
const lock = AsyncLock()
lock(['A', 'B', 'C'], function(){
    //do an async operation
    return someAsyncOperation(args)
    
}).then(function(result){
  //A, B & C are now unlocked!
}).catch(function(e){ 
// error thrown by someAsyncOperation(args) 
})
```
## License

MIT
npm package: @leverj/microtime.js
Description: Utility to convert microtime into second, minute, etc
Author: leverj
Latest version: 4.3.1

# microtime.js

# Convert between micro, milli, second, minutes

## Usage

```javascript
var time = require('microtime.js')
var now = time.micro()
var nowMilli = Date.now()

console.log(now) 
```

```
1462394459286762
```

```javascript
console.log(time.microToMilli(now))
console.log(time.microToMin(now))
console.log(time.milliToMicro(nowMilli))
console.log(time.secToMicro(time.microToSec(now)))
// ... and so on
```
## unix timestamp 30 sec into future
```javascript
console.log(time.secondsAfterNow(30))
```
npm package: @leverj/test-utils
Description: convenient methods for testing 
Author: leverj
Latest version: 4.3.1

# test-utils
convenient methods for testing 

## install
```bash
npm install --save-dev @leverj/test-utils
```

## Usage

```javascript
  const expect  = require('expect.js');
  const testUtil = require('@leverj/test-utils'); 
  //tests only 0 and 5th test from the list of tests. rest of them should be ignored
  [0,1,2,3,4,5].forEach(function (test, index) {
    testUtil.run([0,5], index)(index + ": should be even number", function () {
      expect(test%2 === 0).to.be.ok();
    })
  })
```
npm package: @leverj/tradehelper
Description: "Utilities and functions to help create, cancel, and update orders"
Author: LEVERJ
Latest version: 0.0.1

## What is tradehelper ?
The `tradehelper` module contains a very small set of utilities and functions to help create, cancel, and update orders on the [LEVERJ](https://leverj.io/) exchange.

## Examples and Usage Guidelines

Available as a part of the [API documentation](https://leverj.github.io/api/).


Its sample code that is provided as-is under MIT license without any warranty of any kind, express or implied.