Add a BlindedMessagePath constructor for external recipients#4742
Add a BlindedMessagePath constructor for external recipients#4742dunxen wants to merge 1 commit into
BlindedMessagePath constructor for external recipients#4742Conversation
|
🎉 This PR is now ready for review! |
|
The code is consistent with my prior review. The implementation is symmetric and correct, and the changelog now documents both new APIs (resolving my prior comment). No issues found. The previously-flagged changelog issue (missing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4742 +/- ##
==========================================
- Coverage 86.90% 86.29% -0.61%
==========================================
Files 161 160 -1
Lines 111680 111615 -65
Branches 111680 111615 -65
==========================================
- Hits 97052 96315 -737
- Misses 12115 12660 +545
- Partials 2513 2640 +127
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Putting this in draft. Also need a similar constructor for |
d6dee2b to
8155722
Compare
Add `new_for_external_recipient`, which builds a recipient hop using standard BOLT-4 ChaCha20Poly1305 (empty AAD) and no `MessageContext` or deanonymisation protections. A similar constructor is introduced for `BlindedPaymentPath` to build a compatible payee hop. Tests by Claude
8155722 to
d593175
Compare
We're currently working on BOLT 12 receives in Bark and, at the moment, we run a CLN node for
handling lightning sends and receives atomically for clients of our ark server.
For BOLT 12 receives, we will allow clients to create their own offers (with their own per-offer derived issuer_signing_pubkey), and register them with the server. Requests for invoices on that offer are forwarded to clients who generate and sign invoices themselves. The CLN node is still the final recipient and introduction node on the lightning side. The rest of the flow is similar to our atomic BOLT 11 hold invoice/HTLC VTXO flow.
All our client lightning code uses LDK and we need a way to construct a recipient hop that CLN actually understands with no authentication. Deanonymisation protections are irrelevant in this scenario.
I'm open to ideas if you'd prefer not to have such a constructor just to cover our case as it is somewhat new.