Skip to content

CLN plugin to receive lightning payments without sufficient inbound liquidity trough a small ecash buffer

License

Notifications You must be signed in to change notification settings

f321x/kickstart-cln-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kickstart-cln Core Lightning Plugin

This is a btc++ hackathon project. Don't expect production grade quality.

This plugin intercepts the CLN createinvoice RPC command and replaces the invoice with a cashu ecash mint invoice in case the inbound liquidity is too low to receive the payment directly.

Once enough satoshi are collected a lightning channel will be requested from a specified Lightning Service Provider (LSP).

This way new CLN users can instantly receive small payments, even if no funds to purchase a channel are available upfront. If inbound liquidity is depleted again and no automatic swapping mechanism is set-up the plugin will also help to automatically get new inbound channels from the LSP.

Setup

The plugin is able to read from the environment or a .env file in the plugins directory. The following variables are available:

  • MINT_URL: The ecash mint to use (e.g. https://mint.coinos.io)
  • CASHU_SEED: 64 character (32 byte) hex encoded seed for the ecash wallet

The plugin has sane hardcoded values and can be used without setting any variables to allow for maximal simplicity. If no seed is given the newly generated seed will be stored in a new (or existing) .env file.

Libraries

The following bitcoin specific libraries were used:

Thanks to the developers.

About

CLN plugin to receive lightning payments without sufficient inbound liquidity trough a small ecash buffer

Topics

Resources

License

Stars

Watchers

Forks

Languages