Interledger Connecting blockchain to other ledger
Posted By : Chandan Lunthi | 17-Nov-2017
Blockchain has become very popular technology among the IT people. People have been able to identify its potential and future scope. Still blockchain is in his early days and every days something new work is been done to make this technology much better. Blockchains have several feature likes of the decentralized database, speed, scalable, security and less costly.
Cryptocurrencies are the major product that has used blockchain technology efficiently like Bitcoin, Eitherium, Litecoin, Blackcoin, and ripple etc.
One visible problem that occurs during exchange the currency what you have to what you want. E.G. if you have $10 then you want bitcoin against it or you have 1 bitcoin and you want Eitherium of the same amount.
So to make this happen we build online exchanges that will change one currency to other. Right now existing application does so many
What is Interledger?
Interledger is a protocol which connects two ledgers and allows to make payments in different form to actual form. It provides
How does it work?
Interledger protocol used escrow services to hold money during payment and routing table algorithms to communicate with the receiver. When user A initiates transfer to the user B then amount is get deducted from user A's account and held in the escrow and when user B confirms transaction via fulfilling routing algorithm then money is credited to user B' account. In case of failure money is sent back to user A's account. It does not charges for the transaction fees because it asks for the preprocessed or charged fee. Pay once and use many times.
Escrow:
Escrow is a services which holds information for the temporary purpose and allows security from fraud. It holds
Routing Table:
Routing table plays very vital role in
It contains following information:
- Sender's address
- Receiver's address
- Amount
- Routing address.
Routing address contains internet address type things E.G. wf.rx.ab.jn
here wf is the region where user want to send money. rx is sub-region like state where user want to send money. ab is the user who is sending money and Jn is
We can add as many information on routing address separated by dot(.).
so when sender sends money to receiver then that communication is done by routing table inside routing address. For multiple money transfer network chaining of the
Interledger has been mostly implemented in javascript.Some basic implementation is given below.
Send Money
import { SPSP } from 'ilp'
import PluginBells from 'ilp-plugin-bells'
const plug = new PluginBells({
account: 'https://example.com',
password: 'xyz'
})
SPSP.quote(plug, {
receiver: '[email protected]',
destinationAmount: '0.01'
}).then((payment) => {
payment.memo = { message: 'Your money!' }
return SPSP.sendPayment(plug, payment)
}).then(() => {
console.log('Sent!!')
})
Receiving Money
import PluginBells from 'ilp-plugin-bells'
const plug = new PluginBells({
account: 'https://example.com',
password: 'xyz'
})
plug.connect().then(() => {
plug.on('incoming_fulfill', (transfer) => {
console.log('Received ' + transfer.amount + '$!')
})
})
Javascript full implementation reference: https://github.com/interledgerjs
Java Implementation reference: https://github.com/hyperledger/quilt
You may also like: Hyperledger introduction
Thanks
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Chandan Lunthi
Chandan is the self-motivated person and has expertise in technologies. Chandan likes to sign and MMA fighter.