LndHub icon indicating copy to clipboard operation
LndHub copied to clipboard

Allow lightning payments to nodes with accept keysend

Open Astro92 opened this issue 4 years ago • 8 comments

As of LND 0.9 —accept keysend has allowed for spontaneous payments to nodes, this only requires the nodes pubkey. Therefore within the lightning wallet allow the invoice field to read/ scan node pubkeys to allow sending payments.

Astro92 avatar May 15 '20 15:05 Astro92

+1 to this. It would be great to send any amount to someone's wallet without them needing an invoice. This opens up things like microtipping etc.

steflsd avatar Sep 08 '20 06:09 steflsd

I believe c-lightning also supports this.

https://lightning.readthedocs.io/lightning-keysend.7.html

It would be a very useful feature.

microlancer avatar Mar 03 '21 22:03 microlancer

I vote for this feature too. I think it's a game changer for operability and greater adoption.

  1. Coffee shop has public key as QR code at checkout.
  2. I open my BlueWallet Lightning Wallet
  3. I enter the amount to send
  4. I scan the QR code
  5. Barista at terminal sees my transaction come in
  6. I get my goods

No invoice needed. This would also work for small shops, craft vendors, garage sales, etc.

blankscreengithub avatar Jun 05 '21 19:06 blankscreengithub

if We allow user(account) pay own invoices in BlueWallet Client, IE: change :

screen/lnd/scanLndInvoice.js line 194

const currentUserInvoices = wallet.user_invoices_raw; // not fetching invoices, as we assume they were loaded previously
    if (currentUserInvoices.some(invoice => invoice.payment_hash === decoded.payment_hash)) {
      setIsLoading(false);
      ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false });
      return alert(loc.lnd.sameWalletAsInvoiceError);
    }

and have BlueWallet Client assume when scan(paste) QR that only consist of pub_key (or is constructed as keysend:pub_key ?) then BlueWallet Client takes amount and has checkbox [x] keysend flagged, when button SEND it calls new function /keysend in LndHub

LndHub /keysend takes --amt --pub_key, where function /keysend verifies --pub_key with lightning.getnodeinfo then generates a invoice with user credentials pay internal deducts balance of --amt for user account ( reuse code in /payinvoice) then :

lightning.sendpayment --amt --pub_key --keysend

this would have deducted -amt from user(account) and made a keysend (invoice made and paid from user(account), all accounted in ledger)

*** need change in BlueWallet Client allow "PAY OWN" invoice *** and add in BlueWallet Client assume when QR/paste is only a pub_key it is a keysend request ***

lndhub-admin avatar Jul 24 '21 12:07 lndhub-admin

with regards to *** need change in BlueWallet Client allow "PAY OWN" invoice *** is not needed for /keysend since LndHub would create invoice in function and not have the BlueWallet Client check.

Pay own invoice would be needed for LndHub-Admin be able send commands from BlueWallet Client, so ease on restriction "pay own invoice" is still welcome for planed future functionality.

lndhub-admin avatar Jul 24 '21 12:07 lndhub-admin

I build atm a project for my community and want give them sats for specific things as a reward. Now my problem is that I need this feature too. The user should link his lndhub account with a permanent invoice, so I am able to send them sats then ever I want. The problem is now, that only this delay my project.

TheCherry avatar Sep 16 '21 00:09 TheCherry

keysend being invoice-less so no need for a static invoice the BlueWallet Client can adapt to keysend easily, its harder to receive a keysend to a LndHub account wallet(card)

instead for Your use case :

if all your users connected to the same LndHub one can build a component that can pay the account/s without users actively need create invoice ...

this component is on the drawing board called a Grant component where admin of LndHub can pay into accounts

https://github.com/lndhub-admin

xraid avatar Sep 16 '21 02:09 xraid

its probably easier to add ln address support

Overtorment avatar Sep 16 '21 19:09 Overtorment