# dfo-hub

> DFOHub SDK

Latest version **0.1.7** (published 2020-08-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install dfo-hub
pnpm add dfo-hub
yarn add dfo-hub
bun add dfo-hub
```

## 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.7 |
| Published | 2020-08-19 |
| First published | 2020-05-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 641 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Marco Vasapollo \| Alessandro Mario Laganà Toschi \| bro@buidl.life |
| Maintainers | dfo-hub |

## Links

- npm: https://www.npmjs.com/package/dfo-hub
- Repository: https://github.com/b-u-i-d-l/dfo-hub-sdk
- Homepage: https://github.com/b-u-i-d-l/dfo-hub-sdk#readme
- Issues: https://github.com/b-u-i-d-l/dfo-hub-sdk/issues
- npm.io page: https://npm.io/package/dfo-hub

## Dependencies (1)

- [eth-ens-namehash](https://npm.io/package/eth-ens-namehash.md) ^2.0.8

## Recent versions

- 0.1.7 (latest) — 2020-08-19
- 0.1.6 — 2020-08-04
- 0.1.5 — 2020-08-03
- 0.1.4 — 2020-08-03
- 0.1.3 — 2020-08-03
- 0.1.2 — 2020-07-13
- 0.1.1 — 2020-07-09
- 0.1.0 — 2020-07-08
- 0.0.9 — 2020-07-08
- 0.0.8 — 2020-05-18
- 0.0.7 — 2020-05-18
- 0.0.6 — 2020-05-17
- 0.0.5 — 2020-05-13
- 0.0.4-np — 2020-05-13
- 0.0.3 — 2020-05-13
- … 2 more at https://npm.io/package/dfo-hub/versions

## README

# DFOHub Software Development Kit (BETA)

## Nodejs & NPM Apis to easily interact with DFOHub Ecosystem

### Totally Provider-Agnostic: no matter what will be your Ethereum Blockchain Provider Engine

#### Actually supported engines
[X] Web3 ^1.0.0

[ ] Ethers.js

## How to use

#### Before to start

##### In your NodeJS application

`npm install web3`

`npm install dfo-hub`

```javascript
const Web3 = require('web3');
const DFOHub = require('dfo-hub');

const web3 = new Web3('<your favorite node url goes here>');
```
##### In your Web application

```html
<script type="text/javascript" src="https://raw.githubusercontent.com/b-u-i-d-l/dfo-hub-sdk/master/dist/dfo-hub.js"></script>
```
And load your web3 connection object from your favorite provider (e.g. Metamask).

#### In both environments

```javascript
async function main() {
    DFOHub(web3);

    //DFOHub is now fully loaded in your Blockchain Provider object
    var myDFO = await web3.eth.dfoHub.load('<Your DFO Address goes here>');

    console.log(myDFO.name + ' DFO Successfully loaded!');
    console.log('ENS is: ' + myDFO.ens);
    console.log('Every survey of this DFO will last ' + await myDFO.getMinimumBlockNumberForSurvey() + ' blocks');
};

main().catch(console.error);
```

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