https://github.com/interledgerjs/ilp-plugin-xrp-iou
ILP Plugin for XRP Ledger which settles via IOUs
https://github.com/interledgerjs/ilp-plugin-xrp-iou
Last synced: 4 days ago
JSON representation
ILP Plugin for XRP Ledger which settles via IOUs
- Host: GitHub
- URL: https://github.com/interledgerjs/ilp-plugin-xrp-iou
- Owner: interledgerjs
- Created: 2018-04-20T18:06:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-20T20:44:11.000Z (about 8 years ago)
- Last Synced: 2025-02-25T14:56:17.287Z (over 1 year ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ILP Plugin XRP IOU
> ILP plugin for XRP Ledger which settles via IOUs
- [Overview](#overview)
- [Usage](#usage)
## Overview
Previous ILP Plugins for XRP Ledger have been based on payment channels, which
means they can only use XRP.
This plugin is in the non-payment-channel class of plugins, based upon the [ILP
Plugin Payment](https://github.com/interledgerjs/ilp-plugin-payment) skeleton.
Every call to `sendMoney` triggers an actual on-ledger payment.
Because of the low fees and the speed of XRP Ledger, this is a viable strategy
for settlement, and maximum unsecured amounts can still be kept low.
Furthermore, sending on-ledger payments means we can use any asset issued on
the XRP ledger to settle, not just XRP.
## Usage
Add `ilp-plugin-xrp-iou` to your project with:
```
npm install --save ilp-plugin-xrp-iou
```
Then you can construct the plugin like so:
```js
const PluginXrpIou = require('ilp-plugin-xrp-iou')
const plugin = new PluginXrpIou({
address: 'r...', // Address on XRP ledger
secret: 's...', // Secret on XRP ledger
server: 'btp+wss://...', // BTP server of peer, or listener object
assetCode: 'USD', // Asset code for IOU
assetScale: '9', // Scale to use for integers in the given asset type
assetSpread: '0.01' // Maximum fee on a payment from USD->USD
})
```