Send ILP payments over Ripple using XRP and payment channels (PayChan)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore: update circle ci Sep 22, 2018
examples reliable transaction submission (#35) Mar 26, 2018
src/lib fix: check channel amount signing outgoing claim Jul 19, 2018
test test: test dynamic peer and channel functionality Aug 3, 2018
.eslintignore chore: add linter config Oct 19, 2017
.eslintrc chore: add build config Aug 16, 2017
index.js fix: get peer address Sep 14, 2018
npmrc-env chore: add build config Aug 16, 2017
package-lock.json 2.4.1 Dec 10, 2018
store-wrapper.js feat: use btp plugin (#23) Mar 7, 2018


Uses payment channels on ripple to do fast ILP transactions between you and a peer. Current in-flight payments are at risk (your peer can choose not to give you claims for them), but are secured against the ledger as soon as you get a claim.

Warning: This plugin is still in a development state.


This is how to instantiate a plugin:

const PluginXrpPaychan = require('ilp-plugin-xrp-paychan')
const Store = require('ilp-plugin-payment-channel-framework/test/helpers/objStore')

const plugin = new PluginXrpPaychan({

  // If you want your peer to connect to you as a ws client (which doesn't
  // change the nature of the liquidity relationship) set the `listener`
  // argument in the constructor.
  listener: {
    port: 666,
    secret: 'its_a_secret' // this is the token that your peer must authenticate with.

  // If you wish to connect to your peer as a ws client, specify the server option.
  // You may specify both the server and client options; in that case it is not deterministic
  // which peer will end up as the ws client.
  server: 'btp+ws://:its_a_secret@localhost:666',

  // Specify the server that you submit XRP transactions to.
  xrpServer: 'wss://',

  // XRP address and secret
  secret: 's...',
  address: 'r...',

  // Peer's XRP address
  peerAddress: 'r...',

  // Store in which to save claims and channel details. This will be passed in
  // automatically if you're using the ILP connector.
  _store: new Store()

plugin.connect().then(() => {
  // do something with your plugin
  return plugin.sendData(/* ... */)