# taiweb3js

> 泰岳链前端包

Latest version **1.0.0** (published 2020-05-26) · LGPL-3.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-05-26 |
| First published | 2020-05-26 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 27 |
| Unpacked size | 638.4 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | yojiajia |
| Maintainers | yojiajia |
| Keywords | Ethereum, TaiYueChain, JavaScript, API |

## Links

- npm: https://www.npmjs.com/package/taiweb3js
- Repository: https://github.com/taiyuechain/TaiWeb3js
- Issues: https://github.com/taiyuechain/TaiWeb3js/issues
- npm.io page: https://npm.io/package/taiweb3js

## Dependencies (27)

- [got](https://npm.io/package/got.md) 7.1.0
- [oboe](https://npm.io/package/oboe.md) 2.1.3
- [utf8](https://npm.io/package/utf8.md) 2.1.1
- [uuid](https://npm.io/package/uuid.md) 2.0.1
- [xhr2](https://npm.io/package/xhr2.md) 0.1.4
- [bn.js](https://npm.io/package/bn.js.md) ^4.11.8
- [ethers](https://npm.io/package/ethers.md) 4.0.0-beta.1
- [eth-lib](https://npm.io/package/eth-lib.md) 0.2.7
- [swarm-js](https://npm.io/package/swarm-js.md) ^0.1.39
- [randomhex](https://npm.io/package/randomhex.md) 0.1.5
- [scrypt.js](https://npm.io/package/scrypt.js.md) 0.2.0
- [websocket](https://npm.io/package/websocket.md) git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible
- [@types/got](https://npm.io/package/@types/got.md) ^9.4.4
- [ethjs-unit](https://npm.io/package/ethjs-unit.md) 0.1.6
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [@types/oboe](https://npm.io/package/@types/oboe.md) ^2.0.28
- [@types/utf8](https://npm.io/package/@types/utf8.md) ^2.1.6
- [@types/uuid](https://npm.io/package/@types/uuid.md) ^3.4.4
- [any-promise](https://npm.io/package/any-promise.md) 1.3.0
- [@types/bn.js](https://npm.io/package/@types/bn.js.md) ^4.11.5
- [number-to-bn](https://npm.io/package/number-to-bn.md) 1.7.0
- [eventemitter3](https://npm.io/package/eventemitter3.md) 1.1.1
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.26.0
- [eth-ens-namehash](https://npm.io/package/eth-ens-namehash.md) 2.0.8
- [@types/underscore](https://npm.io/package/@types/underscore.md) ^1.8.14
- [crypto-browserify](https://npm.io/package/crypto-browserify.md) 3.12.0
- [@types/eventemitter3](https://npm.io/package/@types/eventemitter3.md) ^2.0.2

## Recent versions

- 1.0.0 (latest) — 2020-05-26

## README

# Web3tai.js - TaiYueChain Plus ver

This is the TaiYueChain JavaScript API developed based on the Ethereum version.

## Installation

<!-- > NOTICE: You must install lerna via `npm install -g lerna` before install taiWeb3js package. This is a bug that is currently being fixed. (2019-3-27) <Already fixed> -->

install

```
npm install taiWeb3js
```

or update

```
npm update taiWeb3js
```

## Usage

```JavaScript
var Web3tai = require('taiWeb3js');

// connect to TrueChain network
var web3tai = new Web3tai('http://localhost:8545', 'tai')
web3tai.eth.getBlockNumber().then(console.log)
// print: block number

console.log(web3tai.currentProvider.type)
// print: "tai"

// switch network type
// incorrect network correspondence can cause methods to fail!
web3tai.setProvider('http://localhost:8545', 'eth')
web3tai.eth.getBlockNumber().then(console.log)
// Returned error: The method eth_blockNumber does not exist/is not available

console.log(web3tai.currentProvider.type)
// print: "eth"
```

## Documentation
The features for the TrueChain network can be seen in this [document][docs] (Chinese)
Ethereum-version documentation can be found at [read the docs][eth-docs]. Most methods are called in the same way.

[docs]: https://web3taijs.readthedocs.io/zh/latest/
[eth-docs]: http://web3js.readthedocs.io/en/1.0/

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