# polymath.js_v2

> TODO Update

Latest version **0.2.12** (published 2018-04-02) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install polymath.js_v2
pnpm add polymath.js_v2
yarn add polymath.js_v2
bun add polymath.js_v2
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.12 |
| Published | 2018-04-02 |
| First published | 2018-03-12 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 485 KB |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | bshevchenko |

## Links

- npm: https://www.npmjs.com/package/polymath.js_v2
- npm.io page: https://npm.io/package/polymath.js_v2

## Dependencies (8)

- [web3](https://npm.io/package/web3.md) 1.0.0-beta.30
- [axios](https://npm.io/package/axios.md) 0.16.2
- [redux](https://npm.io/package/redux.md) 3.7.2
- [redux-thunk](https://npm.io/package/redux-thunk.md) 2.2.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) 5.0.0
- [polymath-core_v2](https://npm.io/package/polymath-core_v2.md) 0.2.0
- [web3-core-method](https://npm.io/package/web3-core-method.md) github:bshevchenko/web3-core-method#master
- [web3-eth-contract](https://npm.io/package/web3-eth-contract.md) 1.0.0-beta.30

## Recent versions

- 0.2.12 (latest) — 2018-04-02
- 0.2.11 — 2018-04-02
- 0.2.10 — 2018-03-29
- 0.2.9 — 2018-03-29
- 0.2.8 — 2018-03-26
- 0.2.7 — 2018-03-22
- 0.2.6 — 2018-03-22
- 0.2.5 — 2018-03-21
- 0.2.4 — 2018-03-21
- 0.2.3 — 2018-03-21
- 0.2.2 — 2018-03-21
- 0.2.1 — 2018-03-21
- 0.2.0 — 2018-03-21
- 0.1.9 — 2018-03-15
- 0.1.8 — 2018-03-13
- … 8 more at https://npm.io/package/polymath.js_v2/versions

## README

# Introducing Polymath.js v2.0

TODO Update

```
await SecurityTokenRegistry.createSecurityToken(token)
```
This is all you need to create new security token using Polymath.js v2.0. It will:
1. Format data into the blockchain types (e.g. add decimals for token values).
2. Properly estimate gas via Web3 1.0.
3. Make dry run to validate inputs before transaction sending.
4. Notify callbacks with transaction hash and receipt.
5. Check whether the transaction was mined without errors or not.
6. Send necessary requests to the `polymath-api`.

## Key advantages
1. Web3 1.0. It means that we don't need truffle-contract package anymore and we can use async-await, websockets for events (there was bug with disconnection from them, but now it's fixed), proper auto gas estimation.
2. No need to wrap each contract function since v2.0 uses JavaScript Proxy API, which in a simplified manner calls original method if it's not overridden.
```
await PolyToken.symbol()
```
There is no `symbol` entry within the `PolyToken` class, but string above will return you ticker of the Polymath token.
This is how it works.

No excess wrappers means no excess documentation and tests.

## Needs from polymath-core
1. Versioned npm package (with changelog for each new version) with built-in contracts artifacts, which should contain contracts addresses for each network.
2. Complete and up-to-date documentation since Polymath.js will inherit it in many ways.

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