# ilp-plugin

> > A generic handle to ILP

Latest version **3.5.5-alpha.2** (published 2022-09-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install ilp-plugin
pnpm add ilp-plugin
yarn add ilp-plugin
bun add ilp-plugin
```

## 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 | 3.5.5-alpha.2 |
| Published | 2022-09-28 |
| First published | 2017-10-29 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Interledger Team |
| Maintainers | interledger |

## Links

- npm: https://www.npmjs.com/package/ilp-plugin
- npm.io page: https://npm.io/package/ilp-plugin

## Dependencies (2)

- [ilp-logger](https://npm.io/package/ilp-logger.md) ^1.4.5-alpha.2
- [ilp-plugin-btp](https://npm.io/package/ilp-plugin-btp.md) ^1.5.0

## Recent versions

- 3.5.5-alpha.2 (latest) — 2022-09-28
- 3.5.5-alpha.1 — 2022-05-04
- 3.5.5-alpha.0 — 2022-04-27
- 3.5.4 — 2021-10-07
- 3.5.3 — 2021-02-04
- 3.5.2 — 2020-07-27
- 3.4.1 — 2019-12-03
- 3.4.0 — 2019-11-08
- 3.3.1 — 2019-05-15
- 3.3.0 — 2019-05-15
- 3.2.1 — 2018-09-02
- 3.2.0 — 2018-08-27
- 3.1.1 — 2018-05-17
- 3.1.0 — 2018-01-27
- 3.0.0 — 2018-01-16
- … 4 more at https://npm.io/package/ilp-plugin/versions

## README

# ILP Plugin

> A generic handle to ILP

[![NPM Package](https://img.shields.io/npm/v/ilp-plugin.svg?style=flat)](https://npmjs.org/package/ilp-plugin)

The script below will get ILP credentials with no setup whatsoever. You can
use this anywhere that you need an ILP plugin created from details in the
environment.

```js
const plugin = require('ilp-plugin')()

async function run() {
  await plugin.connect()
  await plugin.sendData(/* ... */)
  process.exit(0)
}

run()
```

First, the script checks whether `ILP_CREDENTIALS` is defined in the environment.
`ILP_CREDENTIALS` must contain a JSON object with the options passed into the
constructor of `ilp-plugin-btp` or the module name in `ILP_PLUGIN`.

Next, the script checks for the `ILP_BTP_SERVER` environment variable. `ILP_BTP_SERVER` must be a URI with a protocol and host (e.g. `"btp+ws://localhost:7768"`). Using `ILP_BTP_SERVER` instead of `ILP_CREDENTIALS` ensures that each plugin gets a unique, random secret.

By default, a random secret will be generated and the plugin will connect to
`btp+ws://localhost:7768`.

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