# app3-utils

> Collection of utility functions used in app3.js.

Latest version **0.9.3-4** (published 2018-12-14) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install app3-utils
pnpm add app3-utils
yarn add app3-utils
bun add app3-utils
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.3-4 |
| Published | 2018-12-14 |
| First published | 2018-11-15 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 30.8 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | apisplatform |

## Links

- npm: https://www.npmjs.com/package/app3-utils
- Repository: https://github.com/APIS-Platform/app3.js
- Homepage: https://github.com/APIS-Platform/app3.js#readme
- Issues: https://github.com/APIS-Platform/app3.js/issues
- npm.io page: https://npm.io/package/app3-utils

## Dependencies (6)

- [utf8](https://npm.io/package/utf8.md) 2.1.1
- [bn.js](https://npm.io/package/bn.js.md) 4.11.6
- [eth-lib](https://npm.io/package/eth-lib.md) 0.1.27
- [randomhex](https://npm.io/package/randomhex.md) 0.1.5
- [underscore](https://npm.io/package/underscore.md) 1.8.3
- [number-to-bn](https://npm.io/package/number-to-bn.md) 1.7.0

## Recent versions

- 0.9.3-4 (latest) — 2018-12-14
- 0.9.3-3 — 2018-11-20
- 0.9.3-2 — 2018-11-19
- 0.9.3-1 — 2018-11-15
- 0.9.3 — 2018-11-15

## README

# app3js - APIS JavaScript API

This is the APIS [JavaScript API][docs]

You need to run a local or remote APIS node to use this library.

Please read the [documentation][docs] for more.

## Installation

### Node

```bash
npm install app3js
```

### Yarn

```bash
yarn add app3js
```

### In the Browser

Use the prebuild ``dist/app3.min.js``, or
build using the [app3js][repo] repository:

```bash
npm run-script build
```

Then include `dist/app3.js` in your html file.
This will expose `App3` on the window object.

## Usage

```js
// in node.js
var App3 = require('app3');

var app3 = new App3('ws://153a17085797541e1b821aa7f0:111d8060fd25b75dfadbe0379f@127.0.0.1:40405');

```

Additionally you can set a provider using `app3.setProvider()` (e.g. WebsocketProvider)

```js
app3.setProvider(''ws://153a17085797541e1b821aa7f0:111d8060fd25b75dfadbe0379f@127.0.0.1:40405'');
// or
app3.setProvider(new App3.providers.WebsocketProvider(''ws://153a17085797541e1b821aa7f0:111d8060fd25b75dfadbe0379f@127.0.0.1:40405''));
```

There you go, now you can use it:

```js
app3.apis.getAccounts()
.then(console.log);
```

## Documentation

Documentation can be found at [read the docs][docs]


## Building

### Requirements

* [Node.js](https://nodejs.org)
* npm

```bash
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
```

### Building (gulp)

Build only the app3js package

```bash
npm run-script build
```

Or build all sub packages as well

```bash
npm run-script build-all
```

This will put all the browser build files into the `dist` folder.


[repo]: https://github.com/APIS-Platform/app3.js
[docs]: https://app3js.readthedocs.io/en/latest
[npm-url]: https://npmjs.org/package/app3js

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