Peering: ILP-over-HTTP
Connect to a peer using ILP, HTTP, and some love...
Last updated
Connect to a peer using ILP, HTTP, and some love...
Last updated
This guide instructs you how to setup a peering relationship between your Connector and a peer. In addition, you'll also be able to verify connectivity in both directions using the ILP Ping.
This guide assumes you're operating the test.alice
Connector. Once completed, your ILP network topology will look like this:
In order to create an actual Interledger peering relationship, you need to first determine the financial details of the relationship. This includes:
The amount of credit to extend to your peer. This will be dictated by the min_balance
value.
The currency unit you will use to denominate the account relationship. This guide will use USD
in all examples.
Whether or not you want to rate-limit your peer.
The network connection details you will use to communicate with your peer. This guide assumes ILP-over-HTTP, and as such will specify both incoming and outgoing Link settings using HTTP.
This guide does not enable settlement. Read more in the Settlement section for conceptual details, and consult Settlement: XRP Leger for an example.
Reference the Connector Admin API documentation for more details about actual payloads and their meanings.
On the test.alice
Connector, we need to create two accounts: one for a hypothetical user named Peter and one for the peering relationship with the Bob Connector.
In order to peer with the Bob Connector, we must first tell Alice about Bob. This is done by creating an account for Bob, on Alice. In this case, we want to use a relatively strong token scheme for security purposes, called JWT_HS_256
(See ILP-over-HTTP Auth Profiles for more details). To effect this change, we can use the Connector Admin API by making the following call:
In the above example, the account is configured to send outgoing ILP-over-HTTP requests to URL indicated in outgoing.url
, which should be a valid URL on the Bob Connector.
Note that the shared_secret
above is encrypted using default keys packaged with the Connector in a Java Keystore (JKS) file meant for illustration purposes only. The decrypted shared secret value is shh
but in a real deployment, you should use a strong shared secret and a new set of encryption keys.
See Connector Security for more details.
Next, we need an account on the Alice Connector that can be used to initiate pings and payments. In this case, we want to use a simpler authentication scheme, so we choose SIMPLE
(See ILP-over-HTTP Auth Profiles for more details). To effect this change, we can use the Connector Admin API by making the following call:
The following is a sample payload that can be used to create an account for Peter on the Alice Connector:
Note that the client authenticating as "Peter" may not be an HTTP server. In this case, Alice won't be able to send ILP packets to Peter. However, ILP-over-HTTP will still work from Peter to Alice as long as Alice because Alice's Connector is operating an ILP-over-HTTP server endpoint.
Next, let's mirror this setup on the Bob Connector.
Now that we have accounts configured on both Connectors, we can use the Ping protocol to verify connectivity from Alice to Bob, and vice-versa.
Coming soon...
Coming soon...