This tutorial will help you start an Interledger node locally on your computer and create a local ILP test network.
This tutorial describes how to:
moneydon your system
Install a stable version of Node.js (10.16.0 LTS is recommended)
NOTE: For this tutorial you do not need to use any cryptocurrency. Since you will be running ILP on a local test network, settlement (moving real money) does not take place.
moneyd, open a terminal and run the following command:
$ npm install -g moneyd
After you’ve installed
moneyd, run the following command to start your local node:
$ moneyd local
Running the above command creates an Interledger node that listens on port 7768.
Once you have
moneyd running, you can send and receive value over ILP using the SPSP API. For this tutorial,
we’ll use the SPSP command line tool.
$ npm install -g ilp-spsp ilp-spsp-server
By default, the SPSP server uses localtunnel to create an HTTP endpoint.
Alternatively, we can set up the server on
port by disabling localtunnel.
To receive value, start the SPSP server using the following command:
$ ilp-spsp-server --localtunnel false --port 8080
The above command will create
http://localhost:8080 as your HTTP endpoint.
Now, to send value, open another terminal and run:
$ ilp-spsp send --amount 10 --receiver 'http://localhost:8080'
You should see
sent! on the sending terminal and
got packet for 10 units on the receiving terminal confirming
that you have successfully sent and received value through the Interledger protocol. You are now ready to use
SPSP in your applications.