rn-ldk icon indicating copy to clipboard operation
rn-ldk copied to clipboard

Generate a custom `r_preimage` to invoice

Open LAMike310 opened this issue 3 years ago • 2 comments

I would like to know if it's possible for a user to generate their own payment secret for a LN invoice.

With LND, you can add a field called r_preimage to the /invoices POST endpoint to create your own payment secret. It's optional to add it, and if it is blank, then there is one made up for you that is 32 bytes in length & hex encoded.

Can this be done with LDK?

https://app.swaggerhub.com/apis/lnd-rest/rpc-proto/0.4-beta#/Lightning/AddInvoice

LAMike310 avatar Nov 19 '21 20:11 LAMike310

should be possible with ldk, however rn-ldk doesn't have an interface for that, yet

Overtorment avatar Nov 22 '21 11:11 Overtorment

Interesting, thanks @Overtorment. Is there a way to get a list of invoices paid so I can get access to the generated payment secrets?

LAMike310 avatar Dec 01 '21 19:12 LAMike310