C-simple is a basic and easy-to-use ("c-simple" means phonetically "it's easy !" in french) mobile and desktop interface to the C-lightning Lightning Network daemon. It uses an API hosted on top of the daemon and a mutual authentication with x509 certificates, to make a secure connection possible from a mobile application.
You can find the API code (made with RPyC) in the c-simple/ directory, and the application code (made with Kivy) int client/ directory. Both are entirely written in Python.
🚶 Getting started
C-simple is composed of two parts : an access point running on-top-of your node, and an application (a mobile one, most of the time). In order to initiate the connection between these two parts, the certificate (equivalent of a public key) of each side is uploaded to Pixeldrain. At the first start you will have to enter a code on the computer running the node, then another on the phone so that each device can download each other certificate from Pixeldrain. Here is now how to install each part :
💻 Node side
First method : with pip
python3 -m venv venv && . venv/bin/activate python3 -m c-simple -i 0.0.0.0
Second method : from source
git clone https://github.com/darosior/c-simple && cd c-simple/c-simple/ python3 -m venv venv && . venv/bin/activate python3 setup.py install python3 -m csimple -i 0.0.0.0
📱 Client side
First method : from apk
Second method : build with Docker
You can build the apk yourself, but please note that it will take some time (and even more with Docker).
mkdir apk_dir docker run --name c-simple-client --rm -v $PWD/apk_dir/:/opt/c-simple/client/bin darosior/c-simple-client:0.0.1 /bin/bash -c 'cd /opt/c-simple/client && make apk'
You will find the apk in
Third method : build from source
The installation script will take care of dependencies if you are running a Debian OS (or a similar one) using the
apt module. Only
python3-apt is required under this conditions. If you are not running a Debian OS here is a list of dependencies :
'libzbar-dev', 'cmake', 'python3-pip', 'build-essential', 'git', 'python3', 'python3-dev', 'ffmpeg', 'libsdl2-dev', 'libsdl2-image-dev', 'libsdl2-mixer-dev', 'libsdl2-ttf-dev', 'libportmidi-dev', 'libswscale-dev', 'libavformat-dev', 'libavcodec-dev', 'zlib1g-dev', 'libgstreamer1.0-0', 'gstreamer1.0-plugins-base', 'gstreamer1.0-plugins-good', 'xclip', 'xsel'.
git clone https://github.com/darosior/c-simple && cd c-simple/client make [all|apk|desktop]
-i 0.0.0.0 option is to listen on all interfaces.
You can specify a directory to store the certificates on the node with
python3 -m csimple -i 0.0.0.0 --certdir /path/to/the/certdir
You can generate new certificates (you will need to reconnect the phone after that)
python3 -m csimple -i 0.0.0.0 --new-certs
If you don't use the lightning home default directory, specify it with
python3 -m csimple -i 0.0.0.0 --lightning-dir /path/to/lightning
More is yet to come..
📃 Licence, donations
If you are looking for a Lightning Network node to connect to : email@example.com:9735