Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
recurrence_sig must be a separate field: no point mirroring it into the
invoice.
  • Loading branch information
rustyrussell committed Oct 12, 2020
1 parent fbb9456 commit 07c45e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions 12-offer-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,12 @@ response to an offer (usually via an `onion_message` `invoice_request` field).
1. type: 36 (`recurrence_counter`)
2. data:
* [`tu64`:`counter`]
* [`signature`:`counter_sig`]
1. type: 38 (`payer_key`)
2. data:
* [`pubkey32`:`key`]
1. type: 50 (`recurrence_sig`)
2. data:
* [`signature`:`sig`]

## Requirements for Invoice Requests

Expand Down Expand Up @@ -401,14 +403,15 @@ The writer of an invoice_request:
- for any successive requests:
- MUST use the same `payer_key` as the initial request.
- MUST set `recurrence_counter` `counter` to one greater than the highest-paid invoice.
- MUST set `recurrence_counter` `counter_sig` to
- MUST set `recurrence_sig` `sig` to
SIG('lnr_recurrence_counter',`offer_id`||`counter`,`payer_key`).
- SHOULD NOT send an `invoice_request` for a period which has
already passed.
- SHOULD NOT send an `invoice_request` for a period whose
immediate predecessor has not yet begun.
- otherwise:
- MUST NOT set `recurrence_counter`.
- MUST NOT set `recurrence_sig`.
- if the invoice_request is for a partial or full refund for a previously-paid
invoice:
- SHOULD set `refunded_payment_hash` to the `payment_hash` of that
Expand Down

0 comments on commit 07c45e9

Please sign in to comment.