lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.72k stars 2.09k forks source link

lncli: No routehints argument defined for sendpayment & queryroutes #6601

Open Yiidiir opened 2 years ago

Yiidiir commented 2 years ago

Background

The issue has arisen when trying to do a keysend payment from an LND node to @hsjoberg 's @blixtwallet also running LND node. Keysend works when sending payments from Blixt LND to a Desktop LND but not the other way around.

It turns out it was because of the private nature of Blixt channels, sending from Blixt Wallet to Another Blixt Wallet is possible because the QR code contains route hints in a form of JSON that are passed to lnd within Blixt Wallet using routerrpc.SendPaymentRequest spec.

For some reason I can't get the --route_hints argument to work in lncli so I can do a keysend payment to Blixt from a desktop node, actually, the only place that argument is mentioned to exist within lndcli is the API doc

I've done some digging in commits history and --route_hints should be available both in lncli sendpayment and lncli queryroutes but All I get is

[lncli] flag provided but not defined: -route_hints

Tried other combinations like --routehints but same result

Your environment

Steps to reproduce

run lncli sendpayment --keysend or lncli queryroutes with --route_hints argument.

Expected behavior

Actual behaviour

[lncli] flag provided but not defined: -route_hints

related #3971

Roasbeef commented 2 years ago

Route hints aren't available via the lncli sendpayment call atm. However if you're doing a keysend and want to also package the route hints, you can use AMP invoices: lncli addinvoice --amp.

Yiidiir commented 2 years ago

Route hints aren't available via the lncli sendpayment call atm. However if you're doing a keysend and want to also package the route hints, you can use AMP invoices: lncli addinvoice --amp.

Oh okay, will adding the argument to cmd_payments fix it? If it's the case I can open a PR for that.

I'm surprised keysend can't work at all with private channels because of this. AMP won't help my case.

mohamedawnallah commented 10 months ago

Hey @Roasbeef and @Yiidiir, Is this issue valid yet? Please let me know if there's anything I should be aware of before I start working on it. 🙏