-
Notifications
You must be signed in to change notification settings - Fork 3.3k
initial support bolt12 offers #10110
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
base: master
Are you sure you want to change the base?
Conversation
final_cltv_abs=final_cltv_abs, | ||
total_msat=total_msat, | ||
bolt12_invoice=bolt12_invoice) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bolt12_invoice could be an optional arg
self.payment_key = payment_hash + payment_secret | ||
Logger.__init__(self) | ||
|
||
self.bolt12_invoice = bolt12_invoice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apparently unused
""" | ||
erd_key = 'encrypted_data' # used in 'payload' TLV | ||
if tlv_stream_name == 'onionmsg_tlv': # used in 'onionmsg_tlv' TLV | ||
erd_key = 'encrypted_recipient_data' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x = a if t else b
92419fc
to
59a86cd
Compare
…ation and schnorr-sign over tlvs, implicit en/decode utf8 fields, schnorr signature verification.
…ce_error reply message
…ice field, due to inflexibility of adding fields to @attr.s objects making it hard to use wallets between branches. TODO: determine final place for bolt12 invoice data in Invoice
add lnonion.calc_hops_data_for_blinded_payment, initial support for routing to blinded paths in lnpeer, lnworker
…ply_paths. the former also calculates payinfo information for payment scenarios.
- offers are not saved and only kept in memory, so only for testing - offer_paths are taken from the active channels with peers supporting onion messages - only the first channel is included in offer_paths, with the peer as the introduction point of the blinded path - the offer key is the same as path_id used in the blinded path - expiry is included in the offer but ignored elsewhere
I have pushed a new version of https://github.com/spesmilo/electrum/commits/test_blinded_payment_onion |
This PR contains initial support for BOLT12
offer
payment identifiers,invoice
by sendinginvoice_request
via onion messageinvoice
andinvoice_error
responsesinvoice
bolt11
data structures likeLnAddr
, to minimize changes in payment sending code pathinvoice
currently stored inInvoice.lightning_invoice
with a prefix, because adding a new field to an@attr.s
object is a PITA when switching branches, final storage location TBD.notes w.r.t current state:
offer_path
inoffer
is queried, iteration of multipleoffer_path
is TODOpath
ininvoice_paths
is tried, iteration of multiplepath
is TODOinvoice
has no blinded path (introduction point == destination) succeedinvoice
has blinded path w. >=2 hops fail when testing against CLN, non-final hop however does resolve the next hop, but next hop errors with a invalid HMAC error.calc_hops_data_for_blinded_payment
is not computing per-hop fee/amount/cltv values for blinded hops correctly yet.