# asekuro

> A javascript library for interacting with Asekuro insurance protocol

Latest version **0.1.4** (published 2018-07-17) · MIT license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2018-07-17 |
| First published | 2018-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=6.0.0 |
| Dependencies | 8 |
| Unpacked size | 7.2 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Matt Tyndall |
| Maintainers | tyndallm |

## Links

- npm: https://www.npmjs.com/package/asekuro
- Repository: https://github.com/ConsenSys/asekurojs
- Homepage: https://github.com/ConsenSys/asekurojs#readme
- Issues: https://github.com/ConsenSys/asekurojs/issues
- npm.io page: https://npm.io/package/asekuro

## Dependencies (8)

- [web3](https://npm.io/package/web3.md) 0.20.4
- [lodash](https://npm.io/package/lodash.md) ^4.17.10
- [moment](https://npm.io/package/moment.md) ^2.22.2
- [web3-utils](https://npm.io/package/web3-utils.md) ^1.0.0-beta.34
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^7.2.1
- [tiny-promisify](https://npm.io/package/tiny-promisify.md) ^1.0.0
- [ethereumjs-util](https://npm.io/package/ethereumjs-util.md) ^5.2.0
- [@0xproject/utils](https://npm.io/package/@0xproject/utils.md) ^0.7.2

## Recent versions

- 0.1.4 (latest) — 2018-07-17
- 0.1.3 — 2018-07-16
- 0.1.2 — 2018-07-16
- 0.1.1 — 2018-07-16
- 0.1.0 — 2018-07-16

## README

# Asekurojs

A TypeScript library for interacting with the Asekuro protocol

### Importing library

You can import the generated bundle to use the whole library generated by this starter:

```javascript
import Asekuro from 'asekuro'
```

Additionally, you can import the transpiled modules from `dist/lib` in case you have a modular library:

```javascript
import something from 'mylib/dist/lib/something'
```

### Usage

Create a Asekuro Config object containing addresses of deployed contracts. The easiest way to do this is by using a contract's Truffle artifact:

```javascript
const networkId = await promisify(this.state.web3.version.getNetwork)();

const asekuroConfig = {
    policyRegistryAddress: PolicyRegistry.networks[networkId].address
}
```

Then instantiate the asekuro library by passing in a web3 provider and the Asekuro Config:

```javascript
const asekuro = new Asekuro(this.web3.currentProvider, asekuroConfig);
```

### NPM scripts

 - `npm t`: Run test suite
 - `npm start`: Run `npm run build` in watch mode
 - `npm run test:watch`: Run test suite in [interactive watch mode](http://facebook.github.io/jest/docs/cli.html#watch)
 - `npm run test:prod`: Run linting and generate coverage
 - `npm run build`: Generate bundles and typings, create docs
 - `npm run lint`: Lints code
 - `npm run commit`: Commit using conventional commit style ([husky](https://github.com/typicode/husky) will tell you to use it if you haven't :wink:)

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