Much like the Internet did for information, Interledger provides open protocols and standards to enable payments interoperability — across any currency, fiat or crypto — with no single company or organization controlling the Interledger. Instead, by specifying a common set of protocols to follow, the Interledger will consist of a variety of entities and institutions who can decide which other Interledger networks to connect to.
An Open Collaboration for Java Developers
Because no single entity will own the Interledger, it makes sense for Interledger software implementations to be free and open-source. To this end, Quilt is hosted in the Hyperledger community, which provides a strong governance structure to help the Quilt implementation mature, and also has a rich set of business blockchain technologies and partners that will benefit immensely from a payments interoperability layer.
Hyperledger Quilt and Interledger have major developer backing from a variety of organizations, most importantly Xpring.
At Xpring, we’re creating an open platform for developers to integrate money into their apps.
Central to this vision is Interledger, and we’re investing heavily in tools and services (like an Interledger Testnet and more) to enable anyone to also build payment systems using Interledger technologies. Xpring’s platform is built to foster innovation in blockchain to interoperate “all the money” with the launch of Quilt v1.0 – a Java implementation of Interledger.
Which brings us back to Quilt, and its foundation on Java.
While it’s just one programming language in the Interledger ecosystem, Java is an immensely important one. There are millions of Java developers around the world, with billions of devices running Java software, largely led by Android deployments. With this in mind, Quilt is vital because it provides Java developers with easy-to-use libraries for sending and receiving Interledger payments.
With the 1.0 release of Hyperledger Quilt, the Java ecosystem now has a support for nearly all Intereldger primitives, including streaming payments.
In the rest of this post, I want to explain some of these core primitives and features, and walk you through how to send an Interledger payment from a Java application using Quilt. So let’s get started!
Tutorial: How to Send an Interledger Payment using Quilt
First, let’s talk about identity. Every Interledger sender will need to know who to pay, and for that we use the Payment Pointer: a standardized identifier for payment accounts. Because payment pointers are made up of string characters, you don’t need to fully understand everything about them in order to use them. For this example, we’ll simply be making a payment to this Payment Pointer:
Now that we know who to pay, we need to get an account that will represent us on the Interledger. To do this, we can create a test account by using the Xpring Interledger testnet here.
Once you have your account credentials, you’ll be able to easily send a payment using something like the following code snippets.
To get started with our payment, we need to create a `Link` using Quilt. Links allow two peers to communicate with each other. In this instance, you communicate to your Interledger service provider (think of this like your ISP) using a Link, and this gives you access to the broader Interledger.
For this example, we use HTTP for actual network communication, and construct a new Link of type `IlpOverHttpLink`:
Link link = new IlpOverHttpLink(
// … actual dependencies here.
Next, we want to make an Interledger payment using STREAM, which is a packetized payment protocol inspired by the QUIC Internet Transport Protocol. STREAM operates on top of core Interledger protocols by allowing a sender and receiver to coordinate a payment over any arbitrary Interledger topology.
Similar to the way the Internet packetizes data, STREAM splits up payments into packets to maximize network liquidity and throughput. This allows Interledger to support a variety of use-cases, including micro-payments as well as large-value payments, machine-payments, non-custodial wallets, retail and ecommerce payments, and more.
In code, we can create a `StreamSender` that uses our `Link`, like this:
StreamSender simpleStreamSender = new SimpleStreamSender(link);
Finally, to send our test payment, the following line of Java can be used:
SHARED_SECRET, SENDER_ADDRESS, RECEIVER_ADDRESS, UnsignedLong.valueOf(1000)
The above command instructs the StreamSender to send `1000` units across the Interledger to the receiver identified by `RECEIVER_ADDRESS`. Note that because the immediate peer of this sender is part of the Xpring testnet, these units are actually XRP milli-Drops (a Drop is a millionth of an XRP). Thus, while 1000 units will be sent by this payment, the payment will actually equate to only 1 Drop of XRP.
Quilt for Enterprise
As you can see above, sending payments over Interledger is pretty simple, although the code snippets in this post are truncated for illustration purposes. To see the actual code behind these examples, navigate over to the Hyperledger Quilt Examples on Github.
All of us at Hyperledger and Xpring are incredibly excited about the new platform we’re building on top of Interledger. It will be fun to see what gets built on top of Quilt, especially for enterprise DLT use-cases like connecting currently disconnected Fabric networks together using Interledger.
The examples in this post are powered by the following Interledger Protocols, each of which is implemented in Hyperledger Quilt:
- Interledger Addresses: a hierarchical identifier for Interledger network nodes that enables efficient routing of payment packets.
- Payment Pointers: a standardized identifier for end-user payment accounts.
- ILPv4: The lowest-layer Interledger protocol that enables packets to multi-hop from peer to peer across the Interledger.
- ILP-over-HTTP: An HTTP protocol that allows two peers to transmit ILPv4 packets to each other using HTTP.
- SPSP: Simple Payment Setup Protocol, used to allow a sender and receiver to negotiate the security parameters of an Interledger payment.
- STREAM: A protocol for reliably sending money and data over ILPv4.
Hyperledger is an open source collaborative effort created to advance cross-industry blockchain technologies. It is a global collaboration, hosted by The Linux Foundation, including leaders in finance, banking, Internet of Things, supply chains, manufacturing and technology.
Xpring is creating an open platform for money to make it easy for developers to integrate payments into their applications. The Xpring Platform builds upon open-source core technologies like XRP, Web Monetization, and Interledger to allow for sending and receiving real time payments in any currency. Learn more at https://xpring.io. Follow @xpringDev
Interledger is an open protocol suite for sending payments across different ledgers. The open architecture and minimal protocol enable interoperability for any value transfer system. Learn more at https://interledger.org.