# nfiot-js

> Interact with NFioT contracts in javascript

Latest version **1.26.0** (published 2022-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install nfiot-js
pnpm add nfiot-js
yarn add nfiot-js
bun add nfiot-js
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.26.0 |
| Published | 2022-04-15 |
| First published | 2022-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 223 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | laurentaubin, bagataisse, girardb |

## Links

- npm: https://www.npmjs.com/package/nfiot-js
- npm.io page: https://npm.io/package/nfiot-js

## Recent versions

- 1.26.0 (latest) — 2022-04-15
- 1.13.0 — 2022-04-15
- 1.25.0 — 2022-04-07
- 1.21.0 — 2022-03-27
- 1.20.0 — 2022-03-27
- 1.19.0 — 2022-03-27
- 1.18.0 — 2022-03-27
- 1.17.0 — 2022-03-25
- 1.16.0 — 2022-03-25
- 1.15.0 — 2022-03-25
- 1.14.0 — 2022-03-25
- 1.12.0 — 2022-02-18
- 1.11.0 — 2022-02-18
- 1.10.0 — 2022-02-18
- 1.9.0 — 2022-02-18
- … 13 more at https://npm.io/package/nfiot-js/versions

## README

# NFioT-JS

Interact with NFioT contracts in javascript

## Using NFioTJS

### See avalaible contracts

NFioTJs exports the `Contract` enum containing all available contracts:

```typescript
enum Contract {
  NFTIOT
}
```

### Get a contracts ABI

Use the `getContractAbi` function to get a contract's ABI:

```typescript
import { getContractAbi, Contract } from "nfiot-js";

const nfiotAbi = getContractAbi(Contract.NFIOT);
```

### Full example with ethers

NFioTJs exports types for each contract, which can be used alongside Web3 libraries like `ethers`:

```typescript
import { ethers } from "ethers";
import { getContractAbi, Contract } from "nfiot-js";
import type { NFioT } from "nftio-js";

const provider = new ethers.providers.Web3Provider((window as any).ethereum);
const signer = provider.getSigner();

const nfiotAbi = getContractAbi(Contract.NFIOT);
const nfiotContract = new ethers.Contract(contractAddress, nfiotAbi, signer) as NFiot;
```

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