项目作者: minecraft2048

项目描述 :
A minimalistic payment only wallet for Lightning Network
高级语言: Python
项目地址: git://github.com/minecraft2048/ln-pay.git
创建时间: 2018-01-31T05:06:32Z
项目社区:https://github.com/minecraft2048/ln-pay

开源协议:MIT License

下载


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:

  1. [Desktop Entry]
  2. Version=1.0
  3. Type=Application
  4. Name=Pay with Lightning Network
  5. Exec=/path/to/ln-pay.py %u
  6. MimeType=x-scheme-handler/lightning;
  7. Terminal=true
  8. Icon=
  9. Comment=
  10. Path=
  11. 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

  1. ./ln-pay.py lntb1u1pd8z46jpp5js40pevvggapufa64p6t5muec3u5lxqnnt9xm9e0wzzwtnqw2weqdrq0v3xgg36yfqkgepq8faxzup6ygkzy6fz8g3rvvrzvvmnsvnz94nrqwpk956rvcn995unxerp94jxvdfjv5ersv3jx5urzgnacqzysx93rdsprk25vwv94lueev0x0g38hnj3qlnqk6eenxrsqygwsmv2pjvuzzvsc272n52cwx8sq78ckvd2vpfa2y9fxmvwdfq5dt3d3rjgppzkmex
  2. 1685317000000 mBTC in Lightning Network
  3. Pay to 02d28c3aac4b4f36746052a735831afbe65bc5698a7be5bd41b42fd1ddf2a1a358 for {"d":"Add :zap:","i":"60bc782b-f086-46be-93da-df52e2822581"} with 0.001 mBTC y/n: y
  4. 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:

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