InterLedger-Payments across different Legders
What is InterLedger ?
Interledger is an open protocol for sending payments across different ledgers. It means Sender(Payer) could be in Bitcoin Network (BTC) and Receiver(Payee) would be in Ethereum Network(ETH). Interledger makes it possible to talk with two different blockchain network. Interledger protocol uses connectors to facilitate such type of transactions. Connectors ideally routes packets of money to different networks , they act as routers in today’s Internet.
Interledger Features :
- Add payments without being tied to one currency / crypto-currency.
- Send Payments to other Ledger (ETH,BTC,XRP..)
- Its a modern protocol devised for transacting money over different networks .
How does Interledger Works ?
In the below diagram Sender sets the transaction as USD and the Receiver (Payee) receives money in BTC.
- Sender — Initiates a value transfer.
- Router — Applies currency exchange and forwards packets of value. This is an intermediary node between the sender and the receiver.
- Receiver — Receives the value.
(Source : https://interledger.org/overview.html)
All Payments that is made between Sender and Receiver is via ILPV4 protocol. i.e it defines standard how money is transferred with Interlegder. Every transaction with Interledger has the following phases Prepare, Fulfill, and Reject.
For more Information / Architecture of Interledger , I would recommend to read upon Interledger docs, It has in -depth coverage of the same.(https://interledger.org/rfcs/0001-interledger-architecture/)
Getting Hands-on with Interledger-Hyperledger Quilt :
I have used Java Framework / libraries provided by Hyperledger Quilt (https://www.hyperledger.org/projects/quilt), However you can go with other frameworks (Node,javascript).
- Get the tesnet credentitals to transfer money(XRP as base) https://xpring.io/ilp-testnet-creds
- Mark down the Payer url and secret token
- Mark down the Payee Payment pointer
Above information are required to send test XRP to the receiver using Quilt that uses Interledger to settle transactions.
I have provided link to my gthub repo(https://github.com/rangesh-/Integerleger-Quilt/tree/master/quiltsample) ,feel free to see Quilt in action, i.e replace the payee and payer address and try to run the application, you should see something like below and to note this is happening with ILP(Interledger protocol).
Other Notes :
I would recommend using Kava Labs -Switch API(https://github.com/Kava-Labs/switch) other than using Quilt as connectors for different ledger is still in progress, KavaLabs provides connector for Lightning Network ,ETH,XRP .
References :
2.https://www.hyperledger.org/projects/quilt
3.https://github.com/Kava-Labs/switch
4. https://github.com/hyperledger/quilt/blob/master/examples-parent/send-money/README.md