# async-iota

> Promise wrapper over iota.lib.js

Latest version **0.1.3** (published 2018-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install async-iota
pnpm add async-iota
yarn add async-iota
bun add async-iota
```

## 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.1.3 |
| Published | 2018-08-02 |
| First published | 2018-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | subaru710 |
| Maintainers | subaru710 |
| Keywords | iota, js, promise, async |

## Links

- npm: https://www.npmjs.com/package/async-iota
- Repository: https://github.com/subaru710/async-iota
- Homepage: https://github.com/subaru710/async-iota#readme
- Issues: https://github.com/subaru710/async-iota/issues
- npm.io page: https://npm.io/package/async-iota

## Dependencies (1)

- [iota.lib.js](https://npm.io/package/iota.lib.js.md) ^0.4.7

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.3 (latest) — 2018-08-02
- 0.1.2 — 2018-08-01
- 0.1.1 — 2018-08-01
- 0.1.0 — 2018-08-01

## README

<h1 align="center">async-iota</h1>
<p align="center">Promise wrapper over iota.lib.js</p>

**IMPORTANT: Make sure you handle rejections from returned promises because they won't crash the process**

## API

The API is the same as [iota.lib.js](https://github.com/iotaledger/iota.lib.js#iotaapi), except some functions now return promises instead
 of taking callbacks.


## Example

```javascript
var IOTA = require("async-iota");

// Create IOTA instance with host and port as provider
var iota = new IOTA({
    'host': 'http://localhost',
    'port': 14265
});

// Create IOTA instance directly with provider
var iota = new IOTA({
    'provider': 'http://localhost:14265'
});

// now you can start using all of the functions in promise way
iota.api.getNodeInfo().then(function(result) {
    console.log(result);
}).catch(function(error) {
    console.error(error);
});

// now you can start using all of the functions in async/await way
async function doStuff() {
  try {
    const result = await iota.api.getNodeInfo();
    console.log(result);
  } catch (e) {
    console.error(e);
  }
}
doStuff();
    
// you can also get the version
console.log(iota.version);
```

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