# leap-provider

> Ethers.js Provider for Leap Network

Latest version **1.2.0** (published 2019-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install leap-provider
pnpm add leap-provider
yarn add leap-provider
bun add leap-provider
```

## 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.2.0 |
| Published | 2019-09-12 |
| First published | 2019-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kosta Korenkov |
| Maintainers | troggy |

## Links

- npm: https://www.npmjs.com/package/leap-provider
- Repository: https://github.com/leapdao/leap-provider
- Homepage: https://github.com/leapdao/leap-provider#readme
- Issues: https://github.com/leapdao/leap-provider/issues
- npm.io page: https://npm.io/package/leap-provider

## Recent versions

- 1.2.0 (latest) — 2019-09-12
- 1.1.1 — 2019-09-03
- 1.1.0 — 2019-09-02
- 1.0.0 — 2019-07-29
- 1.0.0-beta.0 — 2019-07-29

## README

# leap-provider

Ethers.js provider to work with Leap Network.

## Install

```sh
yarn add leap-provider
```

## Usage

Connect to a Wallet:

```js
const LeapProvider = require('leap-provider');
const provider = new LeapProvider('https://testnet-node.leapdao.org');

// can be passed in a Wallet
const plasmaWallet = new ethers.Wallet(privKey, provider);

// or connected to existing wallet
const otherWallet = Wallet.createRandom();
otherWallet.connect(provider);
```

Send transaction to Leap Network:

```js
const LeapProvider = require('leap-provider');
const provider = new LeapProvider('https://testnet-node.leapdao.org');

// create some LeapTransaction
const tx = Tx.transfer(
  ...
);

// tx should be signed
tx.signAll(wallet.privateKey);

// send via provider
const resp = await wallet.provider.sendTransaction(tx);

// wait for inclusion, you will get a proper TransactionReceipt once tx is included in a block
const receipt = await resp.wait();
console.log(receipt);
```

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