Skip to content

Commit

Permalink
f make invreq in payment onion required
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinewallace committed Jun 24, 2024
1 parent dc6599f commit 5a36154
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
6 changes: 2 additions & 4 deletions 04-onion-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,8 @@ The writer of the TLV `payload`:
- MUST set `sender_provided_payment_preimage` to randomly generated unique bytes.
- MUST set `update_add_htlc.payment_hash` to match the SHA256 hash of
`sender_provided_payment_preimage`.
- if the `payment_onion_invreq` feature is set in the invoice:
- MUST or MAY set `invoice_request` to the BOLT 12 invoice request
corresponding to this HTLC, based on whether `payment_onion_invreq`
is optional or compulsory.
- MUST set `invoice_request` to the BOLT 12 invoice request
corresponding to this HTLC.
- otherwise:
- MUST NOT set `sender_provided_payment_preimage`.
- MUST NOT include any other tlv field.
Expand Down
2 changes: 0 additions & 2 deletions 09-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ The Context column decodes as follows:
* `9`: presented in [BOLT 11](11-payment-encoding.md) invoices.
* `B`: presented in the `allowed_features` field of a blinded path.
* `R`: presented in [BOLT 12](12-offers.md) invoice requests.
* `V`: presented in [BOLT 12](12-offers.md) invoices.

| Bits | Name | Description | Context | Dependencies | Link |
|-------|-----------------------------------|-----------------------------------------------------------|----------|---------------------------|-----------------------------------------------------------------------|
Expand All @@ -55,7 +54,6 @@ The Context column decodes as follows:
| 52/53 | `option_htlc_hold` | Hold HTLCs and forward on receipt of an onion message | IN | `option_onion_messages` |
| 56/57 | `option_om_mailbox` | Store-and-forward onion messages for often-offline peers | IN | `option_onion_messages` | [BOLT #12](bolt12-offers.md) |
| 59 | `static_invoice_pay` | Supports paying BOLT 12 static invoices | R | `option_onion_messages` | [BOLT #12](bolt12-offers.md) |
| 60/61 | `payment_onion_invreq` | Include `invoice_request` in payment onion | V | | [BOLT #12](bolt12-offers.md) |

## Definitions

Expand Down
10 changes: 0 additions & 10 deletions 12-offer-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,16 +674,6 @@ the `onion_message` `invoice` field.
|------|--------------------------------------------|---------------------------------|
| 16 | Multi-part-payment support | MPP/compulsory |
| 17 | Multi-part-payment support | MPP/optional |
| 60 | Include `invoice_request` in payment onion | payment_onion_invreq/compulsory |
| 61 | Include `invoice_request` in payment onion | payment_onion_invreq/optional |

The `payment_onion_invreq` feature indicates that the payer MUST (0) or MAY (1)
repeat their invoice request in the `update_add_htlc` payment onion.

Often-offline receivers may not have received the payer's invoice request
originally if another node replied with a keysend invoice on their behalf.
Providing it to the receiver separately may be useful for verification purposes
or to supply some other data relevant to the payment.

The 'MPP support' invoice feature indicates that the payer MUST (16) or
MAY (17) use multiple part payments to pay the invoice.
Expand Down

0 comments on commit 5a36154

Please sign in to comment.