You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make offer_description optional if there's no amount; this is the common "tip" case.
Note that this implies a minimal offer is simply a bech32 encoding of the offer_node_id field, or "lno1" + bech32(0x2242<node_id>). This might become normalized as the "default offer" to which you can throw sats to a node directly?
Copy file name to clipboardExpand all lines: 12-offer-encoding.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,8 +228,6 @@ The human-readable prefix for offers is `lno`.
228
228
229
229
A writer of an offer:
230
230
- MUST NOT set any tlv fields greater or equal to 80, or tlv field 0.
231
-
- MUST set `offer_description` to a complete description of the purpose
232
-
of the payment.
233
231
- if the chain for the invoice is not solely bitcoin:
234
232
- MUST specify `offer_chains` the offer is valid for.
235
233
- otherwise:
@@ -243,9 +241,12 @@ A writer of an offer:
243
241
- MUST specify `offer_currency``iso4217` as an ISO 4712 three-letter code.
244
242
- MUST specify `offer_amount` in the currency unit adjusted by the ISO 4712
245
243
exponent (e.g. USD cents).
244
+
- MUST set `offer_description` to a complete description of the purpose
245
+
of the payment.
246
246
- otherwise:
247
247
- MUST NOT set `offer_amount`
248
248
- MUST NOT set `offer_currency`
249
+
- MAY set `offer_description`
249
250
- MAY set `offer_metadata` for its own use.
250
251
- if it supports bolt12 offer features:
251
252
- MUST set `offer_features`.`features` to the bitmap of bolt12 features.
@@ -291,7 +292,7 @@ A reader of an offer:
291
292
- otherwise: (`offer_chains` is set):
292
293
- if the node does not accept invoices for any of the `chains`:
293
294
- MUST NOT respond to the offer
294
-
- if `offer_description` is not set:
295
+
- if `offer_amount` is set and `offer_description` is not set:
295
296
- MUST NOT respond to the offer.
296
297
- if neither `offer_node_id` nor `offer_paths` are set:
297
298
- MUST NOT respond to the offer.
@@ -332,6 +333,8 @@ Because `offer_amount` can be in a different currency (using the `offer_currency
332
333
useful in a system which bases it on available stock. It would be
333
334
painful to have to special-case the "only one left" offer generation.
334
335
336
+
Offers can be used to simply send money without expecting anything in return (tips, kudos, donations, etc), which means the description field is optional (the `offer_issuer` field is very useful for this case!); if you are charging for something specific, the description is vital for the user to know what it was they paid for.
337
+
335
338
# Invoice Requests
336
339
337
340
Invoice Requests are a request for an invoice; the human-readable prefix for
@@ -449,7 +452,8 @@ The writer:
449
452
- otherwise:
450
453
- MUST NOT set `invreq_quantity`
451
454
- otherwise (not responding to an offer):
452
-
- MUST set (or not set) `offer_description`, `offer_absolute_expiry` and `offer_issuer` as it would for an offer.
455
+
- MUST set `offer_description` to a complete description of the purpose of the payment.
456
+
- MUST set (or not set) `offer_absolute_expiry` and `offer_issuer` as it would for an offer.
453
457
- MUST set `invreq_payer_id` (as it would set `offer_node_id` for an offer).
454
458
- MUST set `invreq_paths` as it would set (or not set) `offer_paths` for an offer.
455
459
- MUST NOT include `signature`, `offer_metadata`, `offer_chains`, `offer_amount`, `offer_currency`, `offer_features`, `offer_quantity_max`, `offer_paths` or `offer_node_id`
0 commit comments