lnd icon indicating copy to clipboard operation
lnd copied to clipboard

[feature]: Support MPP record (alias Payment_Address) for more RPC calls

Open ziggie1984 opened this issue 1 year ago • 6 comments

We should always enforce MPP payments because they include the payment_secret which has been introduced a while ago and therefore we should also be able to include the MPP record in the following RPC-Calls.

They are now required in the specification for writer and reader of an invoice, and when sending via a route we should also make sure we include an MPP record.

relates to https://github.com/lightningnetwork/lnd/pull/9752

Tasks to do:

  1. QueryRoutes should support including an MPP record (payment_addr) when querying the route which can then be used in SendToRoute
  2. SendToRoute should also enforce an MPP record.

Extras:

  1. Allow AMP Record in buildroute
  2. Allow Setting AMP record for QueryRoutes
  3. Allow SendToRoute with an AMP record

ziggie1984 avatar Jun 16 '25 19:06 ziggie1984

I want to contribute

ancientdev0x avatar Jun 17 '25 05:06 ancientdev0x

This should also include the buildroute rpc: https://github.com/lightningnetwork/lnd/pull/9752#issuecomment-2973528775

ziggie1984 avatar Jun 18 '25 21:06 ziggie1984

@ziggie1984 I've been working on an initial implementation for this, pushed up what I have so far to https://github.com/lightningnetwork/lnd/pull/10091. There's a lot of work left but at least it's a starting point. Would love feedback/suggestions.

kwsantiago avatar Jul 18 '25 04:07 kwsantiago

Hi! I see this issue has been stale for a while. I'm a Summer of Bitcoin applicant and I'd like to pick this up and finish the work started by the previous contributor. Is it okay if I take this over?

malsomesh9 avatar Feb 01 '26 05:02 malsomesh9

Consolidating related issue here. The following has been closed as a duplicate:

  • #4020 — Original request (from lnd 0.9.0 era) that QueryRoutes/SendToRoute and other payment APIs should accept total_amount and payment_address fields. Notes a workaround: SendToRoute can accept the payment address, but you must manually mutate the route, and QueryRoutes won't properly account for the TLV record size (workaround: add dummy custom records when querying, remove when sending).

litbot-9000 avatar Feb 21 '26 00:02 litbot-9000

@ziggie1984. Hi. thought i'd give this a go seeing as no one is assigned to it - https://github.com/lightningnetwork/lnd/pull/10801

Hope this helps!

murraystewart96 avatar May 12 '26 16:05 murraystewart96