open-index/open-npm huggingface dataset:
npm package: @seal-security/ip
Description: [![](https://badge.fury.io/js/ip.svg)](https://www.npmjs.com/package/ip)
Author: Fedor Indutny
Latest version: 2.0.0-sp-1

# IP  
[![](https://badge.fury.io/js/ip.svg)](https://www.npmjs.com/package/ip)  

IP address utilities for node.js

## Installation

###  npm
```shell
npm install ip
```

### git

```shell
git clone https://github.com/indutny/node-ip.git
```
  
## Usage
Get your ip address, compare ip addresses, validate ip addresses, etc.

```js
var ip = require('ip');

ip.address() // my ip address
ip.isEqual('::1', '::0:1'); // true
ip.toBuffer('127.0.0.1') // Buffer([127, 0, 0, 1])
ip.toString(new Buffer([127, 0, 0, 1])) // 127.0.0.1
ip.fromPrefixLen(24) // 255.255.255.0
ip.mask('192.168.1.134', '255.255.255.0') // 192.168.1.0
ip.cidr('192.168.1.134/26') // 192.168.1.128
ip.not('255.255.255.0') // 0.0.0.255
ip.or('192.168.1.134', '0.0.0.255') // 192.168.1.255
ip.isPrivate('127.0.0.1') // true
ip.isV4Format('127.0.0.1'); // true
ip.isV6Format('::ffff:127.0.0.1'); // true

// operate on buffers in-place
var buf = new Buffer(128);
var offset = 64;
ip.toBuffer('127.0.0.1', buf, offset);  // [127, 0, 0, 1] at offset 64
ip.toString(buf, offset, 4);            // '127.0.0.1'

// subnet information
ip.subnet('192.168.1.134', '255.255.255.192')
// { networkAddress: '192.168.1.128',
//   firstAddress: '192.168.1.129',
//   lastAddress: '192.168.1.190',
//   broadcastAddress: '192.168.1.191',
//   subnetMask: '255.255.255.192',
//   subnetMaskLength: 26,
//   numHosts: 62,
//   length: 64,
//   contains: function(addr){...} }
ip.cidrSubnet('192.168.1.134/26')
// Same as previous.

// range checking
ip.cidrSubnet('192.168.1.134/26').contains('192.168.1.190') // true


// ipv4 long conversion
ip.toLong('127.0.0.1'); // 2130706433
ip.fromLong(2130706433); // '127.0.0.1'
```

### License

This software is licensed under the MIT License.

Copyright Fedor Indutny, 2012.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @seal.run/plate-indent-list
Description: Indent list plugin for Plate
Latest version: 44.0.1

# Plate indent list plugin

This package implements the indent list plugin for Plate.
It's a mix of indent and list plugins, also called as a "flat list"
because the list structure has no children.

## Documentation

Check out [Indent List](https://platejs.org/docs/indent-list).

## License

[MIT](../../LICENSE)
npm package: @seald-io/react-native-turbo-fs
Description: React-Native Turbo-module for fast FS operations with native ArrayBuffer support 
Author: Seald SAS
Latest version: 0.1.0-beta.0

# @seald-io/react-native-turbo-fs

React-Native Turbo-module for fast FS operations with native ArrayBuffer support

~20x faster for Append and ~49x faster for Read than [react-native-fs](https://www.npmjs.com/package/react-native-fs) on a Nexus 5X, because it avoids having to Base64 / Unbase64 the data back and forth.

Try the benchmarks under [example](./example).

| iPhone                                            | Android                                            |
| ------------------------------------------------- | -------------------------------------------------- |
| ![iPhone](./docs/iphone-15-pro-max-simulator.png) | ![Android](./docs/android.png) |

## Installation

```sh
npm install -S @seald-io/react-native-turbo-fs
```

## Usage

```js
import { read, append } from '@seald-io/react-native-turbo-fs'

const buffer = read('my-file-path', 512*1024, 0);

append('my-other-file', buffer);
```

## Methods

#### `read(filePath: string, size: number, position: number): ArrayBuffer`

Reads a chunk of size `size` from the file at `filePath`, starting from position `position`.

Returns an ArrayBuffer of the data read.

If the file is not long enough, it returns an ArrayBuffer of length of what was actually read.

If there is nothing to read at that position, it returns an ArrayBuffer of length 0.

#### `append(filePath: string, data: ArrayBuffer): void`

Appends the given data to the end of the file at `filePath`.

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT by Seald SAS, based on the template of react-native-quick-base64 by Takuya Matsuyama
npm package: @sealdon/imagemin-lint-staged
Description: imagemin CLI designed for lint-staged usage with sensible defaults
Latest version: 1.0.0

# imagemin-lint-staged
> imagemin CLI designed for lint-staged usage with sensible defaults

[![Version][npm-image]][npm-url] [![Travis CI][travis-image]][travis-url] [![Quality][codeclimate-maintainability-image]][codeclimate-maintainability-url] [![Coverage][codeclimate-c-image]][codeclimate-c-url] [![Dependencies][gemnasium-image]][gemnasium-url] [![Gitter][gitter-image]][gitter-url]


## Installation

```sh
npm i --save-dev imagemin-lint-staged
```

## Usage

Use in conjuntion with [lint-staged][lint-staged]. In your `package.json`

```json
  "lint-staged": {
    "*.{png,jpeg,jpg,gif,svg}": ["imagemin-lint-staged", "git add"]
  },
```


## Options

N/A


## Contributing

[![devDependency Status][david-dm-image]][david-dm-url]

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


[lint-staged]: https://github.com/okonet/lint-staged
[npm-image]: https://img.shields.io/npm/v/imagemin-lint-staged.svg?style=flat-square
[npm-url]: https://www.npmjs.org/package/imagemin-lint-staged

[travis-image]: https://img.shields.io/travis/tomchentw/imagemin-lint-staged.svg?style=flat-square
[travis-url]: https://travis-ci.org/tomchentw/imagemin-lint-staged
[codeclimate-maintainability-image]: https://img.shields.io/codeclimate/maintainability/tomchentw/imagemin-lint-staged.svg?style=flat-square
[codeclimate-maintainability-url]: https://codeclimate.com/github/tomchentw/imagemin-lint-staged
[codeclimate-c-image]: https://img.shields.io/codeclimate/c/tomchentw/imagemin-lint-staged.svg?style=flat-square
[codeclimate-c-url]: https://codeclimate.com/github/tomchentw/imagemin-lint-staged
[gemnasium-image]: https://img.shields.io/gemnasium/tomchentw/imagemin-lint-staged.svg?style=flat-square
[gemnasium-url]: https://gemnasium.com/tomchentw/imagemin-lint-staged
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
[gitter-url]: https://gitter.im/tomchentw/imagemin-lint-staged?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[david-dm-image]: https://img.shields.io/david/dev/tomchentw/imagemin-lint-staged.svg?style=flat-square
[david-dm-url]: https://david-dm.org/tomchentw/imagemin-lint-staged#info=devDependencies
npm package: @sealedair/styles
Description: Twitter Bootstrap project that works for any Sealed Air Digital project to give the same look and feel
Author: Sealed Air Corporation
Latest version: 1.1.1

# One Package, All the Styles

### Installing
1. run `npm install @sealedair/styles` or `yarn install @sealedair/styles`


### Usage
1. Include the sealedair.css file in your angular-cli.json file
```angular2html
"styles": [
   "../node_modules/@sealedair/styles/dist/css/sealedair.css"
]
```
npm package: @sealingp/tesla-vin
Description: Tesla Vehicle Identification Number (VIN) decoder fork with updates and maintenance
Author: SealinGp
Latest version: 1.1.1

# @sealingp/tesla-vin

![Last version](https://img.shields.io/github/tag/SealinGp/tesla-vin.svg?style=flat-square)
[![Coverage Status](https://img.shields.io/coveralls/SealinGp/tesla-vin.svg?style=flat-square)](https://coveralls.io/github/SealinGp/tesla-vin)
[![NPM Status](https://img.shields.io/npm/dm/@sealingp/tesla-vin.svg?style=flat-square)](https://www.npmjs.org/package/@sealingp/tesla-vin)

> Tesla Vehicle Identification Number (VIN) decoder fork with updates and maintenance. This is a maintained fork of the original [tesla-vin](https://github.com/teslahunt/tesla-vin) project.

## Install

```bash
$ npm install @sealingp/tesla-vin --save
```

## Usage

```js
const teslaVIN = require('@sealingp/tesla-vin')

const vinDecoded = teslaVIN('5YJ3F7EA2LF656311')

console.log(vinDecoded)
// {
//   bateryType: 'Nickel Manganese Cobalt (NMC)',
//   bodyType: 'Sedan 4 DR / RHD',
//   model: 'Tesla Model 3',
//   motor: 'Single Motor Standard (3DU 800A)',
//   photos: [
//     'https://cdn.jsdelivr.net/gh/SealinGp/tesla-vin@master/images/3/1.jpeg',
//     'https://cdn.jsdelivr.net/gh/SealinGp/tesla-vin@master/images/3/2.jpeg',
//     'https://cdn.jsdelivr.net/gh/SealinGp/tesla-vin@master/images/3/3.jpeg',
//     'https://cdn.jsdelivr.net/gh/SealinGp/tesla-vin@master/images/3/4.jpeg',
//     'https://cdn.jsdelivr.net/gh/SealinGp/tesla-vin@master/images/3/5.jpeg',
//   ],
//   plantOfManufacture: 'Tesla Fremont, California (USA)',
//   restraintSystems: 'Type 2 Manual seatbelts (FR, SR*3) with front Airbags, side Inflatable restraints',
//   sequenceNumber: 656311,
//   worldManufacturingIdentifier: 'Fremont, California',
//   year: 2020,
// }
```

## Why this fork?

This fork was created to maintain and update the original tesla-vin package which is no longer actively maintained. Updates include:
- Regular maintenance and bug fixes
- Support for newer Tesla models and VIN patterns
- Updated dependencies
- Improved documentation

## License

**@sealingp/tesla-vin** © [SealinGp](https://github.com/SealinGp), forked from [Tesla Hunt](https://teslahunt.io), released under the [MIT](https://github.com/SealinGp/tesla-vin/blob/master/LICENSE.md) License.<br>
Maintained by [SealinGp](https://github.com/SealinGp) with contributions from [Leo Zhang](https://github.com/SealinGp).

> GitHub [@SealinGp](https://github.com/SealinGp)
npm package: @sealink/ckeditor-tags-plugin
Description: Provides an UI to select an item from a pre-configured list of items
Author: John Mortlock
Latest version: 0.2.2

[![npm version](https://badge.fury.io/js/%40sealink%2Fckeditor-tags-plugin.svg)](https://badge.fury.io/js/%40sealink%2Fckeditor-tags-plugin)
[![Coverage Status](https://coveralls.io/repos/github/sealink/ckeditor-tags-plugin/badge.svg?branch=master)](https://coveralls.io/github/sealink/ckeditor-tags-plugin?branch=master)
[![Build Status](https://travis-ci.org/sealink/ckeditor-tags-plugin.svg?branch=master)](https://travis-ci.org/sealink/ckeditor-tags-plugin)

## ckeditor-liquidtag-plugin

Allows the user to select from a pre-defined list of records and have
it inserted into the editor at the current selection location.

### How to Install?

`npm -i ckeditor-tags-plugin --save`

### Configuration

```
CKEDITOR.config.extraPlugins: 'tags'
CKEDITOR.config.tags: {
  'label': 'Tags',
  'items': []
}
```

Items have the format

```
[
  ["Item 1", "Value 1"],
  ["Item 2", "Value 2"],
]
```

### Deployment

Build / Deployment is handled via travis CI.
Package management is via NPM.

First create the release branch

```
git branch release/0.3.0
```

Second Update package.json and specify the version you are releasing

Next Tag and push to travis

```
git tag v0.3.0
git push origin master --tags
```
npm package: @sealink/modern-formik-fields
Description: A set of components that can be passed to Formik to create useful custom fields.
Author: Stefan Cooper
Latest version: 1.3.1

[![npm version](https://badge.fury.io/js/%40sealink%2Fmodern-formik-fields.svg)](https://badge.fury.io/js/%40sealink%2Fmodern-formik-fields)
[![Build Status](https://github.com/sealink/modern-formik-fields/workflows/Build%20and%20Test/badge.svg?branch=master)](https://github.com/sealink/modern-formik-fields/actions)

### WHY

A set of components that can be passed to Formik to create useful custom fields.

### Deployment

Build / Deployment is handled via Github actions.
Package management is via NPM.

First create the release branch

```
git branch release/0.1.x
```

Second Update package.json and specify the version you are releasing

Next Tag and push to github

```
git tag v0.1.0
git push origin master --tags
```

Remember to merge changes back to the master branch
npm package: @sealink/money_beans
Description: Create JS money objects from strings, integers or floats
Author: Jack McNicol
Latest version: 1.8.2

# Money

Create JS money objects from strings, integers or floats

[![Build Status](https://github.com/sealink/money_beans/workflows/Build%20and%20Test/badge.svg?branch=master)](https://github.com/sealink/money_beans/actions)

## Get started

```coffee
Money = require('money')

new Money()
# returns => Object {cents: 0}

new Money('12.2')
# returns => Object {cents: 1220}

new Money(195)
# returns => Object {cents: 19500}

```

## Render

```coffee
Money = require('money')
price = new Money(10)

price.format()
# returns = '10.00'

price.render()
# returns => "<span class='money positive'>$10.00</span>"

```

## Operations

```coffee
Money = require('money')

## Multiply

productPrice = new Money('49.95')
quantity = 3
subTotal = productPrice.multiply(quantity)
# returns => Object {cents: 14985}

## Addition

shipping = new Money('20')
total = subTotal.add(shipping)
# returns => Object {cents: 16985}

## Subtraction

discount = new Money('10')
finalTotal = total.subtract(discount)
# returns => Object {cents: 15985}

```

### Deployment

Build / Deployment is handled via travis CI.
Package management is via NPM.

First create the release branch

```
git branch release/0.3.0
```

Second Update package.json and specify the version you are releasing

Next Tag and push to github

```
git tag v0.3.0
git push origin master --tags
```

Remember to merge changes back to the master branch
npm package: @sealink/printers_qt
Description: Quicktravel Printing Integration
Author: John Mortlock
Latest version: 1.15.0

[![npm version](https://badge.fury.io/js/%40sealink%2Fprinters_qt.svg)](https://badge.fury.io/js/%40sealink%2Fprinters_qt)
[![Coverage Status](https://coveralls.io/repos/github/sealink/printers_qt/badge.svg?branch=master)](https://coveralls.io/github/sealink/printers_qt?branch=master)
[![Build Status](https://github.com/sealink/printers_qt/workflows/Build%20and%20Test/badge.svg?branch=master)](https://github.com/sealink/printers_qt/actions)

### Why

Provides a wrapper api which hides the underlying printing services in QuickTravel.
If required you can also manually invoke the underlying API service.

### PrintService (Recommended API)

QuickTravel API endpoints require a CSRF token you must provide as a constructor option.

```
const config = {
  quicktravel: {
    host: 'hostName',
    bearerToken: 'bearerToken'
  },
  config: {
    host: 'hostName',
    bearerToken: 'bearerToken'
  }
}

const service = new PrintService(config)
```

- printTickets
- issueTickets
- voidTickets
- printReservations
- reprintTickets
- voidTickets
- printReceipt

### QuickTravel

- voidTickets
- reprintTickets
- printReceipt
- issueAndPrint
- issueTickets

### QuickPrint

- print-tickets

### Printers Config

- listPrintGroups
- listPrintGroupsPrinters

### Deployment

Build / Deployment is handled via travis CI.
Package management is via NPM.

First create the release branch

```
git branch release/0.3.0
```

Second Update package.json and specify the version you are releasing

Next Tag and push to travis

```
git tag v0.3.0
git push origin master --tags
```

Remember to merge changes back to the master branch
npm package: @seallabs/utils-ts
Description: ## Installation
Author: Seal Labs
Latest version: 1.0.1

# Seal Labs TypeScript Utils

## Installation

```bash
npm i @seallabs/utils-ts
```

or

```bash
yarn add @seallabs/utils-ts
```

## License

Seal Labs TypeScript Utils released under the MIT license. See the
[LICENSE](./LICENSE) file for details.
npm package: @sealsc/polkadot-wrapper
Description: ### Overview
Latest version: 0.1.4

# polkadot-wrapper

### Overview

provide unified interface conformed by our [protocol](https://github.com/SealSC/multi-chain-js/tree/main/protocol) to support Polkadot interaction.

### Install

```
yarn add @sealsc/polkadot-wrapper
```
 or 
```
npm install @sealsc/polkadot-wrapper
```    

### Document

**[polkadot-wrapper](https://multi-chain-js-doc.seor.io/en/polkadot/)**
npm package: @sealsc/solana-wrapper
Description: ### Overview
Latest version: 0.1.1

# polkadot-wrapper

### Overview

provide unified interface conformed by our [protocol](https://github.com/SealSC/multi-chain-js/tree/main/protocol) to support Solana interaction.

### Install

```
yarn add @sealsc/solana-wrapper
```
 or 
```
npm install @sealsc/solana-wrapper
```    

### Document

**[solana-wrapper](https://multi-chain-js-doc.seor.io/en/solana/Actions/)**
npm package: @sealsc/tronweb-wrapper
Description: ### Overview
Latest version: 0.1.4

# tronweb-wrapper

### Overview

provide unified interface conformed by our [protocol](https://github.com/SealSC/multi-chain-js/tree/main/protocol) to support Tron interaction.

### Install

```
yarn add @sealsc/tronweb-wrapper
```
 or 
```
npm install @sealsc/tronweb-wrapper
```    


### Testing
We are using [karma](http://karma-runner.github.io/6.3/intro/configuration.html) & [mocha](https://mochajs.org/) testing @sealsc/tronweb-wrapper SDK .
Tron network of this testing used will be dependence on TronLink extension wallet.  
This test will interact with the TronLink extension wallet in the browser, please pay attention to the pop-up window in the browser.  

#### dependencies
node.js v12+   
karma v4.1.0   
mocha v6.1.4  
[TronLink](https://chrome.google.com/webstore/detail/tronlink%EF%BC%88%E6%B3%A2%E5%AE%9D%E9%92%B1%E5%8C%85%EF%BC%89/ibnejdfjmmkpcnlpebklmnkoeoihofec)    

#### testing

```
git clone https://github.com/SealSC/multi-chain-js.git

cd multi-chain-js

cd ./tronweb-wrapper

yarn run test

```  

Using yarn run test we provided to run all test
```
yarn run test
```
Please make sure that the [TronLink](https://chrome.google.com/webstore/detail/tronlink%EF%BC%88%E6%B3%A2%E5%AE%9D%E9%92%B1%E5%8C%85%EF%BC%89/ibnejdfjmmkpcnlpebklmnkoeoihofec) extension wallet is installed in your browser.   

Open http://localhost:9876/ in a browser with a wallet environment,and perform the test process on the TRON shasta test network.

**Note**: yarn run test will try to open the test report with your chrome browser.



### Document

**[tronweb-wrapper](https://multi-chain-js-doc.seor.io/en/tronWeb/)**
npm package: @sealsc/web-extension-cyano
Description: Cyano extension wrapper which conform Seal-SC web extension protocol.
Author: Seal SC
Latest version: 0.1.1

# sealsc-web-extension-cyano
  Cyano extension wrapper which conform Seal-SC web extension protocol.

### Installation  
```
npm install @sealsc/web-extension-cyano
```

### Import as ES6 module
```javascript
import "@sealsc/web-extension-cyano"
```

### Use in browser
```html
<script src="./dist/sealsc-web-extension-cyano.min.js"></script>
```

### Documentation
[Seal SC web extension cyano](https://sealsc.github.io/documents/en/web-extensions/cyano/)

### License
The source is made available under the MIT license.
npm package: @sealsc/web-extension-metamask
Description: MetaMask extension wrapper which conform Seal-SC web extension protocol.
Author: Seal SC
Latest version: 0.1.7

# sealsc-web-extension-metamask
  MetaMask extension wrapper which conform Seal-SC web extension protocol.

### Installation  
```
npm install @sealsc/web-extension-metamask
```

### Import as ES6 module
```javascript
import "@sealsc/web-extension-metamask"
```

### Use in browser
```html
<script src="./dist/sealsc-web-extension-metamask.min.js"></script>
```

### Documentation
[Seal SC web extension metamask](https://sealsc.github.io/documents/en/web-extensions/metamask/)

### License
The source is made available under the MIT license.
npm package: @sealsc/web-extension-protocol
Description: Uniform blockchain web extension interface protocol.
Author: Seal SC
Latest version: 0.1.2

# sealsc-web-extension-protocol
Basic definitions and tools for Seal-SC web extension protocol.  
This protocol allow developers use a uniform interface sets to access and invoke different web extension for different blockchain, such as MetaMask, Scatter and so on.  

### Installation  
```
npm install @sealsc/web-extension-protocol
```

### Import as ES6 module
```javascript
import "@sealsc/web-extension-protocol"
```

### Use in browser
```html
<script src="./dist/sealsc-web-extension-protocol.min.js"></script>
```

### Documentation
[Seal SC web extension protocol](https://sealsc.github.io/documents/en/web-extensions/protocol/)

### License
The source is made available under the MIT license.
npm package: @sealsc/web-extension-proxy
Description: Web extension proxy of Seal SC web extension.
Author: Seal SC
Latest version: 0.1.3

# sealsc-web-extension-proxy
  Proxy for the blockchain web extensions, such as MetaMask, Scatter and so on.  
  This proxy can load extensions which conform to Seal-SC web extension protocol.

### Installation  
```
npm install @sealsc/web-extension-proxy
```

### Import as ES6 module
```javascript
import "@sealsc/web-extension-proxy"
```

### Use in browser
```html
<script src="./dist/sealsc-web-extension-proxy.min.js"></script>
```

### Documentation
[Seal SC web extension proxy](https://sealsc.github.io/documents/en/web-extensions/proxy/)

### License
The source is made available under the MIT license.
npm package: @sealsc/web-extension-scatter
Description: Scatter extension wrapper which conform Seal-SC web extension protocol.
Author: Seal SC
Latest version: 0.1.3

# sealsc-web-extension-scatter
  Scatter extension wrapper which conform Seal-SC web extension protocol.  

### Installation  
```
npm install @sealsc/web-extension-scatter
```

### Import as ES6 module
```javascript
import "@sealsc/web-extension-scatter"
```

### Use in browser
```html
<script src="./dist/sealsc-web-extension-scatter.min.js"></script>
```

### Documentation
[Seal SC web extension scatter](https://sealsc.github.io/documents/en/web-extensions/scatter/)

### License
The source is made available under the MIT license.
npm package: @sealsc/web-extension-tronweb
Description: Tronweb extension wrapper which conform Seal-SC web extension protocol.
Author: Seal SC
Latest version: 0.1.0

# sealsc-web-extension-tronweb
  Tronweb extension wrapper which conform Seal-SC web extension protocol.  

### Installation  
```
npm install @sealsc/web-extension-tronweb
```

### Import as ES6 module
```javascript
import "@sealsc/web-extension-tronweb"
```

### Use in browser
```html
<script src="./dist/sealsc-web-extension-tronweb.min.js"></script>
```

### Documentation
Coming soon.

### License
The source is made available under the MIT license.
npm package: @sealsc/web3-wrapper
Description: ### Overview
Latest version: 0.1.6

# web3-wrapper

### Overview

provide unified interface conformed by our [protocol](https://github.com/SealSC/multi-chain-js/tree/main/protocol) to support EVM compatible chain interaction.

### Install

```
yarn add @sealsc/web3-wrapper
```
 or 
```
npm install @sealsc/web3-wrapper
```    

### Testing
We are using [karma](http://karma-runner.github.io/6.3/intro/configuration.html) & [mocha](https://mochajs.org/) testing @sealsc/web3-wrapper SDK .

#### dependencies
node.js v12+   
karma v4.1.0   
mocha v6.1.4   

#### testing

Clone the project and checkout the web3-wrapper branch

```
git clone https://github.com/SealSC/multi-chain-js.git

cd multi-chain-js

git checkout web3-wrapper

cd ./web3-wrapper

yarn run test

```  

Using yarn run test we provided to run all test
```
yarn run test
```
Open http://localhost:9876/ in a browser with a wallet environment to execute the test process.  

**Note**: yarn run test will try to open the test report with your chrome browser.

### Document

**[web3-wrapper](https://multi-chain-js-doc.seor.io/en/web3/)**
npm package: @sealsystems/assert-mongo-error
Description: Throws on a servere mongodb error.
Author: SEAL Systems AG
Latest version: 2.0.2

# @sealsystems/assert-mongo-error


Test for a servere mongodb error and handle it by exiting the process, throwing a new generated `@sealsystems/error` error object or just ignore the error.

Default list of severe mongodb error codes to exit:

| Name | Code |
|---|---|
| InternalError |1|
| HostUnreachable |6|
| HostNotFound |7|
| NetworkTimeout | 89 |
| SocketException | 9001 |
| UnknownError |8|
| ProtocolError | 17 |
| IllegalOpMsgFlag | 223 |
| UserNotFound |11|
| Unauthorized |13|
| AuthenticationFailed | 18 |
| InvalidSSLConfiguration | 140 |
| SSLHandshakeFailed | 141 |
| OutOfDiskSpace | 14031 |

## Installation

```bash
$ npm install @sealsystems/assert-mongo-error
```

## Quick start

First you need to add a reference to @sealsystems/assert-mongo-error within your application, then call the `assert` function in the callback of every mongodb call.

```javascript
const assertMongoError = require('@sealsystems/assert-mongo-error');

yourCollection.find({}, (findError, cursor) => {
  assertMongoError.assert(findError);
  ...
});
```

## Assert Error

Test for a servere mongodb error. The function has three outcomes:

- In case of a severe mongodb error exit the process
- Without any of the optional parameters the mongodb error is ignored and the function returns.
- If at least an error message is given as second parameter it throws a new created error of type `@sealsystems/error`. The original mongodb error is chained to the new error.

```javascript
assertMongoError.assert(error, message, code, metadata);
```

Parameters:
```
error      object  mandatory  The error object to test
message    string  optional   Message used for creating a new error object
code       number  optional   Code used for creating a new error object
metadata   object  optional   Metadata used for creating a new error object
```

## Set list of error codes

Use the `setCodes` function to set a new list of error codes. This needs to be done only once, e.g. at startup. The new list is available instantly throughout the whole node process.

```javascript
const assertMongoError = require('@sealsystems/assert-mongo-error');

assertMongoError.setCodes([1,2,3]);
...
assertMongoError.assert(mongoErrorObject);
```

## Running the build

To build this module use [roboter](https://www.npmjs.com/package/roboter).

```bash
$ bot
```
npm package: @sealsystems/connect-service
Description: Connects to a service.
Author: SEAL Systems AG
Latest version: 3.2.4

# @sealsystems/connect-service


Connects to a service with given host name and port number.

## Installation

```bash
$ npm install @sealsystems/connect-service
```

## Quick start

First you need to add a reference to @sealsystems/connect-service within your application.

```javascript
const connectService = require('@sealsystems/connect-service');
```

**Please note:** A connection to consul must already exist before you can use the module.

To create a HTTP/HTTPS connection to an instance of a service (e.g. `myService`), use:

```javascript
const consul = require('@sealsystems/consul');
consul.connect(...);

const client = await connectService({
  service: 'myService',
  path: '/job',
  consul
}, {
  name: 'hostname',
  port: 3000
});

client.on('response', (response) => {
  console.log(`Response status: ${response.statusCode}`);
});

client.write('Hello service!');
client.end();
```

The first parameter is an `options` object that can contain the following properties:

| property  | type            | description                         |
|-----------|-----------------|-------------------------------------|
| service   | required string | Name of the service to access       |
| consul    | required object | Initialized instance of node-consul |
| headers   | optional object | Additional HTTP/HTTPS headers       |
| method    | optional string | HTTP/HTTPS method, default `POST`   |
| path      | optional string | URL-path to access, default `/`     |

Here is an example of a more complete `options` object:

```javascript
const options = {
  headers: {
    'content-type': 'application/json'
  },
  method: 'POST',
  path: '/url/path',
  service: 'myService',
  consul
};
```

Second parameter is the host name and port number. Example:

```javascript
const host = {
  name: 'hostname',
  port: 3000
};
```

The return value `client` contains a [http.ClientRequest](https://nodejs.org/api/http.html#http_class_http_clientrequest) object for further use.

## HTTP and HTTPS

The protocol used for a connection depends on the target (local or remote) and the value of the environment variable TLS_UNPROTECTED. The TLS certificates provided by `@sealsystems/tlscert` will be used for HTTPS connections. It is not possible to override the chosen protocol.

## Running the build

To build this module use [roboter](https://www.npmjs.com/package/roboter).

```bash
$ bot
```
npm package: @sealsystems/counter-storage
Description: @sealsystems/counter-storage manages handling of counters persisted in a MongoDB
Author: SEAL Systems AG
Latest version: 0.0.8

# @sealsystems/counter-storage

[![CircleCI](https://circleci.com/gh/sealsystems/node-counter-storage.svg?style=svg)](https://circleci.com/gh/sealsystems/node-counter-storage)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/5fgoemta2sv4p3ye?svg=true)](https://ci.appveyor.com/project/Plossys/node-counter-storage)

@sealsystems/counter-storage manages handling of counters persisted in a MongoDB.

## Installation

```shell
$ npm install @sealsystems/counter-storage
```

## Quick start

First you need to add a reference to @sealsystems/counter-storage within your application:

```javascript
const counterStorage = require('@sealsystems/counter-storage');
```

Then you can connect to a MongoDB. For that call the `connect` function and provide the database's connection string using the `url` property:

```javascript
const storage = await counterStorage.connect({
  url: 'mongodb://localhost:27017'
});
```

Optionally, you may also specify the number of connection retries:

```javascript
const storage = await counterStorage.connect({
  url: 'mongodb://localhost:27017',
  connectionRetries: 10
});
```

## Get next counter value

To get the next counter value call the `getCounter` function and provide its name. Optionally you can provide the increment as second argument, default increment is `1`:

```javascript
const newCounterValue = await storage.getCounter('hugo');
```

With increment:

```javascript
const newCounterValue = await storage.getCounter('hugo', 100);
```

## Running the build

To build this module use [roboter](https://www.npmjs.com/package/roboter).

```shell
$ bot
```
npm package: @sealsystems/countingstream
Description: @sealsystems/countingstream counts the stream length in bytes.
Author: SEAL Systems AG
Latest version: 1.3.4

# @sealsystems/countingstream

[![CircleCI](https://circleci.com/gh/sealsystems/node-countingstream.svg?style=svg)](https://circleci.com/gh/sealsystems/node-countingstream)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/b87tp7eg07rn4jpv?svg=true)](https://ci.appveyor.com/project/Plossys/node-countingstream)

@sealsystems/countingstream counts the stream length in bytes.

## Installation

```bash
$ npm install @sealsystems/countingstream
```

## Quick start

First you need to add a reference to @sealsystems/countingstream within your application.

```javascript
const CountingStream = require('@sealsystems/countingstream');
```

Then, call the constructor function.

```javascript
const countingstream = new CountingStream();
```

CountingStream is derived from the Transform stream and can be used like any such stream. To get the number of bytes piped through, call:

```javascript
const numberOfStreamedBytes = countingstream.getCount(); // -> returns the number of bytes streamed so far
```

You can reset the counter any time.

```javascript
countingstream.resetCount();
```

It is also possible to set the counter to an arbitrary value.

```javascript
countingstream.resetCount(42);
countingstream.getCount(); // -> returns 42
```

## Running the build

To build this module use [roboter](https://www.npmjs.com/package/roboter).

```bash
$ bot
```
npm package: @sealsystems/determine-executable-version
Description: [![CircleCI](https://circleci.com/gh/sealsystems/node-determine-executable-version.svg?style=svg)](https://circleci.com/gh/sealsystems/node-determine-executable-version)
Author: SEAL Systems AG
Latest version: 1.3.5

# @sealsystems/determine-executable-version
[![CircleCI](https://circleci.com/gh/sealsystems/node-determine-executable-version.svg?style=svg)](https://circleci.com/gh/sealsystems/node-determine-executable-version)

Calls an executable and returns the version information it writes to stdout.

# Installation

```bash
$ npm install seal-determine-executable-version
```

# Usage

```javascript
const determineExecutableVersion = require('seal-determine-executable-version');
const options = {
  exeFile: '/bin/bash',
  maxBytes: 128,
  exeArguments: ['--version']
  };

const versionString = await determineExecutableVersion(options);


```

Parameters:

- ```exeFile``` The full path to the executable file whose version shall be determined. Required option.
- ```maxBytes``` The maximum number of bytes to return from the output; output which is longer is truncated. Default: ```128```
- ```exeArguments``` The argument list to call the executable file with. Default: ```['--version']```
npm package: @sealsystems/droddel
Description: Serialize asynchronous calls
Author: SEAL Systems AG
Latest version: 2.2.4

# @sealsystems/droddel

[![CircleCI](https://circleci.com/gh/sealsystems/node-droddel.svg?style=svg)](https://circleci.com/gh/sealsystems/node-droddel)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/v61t9v04d4q32oo4?svg=true)](https://ci.appveyor.com/project/Plossys/node-droddel)

Serialize asynchronous calls.

## Installation

```bash
$ npm install @sealsystems/droddel
```

## Quick start

First you need to add a reference to seal-droddel within your application.

```javascript
const droddel = require('@sealsystems/droddel');
```

To actually throttle a function, call `droddel` and hand over the function that shall be throttled.

E.g., if you want to serialize read access to a file, hand over a function that does the actual reading and returns its result as a promise:

```javascript
const readFile = util.promisify(fs.readFile);

const throttledRead = droddel(
  async () => await readFile('/etc/passwd'));
```

To then read the file, simply call `throttledRead`:

```javascript
const result = await throttledRead();
```

If you call `throttledRead` while it is already being run, the new call gets delayed.

## Running the build

To build this module use [roboter](https://www.npmjs.com/package/roboter).

```bash
$ bot
```
npm package: @sealsystems/eslint-config-es
Description: ESLint executable and configuration for SEAL Systems
Author: SEAL Systems AG
Latest version: 3.8.0

# @sealsystems/eslint-config-es

ESLint executable and configuration for SEAL Systems

## Installation

```bash
npm install --save-dev @sealsystems/eslint-config-es
```

## Quick start

Create a file with the name `.eslintrc.json` in the root directory of your project. It should contain at least the following lines:

```json
{
  "extends": "@sealsystems/eslint-config-es"
}
```

ESLint is installed as a dependency of `@sealsystems/eslint-config-es`. So you can call `eslint` from the root directory of your project:

```shell
$(npm bin)/eslint **/*.js
```

Please note:

- In order to install all dependencies directly in the project's `node_modules` folder, you may need to delete `package-lock.json` before adding this package.

The package also provides 3 CLI executables:

- `bot` runs the following checks:

  - ESLint

  - Unit Tests by calling `npm run test`

  - Missing or unused dependencies (aborts the test run only if `package.json` does not contain a dependency)

  - Outdated dependencies (never aborts the test run)

  In case of an error, the returned status code indicates the number of the failed test

- `lint` runs ESLint

- `lint-fix` runs ESLint with the option `--fix`

Please note:

- ESLint ignores all files and directories listed in the project's `.gitignore`.

To use these binaries, add some scripts to your `package.json`:

```json
...
"scripts": {
  "bot": "bot",
  "lint": "lint",
  "lint:fix": "lint-fix"
}
...
```

And call them via `npm run`:

```shell
npm run bot
npm run lint
npm run lint:fix
```

## Implementation details

**Please note:** This module is part of the build and release infrastructure. In order to prevent endless loops when automatically updating dependencies, Dependabot is not enabled.
npm package: @sealsystems/failure
Description: Easy handling of error codes and metadata.
Author: SEAL Systems AG
Latest version: 1.2.4

# @sealsystems/failure

[![CircleCI](https://circleci.com/gh/sealsystems/node-failure.svg?style=svg)](https://circleci.com/gh/sealsystems/node-failure)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/abvu4p3jf87kusxb?svg=true)](https://ci.appveyor.com/project/Plossys/node-failure)

Easy handling of error codes and metadata.

## Installation

```bash
npm install @sealsystems/failure
```

## Quick start

First you need to add a reference to @sealsystems/failure within your application.

```javascript
const failure = require('@sealsystems/failure');
```

Then you can create an error object.

```javascript
const err = failure(42, 'Universal error.', { username: 'hugo' });
```

This creates an new object of type `Error` with some additional properties:

```javascript
{
  name: 'SealError',
  code: 42,
  message: 'Universal error',
  metadata: {
    username: 'hugo'
  }
  ...
}
```

## API

### Creating an error objects

Create a new object of type `Error`.

```javascript
const error = failure(code, message, metadata);
```

Parameter:
```
code       number   optional    error code
message    string   mandatory   error message
metadata   object   optional    error metadata
```

Result: new error object

### Join metadata

Join metadata and error object metadata into a new metadata object for extended logging.

**Attention**: This function does not alter the errors metadata, it just returns a new metadata object.

```javascript
const joinedMeta = failure.joinMeta(error, metadata);
```

Parameter:
```
error      object   mandatory   previously created error object
metadata   object   mandatory   additional metadata to join
```

Result: new metadata object

### Export plain object

Export a plain new object for return in REST-API.

```javascript
const plainNewObject = failure.httpExport(error);
```

Parameter:
```
error      object   mandatory   previously created error object
```

Result: new plain javascript object of this structure:

```javascript
{
  code: error.code,
  message: error.message,
  metadata: error.metadata
}
```

### Export JSON string

Export plain error object as JSON string for return in REST-API without bodyparser.

```javascript
const stringifiedObject = failure.jsonHttpExport(error);
```

Parameter:
```
error      object   mandatory   previously created error object
```

Result: JSON string of plain object created by `httpExport`

### Test for failure

For testing if an error is a failure you can call `isFailure` function.

```javascript
if (failure.isFailure(error)) { ... }
```

Parameter:
```
error      object   mandatory   the error object to test
```

### Assert failure

The assert function throws if the error is NOT(!) a failure.

```javascript
failure.assert(error);
```

Parameter:
```
error      object   mandatory   the error object to test
```
npm package: @sealsystems/jest
Description: Jest executable and test configuration for SEAL Systems
Author: SEAL Systems AG
Latest version: 2.0.2

# @sealsystems/test-config-mocha

Jest executable and test configuration for SEAL Systems

## Installation

```bash
npm install --save-dev @sealsystems/jest
```

## Quick start

Jest is installed as a dependency of `@sealsystems/test-config-mocha`. So you can call `jest` from the root directory of your project:

```shell
$(npm bin)/jest
```

Please note:

- In order to install all dependencies directly in the project's `node_modules` folder, you may need to delete `package-lock.json` before adding this package.

The package also provides some CLI executables:

- `test-run` runs Jest

- `test-coverage` collects coverage data

- `test-coverage-check` collects coverage data and fails if threshold (80% for all criteria) has not been reached

- `test-report` collect coverage data and opens the generated HTML page

To use these executables, add some scripts to your `package.json`:

```json
...
"scripts": {
  "test": "test-run",
  "test:coverage": "test-coverage",
  "test:coverage:check": "test-coverage-check",
  "test:report": "test-report"
}
...
```

And call them via `npm run`:

```shell
npm run test
npm run test:coverage
npm run test:coverage:check
npm run test:report
```
npm package: @sealsystems/log
Description: Logger for all Node.js modules by SEAL Systems
Author: SEAL Systems AG
Latest version: 2.5.2

# @sealsystems/log

@sealsystems/log is the logger for all Node.js modules by SEAL Systems.

All log messages will be written to `stdout` and can then be processed by 3rd-party tools.

## Installation

```bash
npm install @sealsystems/log
```

## Quick start

First you need to integrate @sealsystems/log into your application.

```javascript
const log = require('@sealsystems/log').getLogger();
```

### Logging

The following log levels are defined:

- debug:

  ```javascript
  log.debug('This is a debug message.');
  ```

- info:

  ```javascript
  log.info('This is a info message.');
  ```

- warn:

  ```javascript
  log.warn('This is a warning message.');
  ```

- error:

  ```javascript
  log.error('This is a error message.');
  ```

- fatal:

  ```javascript
  log.fatal('This is a fatal error message.');
  ```

  **Please note:** This level will be used for logging an unhandled exception.

### Uncaught exceptions/Unhandled rejections

Exceptions and rejections that are not caught otherwise are also logged with log level `fatal`. After logging the error, the process will be terminated with exit code `1`. You have to require the log module at least one time in your project to enable this feature. No further configuration is required.

## Environment Variable LOG_LEVEL

A single minimum log level which includes all higher levels.

```bash
LOG_LEVEL=warn
```

The setting above includes log levels `warn`, `error` and `fatal`.
npm package: @sealsystems/log-metadata-plossys
Description: Generates metadata for log messages in PLOSSYS 5
Author: SEAL Systems AG
Latest version: 1.5.1

# node-log-metadata-plossys

Generates metadata for log messages in PLOSSYS 5

## Introduction

This module creates an object with metadata required to associate a log message with a print job or printer. Additional attributes may also be added to this metadata.

First, install the log module and this one:

```sh
npm install @sealsystems/log @sealsystems/log-metadata-plossys
```

Require both modules:

```javascript
const log = require('@sealsystems/log-metadata-plossys')(require('@sealsystems/log').getLogger());
```

Now you can use the `log` object as usual, but `job` and `printer` will be reduced. [see lib/inspect.js](lib/inspect.js)

```javascript
const processJob = function(myJob, myPrinter) {
  log.info('Processing job.', {
    job: myJob,
    printer: myPrinter,
    any: 'additionalAttribute'
  });
};

// metadata output
// {
//   uuid: 'xxxxx-yyyy-xxx-aaa-bbb',
//   jobId: 'xxxxx',
//   printer: 'printer1',
//   any: 'additionalAttribute'
// }
```

## Recipes

### job

```diff
log.info('...', {
-  uuid: job._id,
-  jobId: job.refId
+  job
});
```

```diff
const id = '80bf257d-f657-4592-9c03-856e2dc68655'; // in some cases you might not have/need the entire job object just in uuid

log.info('...', {
   uuid: id,
-  jobId: id.substr(0,8)
});
```

```diff
log.info('...', {
-  uuid: job._id,
-  jobId: job.refId,
-  printer: job.current.printerName
+  job
});
```

### printer

```diff
log.info('...', {
-  printer: printer._id
+  printer
});
```

```diff
log.info('...', {
-  printer: job.current.printerName.toLowerCase()
+  printer: job.current.printerName
});
```
npm package: @sealsystems/mocha
Description: Mocha executable and test configuration for SEAL Systems
Author: SEAL Systems AG
Latest version: 4.2.4

# @sealsystems/mocha

Mocha executable and test configuration for SEAL Systems

## Installation

```bash
npm install --save-dev @sealsystems/mocha
```

## Quick start

Mocha is installed as a dependency of `@sealsystems/mocha`. So you can call `mocha` from the root directory of your project:

```shell
$(npm bin)/mocha
```

The package also provides some CLI executables:

- `test-run` runs Mocha

- `test-coverage` collects coverage data via `nyc` (which is also installed as a dependency)

- `test-coverage-check` collects coverage data and fails if threshold (80% for all criteria) has not been reached

- `test-report` collect coverage data and opens the generated HTML page

Please note:

- Our standard assert library `assertthat` is also a dependency of this package. So you do not need to include it in your project's `package.json`.

- In order to install all dependencies directly in the project's `node_modules` folder, you may need to delete `package-lock.json` before adding this package.

- Mocha runs with the following settings:

  ```
  test/**/*Test.js
  --async-only
  --bail
  --color
  --exit
  --recursive
  --ui tdd
  ```

To use these executables, add some scripts to your `package.json`:

```json
...
"scripts": {
  "test": "test-run",
  "test:coverage": "test-coverage",
  "test:coverage:check": "test-coverage-check",
  "test:report": "test-report"
}
...
```

And call them via `npm run`:

```shell
npm run test
npm run test:coverage
npm run test:coverage:check
npm run test:report
```

## Command line parameter

The commands evaluate command line parameters from package.json. All parameters prefixed with `-mocha` are passed to `mocha` without the prefix. All parameters prefixed with `-ny` are passed to `nyc` without the prefix.

Example:
```json
"scripts": {
  "test": "test-run -mocha--max-old-space-size=2500 -nyc--check-coverage"
}
```

The above example runs `mocha` with the extra parameter `--max-old-space-size=2500` and `nyc` with the extra parameter `--check-coverage`.

## Implementation details

**Please note:** This module is part of the build and release infrastructure. In order to prevent endless loops when automatically updating dependencies, Dependabot is not enabled.