Manage peering relationships
To join the Interledger network and be able to send and receive payments, you must add one or more peer(s) to your Rafiki instance.
Prerequisites
Before you add a peer, you and the account servicing entity (ASE) you intend to peer with must both:
- Run an implementation of an Interledger connector (ideally Rafiki).
- Agree on an asset for the peering relationship. You can set up multiple peering relationships with the same peer based on different assets. At least one asset shared by you and your peer must be added to your Rafiki instance prior to setting up the peering relationship.
- Agree on a
maxPacketAmount
value, which specifies how many packets a payment is split into. - Communicate your respective static Interledger (ILP) addresses.
- Communicate a connection endpoint for the other peer to send packets to.
- Exchange
auth
tokens for the connection endpoint. - Agree on a settlement mechanism (a means of paying one another for the successful forwarding and delivery of packets), which is outside the scope of Interledger and Rafiki.
Optionally, you may also deposit an initial liquidity for your peer.
Add peer using the CreatePeer
GraphQL mutation
Example CreatePeer Mutation
Example
Example JSON request
Variable | Description | Required |
---|---|---|
assetID | The ID of the asset that you and your peer will use to ultimately settle your net obligations outside of Interledger. | Y |
staticILPaddress | Your peer’s static ILP address (the example uses g.othergreatwallet ) | Y |
name | Your peer’s name (the example uses “The Other Great Wallet”) | Y |
http.incoming.authTokens | The token your peer will use to present and connect to and send packets to your Rafiki instance. | Y |
http.outgoing.endpoint | Your peer’s connector endpoint. By default it is on local port 0.0.0.0:3002 | Y |
http.outgoing.authtoken | The token that you will use to present to your peer and connect to and send packets to their Rafiki instance. | Y |
initialLiquidity | Initial amount of liquidity to deposit for peer. Liquidity can also be deposited using the DepositPeerLiquidity mutation. | N |
Example JSON Response
Add a peer using Rafiki Admin
Alternatively, a peer can be added through the Rafiki Admin application. Ideally, this will be done using your local Rafiki environment.
Refer to the Rafiki Admin application user guide for more information on adding peers.