Skip to content

minecraft2048/ln-pay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ln-pay

A minimalistic payment only 'wallet' for lnd

http://webm.land/media/z9cW.webm

DISCLAIMER: Do not use this on mainnet, this is still untested for security

Features

  • Extremely small, ~532 kB size on disk
  • Firefox integration through protocol handlers
  • Pay without confirmation on whitelisted public keys
  • CLI
  • GUI through Desktop Notification Specification

Features not included

  • Channel management
  • Show channel balance
  • Show wallet balance
  • On-chain transaction

Use lncli to do those things

Why?

Existing lnd frontends such as lightning-pay or zap are extremely large, requiring hundreds of megabytes of node.js and electron dependencies, and neither will install on my computer for some reason. ln-pay only has one required dependency with two optional dependencies.

Dependencies

Optional dependencies for headless mode

Installation

git clone this repository, and run ln-pay.py in this directory for CLI mode.

lightning: protocol integration

To register ln-pay as a URI handler so that lightning: links work in your browser:

GNU/Linux

Add this snippet to ~/.local/share/applications as ln-pay.desktop:

[Desktop Entry]
Version=1.0
Type=Application
Name=Pay with Lightning Network
Exec=/path/to/ln-pay.py %u
MimeType=x-scheme-handler/lightning;
Terminal=true
Icon=
Comment=
Path=
StartupNotify=false

and append x-scheme-handler/lightning=ln-pay.desktop to ~/.local/share/applications/mimeapps.list then run update-desktop-database

This will launch a terminal running ln-pay.py every time lightning: links are clicked. To use Desktop Notifications GUI, replace Terminal=true in ln-pay.desktop to Terminal=false

How to Use

ln-pay supports 2 modes: terminal/CLI interactive mode, and a GUI mode where it interacts using Gnome's Desktop Notification Specification

Terminal mode

./ln-pay.py lntb1u1pd8z46jpp5js40pevvggapufa64p6t5muec3u5lxqnnt9xm9e0wzzwtnqw2weqdrq0v3xgg36yfqkgepq8faxzup6ygkzy6fz8g3rvvrzvvmnsvnz94nrqwpk956rvcn995unxerp94jxvdfjv5ersv3jx5urzgnacqzysx93rdsprk25vwv94lueev0x0g38hnj3qlnqk6eenxrsqygwsmv2pjvuzzvsc272n52cwx8sq78ckvd2vpfa2y9fxmvwdfq5dt3d3rjgppzkmex
1685317000000 mBTC in Lightning Network
Pay to 02d28c3aac4b4f36746052a735831afbe65bc5698a7be5bd41b42fd1ddf2a1a358 for {"d":"Add :zap:","i":"60bc782b-f086-46be-93da-df52e2822581"} with 0.001 mBTC y/n: y
Transaction to 02d28c3aac4b4f36746052a735831afbe65bc5698a7be5bd41b42fd1ddf2a1a358 is successful

Desktop Notifications GUI

Demo TBD

Setting up automatic payment

Add public keys that ln-pay should automatically pay to this whitelist:

#Autopay setting
MAX_AUTOPAY_AMT = 0.05 #Maximum amount of mBTC that will be automatically paid
MIN_AUTOPAY_BALANCE = 2 #Minimum channel amount in mBTC for autopaying LN transaction
whitelist = [] #Whitelist of public keys that will be automatically paid by ln-pay

About

A minimalistic payment only wallet for Lightning Network

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages