/LNURLPoS

Offline lightning PoS

Primary LanguageC

LNURLPoS

Cheap, offline(!), DIY bitcoin lightning-network PoS

lnurlpos

Lightning-network uses hot wallets, real-world payments are made from phones. The burden of connectivity can be taken away from the point-of-sale and given to the phone.

image

For a traditional PoS experience see my LNPoS project.

LNURLPoS uses the LNURL-pay protocol. LNURL-pay allows your lightning-wallet to make a secure request to a server to get a lightning-network invoice. So instead of scanning a massive ugly lightning-network invoice QR, you can scan a lovely little LNURL QR (if you decode an LNURL you'll see its just a URL).

image

For online stuff I suppose massive QR codes are not an issue, but when fiddling with hardware devices they are. LNURLPoS using the LNURL-pay protocol, it can use a smaller screen for displaying the QR.

Setup workflow

  • LNURLPoS server set up and register PoS in a few clicks on LNbits using the LNURLPoS extension
  • Copy credentials (including a secret key) from server to the physical LNURLPoS device

Payment workflow

  • Merchant enters amount into LNURLPoS device
  • LNURL is generated in device and displayed for scanning (LNURL includes a unique pin encrypted using the secret key shared with the server)
  • Customer scans and pays
  • When the payment has cleared the customer is sent the decrypted unique pin
  • Merchant can compare and verify using the same pin displayed on the lNURLPoS

Credit/props

Stepan Snigerev for creating beautiful crypto and LNURL encoding functions.

Fiatjafs incredible OfflineShop extension. LNURLPoS is the same concept, but can run at scale, and is dependent on a device.

⚡⚡⚡⚡⚡⚡ LNURLPoS Tutorial ⚡⚡⚡⚡⚡⚡

Hardware needed

Arduino software install

  • Download/install latest Arduino IDE
  • Install ESP32 boards, using boards manager
  • Copy these libraries into your Arduino IDE library folder
  • Plug in T-Display, from Tools>Board>ESP32 Boards select TTGO LoRa32 OLED V1

LNbits extension

To make things easy (usually a few clicks on things like Raspiblitz), there is an LNbits extension. If you want to make your own stand-alone server software that would be fairly easy to do, by replicating the lnurl.py file in the extennsion.

Case

Recycle the T-Display case, as with the smaller keypad it all fits together perfectly. See demo

Alternatively, there are 2 lightburn designs for cases depending on membrane keypads. Designs use layered 3mm acrylic and M4 nuts/bolts
(Blue = fill/engrave 1.5mm depth, Black = cut)



Laser cutters are cheap now and should be part of every makers arsenal, these examples were cut on £200 NEJE Master2s 20W, alternatively there are plenty of laser engraving/cutting companies.