# @ukstv/local-filecoin-provider

> Local Filecoin Provider uses passed private key to sign message

Latest version **2.0.1** (published 2020-11-11) · (MIT OR Apache-2.0) license · 0 weekly downloads

## Install

```sh
npm install @ukstv/local-filecoin-provider
pnpm add @ukstv/local-filecoin-provider
yarn add @ukstv/local-filecoin-provider
bun add @ukstv/local-filecoin-provider
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2020-11-11 |
| First published | 2020-08-21 |
| Weekly downloads | 0 |
| License | (MIT OR Apache-2.0) |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 3 |
| Unpacked size | 150.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sergey Ukustov |
| Maintainers | ukstv |

## Links

- npm: https://www.npmjs.com/package/@ukstv/local-filecoin-provider
- npm.io page: https://npm.io/package/@ukstv/local-filecoin-provider

## Dependencies (3)

- [uint8arrays](https://npm.io/package/uint8arrays.md) ^1.1.0
- [@glif/filecoin-wallet-provider](https://npm.io/package/@glif/filecoin-wallet-provider.md) ^1.0.0-beta.5
- [@zondax/filecoin-signing-tools](https://npm.io/package/@zondax/filecoin-signing-tools.md) ^0.12.0

## Recent versions

- 2.0.1 (latest) — 2020-11-11
- 2.0.0 — 2020-11-11
- 1.4.0 — 2020-11-11
- 1.3.0 — 2020-10-14
- 1.2.1 — 2020-10-14
- 1.2.0 — 2020-10-14
- 1.1.2 — 2020-09-07
- 1.1.1 — 2020-08-25
- 1.1.0 — 2020-08-21
- 1.0.1 — 2020-08-21
- 1.0.0 — 2020-08-21

## README

# Local Filecoin Provider

Based on [Filecoin Wallet Provider](https://github.com/openworklabs/filecoin-wallet-provider) by OpenWorkLabs.

Usage:

```typescript
import { LocalFilecoinProvider } from "@ukstv/local-filecoin-provider";
const secp256k1Key =
  "7b2254797065223a22736563703235366b31222c22507269766174654b6579223a2257587362654d5176487a366f5668344b637262633045642b31362b3150766a6a504f3753514931355031343d227d";
const provider = new LocalFilecoinProvider(secp256k1Key, true);
const accounts = await provider.getAccounts(); // ["t17lxg2i2otnl7mmpw2ocd6o4e3b4un3272vny6ka"]
const address = accounts[0];
const sig = await provider.sign(address, {
  from: address,
  to: address,
  value: "0",
  method: 0,
  gasPrice: "1",
  gasLimit: 1000,
  nonce: 0,
  params: "",
}); // Get signature
```

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