Tag: Lightning

  • Lightning wallet for ubports

    Bitcoin is about being in control of your money. For this to be really true, all the components have to be trustable. It is worth nothing if the application is fully open source, when it is run on a compromised platform. On the desktop this is easy. Linux distributions have been well supported, and more user friendly than its closed source counterparts for a long time.

    On the mobile side, the situation is not as nice. You can choose between two platforms that both include a rootkit, that gives the respective company full control over your device. Open source phones have always been available, but they remained a small niche. Besides having an ungoogled Android device for a while, I had devices running OpenMoko, Mobian, Ubuntu Touch and PureOS. But my favorite so far is ubports. It was born as Ubuntu Touch, was renamed when Canonical stopped development, and the community took over. In contrast to the operating systems that expand from desktop to phone (e.g. Mobian or PureOS), with ubports you feel that it is home on the phone. Only two things were annoying for a long time. One was that bluetooth handsfree didn’t work in the car for quite some time. That hasn’t been a problem for a while. The other thing that always bothered me was that there was no native Bitcoin wallet.

    So I used web wallets in the browser. It worked, but I never liked that workaround. I thought about implementing a simple wallet for a long time, but was always lacking the time. Last year I finally decided to give it a go. Since the Bitcoin part is essentially covered by BDK, I was mainly concerned with the QML and clickable stuff. I had a first look at the SDK when it was still developed by Canonical. Back then it looked really nice to develop for the platform, but somehow it never quite worked. All the more pleasantly surprised I was to find out that these days it is much easier and light weight. And it is even possible to develop apps with Rust. I used to develop Desktop apps with Qt in the past, and I loved it. QML is somewhat similar to Qt, but there are big differences. The basics are great, but there is still a lot about the details I have to learn. A first MVP was quickly done and published to the OpenStore. Of course it was the plan from the beginning to support Lightning at some point. But LDK looked much more complicated than BDK. First I wanted to build on top of the Lipa Lightning Library. But I soon found out that it includes also some stuff that I don’t need, and that there were incompatibilities with the ubports SDK. Soon thereafter I found ldk-node. That was just what I needed. It is a really easy to use LDK based lightning node in library form. That makes LDK as easy to use as BDK, or even easier. It is quite possible that at some point I need something else. But even in that case, ldk-node is a great starting point and learning ground.
    All this is to say that I have now a simple Lightning wallet on my ubports phone. So far reading QR codes is not integrated in the app, and I have to use a separate app to copy the addresses or invoices through the clipboard. That’s an inconvenience, and I want to improve it in the future. Also in general, it is still minimal and rough, but it works!!!

    Get utlnwallet from the OpenStore

  • Lightning operated chocolate arcade

    After the Covid lockdowns are only a faint memory, conferences are back again. Last October I was at the Lugano PlanB Forum with lots of familiar speakers. The talks were good, but not as technical as I would prefer. And last month I was at the Swiss Bitcoin Conference in Kreuzlingen. The talks there were even less technical, but the conference was all in German. That was new for me. I only recently discovered how big the German speaking Bitcoin community grew. So far the Bitcoin community that I was involved was more English speaking. A good percentage was also Swiss people, but since there are also a many expats, the main language has always been English. But that’s not what I want to write about here.
    The conference was a FIAT free zone. Drinks and food was all paid with Bitcoin Lightning thanks to the payment terminals from Lipa.
    At the conference there were some industry booths. These are always interesting to explore. One that was particularly interesting was Bischof vending machines. They presented an industry grade vending machine with a Lightning upgrade (prototype), that they actually plan to bring to production. They also sold toy LN Candy Arcades with a Bitcoin Switch kit. I had to get one of these!
    Back home I flashed the micro controller and configured it. And I modified the candy arcade to operate by the relais from the BitcoinSwitch instead of the coins. It is fairly easy to do, but it is at such a high level that it’s more difficult to diagnose if things don’t work, than working at the lower level that I usually prefer. But since everything was already so well prepared, I did the whole thing without diving into the code. The machine is now in the office at SEBA. So far only few colleagues installed a lightning wallet and grabbed some chocolate. It works most of the time, but I found out that the LNBits demo instance is not always so reliable. And I also found out that it is the most difficult to grab some Lindor, when the ground is fully covered with one layer.