Open Astro92 opened 4 years ago
+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.
I believe c-lightning also supports this.
https://lightning.readthedocs.io/lightning-keysend.7.html
It would be a very useful feature.
I vote for this feature too. I think it's a game changer for operability and greater adoption.
No invoice needed. This would also work for small shops, craft vendors, garage sales, etc.
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 ***
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.
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.
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
its probably easier to add ln address support
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.