Closed chenyukang closed 1 day ago
please note that this feature requires Blinded Paths
, this PR is only to test the feasibility of the process, there are security and privacy concerns, waiting for https://github.com/cryptape/fiber-sphinx integration.
How to allow the recipient to receive payments without generating an invoice. In real-world scenarios, there is a similar need where the sender wants to initiate a payment to the recipient.
The keysend mode has been added for this purpose. For more information, see:
https://docs.lightning.engineering/lightning-network-tools/lnd/send-messages-with-keysend
https://docs.lightning.engineering/lightning-network-tools/lnd/amp
In keysend mode, we randomly generate a preimage, then use it to generate a payment hash, and embed the preimage into the last hop of onion routing. This ensures that only the recipient can see the preimage and can use it to directly remove the TLC when settling the TLC.