Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Yiidiir opened this issue May 31, 2022 · 3 comments · May be fixed by #9721
Open

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

Yiidiir opened this issue May 31, 2022 · 3 comments · May be fixed by #9721
Labels
beginner Issues suitable for new developers good first issue Issues suitable for first time contributors to LND lncli payments Related to invoices/payments
Milestone

Comments

@Yiidiir
Copy link

Yiidiir commented May 31, 2022

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

  • version of lnd 0.14.3-beta
  • which operating system Ubuntu / Win10 pre-built binaries
  • version of btcd, bitcoind, or other backend neutrino
  • any other relevant environment details /

Steps to reproduce

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

Expected behavior

  • Payment goes through via private channels specified in the route_hints argument.
  • Query routes returns a route through the private channels specified.

Actual behaviour

[lncli] flag provided but not defined: -route_hints

related #3971

@Roasbeef
Copy link
Member

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.

@Roasbeef Roasbeef added beginner Issues suitable for new developers payments Related to invoices/payments lncli labels May 31, 2022
@Yiidiir
Copy link
Author

Yiidiir commented May 31, 2022

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
Copy link
Contributor

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. 🙏

@ziggie1984 ziggie1984 added the good first issue Issues suitable for first time contributors to LND label Apr 15, 2024
@saubyk saubyk added this to the v0.20.0 milestone Apr 15, 2025
@saubyk saubyk added this to lnd v0.20 Apr 15, 2025
@saubyk saubyk moved this to In progress in lnd v0.20 Apr 15, 2025
appilon added a commit to appilon/lnd that referenced this issue Apr 16, 2025
…tningnetwork#6601)

Adds an integration test to verify SendPayment successfully uses
invoice route hints for payments involving private channels.
appilon added a commit to appilon/lnd that referenced this issue Apr 16, 2025
…tningnetwork#6601)

Adds an integration test to verify SendPayment successfully uses
invoice route hints for payments involving private channels.
appilon added a commit to appilon/lnd that referenced this issue Apr 16, 2025
…tningnetwork#6601)

Adds an integration test to verify SendPayment successfully uses
invoice route hints for payments involving private channels.
appilon added a commit to appilon/lnd that referenced this issue Apr 17, 2025
…tningnetwork#6601)

Adds --route_hints flag to sendpayment for --keysend and --amp payments.
CLI will error if neither is specified or if --pay_req is specified
since bolt 11 already handles route hinting. Hints should be JSON
encoded (see usage for example).

Adds --route_hints flag to queryroutes (no restrictions).

Adds integration tests for query routes over RPC, and manual
keysend/amp over RPC to emulate the new feature. Testing revealed route
hinting did not work for standard payment (w/ or w/o --pay_addr).
appilon added a commit to appilon/lnd that referenced this issue Apr 17, 2025
…tningnetwork#6601)

Adds --route_hints flag to sendpayment for --keysend and --amp payments.
CLI will error if neither is specified or if --pay_req is specified,
however it appears --pay_req codepath is unreachable, left for
robustness. Hints should be JSON encoded (see usage for example).

Adds --route_hints flag to queryroutes (no restrictions).

Adds integration tests for query routes over RPC, and manual
keysend/amp over RPC to emulate the new feature. Testing revealed route
hinting did not work for standard payment (w/ or w/o --pay_addr).
appilon added a commit to appilon/lnd that referenced this issue Apr 17, 2025
…tningnetwork#6601)

Adds --route_hints flag to sendpayment for --keysend and --amp payments.
CLI will error if neither is specified or if --pay_req is specified,
however it appears --pay_req codepath is unreachable, left for
robustness. Hints should be JSON encoded (see usage for example).

Adds --route_hints flag to queryroutes (no restrictions).

Adds integration tests for query routes over RPC, and manual
keysend/amp over RPC to emulate the new feature. Testing revealed route
hinting did not work for standard payment (w/ or w/o --pay_addr).
appilon added a commit to appilon/lnd that referenced this issue Apr 19, 2025
…tningnetwork#6601)

Adds --route_hints flag to sendpayment for --keysend and --amp payments.
CLI will error if neither is specified or if --pay_req is specified,
however it appears --pay_req codepath is unreachable, left for
robustness. Hints should be JSON encoded (see usage for example).

Adds --route_hints flag to queryroutes (no restrictions).

Adds integration tests for query routes over RPC, and manual
keysend/amp over RPC to emulate the new feature. Testing revealed route
hinting did not work for standard payment (w/ or w/o --pay_addr).
appilon added a commit to appilon/lnd that referenced this issue Apr 19, 2025
…tningnetwork#6601)

Adds --route_hints flag to sendpayment for --keysend and --amp payments.
CLI will error if neither is specified. Hints should be JSON encoded
(see usage for example).

Adds --route_hints flag to queryroutes (no restrictions).

Adds integration tests for query routes over RPC, and manual
keysend/amp over RPC to emulate the new feature. Testing revealed route
hinting did not work for standard payment (w/ or w/o --pay_addr).
appilon added a commit to appilon/lnd that referenced this issue Apr 25, 2025
…tningnetwork#6601)

Adds --route_hints flag to sendpayment for --keysend and --amp payments.
CLI will error if neither is specified. Hints should be JSON encoded
(see usage for example).

Adds --route_hints flag to queryroutes (no restrictions).

Adds integration tests for query routes over RPC, and manual
keysend/amp over RPC to emulate the new feature. Testing revealed route
hinting did not work for standard payment (w/ or w/o --pay_addr).
appilon added a commit to appilon/lnd that referenced this issue May 1, 2025
…tningnetwork#6601)

Adds --route_hints flag to sendpayment for --keysend payments.
Hints should be JSON encoded (see usage for example).

Adds --route_hints flag to queryroutes (no restrictions).

Adds integration tests for query routes over RPC, and manual
keysend over RPC to emulate the new feature. Testing revealed route
hinting did not work for standard payment (w/ or w/o --pay_addr).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner Issues suitable for new developers good first issue Issues suitable for first time contributors to LND lncli payments Related to invoices/payments
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

5 participants