# chintwoweb

> JavaScript SDK that encapsulates the CHINTWO Node HTTP API

Latest version **1.0.1** (published 2021-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install chintwoweb
pnpm add chintwoweb
yarn add chintwoweb
bun add chintwoweb
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-10-08 |
| First published | 2021-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 3.4 MB |
| Known vulnerabilities | 0 (+28 in 3 direct dependencies) |
| Install scripts | no |
| Author | Kondax |
| Maintainers | karthigaosiz |

## Links

- npm: https://www.npmjs.com/package/chintwoweb
- Repository: https://github.com/chintwoprotocol/chintwo-web
- Homepage: https://github.com/chintwoprotocol/chintwo-web#readme
- Issues: https://github.com/chintwoprotocol/chintwo-web/issues
- npm.io page: https://npm.io/package/chintwoweb

## Dependencies (10)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [jssha](https://npm.io/package/jssha.md) ^2.3.1
- [ethers](https://npm.io/package/ethers.md) ^4.0.7
- [semver](https://npm.io/package/semver.md) ^5.6.0
- [elliptic](https://npm.io/package/elliptic.md) ^6.4.1
- [validator](https://npm.io/package/validator.md) ^10.7.1
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^7.2.1
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.26.0
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^3.1.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0

## Recent versions

- 1.0.1 (latest) — 2021-10-08
- 1.0.0 — 2021-10-07
- 2.3.1 — 2021-10-07

## README

## What is ChintwoWeb?

ChintwoWeb aims to deliver a unified, seamless development experience influenced by Ethereum's [Web3] implementation. We have taken the core ideas and expanded upon it to unlock the functionality of CHINTWO's unique feature set along with offering new tools for integrating DApps in the browser, Node.js and IoT devices.

## Compatibility
- Version built for Node.js v6 and above
- Version built for browsers with more than 0.25% market share

You can access either version specifically from the [dist](dist) folder.

ChintwoWeb is also compatible with frontend frameworks such as:
- Angular 
- React
- Vue.

You can also ship ChintwoWeb in a Chrome extension.

## Installation

### Node.js
```bash
npm install chintwoweb
```
or
```bash
yarn add chintwoweb
```

### Browser
First, don't use the release section of this repo, it has not updated in a long time.

Then easiest way to use ChintwoWeb in a browser is to install it as above and copy the dist file to your working folder. For example:
```
cp node_modules/chintwoweb/dist/ChintwoWeb.js ./js/chintwoweb.js
```
so that you can call it in your HTML page as
```
<script src="./js/chintwoweb.js"><script>
```

## Your local private network for heavy testing

You can set up your own private network, running Chintwo Quickstart. To do it you must [install Docker](https://docs.docker.com/install/) and, when ready, run a command like

```bash
docker run -it --rm \
  -p 9090:9090 \
  -e "defaultBalance=100000" \
  -e "showQueryString=true" \
  -e "showBody=true" \
  -e "formatJson=true" \
  --name chintwo \
  chintwotools/quickstart
```

## Creating an Instance

First off, in your javascript file, define ChintwoWeb:

```js
const ChintwoWeb = require('chintwoweb')
```
The easiest way to instantiate chintwoWeb is to run
```js
const chintwoWeb = new ChintwoWeb({
    fullHost: 'http://ip:port',
    solidityNode: 'http://ip:port'
    eventServer: 'http://ip:port',
    privateKey: '...'
})
```
but you can continue to use the old way:
```js
const chintwoWeb = new ChintwoWeb(fullNode, solidityNode, eventServer, privateKey)


## A full example

The better way to understand how to work with Chintwo is to clone the [MetaCoin example]

## Contributions

In order to contribute you can

* fork this repo and clone it locally
* install the dependencies — `npm i`
* do your changes to the code
* build the ChintwoWeb dist files — `npm run build`
* run a local private network using Chintwo Quickstart
* run the tests — `npm test:node`
* push your changes and open a pull request

---
_Source: https://npm.io/package/chintwoweb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
