Skip to content

Commit 8605772

Browse files
BOLT 12: clarify that offer_amount must be greater than zero
Add explicit requirements that: - Writers MUST set offer_amount greater than zero when present - Readers MUST NOT respond to offers where offer_amount is zero This addresses ambiguity about whether offer_amount=0 is valid. Since omitting offer_amount indicates no minimum is required, a zero value when present would be semantically incorrect. Fixes #1314
1 parent 34455ff commit 8605772

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

12-offer-encoding.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ A writer of an offer:
240240
- SHOULD omit `offer_chains`, implying that bitcoin is only chain.
241241
- if a specific minimum `offer_amount` is required for successful payment:
242242
- MUST set `offer_amount` to the amount expected (per item).
243+
- MUST set `offer_amount` greater than zero.
243244
- if the currency for `offer_amount` is that of all entries in `chains`:
244245
- MUST specify `offer_amount` in multiples of the minimum lightning-payable unit
245246
(e.g. milli-satoshis for bitcoin).
@@ -299,6 +300,8 @@ A reader of an offer:
299300
- MUST NOT respond to the offer
300301
- if `offer_amount` is set and `offer_description` is not set:
301302
- MUST NOT respond to the offer.
303+
- if `offer_amount` is set and is not greater than zero:
304+
- MUST NOT respond to the offer.
302305
- if `offer_currency` is set and `offer_amount` is not set:
303306
- MUST NOT respond to the offer.
304307
- if neither `offer_issuer_id` nor `offer_paths` are set:

0 commit comments

Comments
 (0)