InterLedger Relay Chat

Usage no npm install needed!

<script type="module">
  import ilrc from '';



InterLedger Relay Chat

Screenshot of CLI


ILRC is a chat protocol that rides on top of the Interledger stack instead of the Internet stack. Using the STREAM protocol to multiplex data and money, ILRC allows any message to be paid.

ILRC comes with a server and a client implementation.



First, clone the repo and install the dependencies. Then, you can launch the client in bin/index.js.

git clone
cd interledger-relay-chat
npm install
node bin/index.js

Next, connect to your server. If you don't yet know a server, follow the Server section to set up your own. Once you've connected, set a nickname with /nick. Finally, you can start sending messages to the chat. In the current version, all messages go to a #global channel.

/connect http://localhost:6677
/nick Alice
Hello World

Command-Line Flags

  • --file <ilrcrc file> - Defaults to ~/.ilrcrc. If the file exists, then the lines are read in and processed line by line. For example, to automatically connect to a server and login to your nick, you could have a ~/.ilrcrc with the following contents:
/connect http://localhost:6677
/nick alice password

Command Reference

  • /connect <SPSP receiver> - Connects to a server. This can only be done once.
  • /nick <Name> [Password] - Set your nickname on the server.
  • <Text> - Send a message to the chat. Currently, this goes to #global.


Start by cloning and installing dependencies. Then you can start the server. It will print the connect command that clients can use to connect to your server.

git clone
cd interledger-relay-chat
npm install
node index.js

If you want clients on other machines to connect, use Localtunnel to expose port 6677 publicly. Then point your users to your localtunnel URL.

Environment Variables

  • PORT - The port to run the SPSP receiver on. Default 6677.

Protocol Definition

ILRC is based on a JSON protocol, which differentiates it from IRC (based in plaintext).


Set nickname. Equivalent to IRC's NICK.

  "type": "nick",
  "nick": "Alice"


Send message to channel or user. Equivalent to IRC's PRIVMSG.

  "type": "privmsg",
  "channel": "#global",
  "message": "Hello World!"


  • Join and register nickname
  • Send message
  • Send message with money
  • Join channels
  • Fix up UI
  • Neaten up code
  • Connect by Payment Pointer
  • Password persistence
  • Fix the readline interrupt when notifications come in
  • Convert server units to local units for display