https://github.com/interledger-deprecated/ilp-compat-plugin
Convert a Ledger Plugin Interface (LPI) version 1 plugin to LPIv2
https://github.com/interledger-deprecated/ilp-compat-plugin
Last synced: 5 months ago
JSON representation
Convert a Ledger Plugin Interface (LPI) version 1 plugin to LPIv2
- Host: GitHub
- URL: https://github.com/interledger-deprecated/ilp-compat-plugin
- Owner: interledger-deprecated
- Created: 2017-11-29T17:40:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T18:20:21.000Z (over 8 years ago)
- Last Synced: 2025-10-20T23:51:30.494Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 72.3 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ilp-plugin-compat
> ILP plugin compatibility layer
Turns any LPI1 plugin into an LPI2 plugin.
## Usage
``` js
const compat = require('ilp-compat-plugin')
const Plugin = require('some-old-plugin')
const plugin = compat(new Plugin({ ... }))
console.log(plugin.constructor.version) // => 2
// Use LPI2
const { fulfillment, data } = await plugin.sendTransfer({ ... })
```
Note that it's safe to pass LPI2 plugins to compat, it will simply become a no-op.