Interledger.js Ledger Plugin for Komodo using CLTV Payment Channels
This plugin enables Interledger payments through Komodo using simple payment channels.
ilp-plugin-komodo-paychan
implements the Interledger.js Ledger Plugin Interface, which allows Komodo to be used with ilp
client and the ilp-connector
.
Dependencies:
- Node.js >=v7.10.0
- Komodo Cored Node
Setup:
git clone https://github.com/nuevax/ilp-plugin-komodo-paychan.git
cd ilp-plugin-komodo-paychan
npm install --save
Test:
on a node with a funded komodod (tx needs 0.01 KMD) on port 7771 (or change port in src/bitcoin.js) run test.js with
BTC_USER=rpcuser BTC_PASS=rpcpassword A_SECRET=alicesecret B_SECRET=bobsecret node test.js
for alicesecret and bobsecret Iguana "encryptwallet" API-call can generate 64 character respective privkey
ilp-plugin-komodo-paychan
uses simple unidirectional Komodo payment channels implemented with CHECKLOCKTIMEVERIFY (CLTV). While the underlying channel is not conditional (i.e. does not use hashlocks), the plugin only sends updates to the channel when it receives the fulfillment from the other party. This means that payments that there is some risk for payments that are in flight. However, the Interledger Protocol isolates participants from risk from indirect peers.
By implementing all of the functions required by the Ledger Plugin Interface, this allows Komodo to be used by standard Interledger.js components.
For more information about how Interledger works, see IL-RFC 1: Interledger Architecture.