Skip to content

BOLT12 recurrence spec update #8398

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

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

This means we now do cancellation of recurring offers.

We use the experimental range for this, instead of the actual range used in the spec PR (lightning/bolts#1240)

Closes: #8392

Use months instead.

Changelog-EXPERIMENTAL: Protocol: BOLT 12 recurrence `years` removed; use 12 x months.
Offer_absolute_expiry should be used if you want to require starting at the start.

Changelog-EXPERIMENTAL: Protocol: BOLT 12 recurrence `start_any_period` removed, use expiry if you need to restrict when they can start using the offer.
Changes:
* Fields renumbered to their draft values + billion.
* offer_recurrence now comes in compulsory or optional (backwards compat) flavors.
* `proportional_amount` is now inside `offer_recurrence_base` not `offer_recurrence_paywindow`.
* New field `invreq_recurrence_cancel`.

Signed-off-by: Rusty Russell <[email protected]>
And fix incorrect comment on its use in the header!

Signed-off-by: Rusty Russell <[email protected]>
If you're doing just-in-time stock management, it would be annoying to
discover this wasn't allowed!

Signed-off-by: Rusty Russell <[email protected]>
We added this to the recurrence spec: the offer expiration only applies to the
first request, not subsequent ones.

Signed-off-by: Rusty Russell <[email protected]>
We're going to want this for cancelrecurringinvoice.

Signed-off-by: Rusty Russell <[email protected]>
We're going to want this for cancelrecurringinvoice.

Signed-off-by: Rusty Russell <[email protected]>
We're going to want this for sending invreq_recurrence_cancel invoice_requests.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell added this to the v25.09 milestone Jul 7, 2025
@rustyrussell rustyrussell force-pushed the guilt/bolt12-recurrence-update branch from 5d23bca to efafa63 Compare July 8, 2025 00:44
`fetchinvoice` variant, for setting invreq_recurrence_cancel instead.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-EXPERIMENTAL: `cancelrecurringinvoice` command to send new "don't expect any more invoice requests" msg to recurring bolt12 invoices.
In this case, we make an immediately-expiring invoice.  This correctly blocks
any successive requests for invoices, as per the spec requirement.

This means we have to handle invoice_requests without reply_path, amounts
or quantity *if* they specify invreq_recurrence_cancel.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell force-pushed the guilt/bolt12-recurrence-update branch from efafa63 to 9d855fa Compare July 8, 2025 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update bolt12 recurrence support
1 participant