initial support bolt12 offers
This PR contains initial support for BOLT12
- parses bolt12
offerpayment identifiers, - requests bolt12
invoiceby sendinginvoice_requestvia onion message - handles
invoiceandinvoice_errorresponses - initial support for paying bolt12
invoice- currently 'abusing'
bolt11data structures likeLnAddr, to minimize changes in payment sending code path - bolt12
invoicecurrently stored inInvoice.lightning_invoicewith a prefix, because adding a new field to an@attr.sobject is a PITA when switching branches, final storage location TBD.
- currently 'abusing'
- CLI commands
add_offer,get_offer,delete_offerandlist_offersfor managing offers. - handles incoming
invoice_requestand replies withinvoiceif request can be matched with an offer. - accepts incoming HTLCs with blinding
- initial Qt GUI should be working for sending to offer
- initial QML GUI should be working for sending to offer
notes w.r.t current state:
- only first
pathininvoice_pathsis tried, iteration of multiplepathis TODO - needs gossip enabled, no support for trampoline routing yet.
- expired offers are not automatically removed from the wallet db.
- adds extra blinding field to HTLCs in
addslog, making the wallet file non-backward compatible
I have pushed a new version of https://github.com/spesmilo/electrum/commits/test_blinded_payment_onion This branch adds a unit test for the blinded payment onion creation test vector from the BOLT
rebase after #10230
I pushed a commit to your branch, that adds a regtest for the scenario alice pays carol throught bob. Please try to make this work first; we can worry about the GUI later.
Edit: sorry, I had to force-push, because I made a mistake. The branch is now rebased on master.
adds extra blinding field to HTLCs in adds log, making the wallet file non-backward compatible
there should be a wallet_db upgrade for that