What changed, and why it matters
This commit adds data definitions for BOLT12 (a newer Lightning Network protocol for offers and invoices) to Electrum's wire format specification file. It is purely a schema addition with no executable code changes, no bug fixes, and no security behavior changes.
No security action required. Treat as normal feature/protocol-support commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit extends electrum/lnwire/onion_wire.csv with TLV (type-length-value) definitions for BOLT12 messages: offer, invoice_request, invoice, invoice_error, plus subtypes blinded_payinfo and fallback_address. These are declarative wire-format definitions used by Electrum’s Lightning code generator/parser. There are no logic changes, no validation changes, no cryptographic changes, and no runtime code paths modified.
Changed components
electrum/lnwire/onion_wire.csvInspect captured patch +138 / −0
diff --git a/electrum/lnwire/onion_wire.csv b/electrum/lnwire/onion_wire.csv
index 06b55da..c3e015a 100644
--- a/electrum/lnwire/onion_wire.csv
+++ b/electrum/lnwire/onion_wire.csv
@@ -116,3 +116,141 @@ subtype,blinded_path_hop
subtypedata,blinded_path_hop,blinded_node_id,point,
subtypedata,blinded_path_hop,enclen,u16,
subtypedata,blinded_path_hop,encrypted_recipient_data,byte,enclen
+tlvtype,offer,offer_chains,2
+tlvdata,offer,offer_chains,chains,chain_hash,...
+tlvtype,offer,offer_metadata,4
+tlvdata,offer,offer_metadata,data,byte,...
+tlvtype,offer,offer_currency,6
+tlvdata,offer,offer_currency,iso4217,utf8,...
+tlvtype,offer,offer_amount,8
+tlvdata,offer,offer_amount,amount,tu64,
+tlvtype,offer,offer_description,10
+tlvdata,offer,offer_description,description,utf8,...
+tlvtype,offer,offer_features,12
+tlvdata,offer,offer_features,features,byte,...
+tlvtype,offer,offer_absolute_expiry,14
+tlvdata,offer,offer_absolute_expiry,seconds_from_epoch,tu64,
+tlvtype,offer,offer_paths,16
+tlvdata,offer,offer_paths,paths,blinded_path,...
+tlvtype,offer,offer_issuer,18
+tlvdata,offer,offer_issuer,issuer,utf8,...
+tlvtype,offer,offer_quantity_max,20
+tlvdata,offer,offer_quantity_max,max,tu64,
+tlvtype,offer,offer_issuer_id,22
+tlvdata,offer,offer_issuer_id,id,point,
+tlvtype,invoice_request,invreq_metadata,0
+tlvdata,invoice_request,invreq_metadata,blob,byte,...
+tlvtype,invoice_request,offer_chains,2
+tlvdata,invoice_request,offer_chains,chains,chain_hash,...
+tlvtype,invoice_request,offer_metadata,4
+tlvdata,invoice_request,offer_metadata,data,byte,...
+tlvtype,invoice_request,offer_currency,6
+tlvdata,invoice_request,offer_currency,iso4217,utf8,...
+tlvtype,invoice_request,offer_amount,8
+tlvdata,invoice_request,offer_amount,amount,tu64,
+tlvtype,invoice_request,offer_description,10
+tlvdata,invoice_request,offer_description,description,utf8,...
+tlvtype,invoice_request,offer_features,12
+tlvdata,invoice_request,offer_features,features,byte,...
+tlvtype,invoice_request,offer_absolute_expiry,14
+tlvdata,invoice_request,offer_absolute_expiry,seconds_from_epoch,tu64,
+tlvtype,invoice_request,offer_paths,16
+tlvdata,invoice_request,offer_paths,paths,blinded_path,...
+tlvtype,invoice_request,offer_issuer,18
+tlvdata,invoice_request,offer_issuer,issuer,utf8,...
+tlvtype,invoice_request,offer_quantity_max,20
+tlvdata,invoice_request,offer_quantity_max,max,tu64,
+tlvtype,invoice_request,offer_issuer_id,22
+tlvdata,invoice_request,offer_issuer_id,id,point,
+tlvtype,invoice_request,invreq_chain,80
+tlvdata,invoice_request,invreq_chain,chain,chain_hash,
+tlvtype,invoice_request,invreq_amount,82
+tlvdata,invoice_request,invreq_amount,msat,tu64,
+tlvtype,invoice_request,invreq_features,84
+tlvdata,invoice_request,invreq_features,features,byte,...
+tlvtype,invoice_request,invreq_quantity,86
+tlvdata,invoice_request,invreq_quantity,quantity,tu64,
+tlvtype,invoice_request,invreq_payer_id,88
+tlvdata,invoice_request,invreq_payer_id,key,point,
+tlvtype,invoice_request,invreq_payer_note,89
+tlvdata,invoice_request,invreq_payer_note,note,utf8,...
+tlvtype,invoice_request,invreq_paths,90
+tlvdata,invoice_request,invreq_paths,paths,blinded_path,...
+tlvtype,invoice_request,signature,240
+tlvdata,invoice_request,signature,sig,bip340sig,
+tlvtype,invoice,invreq_metadata,0
+tlvdata,invoice,invreq_metadata,blob,byte,...
+tlvtype,invoice,offer_chains,2
+tlvdata,invoice,offer_chains,chains,chain_hash,...
+tlvtype,invoice,offer_metadata,4
+tlvdata,invoice,offer_metadata,data,byte,...
+tlvtype,invoice,offer_currency,6
+tlvdata,invoice,offer_currency,iso4217,utf8,...
+tlvtype,invoice,offer_amount,8
+tlvdata,invoice,offer_amount,amount,tu64,
+tlvtype,invoice,offer_description,10
+tlvdata,invoice,offer_description,description,utf8,...
+tlvtype,invoice,offer_features,12
+tlvdata,invoice,offer_features,features,byte,...
+tlvtype,invoice,offer_absolute_expiry,14
+tlvdata,invoice,offer_absolute_expiry,seconds_from_epoch,tu64,
+tlvtype,invoice,offer_paths,16
+tlvdata,invoice,offer_paths,paths,blinded_path,...
+tlvtype,invoice,offer_issuer,18
+tlvdata,invoice,offer_issuer,issuer,utf8,...
+tlvtype,invoice,offer_quantity_max,20
+tlvdata,invoice,offer_quantity_max,max,tu64,
+tlvtype,invoice,offer_issuer_id,22
+tlvdata,invoice,offer_issuer_id,id,point,
+tlvtype,invoice,invreq_chain,80
+tlvdata,invoice,invreq_chain,chain,chain_hash,
+tlvtype,invoice,invreq_amount,82
+tlvdata,invoice,invreq_amount,msat,tu64,
+tlvtype,invoice,invreq_features,84
+tlvdata,invoice,invreq_features,features,byte,...
+tlvtype,invoice,invreq_quantity,86
+tlvdata,invoice,invreq_quantity,quantity,tu64,
+tlvtype,invoice,invreq_payer_id,88
+tlvdata,invoice,invreq_payer_id,key,point,
+tlvtype,invoice,invreq_payer_note,89
+tlvdata,invoice,invreq_payer_note,note,utf8,...
+tlvtype,invoice,invreq_paths,90
+tlvdata,invoice,invreq_paths,paths,blinded_path,...
+tlvtype,invoice,invoice_paths,160
+tlvdata,invoice,invoice_paths,paths,blinded_path,...
+tlvtype,invoice,invoice_blindedpay,162
+tlvdata,invoice,invoice_blindedpay,payinfo,blinded_payinfo,...
+tlvtype,invoice,invoice_created_at,164
+tlvdata,invoice,invoice_created_at,timestamp,tu64,
+tlvtype,invoice,invoice_relative_expiry,166
+tlvdata,invoice,invoice_relative_expiry,seconds_from_creation,tu32,
+tlvtype,invoice,invoice_payment_hash,168
+tlvdata,invoice,invoice_payment_hash,payment_hash,sha256,
+tlvtype,invoice,invoice_amount,170
+tlvdata,invoice,invoice_amount,msat,tu64,
+tlvtype,invoice,invoice_fallbacks,172
+tlvdata,invoice,invoice_fallbacks,fallbacks,fallback_address,...
+tlvtype,invoice,invoice_features,174
+tlvdata,invoice,invoice_features,features,byte,...
+tlvtype,invoice,invoice_node_id,176
+tlvdata,invoice,invoice_node_id,node_id,point,
+tlvtype,invoice,signature,240
+tlvdata,invoice,signature,sig,bip340sig,
+subtype,blinded_payinfo
+subtypedata,blinded_payinfo,fee_base_msat,u32,
+subtypedata,blinded_payinfo,fee_proportional_millionths,u32,
+subtypedata,blinded_payinfo,cltv_expiry_delta,u16,
+subtypedata,blinded_payinfo,htlc_minimum_msat,u64,
+subtypedata,blinded_payinfo,htlc_maximum_msat,u64,
+subtypedata,blinded_payinfo,flen,u16,
+subtypedata,blinded_payinfo,features,byte,flen
+subtype,fallback_address
+subtypedata,fallback_address,version,byte,
+subtypedata,fallback_address,len,u16,
+subtypedata,fallback_address,address,byte,len
+tlvtype,invoice_error,erroneous_field,1
+tlvdata,invoice_error,erroneous_field,tlv_fieldnum,tu64,
+tlvtype,invoice_error,suggested_value,3
+tlvdata,invoice_error,suggested_value,value,byte,...
+tlvtype,invoice_error,error,5
+tlvdata,invoice_error,error,msg,utf8,...
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.