Spark: A new GUI for c-lightning

grubles
grubles
Aug 29, 2018 · 5 min read

noun \ ˈspärk \: a short bright flash of electricity between two points


Spark is a brand new web-based GUI, Electron app (for Linux, Windows, and macOS), and mobile app (for Android, and soon for iOS) from independent developer Nadav Ivgi that uses c-lightning as its backend.

With Spark, bitcoins are easily spent and received over the Lightning Network with a simple interface. A user can now run their own fully validating Bitcoin node, their own c-lightningnode, and their own Spark GUI to use the Lightning Network as trustlessly as possible.

A quick demo of Spark’s user interface

Some of Spark’s features include:

Demo

Buying a hat with Spark!

Spark is flexible in that it can be configured to be run in multiple ways. One way is to run Spark in order to access it remotely via a web browser. Another way is to run it locally with the Electron-based app. A third way is to run Spark as a server and connect to it with the Android app.

Spark installation

Requirements

  • Some command line experience if installing on Linux
  • A running c-lightning instance, an install guide is here
  • nodejs v6.0 or newer

Installing Spark to be accessible remotely:

$ sudo apt install nodejs npm$ sudo npm install -g spark-wallet$ spark-wallet -l /path/to/lightning

That is all you need to run on Ubuntu 18.04.

Once started, Spark will generate and print a random username and password that will be used to login into the wallet. To customize the login credentials, pass --login user:pass . To bind on an address, pass -i <ip address>. -i allows the user to access the Spark server remotely. It also generates and enables a TLS self-signed certificate.

To view other options for Spark, pass --help. Command line options can also be added to a configuration file in ~/.spark-wallet/config.

To view Spark, open http://ip_address:9737/ in your browser and login with the username and password specified earlier.

LetsEncrypt integration:

To register a certificate with LetsEncrypt:

$ spark-wallet --host example.com --letsencrypt admin@example.com

More information on LetsEncrypt integration can be found here.

Tor support:

.onion addresses are self-authenticating and are pinned to your server’s public key, and also serve to authenticate the user accessing Spark since access to the server is only possible if the user knows the .onion address.

To start Spark to run as a Tor Hidden Service v3, simply set --onion on the command line:

$ spark-wallet --onion

Spark will automatically install Tor when first running with --onion, and present the v3 address in the command line output.

Desktop Electron app:

The macOS Electron App and the Starblocks coffee shop

Mobile Android (Cordova) app:

When the Cordova app is first run, the user must first pair their device with the remotely-accessible Spark server. A quick way to do this is to run Spark with -Q, which will generate and print the access key and .onion address of your Spark server. The QR code can then be scanned by the Cordova app to make inputting the address and access key much easier.

The pairing QR for a Spark server running as a Hidden Service!

Once paired with a Spark server, a user can then transact bitcoins over the Lightning Network!

A Spark-to-Spark transaction!

The simplicity and flexibility of Spark allows it to be used on a variety of devices; from desktops to laptops, as well as mobile devices. Up until now, c-lightning users had to take to a terminal emulator to use Lightning. Now, those users can spend and receive bitcoins over the Lightning Network with the tap of a finger or a click of a mouse!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store