jb55 / cln-payment-links

Serverless payment links for Core-Lightning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cln-payment-links

Serverless payment links for Core-Lightning

lnlink.org

How it works

  • All page data is stored in the URL:

    • nodeid
    • ip
    • authentication rune (invoice, waitinvoice)
    • product name
    • description
    • price
    • form input fields
  • When the user clicks buy, it connects to the configured lightning node and calls the invoice rpc via the commando plugin (soon to build a CLN built-in). This is considered a "lightning app" since it is serverless and talks to lightning nodes directly. experimental-websocket-port=8324 needs to be set in your config for websockets access.

  • A bolt11 invoice is returned with the configured price, and the description is set to the product name, description, and form input fields

  • User pays, and page is updated with notification of payment (not done yet! but will use waitinvoice rpc)

What's next?

You'll need a way to manage your lightning node to view paid invoices. Ideally there would be an iOS and web app that talks directly to your lightning node to do this. Follow me on twitter for updates on this.

About

Serverless payment links for Core-Lightning


Languages

Language:JavaScript 59.2%Language:CSS 35.0%Language:HTML 5.7%Language:Makefile 0.1%